Commit c3ee67ac authored by 我在何方's avatar 我在何方

bug修复

parent cc84e62b
...@@ -59,12 +59,13 @@ ...@@ -59,12 +59,13 @@
title="客户跟进" title="客户跟进"
:visible.sync="customerFollow.dialogVisible" :visible.sync="customerFollow.dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="customerFollowClose"
width="680px"> width="680px">
<el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px"> <el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col> <el-col>
<el-form-item label="跟进类型" required> <el-form-item label="跟进类型" required>
<dict-selector form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector> <dict-selector ref="dictType" form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -98,7 +99,7 @@ ...@@ -98,7 +99,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="跟进方式" required> <el-form-item label="跟进方式" required>
<dict-selector v-model="customerFollow.form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector> <dict-selector ref="dictMethod" v-model="customerFollow.form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="customerFollow.dialogVisible = false">取 消</el-button> <el-button @click="customerFollowClose">取 消</el-button>
<el-button type="primary" @click="customerFollowSubmit">确 定</el-button> <el-button type="primary" @click="customerFollowSubmit">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -202,13 +203,15 @@ export default { ...@@ -202,13 +203,15 @@ export default {
return return
} }
createCustomerFollow(this.customerFollow.form).then(r => { createCustomerFollow(this.customerFollow.form).then(r => {
this.resetCustomerFollowForm() this.customerFollowClose()
this.getCustomerFollowList() this.getCustomerFollowList()
this.customerFollow.dialogVisible = false
}) })
}) })
}, },
customerFollowClose(){
this.resetCustomerFollowForm()
this.customerFollow.dialogVisible = false
},
resetCustomerFollowForm() { resetCustomerFollowForm() {
this.customerFollow.form = { this.customerFollow.form = {
"bizId": this.id, "bizId": this.id,
...@@ -220,6 +223,8 @@ export default { ...@@ -220,6 +223,8 @@ export default {
"followUserId": undefined, "followUserId": undefined,
"result": undefined "result": undefined
} }
this.$refs.dictType.changeValue(this.customerFollow.form.followType);
this.$refs.dictMethod.changeValue(this.customerFollow.form.followMethod);
}, },
getCustomerFollowList() { getCustomerFollowList() {
getCustomerFollowPage({bizId: this.id}).then(r => { getCustomerFollowPage({bizId: this.id}).then(r => {
......
...@@ -5,22 +5,24 @@ ...@@ -5,22 +5,24 @@
title="客户跟进" title="客户跟进"
:visible.sync="customerFollow.dialogVisible" :visible.sync="customerFollow.dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="customerFollowClose"
width="680px"> width="680px">
<el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px"> <el-form ref="customerFollowForm" :model="form" label-width="80px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col> <el-col>
<el-form-item label="跟进类型" required> <el-form-item label="跟进类型" required>
<dict-selector form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector> <span>{{form.followType}}</span>
<dict-selector ref="dictTag" form-type="radio" v-model="form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="跟进时间" required> <el-form-item label="跟进时间" required>
<el-date-picker v-model="customerFollow.form.followTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择跟进时间"></el-date-picker> <el-date-picker v-model="form.followTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择跟进时间"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人" required> <el-form-item label="联系人" required>
<el-select v-model="customerFollow.form.contactName" placeholder="请选择"> <el-select v-model="form.contactName" placeholder="请选择">
<el-option <el-option
v-for="(item, index) in customerContactsList" v-for="(item, index) in customerContactsList"
:key="index" :key="index"
...@@ -32,7 +34,7 @@ ...@@ -32,7 +34,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="跟进业务" required> <el-form-item label="跟进业务" required>
<el-select v-model="customerFollow.form.followUserId" placeholder="请选择"> <el-select v-model="form.followUserId" placeholder="请选择">
<el-option <el-option
v-for="item in serviceUserList" v-for="item in serviceUserList"
:key="item.id" :key="item.id"
...@@ -44,23 +46,23 @@ ...@@ -44,23 +46,23 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="跟进方式" required> <el-form-item label="跟进方式" required>
<dict-selector v-model="customerFollow.form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector> <dict-selector ref='dictMethod' v-model="form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="客户反馈" required> <el-form-item label="客户反馈" required>
<el-input type="textarea" v-model="customerFollow.form.feedback"></el-input> <el-input type="textarea" v-model="form.feedback"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="处理结果" required> <el-form-item label="处理结果" required>
<el-input type="textarea" v-model="customerFollow.form.result"></el-input> <el-input type="textarea" v-model="form.result"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="customerFollow.dialogVisible = false">取 消</el-button> <el-button @click="customerFollowClose">取 消</el-button>
<el-button type="primary" @click="customerFollowSubmit">确 定</el-button> <el-button type="primary" @click="customerFollowSubmit">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -94,11 +96,10 @@ export default { ...@@ -94,11 +96,10 @@ export default {
customerFollowList: [], customerFollowList: [],
serviceUserList: [], serviceUserList: [],
customerContactsList: [], customerContactsList: [],
customerFollow:{
customerFollow: {
dialogVisible: false, dialogVisible: false,
form: {}
}, },
form: {}
} }
}, },
...@@ -106,7 +107,7 @@ export default { ...@@ -106,7 +107,7 @@ export default {
this.resetCustomerFollowForm() this.resetCustomerFollowForm()
if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => { if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
this.customerContactsList = r.data this.customerContactsList = r.data
this.$set(this.customerFollow.form, 'customerId', this.customerId) // this.$set(form, 'customerId', this.customerId)
// this.customerFollow.form.customerId = this.customerId // this.customerFollow.form.customerId = this.customerId
}) })
listServiceUser().then(r => { listServiceUser().then(r => {
...@@ -115,49 +116,52 @@ export default { ...@@ -115,49 +116,52 @@ export default {
}, },
methods: { methods: {
customerFollowSubmit() { customerFollowSubmit() {
console.log(this.form)
this.$refs["customerFollowForm"].validate(valid => { this.$refs["customerFollowForm"].validate(valid => {
if (!valid) { if (!valid) {
return return
} }
if(!this.customerFollow.form.followType){ if(!this.form.followType){
this.$modal.msgError("请选择跟进类型"); this.$modal.msgError("请选择跟进类型");
return return
} }
if(!this.customerFollow.form.followTime){ if(!this.form.followTime){
this.$modal.msgError("请选择跟进时间"); this.$modal.msgError("请选择跟进时间");
return return
} }
if(!this.customerFollow.form.contactName){ if(!this.form.contactName){
this.$modal.msgError("请选择联系人"); this.$modal.msgError("请选择联系人");
return return
} }
if(!this.customerFollow.form.followUserId){ if(!this.form.followUserId){
this.$modal.msgError("请选择跟进业务"); this.$modal.msgError("请选择跟进业务");
return return
} }
if(!this.customerFollow.form.followMethod){ if(!this.form.followMethod){
this.$modal.msgError("请选择跟进方式"); this.$modal.msgError("请选择跟进方式");
return return
} }
if(!this.customerFollow.form.feedback){ if(!this.form.feedback){
this.$modal.msgError("请输入客户反馈"); this.$modal.msgError("请输入客户反馈");
return return
} }
if(!this.customerFollow.form.result){ if(!this.form.result){
this.$modal.msgError("请输入处理结果"); this.$modal.msgError("请输入处理结果");
return return
} }
createCustomerFollow(this.customerFollow.form).then(r => { this.$set(this.form, 'customerId', this.customerId)
this.resetCustomerFollowForm() createCustomerFollow(this.form).then(r => {
this.customerFollow.dialogVisible = false this.customerFollowClose()
}) })
}) })
}, },
customerFollowClose(){
this.resetCustomerFollowForm()
this.customerFollow.dialogVisible = false
},
resetCustomerFollowForm() { resetCustomerFollowForm() {
this.customerFollow.form = { var form = {
"bizId":this.id, "bizId":this.id,
"customerId":this.customerId,
"contactName": undefined, "contactName": undefined,
"feedback": undefined, "feedback": undefined,
"followMethod": undefined, "followMethod": undefined,
...@@ -166,12 +170,15 @@ export default { ...@@ -166,12 +170,15 @@ export default {
"followUserId": undefined, "followUserId": undefined,
"result": undefined "result": undefined
} }
this.form = Object.assign({},form)
this.$refs.dictTag.changeValue(this.form.followType);
this.$refs.dictMethod.changeValue(this.form.followMethod);
}, },
}, },
watch:{ watch:{
customerId(val){ customerId(val){
this.customerFollow.form.bizId = val; this.form.bizId = val;
if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => { if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
this.customerContactsList = r.data this.customerContactsList = r.data
}) })
......
...@@ -104,6 +104,9 @@ export default { ...@@ -104,6 +104,9 @@ export default {
} }
return formatter(val) return formatter(val)
}, },
changeValue(val){
this.valueSync = val
},
setValueSync(){ setValueSync(){
if(this.value === null || this.value === undefined || this.value === '') return if(this.value === null || this.value === undefined || this.value === '') return
if(this.multiple){ if(this.multiple){
......
...@@ -571,8 +571,4 @@ export default { ...@@ -571,8 +571,4 @@ export default {
.formShow div{ .formShow div{
flex: 1; flex: 1;
} }
.dialog-footer{
display: flex;
flex-direction: row !important;
}
</style> </style>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
}; };
</script> </script>
<style> <style scoped>
.dialog-footer{ .dialog-footer{
padding: 40px; padding: 40px;
} }
......
...@@ -121,8 +121,11 @@ ...@@ -121,8 +121,11 @@
<el-table-column :label="$t('运费')" width="200px"> <el-table-column :label="$t('运费')" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.seaFreight">
<div>{{$t('运费')+":"+scope.row.seaFreight}}{{currentcyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</div> <div>{{$t('运费')+":"+scope.row.seaFreight}}{{currentcyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</div>
<div>{{$t('清关费')+':'+scope.row.clearanceFreight}}{{currentcyMap[scope.row.clearanceFreightCurrency]}} / {{unitMap[scope.row.clearanceFreightVolume]}}</div> <div>{{$t('清关费')+':'+scope.row.clearanceFreight}}{{currentcyMap[scope.row.clearanceFreightCurrency]}} / {{unitMap[scope.row.clearanceFreightVolume]}}</div>
</div>
<div v-else>未报价</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -221,8 +224,8 @@ ...@@ -221,8 +224,8 @@
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('预计费用')"> <el-descriptions-item :label="$t('预计费用')">
<template v-for="item in estimatedCosts"> <template >
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div> <div v-for="item in estimatedCosts" :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template> </template>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -623,7 +626,7 @@ ...@@ -623,7 +626,7 @@
}; };
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
} }
}; };
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
}; };
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
} }
} }
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
} }
} }
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
}; };
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
} }
} }
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
} }
} }
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -550,7 +550,7 @@ export default { ...@@ -550,7 +550,7 @@ export default {
} }
} }
</script> </script>
<style> <style scoped>
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
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