必填项验证

dev
lilu 2 years ago
parent 9772c7a935
commit f41b80c41f

@ -282,37 +282,17 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
rules: {
type: Object,
default: () => {
return {}
}
} }
}, },
data() { data() {
return { return {
iscontainersoc: '', iscontainersoc: ''
rules: {
// 'bookingEDIExt.sendCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.receiveCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.notifyCdoe': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.salerCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.masterBolIndicator': [ { required: true, message: 'Master Bol Indicator', trigger: 'blur' } ],
// 'bookingEDIExt.emanifestHbl': [ { required: true, message: 'EMANIFEST HBL', trigger: 'blur' } ],
// 'bookingEDIExt.consigneeEdiCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.shipperEdiCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.ediAttn': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.ediAttnTel': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.ediAttnMail': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.amsConsignee': [ { required: true, message: 'AMS', trigger: 'blur' } ],
// 'bookingEDIExt.amsNotifyParty': [ { required: true, message: 'AMS', trigger: 'blur' } ],
// 'bookingEDIExt.opEName': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.opTel': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.opEmail': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.acihbl': [ { required: true, message: 'ACI HBL', trigger: 'blur' } ],
// 'bookingEDIExt.s0CC0C': [ { required: true, message: 'S0C C0C', trigger: 'blur' } ],
// 'bookingEDIExt.goodsName': [ { required: true, message: '', trigger: 'blur' } ],
// 'iscontainersoc': [ { required: true, message: 'SOC', trigger: 'blur' } ],
// 'scaccode': [ { required: true, message: 'SCAC', trigger: 'blur' } ],
// 'itncode': [ { required: true, message: 'ITN', trigger: 'blur' } ],
// 'freightpayer': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.weiTuoFang': [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -355,6 +335,16 @@ export default {
} }
} }
</script> </script>
<style lang="less" scoped>
/deep/ .ant-form-explain{
display: none !important;
}
/deep/ .ant-form-item-children-icon .anticon-check-circle{
display: none;
}
</style>
<style lang="less"> <style lang="less">
.more-edi { .more-edi {
padding: 60px 20px; padding: 60px 20px;

@ -30,26 +30,28 @@
<i class="iconfont icon-dingdan"></i> 当前分单号 <span>{{ editDetails.hblno }}</span> <i class="iconfont icon-dingdan"></i> 当前分单号 <span>{{ editDetails.hblno }}</span>
</div> </div>
<sedOperationArea :details="editDetails" @save="saveFun" @copy="copyFun"></sedOperationArea> <sedOperationArea :details="editDetails" @save="saveFun" @copy="copyFun"></sedOperationArea>
<a-tabs type="card"> <a-tabs type="card" :activeKey="mainOrderActiveKey" @change="changeMainTab">
<a-tab-pane key="1" tab="基础信息"> <a-tab-pane key="1" tab="基础信息">
<div class="pane-box"> <div class="pane-box">
<!-- 基本信息 --> <!-- 基本信息 -->
<basicInfo :type="type" :details="editDetails" :ishd="true" @changeDetail="changeDetailFun"></basicInfo> <basicInfo ref="basicInfo" :type="type" :details="editDetails" :rules="basicRules" :ishd="true" @changeDetail="changeDetailFun"></basicInfo>
<!-- 收发通信息 --> <!-- 收发通信息 -->
<mailingInfo :details="editDetails" @changeDetail="changeDetailFun" @pkgsEnCapital="pkgsEnCapitalFun"></mailingInfo> <mailingInfo ref="mailingInfo" :details="editDetails" :rules="mailingRules" @changeDetail="changeDetailFun" @pkgsEnCapital="pkgsEnCapitalFun"></mailingInfo>
<!-- 货物信息 --> <!-- 货物信息 -->
<cargoInfo :details="editDetails" @changeDetail="changeDetailFun"></cargoInfo> <cargoInfo ref="cargoInfo" :details="editDetails" :rules="cargoRules" @changeDetail="changeDetailFun"></cargoInfo>
<!-- 签单信息 --> <!-- 签单信息 -->
<billInfo :details="editDetails" @changeDetail="changeDetailFun"></billInfo> <billInfo ref="billInfo" :details="editDetails" :rules="billRules" @changeDetail="changeDetailFun"></billInfo>
<!-- 备注信息 --> <!-- 备注信息 -->
<remarksInfo :details="editDetails" @changeDetail="changeDetailFun"></remarksInfo> <remarksInfo ref="remarksInfo" :details="editDetails" :rules="remarksRules" @changeDetail="changeDetailFun"></remarksInfo>
<!-- 箱型 --> <!-- 箱型 -->
<goodsTable :details="editDetails" @changeDetail="changeDetailFun"></goodsTable> <goodsTable ref="goodsTable" :details="editDetails" @changeDetail="changeDetailFun"></goodsTable>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="EDI补充信息"> <a-tab-pane key="2" tab="EDI补充信息">
<ediMore <ediMore
class="pane-box" class="pane-box"
ref="ediMore"
:rules="ediRules"
:details="editDetails" :details="editDetails"
@changeDetail="changeDetailFun" @changeDetail="changeDetailFun"
v-if="!inPageLoading" v-if="!inPageLoading"
@ -97,6 +99,12 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
checkFrom: {
type: Array,
default: () => {
return []
}
} }
}, },
components: { components: {
@ -118,7 +126,120 @@ export default {
editDetails: null, editDetails: null,
editIndex: 0, editIndex: 0,
showSecNav: true, showSecNav: true,
inSecLoad: false inSecLoad: false,
mainOrderActiveKey: '1',
basicRules: {
customername: [ { required: false, message: '请选择客户名', trigger: 'change' } ],
mblno: [{ required: false, message: '请输入提单号', trigger: 'change' }],
carrierid: [{ required: false, message: '请选择船公司', trigger: 'change' }],
forwarder: [{ required: false, message: '请输入订舱代理', trigger: 'change' }],
pono: [{ required: false, message: '请输入PO NO', trigger: 'change' }],
hblno: [{ required: false, message: '请输入分提单号', trigger: 'change' }],
bookingno: [{ required: false, message: '请输入订舱编号', trigger: 'change' }],
contractno: [{ required: false, message: '请输入EP号/约号', trigger: 'change' }],
vessel: [{ required: false, message: '请输入船名', trigger: 'change' }],
lanecode: [{ required: false, message: '请输入航线代码', trigger: 'change' }],
voynoinner: [{ required: false, message: '请输入内部航次', trigger: 'change' }],
voyno: [{ required: false, message: '请输入海关航次', trigger: 'change' }],
etd: [{ required: false, message: '请选择开船日期', trigger: 'change' }],
atd: [{ required: false, message: '请选择实际开船日期', trigger: 'change' }],
lanename: [{ required: false, message: '请输入航线', trigger: 'change' }],
shipagency: [{ required: false, message: '请输入船代', trigger: 'change' }],
sale: [{ required: false, message: '请选择销售人员', trigger: 'change' }],
op: [{ required: false, message: '请选择操作人员', trigger: 'change' }],
doc: [{ required: false, message: '请选择单证人员', trigger: 'change' }],
custservice: [{ required: false, message: '请选择客服人员', trigger: 'change' }]
},
mailingRules: {
shipper: [ { required: false, message: '请输入发货人', trigger: 'change' } ],
consignee: [ { required: false, message: '请输入收货人', trigger: 'change' } ],
notifyparty: [ { required: false, message: '请输入通知人', trigger: 'change' } ],
yard: [ { required: false, message: '请输入场站', trigger: 'change' } ],
customser: [ { required: false, message: '请输入报关行', trigger: 'change' } ],
trucker: [ { required: false, message: '请输入车队', trigger: 'change' } ],
agentid: [ { required: false, message: '请输入国外代理', trigger: 'change' } ],
eta: [ { required: false, message: '请选择预抵日期', trigger: 'change' } ],
closingdate: [ { required: false, message: '请选择截港时间', trigger: 'change' } ],
closedocdate: [ { required: false, message: '请选择截单时间', trigger: 'change' } ],
closevgmdate: [ { required: false, message: '请选择VGM时间', trigger: 'change' } ],
placereceiptid: [ { required: false, message: '请选择收货代码', trigger: 'change' } ],
placereceipt: [ { required: false, message: '请选择收货地', trigger: 'change' } ],
portloadid: [ { required: false, message: '请选择装货港代码', trigger: 'change' } ],
portload: [ { required: false, message: '请选择装货港', trigger: 'change' } ],
transportid: [ { required: false, message: '请选择中转港代码', trigger: 'change' } ],
transport: [ { required: false, message: '请选择中转港', trigger: 'change' } ],
portdischargeid: [ { required: false, message: '请选择卸货港代码', trigger: 'change' } ],
portdischarge: [ { required: false, message: '请选择卸货港', trigger: 'change' } ],
destinationid: [ { required: false, message: '请选择目的代码', trigger: 'change' } ],
destination: [ { required: false, message: '请选择目的地', trigger: 'change' } ],
placedeliveryid: [ { required: false, message: '请选择交货代码', trigger: 'change' } ],
placedelivery: [ { required: false, message: '请选择交货地', trigger: 'change' } ],
pkgs: [ { required: false, message: '请输入件数', trigger: 'change' } ],
kindpkgs: [ { required: false, message: '请输入包装', trigger: 'change' } ],
kgs: [ { required: false, message: '请输入毛重', trigger: 'change' } ],
cbm: [ { required: false, message: '请输入尺寸', trigger: 'change' } ],
},
cargoRules: {
marks: [ { required: false, message: '请输入Seal No. Marks & Nos', trigger: 'change' } ],
cargoid: [ { required: false, message: '请选择货物标志', trigger: 'change' } ],
hscode: [ { required: false, message: '请输入HS编码', trigger: 'change' } ],
description: [ { required: false, message: '请输入包装种类与货名', trigger: 'change' } ]
},
billRules: {
issuetype: [ { required: false, message: '请选择签单方式', trigger: 'change' } ],
issuedate: [ { required: false, message: '请选择签单日期', trigger: 'change' } ],
// issueplace: [ { required: false, message: '', trigger: 'change' } ],
issueplaceid: [ { required: false, message: '请输入签单地代码', trigger: 'change' } ],
nobill: [ { required: false, message: '请选择提单份数', trigger: 'change' } ],
copynobilll: [ { required: false, message: '请选择副本份数', trigger: 'change' } ],
prepardat: [ { required: false, message: '请选择预付地点', trigger: 'change' } ],
payableat: [ { required: false, message: '请选择到付地点', trigger: 'change' } ],
blfrt: [ { required: false, message: '请选择付费方式', trigger: 'change' } ],
thirdpayaddr: [ { required: false, message: '请输入第三付款地', trigger: 'change' } ],
service: [ { required: false, message: '请选择运输条款', trigger: 'change' } ],
reeferf: [ { required: false, message: '请输入冷藏通风量', trigger: 'change' } ],
tempset: [ { required: false, message: '请输入温度', trigger: 'change' } ],
tempid: [ { required: false, message: '请选择温度单位', trigger: 'change' } ],
tempmin: [ { required: false, message: '请输入最低温度', trigger: 'change' } ],
tempmax: [ { required: false, message: '请输入最高温度', trigger: 'change' } ],
humidity: [ { required: false, message: '请输入湿度', trigger: 'change' } ],
dclass: [ { required: false, message: '请输入危险品等级', trigger: 'change' } ],
dunno: [ { required: false, message: '请输入危险品编号', trigger: 'change' } ],
dpage: [ { required: false, message: '请输入危险品页号', trigger: 'change' } ],
dlabel: [ { required: false, message: '请输入危险品标签', trigger: 'change' } ],
linkman: [ { required: false, message: '请输入危险品联系人', trigger: 'change' } ],
},
remarksRules: {
soremark: [ { required: false, message: '请输入订舱备注', trigger: 'change' } ],
siremark: [ { required: false, message: '请输入截单备注', trigger: 'change' } ],
},
ediRules: {
'bookingEDIExt.sendCode': [ { required: false, message: '请输入发送方EDI代码', trigger: 'change' } ],
'bookingEDIExt.receiveCode': [ { required: false, message: '请输入接收方EDI代码', trigger: 'change' } ],
'bookingEDIExt.notifyCdoe': [ { required: false, message: '请输入通知方EDI代码', trigger: 'change' } ],
'bookingEDIExt.salerCode': [ { required: false, message: '请输入销售EDI代码', trigger: 'change' } ],
'bookingEDIExt.masterBolIndicator': [ { required: false, message: '请输入Master Bol Indicator', trigger: 'change' } ],
'bookingEDIExt.emanifestHbl': [ { required: false, message: '请输入EMANIFEST HBL', trigger: 'change' } ],
'bookingEDIExt.consigneeEdiCode': [ { required: false, message: '请输入收货人EDI代码', trigger: 'change' } ],
'bookingEDIExt.shipperEdiCode': [ { required: false, message: '请输入发货人EDI代码', trigger: 'change' } ],
'bookingEDIExt.ediAttn': [ { required: false, message: '请输入EDI联系人名称', trigger: 'change' } ],
'bookingEDIExt.ediAttnTel': [ { required: false, message: '请输入EDI联系人电话', trigger: 'change' } ],
'bookingEDIExt.ediAttnMail': [ { required: false, message: '请输入EDI联系人邮箱', trigger: 'change' } ],
'bookingEDIExt.amsConsignee': [ { required: false, message: '请输入AMS收货人', trigger: 'change' } ],
'bookingEDIExt.amsNotifyParty': [ { required: false, message: '请输入AMS通知人', trigger: 'change' } ],
'bookingEDIExt.opEName': [ { required: false, message: '请输入操作英文名称', trigger: 'change' } ],
'bookingEDIExt.opTel': [ { required: false, message: '请输入操作电话', trigger: 'change' } ],
'bookingEDIExt.opEmail': [ { required: false, message: '请输入操作邮箱', trigger: 'change' } ],
'bookingEDIExt.acihbl': [ { required: false, message: '请输入ACI HBL', trigger: 'change' } ],
'bookingEDIExt.s0CC0C': [ { required: false, message: '请输入S0C C0C', trigger: 'change' } ],
'bookingEDIExt.goodsName': [ { required: false, message: '请输入商品名称', trigger: 'change' } ],
'iscontainersoc': [ { required: false, message: '请输入SOC箱', trigger: 'change' } ],
'scaccode': [ { required: false, message: '请输入SCAC代码', trigger: 'change' } ],
'itncode': [ { required: false, message: '请输入ITN编号', trigger: 'change' } ],
'freightpayer': [ { required: false, message: '请输入付款方', trigger: 'change' } ],
'bookingEDIExt.weiTuoFang': [ { required: false, message: '请输入委托方', trigger: 'change' } ],
},
hasEdiRules: false
} }
}, },
watch: { watch: {
@ -155,7 +276,15 @@ export default {
immediate: true, immediate: true,
handler(nD, oD) { handler(nD, oD) {
this.id = this.$route.query.id this.id = this.$route.query.id
// this.$refs.basicInfo.$refs.basicFrom.clearValidate()
// this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
// this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
// this.$refs.billInfo.$refs.billFrom.clearValidate()
// this.$refs.remarksInfo.$refs.remarkFrom.clearValidate()
} }
},
checkFrom (nval, oval) {
this.checkFromInit()
} }
}, },
created() { created() {
@ -177,11 +306,46 @@ export default {
} }
}, },
mounted() { mounted() {
this.checkFromInit()
// setTimeout(() => { // setTimeout(() => {
// this.$message.destroy() // this.$message.destroy()
// }, 1500) // }, 1500)
}, },
methods: { methods: {
checkFromInit () {
Object.keys(this.basicRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.basicRules[item][0].required = true
}
})
Object.keys(this.mailingRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.mailingRules[item][0].required = true
}
})
Object.keys(this.cargoRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.cargoRules[item][0].required = true
}
})
Object.keys(this.billRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.billRules[item][0].required = true
}
})
Object.keys(this.remarksRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.remarksRules[item][0].required = true
}
})
Object.keys(this.ediRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.ediRules[item][0].required = true
// this.hasEdiRules = true
}
})
this.$forceUpdate()
},
addSedOrder() { addSedOrder() {
if (this.isAdd) { if (this.isAdd) {
this.$message.error('请先保存主单') this.$message.error('请先保存主单')
@ -263,8 +427,59 @@ export default {
this.$message.error('请输入分提单号') this.$message.error('请输入分提单号')
return false return false
} }
// - start
let basicFrom = true
this.$refs.basicInfo.$refs.basicFrom.validate(valid => {
basicFrom = valid
})
let mailingFrom = true
this.$refs.mailingInfo.$refs.mailingFrom.validate(valid => {
mailingFrom = valid
})
let cargoFrom = true
this.$refs.cargoInfo.$refs.cargoFrom.validate(valid => {
cargoFrom = valid
})
let billFrom = true
this.$refs.billInfo.$refs.billFrom.validate(valid => {
billFrom = valid
})
let remarksFrom = true
this.$refs.remarksInfo.$refs.remarkFrom.validate(valid => {
remarksFrom = valid
})
if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) {
this.$message.error('请填写完整数据')
return false
}
if (this.$refs.ediMore) {
let ediFrom = true
this.$refs.ediMore.$refs.ediFrom.validate(valid => {
ediFrom = valid
})
if (!ediFrom) {
this.mainOrderActiveKey = '2'
this.$message.error('请填写完整EDI数据')
return false
}
} else {
// edi
Object.keys(this.ediRules).map((item, index) => {
console.log(this.editDetails[item.split('.')[0]][item.split('.')[1]])
if (this.checkFrom.includes(item) && !this.editDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
}
})
if (this.hasEdiRules) {
this.mainOrderActiveKey = '2'
this.$message.error('请填写完整EDI数据')
return false
}
}
// - end
let data = JSON.parse(JSON.stringify(this.editDetails)) let data = JSON.parse(JSON.stringify(this.editDetails))
delete data.isNoSave delete data.isNoSave
data.parentId = this.$route.query.id
BookingOrderUpdate(data) BookingOrderUpdate(data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
@ -287,9 +502,59 @@ export default {
this.$message.error('请输入分提单号') this.$message.error('请输入分提单号')
return false return false
} }
// - start
let basicFrom = true
this.$refs.basicInfo.$refs.basicFrom.validate(valid => {
basicFrom = valid
})
let mailingFrom = true
this.$refs.mailingInfo.$refs.mailingFrom.validate(valid => {
mailingFrom = valid
})
let cargoFrom = true
this.$refs.cargoInfo.$refs.cargoFrom.validate(valid => {
cargoFrom = valid
})
let billFrom = true
this.$refs.billInfo.$refs.billFrom.validate(valid => {
billFrom = valid
})
let remarksFrom = true
this.$refs.remarksInfo.$refs.remarkFrom.validate(valid => {
remarksFrom = valid
})
if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) {
this.$message.error('请填写完整数据')
return false
}
if (this.$refs.ediMore) {
let ediFrom = true
this.$refs.ediMore.$refs.ediFrom.validate(valid => {
ediFrom = valid
})
if (!ediFrom) {
this.mainOrderActiveKey = '2'
this.$message.error('请填写完整EDI数据')
return false
}
} else {
// edi
Object.keys(this.ediRules).map((item, index) => {
console.log(this.editDetails[item.split('.')[0]][item.split('.')[1]])
if (this.checkFrom.includes(item) && !this.editDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
}
})
if (this.hasEdiRules) {
this.mainOrderActiveKey = '2'
this.$message.error('请填写完整EDI数据')
return false
}
}
// - end
let data = JSON.parse(JSON.stringify(this.editDetails)) let data = JSON.parse(JSON.stringify(this.editDetails))
delete data.isNoSave delete data.isNoSave
data.parentid = this.$route.query.id data.parentId = this.$route.query.id
data.id = 0 data.id = 0
data.ctnInputs.map((item, index) => { data.ctnInputs.map((item, index) => {
item.id = 0 item.id = 0
@ -357,7 +622,10 @@ export default {
}, },
pkgsEnCapitalFun (data) { pkgsEnCapitalFun (data) {
this.editDetails.totalno = data this.editDetails.totalno = data
} },
changeMainTab (e) {
this.mainOrderActiveKey = e
},
} }
} }
</script> </script>

