Commit d176ce48 authored by 1483922988@qq.com's avatar 1483922988@qq.com

修改bug

parent fa996d57
...@@ -73,9 +73,11 @@ ...@@ -73,9 +73,11 @@
<el-input rows="3" class="text_style" type="textarea" v-model="form.feedback" maxlength="500" show-word-limit :disabled="isView" /> <el-input rows="3" class="text_style" type="textarea" v-model="form.feedback" maxlength="500" show-word-limit :disabled="isView" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20" v-if="isView">
<el-form-item <el-form-item>
><el-button size="mini" v-if="isView" type="text" icon="el-icon-collection" @click="$emit(handleCustomerFollowAdd, form)" v-has-permi="['ecw:customer:follow-add-plan']">{{ $t("增加计划") }} </el-button> <div style="text-align: right">
<el-button size="mini" icon="el-icon-collection" type="primary" @click="$emit('handleCustomerFollowAdd', form)" v-has-permi="['ecw:customer:follow-add-plan']">{{ $t("增加计划") }} </el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
...@@ -354,10 +356,14 @@ export default { ...@@ -354,10 +356,14 @@ export default {
this.form = row this.form = row
this.customerFollow.dialogVisible = true this.customerFollow.dialogVisible = true
}, },
handleAdd() { async handleAdd() {
this.isView = false this.isView = false
this.customerFollow.dialogVisible = true this.customerFollow.dialogVisible = true
this.reset() this.reset()
let r = await getFollowupNewNumber()
console.log(r)
this.form.number = r.data
}, },
async handleUpdate(row, flag) { async handleUpdate(row, flag) {
this.isView = false this.isView = false
...@@ -370,6 +376,7 @@ export default { ...@@ -370,6 +376,7 @@ export default {
this.form = { this.form = {
...row, ...row,
id: null,
parentNumber: row.number, parentNumber: row.number,
followTime: row.nextTime, followTime: row.nextTime,
nextTime: "", nextTime: "",
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13" v-show="form.roles && form.roles.indexOf('2') !== -1"> <el-col :span="12" v-show="form.roles && form.roles.indexOf('2') !== -1">
<el-form-item :label="$t('所属代理')" prop="agentId"> <el-form-item :label="$t('所属代理')" prop="agentId">
<el-select filterable clearable v-model="form.agentId" :placeholder="$t('请选择所属代理')"> <el-select filterable clearable v-model="form.agentId" :placeholder="$t('请选择所属代理')">
<el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id" /> <el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id" />
...@@ -191,7 +191,6 @@ ...@@ -191,7 +191,6 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('出货渠道')" prop="transportType"> <el-form-item :label="$t('出货渠道')" prop="transportType">
<!-- <dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>-->
<el-checkbox-group v-model="form.transportType"> <el-checkbox-group v-model="form.transportType">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="[3].includes(+item.value)">{{ item.label }}</el-checkbox> <el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="[3].includes(+item.value)">{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -212,6 +211,7 @@ ...@@ -212,6 +211,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('主营类别')" prop="productTypes"> <el-form-item :label="$t('主营类别')" prop="productTypes">
<el-row :gutter="10"> <el-row :gutter="10">
...@@ -1119,9 +1119,7 @@ export default { ...@@ -1119,9 +1119,7 @@ export default {
companyEn: undefined, companyEn: undefined,
payerName: undefined, payerName: undefined,
address: undefined, address: undefined,
productType: undefined, productTypes: [],
// productId: undefined,
// pickupPoint: undefined,
pickupPoints: [], pickupPoints: [],
productIds: [], productIds: [],
memberId: undefined, memberId: undefined,
...@@ -1189,11 +1187,10 @@ export default { ...@@ -1189,11 +1187,10 @@ export default {
productIds: this.stringArrToNumberArr(response.data.productIds), productIds: this.stringArrToNumberArr(response.data.productIds),
busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds), busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds),
competitorIds: Number(response.data.competitorIds), competitorIds: Number(response.data.competitorIds),
productTypes: response.data.productTypes ? response.data.productTypes.split(",") : [] productTypes: this.stringArrToNumberArr(response.data.productTypes)
} }
if (this.form.productType) { if (this.form.productTypes.length) {
console.log("1231", this.form.productType) this.getProductListFn(this.form.productTypes)
this.getProductListFn(this.form.productType)
} }
console.log(this.form) console.log(this.form)
...@@ -1298,15 +1295,6 @@ export default { ...@@ -1298,15 +1295,6 @@ export default {
customerId() { customerId() {
return this.$route.params.customerId return this.$route.params.customerId
}, },
/* userMemberUser(){
let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0
})
return [...this.selectMemberList,...list]
}, */
productListFilter() {
return this.productList.filter((p) => p.typeId === this.form.productType)
},
customerSelectFn() { customerSelectFn() {
if (this.recommended.length > 0) { if (this.recommended.length > 0) {
let i = this.customerSelect.find((item) => item.id === this.recommended[0].id) let i = this.customerSelect.find((item) => item.id === this.recommended[0].id)
......
...@@ -222,7 +222,29 @@ ...@@ -222,7 +222,29 @@
<el-tab-pane name="quote" :label="$t('报价')"> <el-tab-pane name="quote" :label="$t('报价')">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small" ref="handleOffer">
<el-form-item :label="$t('编号')" prop="searchNumber">
<el-input v-model.trim="queryOfferParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model.trim="queryOfferParams.searchCustomer" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('联系方式')" prop="relationPhone">
<el-input v-model.trim="queryOfferParams.relationPhone" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationPhone = queryOfferParams.relationPhone.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('区号')" prop="relationAreaCode">
<el-input v-model.trim="queryOfferParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationAreaCode = queryOfferParams.relationAreaCode.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('始发地')" prop="departureId">
<el-select v-model="queryOfferParams.departureId" :placeholder="$t('请选择始发地')" clearable>
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery"> <el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option> <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
...@@ -238,6 +260,23 @@ ...@@ -238,6 +260,23 @@
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option> <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户经理')" prop="salesmanIds">
<user-selector v-model="queryOfferParams.salesmanIds" multiple clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('销售阶段')" prop="statusList">
<dict-selector :type="DICT_TYPE.ECW_OFFER_STATUS" multiple v-model="queryOfferParams.statusList" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('重要程度')" prop="importances">
<el-select v-model="queryOfferParams.importances" multiple :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option v-for="item in [1, 2, 3, 4, 5]" :label="item" :value="item" :key="item"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="queryTmp.createTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getInfoListOfferPage">{{ $t("搜索") }}</el-button> <el-button type="primary" @click="getInfoListOfferPage">{{ $t("搜索") }}</el-button>
<el-button type="primary" @click="handleOfferReset">{{ $t("重置") }}</el-button> <el-button type="primary" @click="handleOfferReset">{{ $t("重置") }}</el-button>
...@@ -634,10 +673,14 @@ import { getWarehouseList } from "@/api/ecw/warehouse" ...@@ -634,10 +673,14 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { deleteOffer, cancel, recovery } from "@/api/ecw/offer" import { deleteOffer, cancel, recovery } from "@/api/ecw/offer"
import logListCommon from "@/views/ecw/offer/logListCommon" import logListCommon from "@/views/ecw/offer/logListCommon"
import { getTradeCityList } from "@/api/ecw/region"
import UserSelector from "@/components/UserSelector"
export default { export default {
name: "query", name: "query",
components: { components: {
UserSelector,
ImageDisplay, ImageDisplay,
Template, Template,
CustomerFollow, CustomerFollow,
...@@ -650,6 +693,7 @@ export default { ...@@ -650,6 +693,7 @@ export default {
getCurrencyList().then((response) => { getCurrencyList().then((response) => {
this.currecyList = response.data this.currecyList = response.data
}) })
getTradeCityList().then((res) => (this.tradeCityList = res.data))
//获取信用类型 //获取信用类型
getCreditRulePage({ page: 1, rows: 999, type: 2 }).then((r) => { getCreditRulePage({ page: 1, rows: 999, type: 2 }).then((r) => {
this.creditTypeList = r.data.list this.creditTypeList = r.data.list
...@@ -782,6 +826,10 @@ export default { ...@@ -782,6 +826,10 @@ export default {
}, },
data() { data() {
return { return {
tradeCityList: [],
queryTmp: {
createTime: ["", ""]
},
activeName: "order", activeName: "order",
currecyList: [], currecyList: [],
STATUS: { STATUS: {
...@@ -866,6 +914,11 @@ export default { ...@@ -866,6 +914,11 @@ export default {
rows: 10, rows: 10,
page: 1 page: 1
}, },
queryOfferParams: {
salesmanIds: [],
statusList: [],
importances: []
},
orderList: [], orderList: [],
orderTotal: 0, orderTotal: 0,
infoListOfferFrom: { infoListOfferFrom: {
...@@ -899,6 +952,9 @@ export default { ...@@ -899,6 +952,9 @@ export default {
} }
}, },
computed: { computed: {
exportCityList() {
return this.tradeCityList.filter((item) => item.type == 2)
},
permissions() { permissions() {
return this.$store.state.user.permissions return this.$store.state.user.permissions
}, },
...@@ -1048,22 +1104,27 @@ export default { ...@@ -1048,22 +1104,27 @@ export default {
this.getorderList() this.getorderList()
this.rucangtime = [] this.rucangtime = []
}, },
// 客户报价 formatQuery() {
getInfoListOfferPage() { let obj = {}
let queryParams = {}
//目的国 //目的国
if (this.destCountryId != null && this.destCountryId != "") { if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId obj.destCountryIds = this.destCountryId
} }
//目的城市 //目的城市
if (this.objectiveId != null && this.objectiveId != "") { if (this.objectiveId != null && this.objectiveId != "") {
queryParams.destCountryIds = this.objectiveId obj.objectiveIds = this.objectiveId
} }
//目的仓 //目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") { if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId obj.destWarehouseIds = this.destWarehouseId
} }
infoListOfferPage({ ...this.infoListOfferFrom, customerId: this.id, ...queryParams }).then((r) => { obj.beginCreateTime = this.queryTmp.createTime[0]
obj.endCreateTime = this.queryTmp.createTime[1]
return obj
},
// 客户报价
getInfoListOfferPage() {
infoListOfferPage({ ...this.infoListOfferFrom, customerId: this.id, ...this.queryOfferParams, ...this.formatQuery() }).then((r) => {
this.infoListOfferList = r.data.list this.infoListOfferList = r.data.list
this.infoListOfferTotal = r.data.total this.infoListOfferTotal = r.data.total
}) })
...@@ -1072,6 +1133,11 @@ export default { ...@@ -1072,6 +1133,11 @@ export default {
this.destCountryId = null this.destCountryId = null
this.objectiveId = null this.objectiveId = null
this.destWarehouseId = null this.destWarehouseId = null
this.queryOfferParams = {
salesmanIds: [],
statusList: [],
importances: []
}
this.infoListOfferFrom = { pageNo: 1, pageSize: 10 } this.infoListOfferFrom = { pageNo: 1, pageSize: 10 }
this.getInfoListOfferPage() this.getInfoListOfferPage()
}, },
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
" "
>{{ $t("重置") }} >{{ $t("重置") }}
</el-button> </el-button>
<el-button type="success" @click="$refs['customerFollow'].handleAdd()" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button> <el-button type="success" @click="handleAdd" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']"> <el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t("导出") }} {{ $t("导出") }}
</el-button> </el-button>
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.customerFollowVisible = true this.customerFollowVisible = true
this.$nextTick((_) => { this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row) this.$refs["customerFollow"].handleUpdate(row, true)
}) })
}, 100) }, 100)
}, },
...@@ -168,6 +168,13 @@ export default { ...@@ -168,6 +168,13 @@ export default {
this.$refs["customerFollow"].handleUpdate(row, flag) this.$refs["customerFollow"].handleUpdate(row, flag)
}) })
}, },
handleAdd() {
this.customerFollowVisible = true
this.$nextTick(() => {
this.$refs["customerFollow"].handleAdd()
})
},
handleCustomerFollowLink(row) { handleCustomerFollowLink(row) {
this.customerFollowVisible = true this.customerFollowVisible = true
this.$nextTick((_) => { this.$nextTick((_) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment