Commit c7c928e4 authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents 2a6575e0 f5d996fc
......@@ -59,12 +59,13 @@
title="客户跟进"
:visible.sync="customerFollow.dialogVisible"
:close-on-click-modal="false"
:before-close="customerFollowClose"
width="680px">
<el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px">
<el-row :gutter="10">
<el-col>
<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-col>
<el-col :span="12">
......@@ -98,7 +99,7 @@
</el-col>
<el-col :span="12">
<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-col>
<el-col>
......@@ -114,7 +115,7 @@
</el-row>
</el-form>
<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>
</span>
</el-dialog>
......@@ -202,13 +203,15 @@ export default {
return
}
createCustomerFollow(this.customerFollow.form).then(r => {
this.resetCustomerFollowForm()
this.customerFollowClose()
this.getCustomerFollowList()
this.customerFollow.dialogVisible = false
})
})
},
customerFollowClose(){
this.resetCustomerFollowForm()
this.customerFollow.dialogVisible = false
},
resetCustomerFollowForm() {
this.customerFollow.form = {
"bizId": this.id,
......@@ -220,6 +223,8 @@ export default {
"followUserId": undefined,
"result": undefined
}
this.$refs.dictType.changeValue(this.customerFollow.form.followType);
this.$refs.dictMethod.changeValue(this.customerFollow.form.followMethod);
},
getCustomerFollowList() {
getCustomerFollowPage({bizId: this.id}).then(r => {
......
......@@ -5,22 +5,24 @@
title="客户跟进"
:visible.sync="customerFollow.dialogVisible"
:close-on-click-modal="false"
:before-close="customerFollowClose"
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-col>
<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-col>
<el-col :span="12">
<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-col>
<el-col :span="12">
<el-form-item label="联系人" required>
<el-select v-model="customerFollow.form.contactName" placeholder="请选择">
<el-select v-model="form.contactName" placeholder="请选择">
<el-option
v-for="(item, index) in customerContactsList"
:key="index"
......@@ -32,7 +34,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="跟进业务" required>
<el-select v-model="customerFollow.form.followUserId" placeholder="请选择">
<el-select v-model="form.followUserId" placeholder="请选择">
<el-option
v-for="item in serviceUserList"
:key="item.id"
......@@ -44,23 +46,23 @@
</el-col>
<el-col :span="12">
<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-col>
<el-col>
<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-col>
<el-col>
<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-col>
</el-row>
</el-form>
<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>
</span>
</el-dialog>
......@@ -94,11 +96,10 @@ export default {
customerFollowList: [],
serviceUserList: [],
customerContactsList: [],
customerFollow: {
customerFollow:{
dialogVisible: false,
form: {}
},
form: {}
}
},
......@@ -106,7 +107,7 @@ export default {
this.resetCustomerFollowForm()
if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
this.customerContactsList = r.data
this.$set(this.customerFollow.form, 'customerId', this.customerId)
// this.$set(form, 'customerId', this.customerId)
// this.customerFollow.form.customerId = this.customerId
})
listServiceUser().then(r => {
......@@ -115,49 +116,52 @@ export default {
},
methods: {
customerFollowSubmit() {
console.log(this.form)
this.$refs["customerFollowForm"].validate(valid => {
if (!valid) {
return
}
if(!this.customerFollow.form.followType){
if(!this.form.followType){
this.$modal.msgError("请选择跟进类型");
return
}
if(!this.customerFollow.form.followTime){
if(!this.form.followTime){
this.$modal.msgError("请选择跟进时间");
return
}
if(!this.customerFollow.form.contactName){
if(!this.form.contactName){
this.$modal.msgError("请选择联系人");
return
}
if(!this.customerFollow.form.followUserId){
if(!this.form.followUserId){
this.$modal.msgError("请选择跟进业务");
return
}
if(!this.customerFollow.form.followMethod){
if(!this.form.followMethod){
this.$modal.msgError("请选择跟进方式");
return
}
if(!this.customerFollow.form.feedback){
if(!this.form.feedback){
this.$modal.msgError("请输入客户反馈");
return
}
if(!this.customerFollow.form.result){
if(!this.form.result){
this.$modal.msgError("请输入处理结果");
return
}
createCustomerFollow(this.customerFollow.form).then(r => {
this.resetCustomerFollowForm()
this.customerFollow.dialogVisible = false
this.$set(this.form, 'customerId', this.customerId)
createCustomerFollow(this.form).then(r => {
this.customerFollowClose()
})
})
},
customerFollowClose(){
this.resetCustomerFollowForm()
this.customerFollow.dialogVisible = false
},
resetCustomerFollowForm() {
this.customerFollow.form = {
var form = {
"bizId":this.id,
"customerId":this.customerId,
"contactName": undefined,
"feedback": undefined,
"followMethod": undefined,
......@@ -166,12 +170,15 @@ export default {
"followUserId": undefined,
"result": undefined
}
this.form = Object.assign({},form)
this.$refs.dictTag.changeValue(this.form.followType);
this.$refs.dictMethod.changeValue(this.form.followMethod);
},
},
watch:{
customerId(val){
this.customerFollow.form.bizId = val;
this.form.bizId = val;
if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
this.customerContactsList = r.data
})
......
......@@ -93,7 +93,7 @@ export default {
created(){
this.setValueSync()
this.setDefault()
},
},
methods:{
format(val){
if(val === null || val == undefined) return val
......@@ -104,8 +104,11 @@ export default {
}
return formatter(val)
},
changeValue(val){
this.valueSync = val
},
setValueSync(){
if(this.value === null || this.value === undefined || this.value === '') return
if(this.value === null || this.value === undefined || this.value === '') return
if(this.multiple){
let value = []
if(typeof this.value == 'string'){
......@@ -113,9 +116,9 @@ export default {
}
this.valueSync = value.map(item => this.format(item))
}else{
this.valueSync = this.format(this.value)
this.valueSync = this.format(this.value)
}
/* if(this.forceString && this.multiple){
this.valueSync = this.value.split(',')
}else this.valueSync = this.forceString ? String(this.value) : this.value */
......@@ -124,7 +127,7 @@ export default {
return this.getDictDatas(this.type)
},
setDefault(){
if(!this.defaultable) return
if(!this.defaultable) return
if(this.dictList.length && (this.valueSync === null || this.valueSync == '')){
this.valueSync = this.multiple ? [] : this.formattedList[0].value
}
......@@ -136,4 +139,4 @@ export default {
.dict-selector{
display: inline-block;
}
</style>
\ No newline at end of file
</style>
......@@ -571,8 +571,4 @@ export default {
.formShow div{
flex: 1;
}
.dialog-footer{
display: flex;
flex-direction: row !important;
}
</style>
......@@ -136,7 +136,7 @@
};
</script>
<style>
<style scoped>
.dialog-footer{
padding: 40px;
}
......
......@@ -121,8 +121,11 @@
<el-table-column :label="$t('运费')" width="200px">
<template slot-scope="scope">
<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 v-if="scope.row.seaFreight">
<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>
<div v-else>未报价</div>
</template>
</el-table-column>
</el-table>
......@@ -221,8 +224,8 @@
</div>
</el-descriptions-item>
<el-descriptions-item :label="$t('预计费用')">
<template v-for="item in estimatedCosts">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
<template >
<div v-for="item in estimatedCosts" :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
</el-descriptions-item>
</el-descriptions>
......@@ -623,7 +626,7 @@
};
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -108,7 +108,7 @@ export default {
}
};
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -377,7 +377,7 @@
};
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -290,7 +290,7 @@ export default {
}
}
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -222,7 +222,7 @@ export default {
}
}
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -200,7 +200,7 @@ export default {
};
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -118,7 +118,7 @@ export default {
}
}
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -119,7 +119,7 @@ export default {
}
}
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -550,7 +550,7 @@ export default {
}
}
</script>
<style>
<style scoped>
.card-title{
font-size: 18px;
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