Commit 5db31db1 authored by Smile's avatar Smile Committed by wux

任务103:跟进记录调整

parent bf85aa0a
......@@ -95,7 +95,7 @@
<el-col :span="8" v-if="form.followType == 2">
<el-form-item :label="$t('货物状态')" prop="cargoStatus">
<el-select v-model="form.cargoStatus" :placeholder="$t('请选择')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.ECW_OFFER_CARGO_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-option v-for="dict in getDictDatas(DICT_TYPE.ECW_OFFER_CARGO_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
......@@ -265,6 +265,10 @@ export default {
}
},
created() {
this.$nextTick(() => {
// 在页面加载完后执行的代码
this.setCustomerFollow()
});
this.hasAccountRole();
listServiceUser().then((r) => {
this.serviceUserList = r.data
......@@ -274,6 +278,9 @@ export default {
})
},
watch: {
'form.cargoStatus'(){
console.log(this.form)
},
"form.offerId"(v) {
if (v) {
getOffer(v).then((r) => {
......@@ -281,7 +288,12 @@ export default {
this.offer = offer;
// 选择了报价单后,需要将报价单中的客户及客户联系人信息回显
this.form.offerNumber = offer.number
this.form.cargoStatus = parseInt(offer.cargoStatus);
console.log("this.form.cargoStatus",this.form)
if (offer.cargoStatus){
this.$set(this.form,'cargoStatus',String(offer.cargoStatus));
}else {
this.$set(this.form,'cargoStatus',null);
}
this.form.customerId = offer.relationId
this.customerId = offer.relationId
this.form.contactId = offer.relation === 1 ? offer.consignorId : offer.consigneeId
......@@ -325,9 +337,7 @@ export default {
this.form.contactName = item.name
this.form.contactPhone = "+" + item.areaCode + item.phoneNew
this.form.followUserId = item.customerService
if (this.isAccountManager&&this.form.followUserId===null){
this.form.followUserId = this.$store.getters.userId
}
this.setCustomerFollow()
return true
}
})
......@@ -339,6 +349,11 @@ export default {
}
},
methods: {
setCustomerFollow(){
if (this.isAccountManager&&!this.form.followUserId){
this.$set(this.form,"followUserId",this.$store.getters.userId)
}
},
hasAccountRole(){
this.isAccountManager=this.$store.getters.roles.some((item) => {
return item === "Account Manager"
......
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