|
|
@ -1,9 +1,9 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="basic-info">
|
|
|
|
<div class="basic-info">
|
|
|
|
<x-card style="padding-top: 15px;">
|
|
|
|
<x-card style="padding-top: 15px">
|
|
|
|
<div slot="content" style="margin-top: -24px;">
|
|
|
|
<div slot="content" style="margin-top: -24px">
|
|
|
|
<a-form-model
|
|
|
|
<a-form-model
|
|
|
|
style="margin-bottom:10px;"
|
|
|
|
style="margin-bottom: 10px"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
ref="basicFrom"
|
|
|
|
ref="basicFrom"
|
|
|
|
:selfUpdate="true"
|
|
|
|
:selfUpdate="true"
|
|
|
@ -20,7 +20,7 @@
|
|
|
|
:wrapperCol="wrapperCol2"
|
|
|
|
:wrapperCol="wrapperCol2"
|
|
|
|
has-feedback
|
|
|
|
has-feedback
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div class="customer-box" style="padding-right:24px;">
|
|
|
|
<div class="customer-box" style="padding-right: 24px">
|
|
|
|
<selectView
|
|
|
|
<selectView
|
|
|
|
type="customername"
|
|
|
|
type="customername"
|
|
|
|
:defaultVal="details.customername"
|
|
|
|
:defaultVal="details.customername"
|
|
|
@ -30,7 +30,7 @@
|
|
|
|
:openSearch="true"
|
|
|
|
:openSearch="true"
|
|
|
|
:isCopy="true"
|
|
|
|
:isCopy="true"
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
style="flex: 1; margin-top: -4px;"
|
|
|
|
style="flex: 1; margin-top: -4px"
|
|
|
|
></selectView>
|
|
|
|
></selectView>
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
class="customer-btn iconfont icon-touxiang"
|
|
|
|
class="customer-btn iconfont icon-touxiang"
|
|
|
@ -71,7 +71,7 @@
|
|
|
|
:showLabel="['cnName', 'code']"
|
|
|
|
:showLabel="['cnName', 'code']"
|
|
|
|
:openSearch="false"
|
|
|
|
:openSearch="false"
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
style="flex: 1; margin-top: -4px;"
|
|
|
|
style="flex: 1; margin-top: -4px"
|
|
|
|
></selectView>
|
|
|
|
></selectView>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
@ -92,7 +92,7 @@
|
|
|
|
:showLabel="['shortName']"
|
|
|
|
:showLabel="['shortName']"
|
|
|
|
:openSearch="true"
|
|
|
|
:openSearch="true"
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
style="flex: 1; margin-top: -4px;"
|
|
|
|
style="flex: 1; margin-top: -4px"
|
|
|
|
></selectView>
|
|
|
|
></selectView>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
@ -309,7 +309,7 @@
|
|
|
|
type="etd"
|
|
|
|
type="etd"
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
@dateChange="dateChangeFun"
|
|
|
|
@dateChange="dateChangeFun"
|
|
|
|
style="margin-top: -5px;"
|
|
|
|
style="margin-top: -5px"
|
|
|
|
></datePickerView>
|
|
|
|
></datePickerView>
|
|
|
|
<span class="week" v-if="etdWeek && etdWeek !== 'NaN'">W{{ etdWeek || '--' }}</span>
|
|
|
|
<span class="week" v-if="etdWeek && etdWeek !== 'NaN'">W{{ etdWeek || '--' }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -331,12 +331,8 @@
|
|
|
|
<template v-else>否</template>
|
|
|
|
<template v-else>否</template>
|
|
|
|
</a-checkbox> -->
|
|
|
|
</a-checkbox> -->
|
|
|
|
<a-radio-group size="small" v-model="details.zhanCangFlag">
|
|
|
|
<a-radio-group size="small" v-model="details.zhanCangFlag">
|
|
|
|
<a-radio size="small" value="是">
|
|
|
|
<a-radio size="small" value="是"> 是 </a-radio>
|
|
|
|
是
|
|
|
|
<a-radio size="small" value="否"> 否 </a-radio>
|
|
|
|
</a-radio>
|
|
|
|
|
|
|
|
<a-radio size="small" value="否">
|
|
|
|
|
|
|
|
否
|
|
|
|
|
|
|
|
</a-radio>
|
|
|
|
|
|
|
|
</a-radio-group>
|
|
|
|
</a-radio-group>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
@ -630,18 +626,14 @@
|
|
|
|
@cancel="handleModelCancel"
|
|
|
|
@cancel="handleModelCancel"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot="footer">
|
|
|
|
<template slot="footer">
|
|
|
|
<a-button key="back" @click="handleModelCancel">
|
|
|
|
<a-button key="back" @click="handleModelCancel"> 关闭 </a-button>
|
|
|
|
关闭
|
|
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-if="customerType === 'select'">
|
|
|
|
<template v-if="customerType === 'select'">
|
|
|
|
<div class="select-customer">
|
|
|
|
<div class="select-customer">
|
|
|
|
<vxe-toolbar>
|
|
|
|
<vxe-toolbar>
|
|
|
|
<template #buttons>
|
|
|
|
<template #buttons>
|
|
|
|
<vxe-button status="success" icon="vxe-icon-square-plus" @click="insertEvent()">新增</vxe-button>
|
|
|
|
<vxe-button status="success" icon="vxe-icon-square-plus" @click="insertEvent()">新增</vxe-button>
|
|
|
|
<vxe-button status="danger" icon="vxe-icon-delete" @click="removeLine">
|
|
|
|
<vxe-button status="danger" icon="vxe-icon-delete" @click="removeLine"> 删除选中 </vxe-button>
|
|
|
|
删除选中
|
|
|
|
|
|
|
|
</vxe-button>
|
|
|
|
|
|
|
|
<vxe-button status="primary" icon="vxe-icon-save" @click="saveEvent">保存</vxe-button>
|
|
|
|
<vxe-button status="primary" icon="vxe-icon-save" @click="saveEvent">保存</vxe-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</vxe-toolbar>
|
|
|
|
</vxe-toolbar>
|
|
|
@ -858,7 +850,7 @@ export default {
|
|
|
|
option-filter-prop="children"
|
|
|
|
option-filter-prop="children"
|
|
|
|
style="width: 240px"
|
|
|
|
style="width: 240px"
|
|
|
|
placeholder="请选择"
|
|
|
|
placeholder="请选择"
|
|
|
|
on-change={val => {
|
|
|
|
on-change={(val) => {
|
|
|
|
row['name'] = this.customerContacts[val].name
|
|
|
|
row['name'] = this.customerContacts[val].name
|
|
|
|
row['email'] = this.customerContacts[val].email
|
|
|
|
row['email'] = this.customerContacts[val].email
|
|
|
|
row['tel'] = this.customerContacts[val].tel
|
|
|
|
row['tel'] = this.customerContacts[val].tel
|
|
|
@ -889,7 +881,7 @@ export default {
|
|
|
|
option-filter-prop="children"
|
|
|
|
option-filter-prop="children"
|
|
|
|
style="width: 240px"
|
|
|
|
style="width: 240px"
|
|
|
|
placeholder="请选择角色"
|
|
|
|
placeholder="请选择角色"
|
|
|
|
on-change={val => {
|
|
|
|
on-change={(val) => {
|
|
|
|
row['roleCode'] = val
|
|
|
|
row['roleCode'] = val
|
|
|
|
console.log(row['roleCode'])
|
|
|
|
console.log(row['roleCode'])
|
|
|
|
}}
|
|
|
|
}}
|
|
|
@ -957,7 +949,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
checkbasic() {
|
|
|
|
checkbasic() {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
this.$refs.basicFrom.validate(valid => {
|
|
|
|
this.$refs.basicFrom.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
resolve(true)
|
|
|
|
resolve(true)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -970,7 +962,7 @@ export default {
|
|
|
|
// ========== 关系人弹窗 ==========
|
|
|
|
// ========== 关系人弹窗 ==========
|
|
|
|
focusEvent2(data) {
|
|
|
|
focusEvent2(data) {
|
|
|
|
let Arr = data
|
|
|
|
let Arr = data
|
|
|
|
? this.customerContactsData.filter(item => item.name.indexOf(data) > -1)
|
|
|
|
? this.customerContactsData.filter((item) => item.name.indexOf(data) > -1)
|
|
|
|
: this.customerContactsData
|
|
|
|
: this.customerContactsData
|
|
|
|
if (Arr.length) {
|
|
|
|
if (Arr.length) {
|
|
|
|
this.$refs.xDown2.showPanel()
|
|
|
|
this.$refs.xDown2.showPanel()
|
|
|
@ -978,7 +970,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
keyupEvent2(data) {
|
|
|
|
keyupEvent2(data) {
|
|
|
|
this.customerContactsDataList = data
|
|
|
|
this.customerContactsDataList = data
|
|
|
|
? this.customerContactsData.filter(item => item.name.indexOf(data) > -1)
|
|
|
|
? this.customerContactsData.filter((item) => item.name.indexOf(data) > -1)
|
|
|
|
: this.customerContactsData
|
|
|
|
: this.customerContactsData
|
|
|
|
if (this.customerContactsDataList.length) {
|
|
|
|
if (this.customerContactsDataList.length) {
|
|
|
|
this.$refs.xDown2.showPanel()
|
|
|
|
this.$refs.xDown2.showPanel()
|
|
|
@ -1012,12 +1004,12 @@ export default {
|
|
|
|
// ---------- 保存 ----------
|
|
|
|
// ---------- 保存 ----------
|
|
|
|
saveEvent() {
|
|
|
|
saveEvent() {
|
|
|
|
const fullData = this.tableData
|
|
|
|
const fullData = this.tableData
|
|
|
|
fullData.forEach(item => {
|
|
|
|
fullData.forEach((item) => {
|
|
|
|
item.WroleCode = ''
|
|
|
|
item.WroleCode = ''
|
|
|
|
item.bookingId = this.$route.query.id
|
|
|
|
item.bookingId = this.$route.query.id
|
|
|
|
if (item.roleCode) {
|
|
|
|
if (item.roleCode) {
|
|
|
|
item.roleCode.forEach(e => {
|
|
|
|
item.roleCode.forEach((e) => {
|
|
|
|
this.ContactType.forEach(item2 => {
|
|
|
|
this.ContactType.forEach((item2) => {
|
|
|
|
if (e == item2.name) {
|
|
|
|
if (e == item2.name) {
|
|
|
|
if (item.WroleCode) {
|
|
|
|
if (item.WroleCode) {
|
|
|
|
item.WroleCode = `${item.WroleCode}[${item2.code}]`
|
|
|
|
item.WroleCode = `${item.WroleCode}[${item2.code}]`
|
|
|
@ -1030,11 +1022,11 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const data = JSON.parse(JSON.stringify(fullData))
|
|
|
|
const data = JSON.parse(JSON.stringify(fullData))
|
|
|
|
data.forEach(item => {
|
|
|
|
data.forEach((item) => {
|
|
|
|
item.roleCode = item.WroleCode
|
|
|
|
item.roleCode = item.WroleCode
|
|
|
|
delete item.rowKey
|
|
|
|
delete item.rowKey
|
|
|
|
})
|
|
|
|
})
|
|
|
|
BookingOrderContactSavebatch(this.$route.query.id, data).then(res => {
|
|
|
|
BookingOrderContactSavebatch(this.$route.query.id, data).then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1060,20 +1052,20 @@ export default {
|
|
|
|
if (this.details.customerid) {
|
|
|
|
if (this.details.customerid) {
|
|
|
|
this.customerType = type
|
|
|
|
this.customerType = type
|
|
|
|
this.customerVisible = true
|
|
|
|
this.customerVisible = true
|
|
|
|
DjyCustomerdetail({ id: this.details.customerid }).then(res => {
|
|
|
|
DjyCustomerdetail({ id: this.details.customerid }).then((res) => {
|
|
|
|
this.customerContactsData = res.data.contacts
|
|
|
|
this.customerContactsData = res.data.contacts
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.djyCustomerContacts()
|
|
|
|
this.djyCustomerContacts()
|
|
|
|
BookingOrderContactPage({ id: this.details.customerid, BookingId: this.$route.query.id, pageSize: 999 }).then(
|
|
|
|
BookingOrderContactPage({ id: this.details.customerid, BookingId: this.$route.query.id, pageSize: 999 }).then(
|
|
|
|
res => {
|
|
|
|
(res) => {
|
|
|
|
res.data.rows.forEach(item => {
|
|
|
|
res.data.rows.forEach((item) => {
|
|
|
|
let WroleCode = []
|
|
|
|
let WroleCode = []
|
|
|
|
if (item.roleCode) {
|
|
|
|
if (item.roleCode) {
|
|
|
|
item.roleCode.split(']').forEach(e => {
|
|
|
|
item.roleCode.split(']').forEach((e) => {
|
|
|
|
if (e) {
|
|
|
|
if (e) {
|
|
|
|
e.split('[').forEach(i => {
|
|
|
|
e.split('[').forEach((i) => {
|
|
|
|
if (i) {
|
|
|
|
if (i) {
|
|
|
|
this.ContactType.forEach(item2 => {
|
|
|
|
this.ContactType.forEach((item2) => {
|
|
|
|
if (item2.code == i) {
|
|
|
|
if (item2.code == i) {
|
|
|
|
WroleCode.push(item2.name)
|
|
|
|
WroleCode.push(item2.name)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1116,7 +1108,7 @@ export default {
|
|
|
|
DjyCustomerContacts({
|
|
|
|
DjyCustomerContacts({
|
|
|
|
customerId: this.details.customerid
|
|
|
|
customerId: this.details.customerid
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(res => {
|
|
|
|
.then((res) => {
|
|
|
|
const arr = []
|
|
|
|
const arr = []
|
|
|
|
res.data.map((item, index) => {
|
|
|
|
res.data.map((item, index) => {
|
|
|
|
if (item.name) {
|
|
|
|
if (item.name) {
|
|
|
@ -1125,7 +1117,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.customerContacts = res.data
|
|
|
|
this.customerContacts = res.data
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
.catch((err) => {
|
|
|
|
console.log(err)
|
|
|
|
console.log(err)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -1168,7 +1160,7 @@ export default {
|
|
|
|
// if (type === 'voyno' && this.details.carrierid === 'ESL') {
|
|
|
|
// if (type === 'voyno' && this.details.carrierid === 'ESL') {
|
|
|
|
// this.details.voynoinner = this.details[type]
|
|
|
|
// this.details.voynoinner = this.details[type]
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
if (type === 'voyno') {
|
|
|
|
if (type === 'voyno' && value !== '') {
|
|
|
|
this.details.voynoinner = this.details[type]
|
|
|
|
this.details.voynoinner = this.details[type]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (type === 'epCode' && this.details.carrierid === 'ESL') {
|
|
|
|
if (type === 'epCode' && this.details.carrierid === 'ESL') {
|
|
|
@ -1199,15 +1191,15 @@ export default {
|
|
|
|
if (res.serviceItem) {
|
|
|
|
if (res.serviceItem) {
|
|
|
|
let WserviceItem = []
|
|
|
|
let WserviceItem = []
|
|
|
|
if (res.serviceItem) {
|
|
|
|
if (res.serviceItem) {
|
|
|
|
res.serviceItem.split(']').forEach(item => {
|
|
|
|
res.serviceItem.split(']').forEach((item) => {
|
|
|
|
if (item.split('[')[1]) {
|
|
|
|
if (item.split('[')[1]) {
|
|
|
|
WserviceItem.push(item.split('[')[1])
|
|
|
|
WserviceItem.push(item.split('[')[1])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let data = []
|
|
|
|
let data = []
|
|
|
|
this.$options.filters['dictData']('booking_service_item').forEach(item => {
|
|
|
|
this.$options.filters['dictData']('booking_service_item').forEach((item) => {
|
|
|
|
WserviceItem.forEach(item2 => {
|
|
|
|
WserviceItem.forEach((item2) => {
|
|
|
|
if (item.code == item2) {
|
|
|
|
if (item.code == item2) {
|
|
|
|
data.push(item)
|
|
|
|
data.push(item)
|
|
|
|
}
|
|
|
|
}
|
|
|
|