@ -21,7 +21,7 @@
@copy="copyBookingFun" @copy="copyBookingFun"
@addSedList="addSedList" @addSedList="addSedList"
></operationArea> ></operationArea>
<a-tabs type="card"> <a-tabs type="card" :activeKey="mainOrderActiveKey" @change="changeMainTab">
<a-tab-pane key="1-1" tab="基础信息"> <a-tab-pane key="1-1" tab="基础信息">
<div class="pane-box"> <div class="pane-box">
<!-- 基本信息 --> <!-- 基本信息 -->
@ -87,6 +87,7 @@
:details="bookingDetails" :details="bookingDetails"
:sedOrderList="bookingDetails.hbList" :sedOrderList="bookingDetails.hbList"
:isAdd="isAdd" :isAdd="isAdd"
:checkFrom="checkFrom"
@changeHB="changeHBFun" @changeHB="changeHBFun"
></sedOrder> ></sedOrder>
</a-tab-pane> </a-tab-pane>
@ -256,117 +257,119 @@ export default {
inChildLoading: false, inChildLoading: false,
scrollTop: 0, scrollTop: 0,
checkFrom: [], checkFrom: [],
mainOrderActiveKey: '1-1',
basicRules: { basicRules: {
customername: [ { required: false, message: '请选择客户名', trigger: 'blur' } ], customername: [ { required: false, message: '请选择客户名', trigger: 'change' } ],
mblno: [{ required: false, message: '请输入提单号', trigger: 'blur' }], mblno: [{ required: false, message: '请输入提单号', trigger: 'change' }],
carrierid: [{ required: false, message: '请选择船公司', trigger: 'blur' }], carrierid: [{ required: false, message: '请选择船公司', trigger: 'change' }],
forwarder: [{ required: false, message: '请输入订舱代理', trigger: 'blur' }], forwarder: [{ required: false, message: '请输入订舱代理', trigger: 'change' }],
pono: [{ required: false, message: '请输入PO NO', trigger: 'blur' }], pono: [{ required: false, message: '请输入PO NO', trigger: 'change' }],
hblno: [{ required: false, message: '请输入分提单号', trigger: 'blur' }], hblno: [{ required: false, message: '请输入分提单号', trigger: 'change' }],
bookingno: [{ required: false, message: '请输入订舱编号', trigger: 'blur' }], bookingno: [{ required: false, message: '请输入订舱编号', trigger: 'change' }],
contractno: [{ required: false, message: '请输入EP号/约号', trigger: 'blur' }], contractno: [{ required: false, message: '请输入EP号/约号', trigger: 'change' }],
vessel: [{ required: false, message: '请输入船名', trigger: 'blur' }], vessel: [{ required: false, message: '请输入船名', trigger: 'change' }],
lanecode: [{ required: false, message: '请输入航线代码', trigger: 'blur' }], lanecode: [{ required: false, message: '请输入航线代码', trigger: 'change' }],
voynoinner: [{ required: false, message: '请输入内部航次', trigger: 'blur' }], voynoinner: [{ required: false, message: '请输入内部航次', trigger: 'change' }],
voyno: [{ required: false, message: '请输入海关航次', trigger: 'blur' }], voyno: [{ required: false, message: '请输入海关航次', trigger: 'change' }],
etd: [{ required: false, message: '请选择开船日期', trigger: 'blur' }], etd: [{ required: false, message: '请选择开船日期', trigger: 'change' }],
atd: [{ required: false, message: '请选择实际开船日期', trigger: 'blur' }], atd: [{ required: false, message: '请选择实际开船日期', trigger: 'change' }],
lanename: [{ required: false, message: '请输入航线', trigger: 'blur' }], lanename: [{ required: false, message: '请输入航线', trigger: 'change' }],
shipagency: [{ required: false, message: '请输入船代', trigger: 'blur' }], shipagency: [{ required: false, message: '请输入船代', trigger: 'change' }],
sale: [{ required: false, message: '请选择销售人员', trigger: 'blur' }], sale: [{ required: false, message: '请选择销售人员', trigger: 'change' }],
op: [{ required: false, message: '请选择操作人员', trigger: 'blur' }], op: [{ required: false, message: '请选择操作人员', trigger: 'change' }],
doc: [{ required: false, message: '请选择单证人员', trigger: 'blur' }], doc: [{ required: false, message: '请选择单证人员', trigger: 'change' }],
custservice: [{ required: false, message: '请选择客服人员', trigger: 'blur' }] custservice: [{ required: false, message: '请选择客服人员', trigger: 'change' }]
}, },
mailingRules: { mailingRules: {
shipper: [ { required: false, message: '请输入发货人', trigger: 'blur' } ], shipper: [ { required: false, message: '请输入发货人', trigger: 'change' } ],
consignee: [ { required: false, message: '请输入收货人', trigger: 'blur' } ], consignee: [ { required: false, message: '请输入收货人', trigger: 'change' } ],
notifyparty: [ { required: false, message: '请输入通知人', trigger: 'blur' } ], notifyparty: [ { required: false, message: '请输入通知人', trigger: 'change' } ],
yard: [ { required: false, message: '请输入场站', trigger: 'blur' } ], yard: [ { required: false, message: '请输入场站', trigger: 'change' } ],
customser: [ { required: false, message: '请输入报关行', trigger: 'blur' } ], customser: [ { required: false, message: '请输入报关行', trigger: 'change' } ],
trucker: [ { required: false, message: '请输入车队', trigger: 'blur' } ], trucker: [ { required: false, message: '请输入车队', trigger: 'change' } ],
agentid: [ { required: false, message: '请输入国外代理', trigger: 'blur' } ], agentid: [ { required: false, message: '请输入国外代理', trigger: 'change' } ],
eta: [ { required: false, message: '请选择预抵日期', trigger: 'blur' } ], eta: [ { required: false, message: '请选择预抵日期', trigger: 'change' } ],
closingdate: [ { required: false, message: '请选择截港时间', trigger: 'blur' } ], closingdate: [ { required: false, message: '请选择截港时间', trigger: 'change' } ],
closedocdate: [ { required: false, message: '请选择截单时间', trigger: 'blur' } ], closedocdate: [ { required: false, message: '请选择截单时间', trigger: 'change' } ],
closevgmdate: [ { required: false, message: '请选择VGM时间', trigger: 'blur' } ], closevgmdate: [ { required: false, message: '请选择VGM时间', trigger: 'change' } ],
placereceiptid: [ { required: false, message: '请选择收货代码', trigger: 'blur' } ], placereceiptid: [ { required: false, message: '请选择收货代码', trigger: 'change' } ],
placereceipt: [ { required: false, message: '请选择收货地', trigger: 'blur' } ], placereceipt: [ { required: false, message: '请选择收货地', trigger: 'change' } ],
portloadid: [ { required: false, message: '请选择装货港代码', trigger: 'blur' } ], portloadid: [ { required: false, message: '请选择装货港代码', trigger: 'change' } ],
portload: [ { required: false, message: '请选择装货港', trigger: 'blur' } ], portload: [ { required: false, message: '请选择装货港', trigger: 'change' } ],
transportid: [ { required: false, message: '请选择中转港代码', trigger: 'blur' } ], transportid: [ { required: false, message: '请选择中转港代码', trigger: 'change' } ],
transport: [ { required: false, message: '请选择中转港', trigger: 'blur' } ], transport: [ { required: false, message: '请选择中转港', trigger: 'change' } ],
portdischargeid: [ { required: false, message: '请选择卸货港代码', trigger: 'blur' } ], portdischargeid: [ { required: false, message: '请选择卸货港代码', trigger: 'change' } ],
portdischarge: [ { required: false, message: '请选择卸货港', trigger: 'blur' } ], portdischarge: [ { required: false, message: '请选择卸货港', trigger: 'change' } ],
destinationid: [ { required: false, message: '请选择目的代码', trigger: 'blur' } ], destinationid: [ { required: false, message: '请选择目的代码', trigger: 'change' } ],
destination: [ { required: false, message: '请选择目的地', trigger: 'blur' } ], destination: [ { required: false, message: '请选择目的地', trigger: 'change' } ],
placedeliveryid: [ { required: false, message: '请选择交货代码', trigger: 'blur' } ], placedeliveryid: [ { required: false, message: '请选择交货代码', trigger: 'change' } ],
placedelivery: [ { required: false, message: '请选择交货地', trigger: 'blur' } ], placedelivery: [ { required: false, message: '请选择交货地', trigger: 'change' } ],
pkgs: [ { required: false, message: '请输入件数', trigger: 'blur' } ], pkgs: [ { required: false, message: '请输入件数', trigger: 'change' } ],
kindpkgs: [ { required: false, message: '请输入包装', trigger: 'blur' } ], kindpkgs: [ { required: false, message: '请输入包装', trigger: 'change' } ],
kgs: [ { required: false, message: '请输入毛重', trigger: 'blur' } ], kgs: [ { required: false, message: '请输入毛重', trigger: 'change' } ],
cbm: [ { required: false, message: '请输入尺寸', trigger: 'blur' } ], cbm: [ { required: false, message: '请输入尺寸', trigger: 'change' } ],
}, },
cargoRules: { cargoRules: {
marks: [ { required: false, message: '请输入Seal No. Marks & Nos', trigger: 'blur' } ], marks: [ { required: false, message: '请输入Seal No. Marks & Nos', trigger: 'change' } ],
cargoid: [ { required: false, message: '请选择货物标志', trigger: 'blur' } ], cargoid: [ { required: false, message: '请选择货物标志', trigger: 'change' } ],
hscode: [ { required: false, message: '请输入HS编码', trigger: 'blur' } ], hscode: [ { required: false, message: '请输入HS编码', trigger: 'change' } ],
description: [ { required: false, message: '请输入包装种类与货名', trigger: 'blur' } ] description: [ { required: false, message: '请输入包装种类与货名', trigger: 'change' } ]
}, },
billRules: { billRules: {
issuetype: [ { required: false, message: '请选择签单方式', trigger: 'blur' } ], issuetype: [ { required: false, message: '请选择签单方式', trigger: 'change' } ],
issuedate: [ { required: false, message: '请选择签单日期', trigger: 'blur' } ], issuedate: [ { required: false, message: '请选择签单日期', trigger: 'change' } ],
issueplace: [ { required: false, message: '请选择签单地点', trigger: 'blur' } ], // issueplace: [ { required: false, message: '', trigger: 'change' } ],
issueplaceid: [ { required: false, message: '请输入签单地代码', trigger: 'blur' } ], issueplaceid: [ { required: false, message: '请输入签单地代码', trigger: 'change' } ],
nobill: [ { required: false, message: '请选择提单份数', trigger: 'blur' } ], nobill: [ { required: false, message: '请选择提单份数', trigger: 'change' } ],
copynobilll: [ { required: false, message: '请选择副本份数', trigger: 'blur' } ], copynobilll: [ { required: false, message: '请选择副本份数', trigger: 'change' } ],
prepardat: [ { required: false, message: '请选择预付地点', trigger: 'blur' } ], prepardat: [ { required: false, message: '请选择预付地点', trigger: 'change' } ],
payableat: [ { required: false, message: '请选择到付地点', trigger: 'blur' } ], payableat: [ { required: false, message: '请选择到付地点', trigger: 'change' } ],
blfrt: [ { required: false, message: '请选择付费方式', trigger: 'blur' } ], blfrt: [ { required: false, message: '请选择付费方式', trigger: 'change' } ],
thirdpayaddr: [ { required: false, message: '请输入第三付款地', trigger: 'blur' } ], thirdpayaddr: [ { required: false, message: '请输入第三付款地', trigger: 'change' } ],
service: [ { required: false, message: '请选择运输条款', trigger: 'blur' } ], service: [ { required: false, message: '请选择运输条款', trigger: 'change' } ],
reeferf: [ { required: false, message: '请输入冷藏通风量', trigger: 'blur' } ], reeferf: [ { required: false, message: '请输入冷藏通风量', trigger: 'change' } ],
tempset: [ { required: false, message: '请输入温度', trigger: 'blur' } ], tempset: [ { required: false, message: '请输入温度', trigger: 'change' } ],
tempid: [ { required: false, message: '请选择温度单位', trigger: 'blur' } ], tempid: [ { required: false, message: '请选择温度单位', trigger: 'change' } ],
tempmin: [ { required: false, message: '请输入最低温度', trigger: 'blur' } ], tempmin: [ { required: false, message: '请输入最低温度', trigger: 'change' } ],
tempmax: [ { required: false, message: '请输入最高温度', trigger: 'blur' } ], tempmax: [ { required: false, message: '请输入最高温度', trigger: 'change' } ],
humidity: [ { required: false, message: '请输入湿度', trigger: 'blur' } ], humidity: [ { required: false, message: '请输入湿度', trigger: 'change' } ],
dclass: [ { required: false, message: '请输入危险品等级', trigger: 'blur' } ], dclass: [ { required: false, message: '请输入危险品等级', trigger: 'change' } ],
dunno: [ { required: false, message: '请输入危险品编号', trigger: 'blur' } ], dunno: [ { required: false, message: '请输入危险品编号', trigger: 'change' } ],
dpage: [ { required: false, message: '请输入危险品页号', trigger: 'blur' } ], dpage: [ { required: false, message: '请输入危险品页号', trigger: 'change' } ],
dlabel: [ { required: false, message: '请输入危险品标签', trigger: 'blur' } ], dlabel: [ { required: false, message: '请输入危险品标签', trigger: 'change' } ],
linkman: [ { required: false, message: '请输入危险品联系人', trigger: 'blur' } ], linkman: [ { required: false, message: '请输入危险品联系人', trigger: 'change' } ],
}, },
remarksRules: { remarksRules: {
soremark: [ { required: false, message: '请输入订舱备注', trigger: 'blur' } ], soremark: [ { required: false, message: '请输入订舱备注', trigger: 'change' } ],
siremark: [ { required: false, message: '请输入截单备注', trigger: 'blur' } ], siremark: [ { required: false, message: '请输入截单备注', trigger: 'change' } ],
}, },
ediRules: { ediRules: {
'bookingEDIExt.sendCode': [ { required: false, message: '请输入发送方EDI代码', trigger: 'blur' } ], 'bookingEDIExt.sendCode': [ { required: false, message: '请输入发送方EDI代码', trigger: 'change' } ],
'bookingEDIExt.receiveCode': [ { required: false, message: '请输入接收方EDI代码', trigger: 'blur' } ], 'bookingEDIExt.receiveCode': [ { required: false, message: '请输入接收方EDI代码', trigger: 'change' } ],
'bookingEDIExt.notifyCdoe': [ { required: false, message: '请输入通知方EDI代码', trigger: 'blur' } ], 'bookingEDIExt.notifyCdoe': [ { required: false, message: '请输入通知方EDI代码', trigger: 'change' } ],
'bookingEDIExt.salerCode': [ { required: false, message: '请输入销售EDI代码', trigger: 'blur' } ], 'bookingEDIExt.salerCode': [ { required: false, message: '请输入销售EDI代码', trigger: 'change' } ],
'bookingEDIExt.masterBolIndicator': [ { required: false, message: '请输入Master Bol Indicator', trigger: 'blur' } ], 'bookingEDIExt.masterBolIndicator': [ { required: false, message: '请输入Master Bol Indicator', trigger: 'change' } ],
'bookingEDIExt.emanifestHbl': [ { required: false, message: '请输入EMANIFEST HBL', trigger: 'blur' } ], 'bookingEDIExt.emanifestHbl': [ { required: false, message: '请输入EMANIFEST HBL', trigger: 'change' } ],
'bookingEDIExt.consigneeEdiCode': [ { required: false, message: '请输入收货人EDI代码', trigger: 'blur' } ], 'bookingEDIExt.consigneeEdiCode': [ { required: false, message: '请输入收货人EDI代码', trigger: 'change' } ],
'bookingEDIExt.shipperEdiCode': [ { required: false, message: '请输入发货人EDI代码', trigger: 'blur' } ], 'bookingEDIExt.shipperEdiCode': [ { required: false, message: '请输入发货人EDI代码', trigger: 'change' } ],
'bookingEDIExt.ediAttn': [ { required: false, message: '请输入EDI联系人名称', trigger: 'blur' } ], 'bookingEDIExt.ediAttn': [ { required: false, message: '请输入EDI联系人名称', trigger: 'change' } ],
'bookingEDIExt.ediAttnTel': [ { required: false, message: '请输入EDI联系人电话', trigger: 'blur' } ], 'bookingEDIExt.ediAttnTel': [ { required: false, message: '请输入EDI联系人电话', trigger: 'change' } ],
'bookingEDIExt.ediAttnMail': [ { required: false, message: '请输入EDI联系人邮箱', trigger: 'blur' } ], 'bookingEDIExt.ediAttnMail': [ { required: false, message: '请输入EDI联系人邮箱', trigger: 'change' } ],
'bookingEDIExt.amsConsignee': [ { required: false, message: '请输入AMS收货人', trigger: 'blur' } ], 'bookingEDIExt.amsConsignee': [ { required: false, message: '请输入AMS收货人', trigger: 'change' } ],
'bookingEDIExt.amsNotifyParty': [ { required: false, message: '请输入AMS通知人', trigger: 'blur' } ], 'bookingEDIExt.amsNotifyParty': [ { required: false, message: '请输入AMS通知人', trigger: 'change' } ],
'bookingEDIExt.opEName': [ { required: false, message: '请输入操作英文名称', trigger: 'blur' } ], 'bookingEDIExt.opEName': [ { required: false, message: '请输入操作英文名称', trigger: 'change' } ],
'bookingEDIExt.opTel': [ { required: false, message: '请输入操作电话', trigger: 'blur' } ], 'bookingEDIExt.opTel': [ { required: false, message: '请输入操作电话', trigger: 'change' } ],
'bookingEDIExt.opEmail': [ { required: false, message: '请输入操作邮箱', trigger: 'blur' } ], 'bookingEDIExt.opEmail': [ { required: false, message: '请输入操作邮箱', trigger: 'change' } ],
'bookingEDIExt.acihbl': [ { required: false, message: '请输入ACI HBL', trigger: 'blur' } ], 'bookingEDIExt.acihbl': [ { required: false, message: '请输入ACI HBL', trigger: 'change' } ],
'bookingEDIExt.s0CC0C': [ { required: false, message: '请输入S0C C0C', trigger: 'blur' } ], 'bookingEDIExt.s0CC0C': [ { required: false, message: '请输入S0C C0C', trigger: 'change' } ],
'bookingEDIExt.goodsName': [ { required: false, message: '请输入商品名称', trigger: 'blur' } ], 'bookingEDIExt.goodsName': [ { required: false, message: '请输入商品名称', trigger: 'change' } ],
'iscontainersoc': [ { required: false, message: '请输入SOC箱', trigger: 'blur' } ], 'iscontainersoc': [ { required: false, message: '请输入SOC箱', trigger: 'change' } ],
'scaccode': [ { required: false, message: '请输入SCAC代码', trigger: 'blur' } ], 'scaccode': [ { required: false, message: '请输入SCAC代码', trigger: 'change' } ],
'itncode': [ { required: false, message: '请输入ITN编号', trigger: 'blur' } ], 'itncode': [ { required: false, message: '请输入ITN编号', trigger: 'change' } ],
'freightpayer': [ { required: false, message: '请输入付款方', trigger: 'blur' } ], 'freightpayer': [ { required: false, message: '请输入付款方', trigger: 'change' } ],
'bookingEDIExt.weiTuoFang': [ { required: false, message: '请输入委托方', trigger: 'blur' } ], 'bookingEDIExt.weiTuoFang': [ { required: false, message: '请输入委托方', trigger: 'change' } ],
} },
hasEdiRules: false
} }
}, },
computed: { computed: {
@ -425,6 +428,7 @@ export default {
excuteRulesType: this.excuteRulesType, excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd, isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey, tabActiveKey: this.tabActiveKey,
mainOrderActiveKey: this.mainOrderActiveKey,
type: this.type, type: this.type,
isCopy: this.isCopy, isCopy: this.isCopy,
id: this.id id: this.id
@ -437,6 +441,7 @@ export default {
excuteRulesType: this.excuteRulesType, excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd, isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey, tabActiveKey: this.tabActiveKey,
mainOrderActiveKey: this.mainOrderActiveKey,
type: this.type, type: this.type,
isCopy: this.isCopy isCopy: this.isCopy
// id: this.id // id: this.id
@ -449,6 +454,7 @@ export default {
excuteRulesType: this.excuteRulesType, excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd, isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey, tabActiveKey: this.tabActiveKey,
mainOrderActiveKey: this.mainOrderActiveKey,
type: this.type, type: this.type,
isCopy: this.isCopy, isCopy: this.isCopy,
id: this.id id: this.id
@ -482,6 +488,7 @@ export default {
excuteRulesType: this.excuteRulesType, excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd, isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey, tabActiveKey: this.tabActiveKey,
mainOrderActiveKey: this.mainOrderActiveKey,
type: this.type, type: this.type,
isCopy: this.isCopy, isCopy: this.isCopy,
id: this.id id: this.id
@ -494,6 +501,7 @@ export default {
excuteRulesType: this.excuteRulesType, excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd, isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey, tabActiveKey: this.tabActiveKey,
mainOrderActiveKey: this.mainOrderActiveKey,
type: this.type, type: this.type,
isCopy: this.isCopy isCopy: this.isCopy
// id: this.id // id: this.id
@ -506,6 +514,7 @@ export default {
excuteRulesType: this.excuteRulesType, excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd, isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey, tabActiveKey: this.tabActiveKey,
mainOrderActiveKey: this.mainOrderActiveKey,
type: this.type, type: this.type,
isCopy: this.isCopy, isCopy: this.isCopy,
id: this.id id: this.id
@ -532,6 +541,7 @@ export default {
// ) // )
this.inChildLoading = true this.inChildLoading = true
const newId = this.$route.query.id const newId = this.$route.query.id
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') { if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
this.id = this.$route.query.id this.id = this.$route.query.id
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`])) const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
@ -540,6 +550,7 @@ export default {
this.excuteRulesType = $data.excuteRulesType this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.isCopy = this.$route.query.isCopy this.isCopy = this.$route.query.isCopy
this.inPageLoading = false this.inPageLoading = false
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) { if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
@ -560,6 +571,7 @@ export default {
this.excuteRulesType = $data.excuteRulesType this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.isCopy = this.$route.query.isCopy this.isCopy = this.$route.query.isCopy
this.inPageLoading = false this.inPageLoading = false
// console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy) // console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
@ -585,6 +597,7 @@ export default {
this.excuteRulesType = $data.excuteRulesType this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.isCopy = this.$route.query.isCopy this.isCopy = this.$route.query.isCopy
this.inPageLoading = false this.inPageLoading = false
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) { if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
@ -607,9 +620,15 @@ export default {
this.type = this.$route.query.type this.type = this.$route.query.type
this.isCopy = this.$route.query.isCopy || false this.isCopy = this.$route.query.isCopy || false
this.tabActiveKey = '1' this.tabActiveKey = '1'
this.mainOrderActiveKey = '1-1'
this.$forceUpdate() this.$forceUpdate()
this.init() this.init()
} }
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
this.$refs.billInfo.$refs.billFrom.clearValidate()
this.$refs.remarksInfo.$refs.remarkFrom.clearValidate()
}, },
init() { init() {
this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
@ -631,10 +650,15 @@ export default {
getDjyTenantConfig () { getDjyTenantConfig () {
getDjyTenantConfig({ getDjyTenantConfig({
type: 'customer_config_type' type: 'booking_form_col'
}) })
.then(res => { .then(res => {
this.checkFrom = ['customername', 'mblno', 'carrierid', 'forwarder', 'shipper', 'consignee', 'notifyparty', 'yard', 'customser', 'marks', 'cargoid', 'hscode', 'issuetype', 'issuedate', 'issueplace', 'soremark', 'siremark', 'bookingEDIExt.sendCode', 'bookingEDIExt.receiveCode'] // this.checkFrom = ['customername', 'mblno', 'carrierid', 'forwarder', 'shipper', 'consignee', 'notifyparty', 'yard', 'customser', 'marks', 'cargoid', 'hscode', 'issuetype', 'issuedate', 'soremark', 'siremark', 'bookingEDIExt.sendCode', 'bookingEDIExt.receiveCode']
if (res.data && JSON.parse(res.data.configJson).length) {
this.checkFrom = JSON.parse(res.data.configJson) || []
} else {
this.checkFrom = []
}
Object.keys(this.basicRules).map((item, index) => { Object.keys(this.basicRules).map((item, index) => {
if (this.checkFrom.includes(item)) { if (this.checkFrom.includes(item)) {
this.basicRules[item][0].required = true this.basicRules[item][0].required = true
@ -663,6 +687,7 @@ export default {
Object.keys(this.ediRules).map((item, index) => { Object.keys(this.ediRules).map((item, index) => {
if (this.checkFrom.includes(item)) { if (this.checkFrom.includes(item)) {
this.ediRules[item][0].required = true this.ediRules[item][0].required = true
// this.hasEdiRules = true
} }
}) })
this.$forceUpdate() this.$forceUpdate()
@ -740,6 +765,14 @@ export default {
}) })
} }
this.$set(this, 'bookingDetails', res.data) this.$set(this, 'bookingDetails', res.data)
// // edi
// Object.keys(this.ediRules).map((item, index) => {
// console.log(this.bookingDetails[item.split('.')[0]][item.split('.')[1]])
// if (this.checkFrom.includes(item) && !this.bookingDetails[item.split('.')[0]][item.split('.')[1]]) {
// this.hasEdiRules = true
// }
// })
setTimeout(() => { setTimeout(() => {
// console.log(' 1. === ===') // console.log(' 1. === ===')
this.inChildLoading = false this.inChildLoading = false
@ -780,22 +813,54 @@ export default {
return false return false
} }
// - start // - start
// const basicFrom = this.$refs.basicInfo.checkbasic() let basicFrom = true
// const mailingFrom = this.$refs.mailingInfo.checkbasic() this.$refs.basicInfo.$refs.basicFrom.validate(valid => {
// const cargoFrom = this.$refs.cargoInfo.checkbasic() basicFrom = valid
// const billFrom = this.$refs.billInfo.checkbasic() })
// const remarksFrom = this.$refs.remarksInfo.checkbasic() let mailingFrom = true
// if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) { this.$refs.mailingInfo.$refs.mailingFrom.validate(valid => {
// this.$message.error('') mailingFrom = valid
// return false })
// } let cargoFrom = true
// if (this.$refs.ediMore && !this.$refs.ediMore.checkbasic()) { this.$refs.cargoInfo.$refs.cargoFrom.validate(valid => {
// this.$message.error('') cargoFrom = valid
// return false })
// } else if (!this.$refs.ediMore) { let billFrom = true
// console.log('== ==') this.$refs.billInfo.$refs.billFrom.validate(valid => {
// } billFrom = valid
debugger })
let remarksFrom = true
this.$refs.remarksInfo.$refs.remarkFrom.validate(valid => {
remarksFrom = valid
})
if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) {
this.$message.error('请填写完整数据')
return false
}
if (this.$refs.ediMore) {
let ediFrom = true
this.$refs.ediMore.$refs.ediFrom.validate(valid => {
ediFrom = valid
})
if (!ediFrom) {
this.mainOrderActiveKey = '2-2'
this.$message.error('请填写完整EDI数据')
return false
}
} else {
// edi
Object.keys(this.ediRules).map((item, index) => {
console.log(this.bookingDetails[item.split('.')[0]][item.split('.')[1]])
if (this.checkFrom.includes(item) && !this.bookingDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
}
})
if (this.hasEdiRules) {
this.mainOrderActiveKey = '2-2'
this.$message.error('请填写完整EDI数据')
return false
}
}
// - end // - end
const _data = JSON.parse(JSON.stringify(this.bookingDetails)) const _data = JSON.parse(JSON.stringify(this.bookingDetails))
delete _data.hbList delete _data.hbList
@ -840,6 +905,56 @@ export default {
this.$message.error('请输入提单号') this.$message.error('请输入提单号')
return false return false
} }
// - start
let basicFrom = true
this.$refs.basicInfo.$refs.basicFrom.validate(valid => {
basicFrom = valid
})
let mailingFrom = true
this.$refs.mailingInfo.$refs.mailingFrom.validate(valid => {
mailingFrom = valid
})
let cargoFrom = true
this.$refs.cargoInfo.$refs.cargoFrom.validate(valid => {
cargoFrom = valid
})
let billFrom = true
this.$refs.billInfo.$refs.billFrom.validate(valid => {
billFrom = valid
})
let remarksFrom = true
this.$refs.remarksInfo.$refs.remarkFrom.validate(valid => {
remarksFrom = valid
})
if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) {
this.$message.error('请填写完整数据')
return false
}
if (this.$refs.ediMore) {
let ediFrom = true
this.$refs.ediMore.$refs.ediFrom.validate(valid => {
ediFrom = valid
})
if (!ediFrom) {
this.mainOrderActiveKey = '2-2'
this.$message.error('请填写完整EDI数据')
return false
}
} else {
// edi
Object.keys(this.ediRules).map((item, index) => {
console.log(this.bookingDetails[item.split('.')[0]][item.split('.')[1]])
if (this.checkFrom.includes(item) && !this.bookingDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
}
})
if (this.hasEdiRules) {
this.mainOrderActiveKey = '2-2'
this.$message.error('请填写完整EDI数据')
return false
}
}
// - end
const _data = JSON.parse(JSON.stringify(this.bookingDetails)) const _data = JSON.parse(JSON.stringify(this.bookingDetails))
delete _data.hbList delete _data.hbList
BookingOrderAddOrUpdate(_data) BookingOrderAddOrUpdate(_data)
@ -880,6 +995,10 @@ export default {
this.tabActiveKey = e this.tabActiveKey = e
}, },
changeMainTab (e) {
this.mainOrderActiveKey = e
},
// //
refreshPage() { refreshPage() {
this.init() this.init()
@ -1233,4 +1352,5 @@ export default {
background: #fff; background: #fff;
transition: 0.5s all; transition: 0.5s all;
} }
</style> </style>

@ -557,6 +557,12 @@ export default {
ishd: { ishd: {
type: Boolean, type: Boolean,
default: false default: false
},
rules: {
type: Object,
default: () => {
return {}
}
} }
}, },
data() { data() {
@ -711,29 +717,7 @@ export default {
// / - end // / - end
customerContactsData: [], customerContactsData: [],
ContactType: [], ContactType: [],
customerContactsDataList: [], customerContactsDataList: []
rules: {
// customername: [ { required: true, message: '', trigger: 'blur' } ],
// mblno: [{ required: true, message: '', trigger: 'blur' }],
// carrierid: [{ required: true, message: '', trigger: 'blur' }],
// forwarder: [{ required: true, message: '', trigger: 'blur' }],
// pono: [{ required: true, message: 'PO NO', trigger: 'blur' }],
// hblno: [{ required: true, message: '', trigger: 'blur' }],
// bookingno: [{ required: true, message: '', trigger: 'blur' }],
// contractno: [{ required: true, message: 'EP/', trigger: 'blur' }],
// vessel: [{ required: true, message: '', trigger: 'blur' }],
// lanecode: [{ required: true, message: '线', trigger: 'blur' }],
// voynoinner: [{ required: true, message: '', trigger: 'blur' }],
// voyno: [{ required: true, message: '', trigger: 'blur' }],
// etd: [{ required: true, message: '', trigger: 'blur' }],
// atd: [{ required: true, message: '', trigger: 'blur' }],
// lanename: [{ required: true, message: '线', trigger: 'blur' }],
// shipagency: [{ required: true, message: '', trigger: 'blur' }],
// sale: [{ required: true, message: '', trigger: 'blur' }],
// op: [{ required: true, message: '', trigger: 'blur' }],
// doc: [{ required: true, message: '', trigger: 'blur' }],
// custservice: [{ required: true, message: '', trigger: 'blur' }]
}
} }
}, },
computed: { computed: {
@ -907,15 +891,17 @@ export default {
}, },
methods: { methods: {
checkbasic () { checkbasic () {
this.$refs.basicFrom.validate(valid => { return new Promise((resolve, reject) => {
console.log(valid) this.$refs.basicFrom.validate(valid => {
if (valid) { console.log(valid)
console.log('验证成功!'); if (valid) {
return true; console.log('验证成功!');
} else { resolve(true);
console.log('验证失败!'); } else {
return false; console.log('验证失败!');
} reject(false);
}
});
}); });
}, },
// ========== ========== // ========== ==========
@ -1380,6 +1366,18 @@ export default {
} }
} }
</script> </script>
<style lang="less" scoped>
/deep/ .ant-form-explain{
display: none !important;
}
/deep/ .ant-form-item-children-icon .anticon-check-circle{
display: none;
}
</style>
<style lang="less"> <style lang="less">
@import url('../index.less'); @import url('../index.less');
@ -1466,6 +1464,7 @@ export default {
height: 28px !important; height: 28px !important;
} }
// .ant-calendar-picker-input{ // .ant-calendar-picker-input{
// padding: 0 4px; // padding: 0 4px;
// } // }
@ -1501,3 +1500,4 @@ export default {
// margin-top: 4px !important; // margin-top: 4px !important;
// } // }
</style> </style>

@ -93,7 +93,7 @@
has-feedback has-feedback
prop="nobill" prop="nobill"
> >
<a-select :default-value="details.nobill || 'THREE'" @change="handleChange"> <a-select :default-value="details.nobill || 'THREE'" v-model="details.nobill" @change="handleNoChange">
<a-select-option value="ONE"> ONE </a-select-option> <a-select-option value="ONE"> ONE </a-select-option>
<a-select-option value="TWO"> TWO </a-select-option> <a-select-option value="TWO"> TWO </a-select-option>
<a-select-option value="THREE"> THREE </a-select-option> <a-select-option value="THREE"> THREE </a-select-option>
@ -116,7 +116,7 @@
has-feedback has-feedback
prop="copynobilll" prop="copynobilll"
> >
<a-select :default-value="details.copynobilll || 'THREE'" @change="handleChange"> <a-select :default-value="details.copynobilll || 'THREE'" v-model="details.copynobilll" @change="handleCopyNoChange">
<a-select-option value="ONE"> ONE </a-select-option> <a-select-option value="ONE"> ONE </a-select-option>
<a-select-option value="TWO"> TWO </a-select-option> <a-select-option value="TWO"> TWO </a-select-option>
<a-select-option value="THREE"> THREE </a-select-option> <a-select-option value="THREE"> THREE </a-select-option>
@ -380,6 +380,12 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
rules: {
type: Object,
default: () => {
return {}
}
} }
}, },
data() { data() {
@ -401,31 +407,7 @@ export default {
prepardatData: [], prepardatData: [],
payableatData: [], payableatData: [],
blfrtData: [], blfrtData: [],
serviceData: [], serviceData: []
rules: {
// issuetype: [ { required: true, message: '', trigger: 'blur' } ],
// issuedate: [ { required: true, message: '', trigger: 'blur' } ],
// issueplace: [ { required: true, message: '', trigger: 'blur' } ],
// issueplaceid: [ { required: true, message: '', trigger: 'blur' } ],
// nobill: [ { required: true, message: '', trigger: 'blur' } ],
// copynobilll: [ { required: true, message: '', trigger: 'blur' } ],
// prepardat: [ { required: true, message: '', trigger: 'blur' } ],
// payableat: [ { required: true, message: '', trigger: 'blur' } ],
// blfrt: [ { required: true, message: '', trigger: 'blur' } ],
// thirdpayaddr: [ { required: true, message: '', trigger: 'blur' } ],
// service: [ { required: true, message: '', trigger: 'blur' } ],
// reeferf: [ { required: true, message: '', trigger: 'blur' } ],
// tempset: [ { required: true, message: '', trigger: 'blur' } ],
// tempid: [ { required: true, message: '', trigger: 'blur' } ],
// tempmin: [ { required: true, message: '', trigger: 'blur' } ],
// tempmax: [ { required: true, message: '', trigger: 'blur' } ],
// humidity: [ { required: true, message: '湿', trigger: 'blur' } ],
// dclass: [ { required: true, message: '', trigger: 'blur' } ],
// dunno: [ { required: true, message: '', trigger: 'blur' } ],
// dpage: [ { required: true, message: '', trigger: 'blur' } ],
// dlabel: [ { required: true, message: '', trigger: 'blur' } ],
// linkman: [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -714,11 +696,29 @@ export default {
// - end // - end
// ===== ==== // ===== ====
handleChange() {} handleCopyNoChange(value) {
this.details.copynobilll = value
console.log(this.details.copynobilll)
},
handleNoChange(value) {
this.details.nobill = value
console.log(this.details.nobill)
}
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .ant-form-explain{
display: none !important;
}
/deep/ .ant-form-item-children-icon .anticon-check-circle{
display: none;
}
</style>
<style lang="less" scoped>
.collapse-box { .collapse-box {
margin-bottom: 10px; margin-bottom: 10px;
background: #fff; background: #fff;

@ -86,17 +86,17 @@ export default {
moreStr: { moreStr: {
type: String, type: String,
default: '' default: ''
},
rules: {
type: Object,
default: () => {
return {}
}
} }
}, },
data() { data() {
return { return {
showKey: ['1'], showKey: ['1']
rules: {
// marks: [ { required: true, message: 'Seal No. Marks & Nos', trigger: 'blur' } ],
// cargoid: [ { required: true, message: '', trigger: 'blur' } ],
// hscode: [ { required: true, message: 'HS', trigger: 'blur' } ],
// description: [ { required: true, message: '', trigger: 'blur' } ]
}
} }
}, },
watch: { watch: {
@ -167,6 +167,16 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .ant-form-explain{
display: none !important;
}
/deep/ .ant-form-item-children-icon .anticon-check-circle{
display: none;
}
</style>
<style lang="less" scoped>
.collapse-box { .collapse-box {
margin-bottom: 10px; margin-bottom: 10px;
background: #fff; background: #fff;
@ -233,6 +243,7 @@ export default {
} }
.input-box { .input-box {
height: 200px; height: 200px;
font-size: 14px;
} }
.num-box { .num-box {
display: flex; display: flex;
@ -259,8 +270,8 @@ export default {
.input-box { .input-box {
margin-top: 10px; margin-top: 10px;
flex: 1; flex: 1;
font-size: 12px; font-size: 14px;
line-height: 20px; line-height: 22px;
} }
.line-count { .line-count {
width: 24px; width: 24px;

@ -130,7 +130,7 @@ export default {
style="width: 90px" style="width: 90px"
on-change={val => { on-change={val => {
console.log(' change - 修改内容', val) console.log(' change - 修改内容', val)
if (val) { if (val !== undefined) {
const data = this.ctnList[val] const data = this.ctnList[val]
this.tableData[rowIndex].ctnall = data.name this.tableData[rowIndex].ctnall = data.name
this.tableData[rowIndex].ctncode = data.code this.tableData[rowIndex].ctncode = data.code
@ -190,7 +190,7 @@ export default {
key: 'cntrno', key: 'cntrno',
title: '箱号', title: '箱号',
align: 'left', align: 'left',
width: 180, width: 130,
edit: true edit: true
}, },
{ {
@ -225,7 +225,7 @@ export default {
class="kindpkgsView" class="kindpkgsView"
on-change={val => { on-change={val => {
console.log('包装修改:', this.packageList[val]) console.log('包装修改:', this.packageList[val])
if (val) { if (val !== undefined) {
const data = this.packageList[val] const data = this.packageList[val]
this.tableData[rowIndex].kindpkgs = data.name this.tableData[rowIndex].kindpkgs = data.name
row['kindpkgs'] = data.name row['kindpkgs'] = data.name

@ -138,7 +138,7 @@
</div> </div>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="24" :sm="24" :md="24" :lg="14" :xl="12"> <a-col class="right-content" :xs="24" :sm="24" :md="24" :lg="14" :xl="12">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item <a-form-model-item
@ -690,6 +690,12 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
rules: {
type: Object,
default: () => {
return {}
}
} }
}, },
@ -745,36 +751,7 @@ export default {
customerModelconfirm: false, customerModelconfirm: false,
showShipper: '', showShipper: '',
showConsignee: '', showConsignee: '',
showNotifier: '', showNotifier: ''
rules: {
// shipper: [ { required: true, message: '', trigger: 'blur' } ],
// consignee: [ { required: true, message: '', trigger: 'blur' } ],
// notifyparty: [ { required: true, message: '', trigger: 'blur' } ],
// yard: [ { required: true, message: '', trigger: 'blur' } ],
// customser: [ { required: true, message: '', trigger: 'blur' } ],
// trucker: [ { required: true, message: '', trigger: 'blur' } ],
// agentid: [ { required: true, message: '', trigger: 'blur' } ],
// eta: [ { required: true, message: '', trigger: 'blur' } ],
// closingdate: [ { required: true, message: '', trigger: 'blur' } ],
// closedocdate: [ { required: true, message: '', trigger: 'blur' } ],
// closevgmdate: [ { required: true, message: 'VGM', trigger: 'blur' } ],
// placereceiptid: [ { required: true, message: '', trigger: 'blur' } ],
// placereceipt: [ { required: true, message: '', trigger: 'blur' } ],
// portloadid: [ { required: true, message: '', trigger: 'blur' } ],
// portload: [ { required: true, message: '', trigger: 'blur' } ],
// transportid: [ { required: true, message: '', trigger: 'blur' } ],
// transport: [ { required: true, message: '', trigger: 'blur' } ],
// portdischargeid: [ { required: true, message: '', trigger: 'blur' } ],
// portdischarge: [ { required: true, message: '', trigger: 'blur' } ],
// destinationid: [ { required: true, message: '', trigger: 'blur' } ],
// destination: [ { required: true, message: '', trigger: 'blur' } ],
// placedeliveryid: [ { required: true, message: '', trigger: 'blur' } ],
// placedelivery: [ { required: true, message: '', trigger: 'blur' } ],
// pkgs: [ { required: true, message: '', trigger: 'blur' } ],
// kindpkgs: [ { required: true, message: '', trigger: 'blur' } ],
// kgs: [ { required: true, message: '', trigger: 'blur' } ],
// cbm: [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -1862,6 +1839,9 @@ export default {
display: none; display: none;
} }
} }
/deep/ .ant-form-item-children-icon .anticon-check-circle{
display: none;
}
.content { .content {
.label { .label {
margin-bottom: 10px; margin-bottom: 10px;
@ -1911,6 +1891,11 @@ export default {
left: 0; left: 0;
} }
} }
/deep/ .right-content .ant-form-explain{
display: none !important;
}
@media (max-width: 1700px) { @media (max-width: 1700px) {
.feeself { .feeself {
top: 15px !important; top: 15px !important;

@ -28,15 +28,17 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
rules: {
type: Object,
default: () => {
return {}
}
} }
}, },
data() { data() {
return { return {
remarks: '', remarks: ''
rules: {
// soremark: [ { required: true, message: '', trigger: 'blur' } ],
// siremark: [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -75,6 +77,16 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .ant-form-explain{
display: none !important;
}
/deep/ .ant-form-item-children-icon .anticon-check-circle{
display: none;
}
</style>
<style lang="less" scoped>
.tit { .tit {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;

@ -715,10 +715,12 @@ export default {
} }
} }
.booking-log { .booking-log {
padding-bottom: 10px; // padding-bottom: 10px;
.log { .log {
min-height: 30px; // min-height: 30px;
line-height: 30px; // line-height: 30px;
min-height: 15px;
line-height: 15px;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
display: flex; display: flex;
@ -732,7 +734,7 @@ export default {
border-right: 1px dashed #ccc; border-right: 1px dashed #ccc;
top: 0; top: 0;
left: 0; left: 0;
top: 22px; // top: 22px;
left: 76px; left: 76px;
} }
i:hover { i:hover {
@ -750,7 +752,7 @@ export default {
line-height: 15px; line-height: 15px;
font-size: 12px; font-size: 12px;
color: #999; color: #999;
padding-top: 4px; // padding-top: 4px;
margin-right: 30px; margin-right: 30px;
} }
.icon { .icon {
@ -768,8 +770,8 @@ export default {
} }
} }
.child-log { .child-log {
min-height: 30px; min-height: 15px;
line-height: 30px; line-height: 15px;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
display: flex; display: flex;
@ -780,11 +782,13 @@ export default {
width: 1px; width: 1px;
height: 120%; height: 120%;
// background: @primary-color; // background: @primary-color;
background: #ccc; // background: #ccc;
top: 0; top: 0;
left: 0; // left: 0;
top: 22px; // top: 22px;
left: 77px; // left: 77px;
left: 76px;
border-right: 1px dashed #ccc;
} }
// &:nth-last-child(1){ // &:nth-last-child(1){
// &::before{ // &::before{
@ -795,7 +799,7 @@ export default {
width: 70px; width: 70px;
text-align: left; text-align: left;
height: 50px; height: 50px;
line-height: 22px; line-height: 15px;
font-size: 12px; font-size: 12px;
color: #999; color: #999;
padding-top: 4px; padding-top: 4px;
@ -808,7 +812,7 @@ export default {
text-align: left; text-align: left;
position: absolute; position: absolute;
top: 0; top: 0;
left: 69.5px; left: 68.5px;
} }
.log-name { .log-name {
flex: 1; flex: 1;

Loading…
Cancel
Save