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

修改bug

parent fa996d57
......@@ -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-form-item>
</el-col>
<el-col :span="20">
<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>
<el-col :span="20" v-if="isView">
<el-form-item>
<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-col>
<el-col :span="20">
......@@ -354,10 +356,14 @@ export default {
this.form = row
this.customerFollow.dialogVisible = true
},
handleAdd() {
async handleAdd() {
this.isView = false
this.customerFollow.dialogVisible = true
this.reset()
let r = await getFollowupNewNumber()
console.log(r)
this.form.number = r.data
},
async handleUpdate(row, flag) {
this.isView = false
......@@ -370,6 +376,7 @@ export default {
this.form = {
...row,
id: null,
parentNumber: row.number,
followTime: row.nextTime,
nextTime: "",
......
......@@ -181,7 +181,7 @@
</el-form-item>
</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-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" />
......@@ -191,7 +191,6 @@
<el-col :span="12">
<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 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>
......@@ -212,6 +211,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('主营类别')" prop="productTypes">
<el-row :gutter="10">
......@@ -1119,9 +1119,7 @@ export default {
companyEn: undefined,
payerName: undefined,
address: undefined,
productType: undefined,
// productId: undefined,
// pickupPoint: undefined,
productTypes: [],
pickupPoints: [],
productIds: [],
memberId: undefined,
......@@ -1189,11 +1187,10 @@ export default {
productIds: this.stringArrToNumberArr(response.data.productIds),
busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds),
competitorIds: Number(response.data.competitorIds),
productTypes: response.data.productTypes ? response.data.productTypes.split(",") : []
productTypes: this.stringArrToNumberArr(response.data.productTypes)
}
if (this.form.productType) {
console.log("1231", this.form.productType)
this.getProductListFn(this.form.productType)
if (this.form.productTypes.length) {
this.getProductListFn(this.form.productTypes)
}
console.log(this.form)
......@@ -1298,15 +1295,6 @@ export default {
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() {
if (this.recommended.length > 0) {
let i = this.customerSelect.find((item) => item.id === this.recommended[0].id)
......
......@@ -222,7 +222,29 @@
<el-tab-pane name="quote" :label="$t('报价')">
<el-card class="box-card">
<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-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>
......@@ -238,6 +260,23 @@
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</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-button type="primary" @click="getInfoListOfferPage">{{ $t("搜索") }}</el-button>
<el-button type="primary" @click="handleOfferReset">{{ $t("重置") }}</el-button>
......@@ -634,10 +673,14 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { deleteOffer, cancel, recovery } from "@/api/ecw/offer"
import logListCommon from "@/views/ecw/offer/logListCommon"
import { getTradeCityList } from "@/api/ecw/region"
import UserSelector from "@/components/UserSelector"
export default {
name: "query",
components: {
UserSelector,
ImageDisplay,
Template,
CustomerFollow,
......@@ -650,6 +693,7 @@ export default {
getCurrencyList().then((response) => {
this.currecyList = response.data
})
getTradeCityList().then((res) => (this.tradeCityList = res.data))
//获取信用类型
getCreditRulePage({ page: 1, rows: 999, type: 2 }).then((r) => {
this.creditTypeList = r.data.list
......@@ -782,6 +826,10 @@ export default {
},
data() {
return {
tradeCityList: [],
queryTmp: {
createTime: ["", ""]
},
activeName: "order",
currecyList: [],
STATUS: {
......@@ -866,6 +914,11 @@ export default {
rows: 10,
page: 1
},
queryOfferParams: {
salesmanIds: [],
statusList: [],
importances: []
},
orderList: [],
orderTotal: 0,
infoListOfferFrom: {
......@@ -899,6 +952,9 @@ export default {
}
},
computed: {
exportCityList() {
return this.tradeCityList.filter((item) => item.type == 2)
},
permissions() {
return this.$store.state.user.permissions
},
......@@ -1048,22 +1104,27 @@ export default {
this.getorderList()
this.rucangtime = []
},
// 客户报价
getInfoListOfferPage() {
let queryParams = {}
formatQuery() {
let obj = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId
obj.destCountryIds = this.destCountryId
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.destCountryIds = this.objectiveId
obj.objectiveIds = this.objectiveId
}
//目的仓
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.infoListOfferTotal = r.data.total
})
......@@ -1072,6 +1133,11 @@ export default {
this.destCountryId = null
this.objectiveId = null
this.destWarehouseId = null
this.queryOfferParams = {
salesmanIds: [],
statusList: [],
importances: []
}
this.infoListOfferFrom = { pageNo: 1, pageSize: 10 }
this.getInfoListOfferPage()
},
......
......@@ -53,7 +53,7 @@
"
>{{ $t("重置") }}
</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']">
{{ $t("导出") }}
</el-button>
......@@ -158,7 +158,7 @@ export default {
setTimeout(() => {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row)
this.$refs["customerFollow"].handleUpdate(row, true)
})
}, 100)
},
......@@ -168,6 +168,13 @@ export default {
this.$refs["customerFollow"].handleUpdate(row, flag)
})
},
handleAdd() {
this.customerFollowVisible = true
this.$nextTick(() => {
this.$refs["customerFollow"].handleAdd()
})
},
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
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