|
|
|
@ -104,65 +104,46 @@
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row class="from-box3" :gutter="10">
|
|
|
|
|
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
|
|
|
|
|
<a-row class="from-box3">
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item class="from-label" label="销售人员" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<auto-complete
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
v-model="details.sale"
|
|
|
|
|
:data-source="saleUserListArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="saleSelect"
|
|
|
|
|
@change="saleChange"
|
|
|
|
|
@focus="saleChange"
|
|
|
|
|
/>
|
|
|
|
|
<a-select :showSearch="true" :filterOption="filterOption" v-decorator="['saleid']" @focus="getUserList">
|
|
|
|
|
<a-select-option v-for="item in saleUserList" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item class="from-label" label="操作人员" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<auto-complete
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
v-model="details.op"
|
|
|
|
|
:data-source="opUserListArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="opSelect"
|
|
|
|
|
@change="opChange"
|
|
|
|
|
@focus="opChange"
|
|
|
|
|
/>
|
|
|
|
|
<a-select :showSearch="true" :filterOption="filterOption" v-decorator="['opid']" @focus="getUserList">
|
|
|
|
|
<a-select-option v-for="item in saleUserList" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item class="from-label" label="单证人员" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<auto-complete
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
v-model="details.doc"
|
|
|
|
|
:data-source="docUserListArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="docSelect"
|
|
|
|
|
@change="docChange"
|
|
|
|
|
@focus="docChange"
|
|
|
|
|
/>
|
|
|
|
|
<a-select :showSearch="true" :filterOption="filterOption" v-decorator="['docid']" @focus="getUserList">
|
|
|
|
|
<a-select-option v-for="item in saleUserList" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item class="from-label" label="客服人员" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<auto-complete
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
v-model="details.custservice"
|
|
|
|
|
:data-source="custserviceUserListArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="custserviceSelect"
|
|
|
|
|
@change="custserviceChange"
|
|
|
|
|
@focus="custserviceChange"
|
|
|
|
|
/>
|
|
|
|
|
<a-select
|
|
|
|
|
:showSearch="true"
|
|
|
|
|
:filterOption="filterOption"
|
|
|
|
|
v-decorator="['custserviceid']"
|
|
|
|
|
@focus="getUserList"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in saleUserList" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
@ -272,6 +253,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { DjyCustomerAdd, DjyCustomerEdit } from '@/api/modular/main/CustomerInformationManagement'
|
|
|
|
|
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -311,7 +293,8 @@ export default {
|
|
|
|
|
ContactsData: [],
|
|
|
|
|
TypeData: [],
|
|
|
|
|
propStringData: [],
|
|
|
|
|
id: ''
|
|
|
|
|
id: '',
|
|
|
|
|
saleUserList: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
@ -329,6 +312,22 @@ export default {
|
|
|
|
|
this.propStringData = this.$options.filters['dictData']('djy_cust_prop')
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getUserList(name = '', type) {
|
|
|
|
|
GetSysUserPage({
|
|
|
|
|
name: name
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.saleUserList = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
filterOption(value, option) {
|
|
|
|
|
return option.componentOptions.children[0].text.indexOf(value) >= 0
|
|
|
|
|
},
|
|
|
|
|
removeCheckboxRow() {
|
|
|
|
|
this.$refs.xTable.selection.forEach(item => {
|
|
|
|
|
this.ContactsData.forEach((item2, index2) => {
|
|
|
|
@ -390,6 +389,20 @@ export default {
|
|
|
|
|
propString == '' ? (propString = `[${item2}]`) : (propString = `${propString}[${item2}]`)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
let Arr = ['sale', 'op', 'doc', 'custservice']
|
|
|
|
|
GetSysUserPage()
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
let saleUserList = res.data
|
|
|
|
|
Arr.forEach(item => {
|
|
|
|
|
if (values[`${item}id`]) {
|
|
|
|
|
saleUserList.forEach(i => {
|
|
|
|
|
if (i.id == values[`${item}id`]) {
|
|
|
|
|
values[item] = i.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (this.id) {
|
|
|
|
|
DjyCustomerEdit({ id: this.id, ...values, propString: propString, contacts: this.ContactsData })
|
|
|
|
|
.then(res => {
|
|
|
|
@ -420,6 +433,11 @@ export default {
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
}
|
|
|
|
@ -432,7 +450,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
.CsForm {
|
|
|
|
|
background: #fff;
|
|
|
|
|
padding: 25px;
|
|
|
|
@ -454,4 +472,23 @@ export default {
|
|
|
|
|
.CsFormTitle span i {
|
|
|
|
|
margin-right: 7px;
|
|
|
|
|
}
|
|
|
|
|
.from-label {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.customer-box {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.customer-input {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.customer-btn {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 0 4px;
|
|
|
|
|
color: @primary-color;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin-top: -3px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|