修改预配舱单

szh_zidingyibiaoti
sunzehua 2 years ago
parent 60a52d3f36
commit af540093b3

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

@ -2057,13 +2057,13 @@ export default {
portloadid: $details.portloadid || 'CNTAO',
portdischarge: $details.portdischarge,
portdischargeid: $details.portdischargeid,
description: '',
cargoid: '',
description: $details.description,
cargoid: $details.cargoid,
tempset: '',
tempid: '',
reeferf: '',
dclass: '',
marks: '',
marks: $details.marks,
dunno: '',
dattn: '',
dtel: '',
@ -2148,7 +2148,6 @@ export default {
}
})
}
console.log($details.portloadid, '$details.portloadid')
if ($data.portloadid) {
$data.shippercountry = 'CN'
$data.shippercountryName = 'CN/中国'
@ -2182,6 +2181,7 @@ export default {
$data.notifypartyname = newArr[0]
$data.notifypartyaddR1 = newArr[1]
}
// if ($data.placedeliveryid) {
// $data.consigneecountry = 'CN'

Loading…
Cancel
Save