Commit d86e3709 authored by Smile's avatar Smile Committed by wux

任务103:跟进记录调整

parent 0ddbcff3
...@@ -17,6 +17,13 @@ export function updateOffer(data) { ...@@ -17,6 +17,13 @@ export function updateOffer(data) {
data: data data: data
}) })
} }
export function updateByCustomerFollow(data) {
return request({
url: "/ecw/offer/updateByCustomerFollow",
method: "put",
data: data
})
}
// 删除报价单管理 // 删除报价单管理
export function deleteOffer(id) { export function deleteOffer(id) {
......
...@@ -62,15 +62,15 @@ ...@@ -62,15 +62,15 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="$t('客户经理')" required> <el-form-item :label="$t('客户经理')" required prop="followUserId">
<el-select v-model="form.followUserId" clearable :placeholder="$t('请选择')" :disabled="isView"> <el-select v-model="form.followUserId" clearable :placeholder="$t('请选择')" :disabled="isView">
<el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option> <el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="$t('跟进方式')" required> <el-form-item :label="$t('跟进方式')" required prop="followMethod">
<dict-selector ref="dictMethod" v-model="form.followMethod" clearable :disabled="isView" :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD"></dict-selector> <dict-selector v-model="form.followMethod" clearable :disabled="isView" :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -92,6 +92,13 @@ ...@@ -92,6 +92,13 @@
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<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-select>
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('目的')" prop="purpose"> <el-form-item :label="$t('目的')" prop="purpose">
<el-input type="textarea" :rows="3" v-model="form.purpose" :placeholder="$t('请输入目的')" maxlength="200" show-word-limit :disabled="isView" /> <el-input type="textarea" :rows="3" v-model="form.purpose" :placeholder="$t('请输入目的')" maxlength="200" show-word-limit :disabled="isView" />
...@@ -180,7 +187,7 @@ ...@@ -180,7 +187,7 @@
<script> <script>
import { addCustomerFollow, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow" import { addCustomerFollow, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow"
import { getCustomerContactsSelect } from "@/api/ecw/customerContacts" import { getCustomerContactsSelect } from "@/api/ecw/customerContacts"
import { getOfferPage, getOfferNumber, getOffer } from "@/api/ecw/offer" import { getOfferPage, getOfferNumber, getOffer,updateByCustomerFollow} from "@/api/ecw/offer"
import { DICT_TYPE, getDictDataLabel } from "@/utils/dict" import { DICT_TYPE, getDictDataLabel } from "@/utils/dict"
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts" import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user" import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user"
...@@ -211,6 +218,8 @@ export default { ...@@ -211,6 +218,8 @@ export default {
}, },
data() { data() {
return { return {
offer:{},
isAccountManager:false,
CustomerFollowSelectOffer: false, CustomerFollowSelectOffer: false,
ChooseContactDialog: false, ChooseContactDialog: false,
fileType: ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"], fileType: ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"],
...@@ -256,6 +265,7 @@ export default { ...@@ -256,6 +265,7 @@ export default {
} }
}, },
created() { created() {
this.hasAccountRole();
listServiceUser().then((r) => { listServiceUser().then((r) => {
this.serviceUserList = r.data this.serviceUserList = r.data
}) })
...@@ -268,8 +278,10 @@ export default { ...@@ -268,8 +278,10 @@ export default {
if (v) { if (v) {
getOffer(v).then((r) => { getOffer(v).then((r) => {
let offer = r.data let offer = r.data
this.offer = offer;
// 选择了报价单后,需要将报价单中的客户及客户联系人信息回显 // 选择了报价单后,需要将报价单中的客户及客户联系人信息回显
this.form.offerNumber = offer.number this.form.offerNumber = offer.number
this.form.cargoStatus = parseInt(offer.cargoStatus);
this.form.customerId = offer.relationId this.form.customerId = offer.relationId
this.customerId = offer.relationId this.customerId = offer.relationId
this.form.contactId = offer.relation === 1 ? offer.consignorId : offer.consigneeId this.form.contactId = offer.relation === 1 ? offer.consignorId : offer.consigneeId
...@@ -313,6 +325,9 @@ export default { ...@@ -313,6 +325,9 @@ export default {
this.form.contactName = item.name this.form.contactName = item.name
this.form.contactPhone = "+" + item.areaCode + item.phoneNew this.form.contactPhone = "+" + item.areaCode + item.phoneNew
this.form.followUserId = item.customerService this.form.followUserId = item.customerService
if (this.isAccountManager&&this.form.followUserId===null){
this.form.followUserId = this.$store.getters.userId
}
return true return true
} }
}) })
...@@ -324,6 +339,11 @@ export default { ...@@ -324,6 +339,11 @@ export default {
} }
}, },
methods: { methods: {
hasAccountRole(){
this.isAccountManager=this.$store.getters.roles.some((item) => {
return item === "Account Manager"
})
},
selectOffer(offerId) { selectOffer(offerId) {
this.form.offerId = offerId this.form.offerId = offerId
}, },
...@@ -521,6 +541,12 @@ export default { ...@@ -521,6 +541,12 @@ export default {
status status
}).then((r) => { }).then((r) => {
this.$message.success(this.$t("操作成功")) this.$message.success(this.$t("操作成功"))
if (status === 1){
if (this.form.followType===2&&this.form.cargoStatus!==this.offer.cargoStatus){
this.offer.cargoStatus=this.form.cargoStatus;
updateByCustomerFollow(this.offer);
}
}
this.$emit("refresh") this.$emit("refresh")
this.customerFollowClose() this.customerFollowClose()
}) })
......
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