Commit b63aecbc authored by 邓春圆's avatar 邓春圆

输入邮箱,和询盘信息添加

parent 49c186bc
......@@ -193,7 +193,11 @@
<el-switch v-model="form.isShowTidanPrice"></el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('询盘信息')">
<el-input show-word-limit v-model="form.inquiry" :rows="3" type="textarea" :maxlength="500"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch v-model="form.arrivalConfirm" :active-value="1" :inactive-value="0" />
......@@ -358,12 +362,17 @@
</template>
</el-table-column>
<el-table-column
width="260px"
prop="email"
:label="$t('邮箱')"
>
<template v-slot="{row}">
<el-form-item label="">
<el-input v-model="row.email" :placeholder="$t('请输入邮箱')" size="mini"/>
<el-form-item v-for="(item, index) in row.email" :key="index" label="">
<div style="display: flex;align-items: center;">
<el-input v-model="row.email[index]" :placeholder="$t('请输入邮箱')" size="mini"/>
<el-button @click="deleteEmail(row.email,index)" v-if="row.email.length !== 1" style="height:25px;margin-left: 5px" type="danger" size="mini">删除</el-button>
<el-button @click="addEmail(row.email)" style="height: 25px;margin-left: 5px" v-if="index === row.email.length -1 && row.email.length < 5" size="mini" type="primary">添加</el-button>
</div>
</el-form-item>
</template>
</el-table-column>
......@@ -592,6 +601,13 @@ export default {
this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: customerId}).then(r => {
this.form.customerContacts = r.data
this.form.customerContacts.forEach(item => {
if(item.email){
item.email = item.email.split(',')
}else {
item.email = [""]
}
})
})
if(this.form.promoter){
getCustomerList({ids:this.form.promoter}).then(r => {
......@@ -706,6 +722,12 @@ export default {
},
methods: {
addEmail(row){
row.push('')
},
deleteEmail(row, index){
row.splice(index, 1)
},
change(val){
this.form.productId = '';
this.getProductListFn(val);
......@@ -839,7 +861,10 @@ export default {
}
this.updateCustomerLines()
const form = {...this.form, type: this.form.type?.join(','), transportType: (this.form.transportType || [])?.join(','), taxRate: Number(this.form.taxRate)}
form.customerContacts = JSON.parse(JSON.stringify(this.form.customerContacts))
form.customerContacts.forEach(e =>{
e.email = [...e.email].join(',')
})
// 检查路线是否启用了但是没选择目的仓
let errors = 0
form.customerLines.forEach(line => {
......@@ -893,6 +918,7 @@ export default {
/** 表单重置 */
reset() {
this.form = {
inquiry:undefined,
id: undefined,
number: undefined,
name: undefined,
......@@ -971,7 +997,7 @@ export default {
"areaCode": "",
// "customerId": 0,q
"department": "",
"email": "",
"email": [''],
"isDefault": this.form.customerContacts.length === 0 ? 1 : 0,
"name": "",
"phoneNew": "",
......
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