分单保存

pull/1/head
张同海 2 years ago
parent ab9e60d978
commit 3ea99dabe8

@ -29,14 +29,20 @@
<div class="order-title"> <div class="order-title">
<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" :scrollTop="scrollTop" :class="scrollTop < 100 ? 'normal-nav' : 'fixed-nav'" @save="saveFun" @copy="copyFun"></sedOperationArea> <sedOperationArea
:details="editDetails"
:scrollTop="scrollTop"
:class="scrollTop < 100 ? 'normal-nav' : 'fixed-nav'"
@save="saveFun"
@copy="copyFun"
></sedOperationArea>
<ul class="sec-parent-tabs-box"> <ul class="sec-parent-tabs-box">
<div class="parents-tabs-top"> <div class="parents-tabs-top">
<li @click="changeParentTabs('1')" :class="{ 'active':mainOrderActiveKey === '1' }"> <li @click="changeParentTabs('1')" :class="{ active: mainOrderActiveKey === '1' }">
<input type="radio" name="tabs" id="stab1" checked /> <input type="radio" name="tabs" id="stab1" checked />
<label class="tabs-label" for="tab1">基础信息</label> <label class="tabs-label" for="tab1">基础信息</label>
</li> </li>
<li @click="changeParentTabs('2')" :class="{ 'active':mainOrderActiveKey === '2' }"> <li @click="changeParentTabs('2')" :class="{ active: mainOrderActiveKey === '2' }">
<input type="radio" name="tabs" id="stab2" /> <input type="radio" name="tabs" id="stab2" />
<label class="tabs-label" for="tab2">EDI补充信息</label> <label class="tabs-label" for="tab2">EDI补充信息</label>
</li> </li>
@ -64,11 +70,29 @@
@pkgsEnCapital="pkgsEnCapitalFun" @pkgsEnCapital="pkgsEnCapitalFun"
></mailingInfo> ></mailingInfo>
<!-- 货物信息 --> <!-- 货物信息 -->
<cargoInfo ref="cargoInfo" :details="editDetails" :rules="cargoRules" :inSave="inSave" @changeDetail="changeDetailFun"></cargoInfo> <cargoInfo
ref="cargoInfo"
:details="editDetails"
:rules="cargoRules"
:inSave="inSave"
@changeDetail="changeDetailFun"
></cargoInfo>
<!-- 签单信息 --> <!-- 签单信息 -->
<billInfo ref="billInfo" :details="editDetails" :rules="billRules" :inSave="inSave" @changeDetail="changeDetailFun"></billInfo> <billInfo
ref="billInfo"
:details="editDetails"
:rules="billRules"
:inSave="inSave"
@changeDetail="changeDetailFun"
></billInfo>
<!-- 备注信息 --> <!-- 备注信息 -->
<remarksInfo ref="remarksInfo" :details="editDetails" :rules="remarksRules" :inSave="inSave" @changeDetail="changeDetailFun"></remarksInfo> <remarksInfo
ref="remarksInfo"
:details="editDetails"
:rules="remarksRules"
:inSave="inSave"
@changeDetail="changeDetailFun"
></remarksInfo>
<!-- 箱型 --> <!-- 箱型 -->
<goodsTable <goodsTable
ref="goodsTable" ref="goodsTable"
@ -160,7 +184,7 @@ import goodsTable from '../modules/goodsTable'
// import basicItem from './basicItem' // import basicItem from './basicItem'
import ediMore from './ediMore' import ediMore from './ediMore'
import { BookingOrderUpdate, BookingOrderAdd } from '@/api/modular/main/BookingLedger' import { BookingOrderUpdate, BookingOrderAdd, BookingOrderGet } from '@/api/modular/main/BookingLedger'
export default { export default {
name: 'SedOrder', name: 'SedOrder',
props: { props: {
@ -213,7 +237,7 @@ export default {
inSecLoad: false, inSecLoad: false,
mainOrderActiveKey: '1', mainOrderActiveKey: '1',
basicRules: { basicRules: {
customername: [ { required: false, message: '请选择委托单位', trigger: 'change' } ], customername: [{ required: false, message: '请选择委托单位', trigger: 'change' }],
mblno: [{ required: false, message: '请输入提单号', trigger: 'change' }], mblno: [{ required: false, message: '请输入提单号', trigger: 'change' }],
carrierid: [{ required: false, message: '请选择船公司', trigger: 'change' }], carrierid: [{ required: false, message: '请选择船公司', trigger: 'change' }],
forwarder: [{ required: false, message: '请输入订舱代理', trigger: 'change' }], forwarder: [{ required: false, message: '请输入订舱代理', trigger: 'change' }],
@ -235,67 +259,67 @@ export default {
custservice: [{ required: false, message: '请选择客服人员', trigger: 'change' }] custservice: [{ required: false, message: '请选择客服人员', trigger: 'change' }]
}, },
mailingRules: { mailingRules: {
shipper: [ { required: false, message: '请输入发货人', trigger: 'submit' } ], shipper: [{ required: false, message: '请输入发货人', trigger: 'submit' }],
consignee: [ { required: false, message: '请输入收货人', trigger: 'submit' } ], consignee: [{ required: false, message: '请输入收货人', trigger: 'submit' }],
notifyparty: [ { required: false, message: '请输入通知人', trigger: 'submit' } ], notifyparty: [{ required: false, message: '请输入通知人', trigger: 'submit' }],
yard: [ { required: false, message: '请输入场站', trigger: 'change' } ], yard: [{ required: false, message: '请输入场站', trigger: 'change' }],
customser: [ { required: false, message: '请输入报关行', trigger: 'change' } ], customser: [{ required: false, message: '请输入报关行', trigger: 'change' }],
trucker: [ { required: false, message: '请输入车队', trigger: 'change' } ], trucker: [{ required: false, message: '请输入车队', trigger: 'change' }],
agentid: [ { required: false, message: '请输入国外代理', trigger: 'change' } ], agentid: [{ required: false, message: '请输入国外代理', trigger: 'change' }],
eta: [ { required: false, message: '请选择预抵日期', trigger: 'change' } ], eta: [{ required: false, message: '请选择预抵日期', trigger: 'change' }],
closingdate: [ { required: false, message: '请选择截港时间', trigger: 'change' } ], closingdate: [{ required: false, message: '请选择截港时间', trigger: 'change' }],
closedocdate: [ { required: false, message: '请选择截单时间', trigger: 'change' } ], closedocdate: [{ required: false, message: '请选择截单时间', trigger: 'change' }],
closevgmdate: [ { required: false, message: '请选择VGM时间', trigger: 'change' } ], closevgmdate: [{ required: false, message: '请选择VGM时间', trigger: 'change' }],
placereceiptid: [ { required: false, message: '请选择收货代码', trigger: 'change' } ], placereceiptid: [{ required: false, message: '请选择收货代码', trigger: 'change' }],
placereceipt: [ { required: false, message: '请选择收货地', trigger: 'change' } ], placereceipt: [{ required: false, message: '请选择收货地', trigger: 'change' }],
portloadid: [ { required: false, message: '请选择装货港代码', trigger: 'change' } ], portloadid: [{ required: false, message: '请选择装货港代码', trigger: 'change' }],
portload: [ { required: false, message: '请选择装货港', trigger: 'change' } ], portload: [{ required: false, message: '请选择装货港', trigger: 'change' }],
transportid: [ { required: false, message: '请选择中转港代码', trigger: 'change' } ], transportid: [{ required: false, message: '请选择中转港代码', trigger: 'change' }],
transport: [ { required: false, message: '请选择中转港', trigger: 'change' } ], transport: [{ required: false, message: '请选择中转港', trigger: 'change' }],
portdischargeid: [ { required: false, message: '请选择卸货港代码', trigger: 'change' } ], portdischargeid: [{ required: false, message: '请选择卸货港代码', trigger: 'change' }],
portdischarge: [ { required: false, message: '请选择卸货港', trigger: 'change' } ], portdischarge: [{ required: false, message: '请选择卸货港', trigger: 'change' }],
destinationid: [ { required: false, message: '请选择目的代码', trigger: 'change' } ], destinationid: [{ required: false, message: '请选择目的代码', trigger: 'change' }],
destination: [ { required: false, message: '请选择目的地', trigger: 'change' } ], destination: [{ required: false, message: '请选择目的地', trigger: 'change' }],
placedeliveryid: [ { required: false, message: '请选择交货代码', trigger: 'change' } ], placedeliveryid: [{ required: false, message: '请选择交货代码', trigger: 'change' }],
placedelivery: [ { required: false, message: '请选择交货地', trigger: 'change' } ], placedelivery: [{ required: false, message: '请选择交货地', trigger: 'change' }],
pkgs: [ { required: false, message: '请输入件数', trigger: 'change' } ], pkgs: [{ required: false, message: '请输入件数', trigger: 'change' }],
kindpkgs: [ { required: false, message: '请输入包装', trigger: 'change' } ], kindpkgs: [{ required: false, message: '请输入包装', trigger: 'change' }],
kgs: [ { required: false, message: '请输入毛重', trigger: 'change' } ], kgs: [{ required: false, message: '请输入毛重', trigger: 'change' }],
cbm: [ { required: false, message: '请输入尺寸', trigger: 'change' } ], cbm: [{ required: false, message: '请输入尺寸', trigger: 'change' }]
}, },
cargoRules: { cargoRules: {
marks: [ { required: false, message: '请输入Seal No. Marks & Nos', trigger: 'change' } ], marks: [{ required: false, message: '请输入Seal No. Marks & Nos', trigger: 'change' }],
cargoid: [ { required: false, message: '请选择货物标志', trigger: 'change' } ], cargoid: [{ required: false, message: '请选择货物标志', trigger: 'change' }],
hscode: [ { required: false, message: '请输入HS编码', trigger: 'change' } ], hscode: [{ required: false, message: '请输入HS编码', trigger: 'change' }],
description: [ { required: false, message: '请输入包装种类与货名', trigger: 'change' } ] description: [{ required: false, message: '请输入包装种类与货名', trigger: 'change' }]
}, },
billRules: { billRules: {
issuetype: [ { required: false, message: '请选择签单方式', trigger: 'change' } ], issuetype: [{ required: false, message: '请选择签单方式', trigger: 'change' }],
issuedate: [ { required: false, message: '请选择签单日期', trigger: 'change' } ], issuedate: [{ required: false, message: '请选择签单日期', trigger: 'change' }],
// issueplace: [ { required: false, message: '', trigger: 'change' } ], // issueplace: [ { required: false, message: '', trigger: 'change' } ],
issueplaceid: [ { required: false, message: '请输入签单地代码', trigger: 'change' } ], issueplaceid: [{ required: false, message: '请输入签单地代码', trigger: 'change' }],
nobill: [ { required: false, message: '请选择提单份数', trigger: 'change' } ], nobill: [{ required: false, message: '请选择提单份数', trigger: 'change' }],
copynobill: [ { required: false, message: '请选择副本份数', trigger: 'change' } ], copynobill: [{ required: false, message: '请选择副本份数', trigger: 'change' }],
prepardat: [ { required: false, message: '请选择预付地点', trigger: 'change' } ], prepardat: [{ required: false, message: '请选择预付地点', trigger: 'change' }],
payableat: [ { required: false, message: '请选择到付地点', trigger: 'change' } ], payableat: [{ required: false, message: '请选择到付地点', trigger: 'change' }],
blfrt: [ { required: false, message: '请选择付费方式', trigger: 'change' } ], blfrt: [{ required: false, message: '请选择付费方式', trigger: 'change' }],
thirdpayaddr: [ { required: false, message: '请输入第三付款地', trigger: 'change' } ], thirdpayaddr: [{ required: false, message: '请输入第三付款地', trigger: 'change' }],
service: [ { required: false, message: '请选择运输条款', trigger: 'change' } ], service: [{ required: false, message: '请选择运输条款', trigger: 'change' }],
reeferf: [ { required: false, message: '请输入冷藏通风量', trigger: 'change' } ], reeferf: [{ required: false, message: '请输入冷藏通风量', trigger: 'change' }],
tempset: [ { required: false, message: '请输入温度', trigger: 'change' } ], tempset: [{ required: false, message: '请输入温度', trigger: 'change' }],
tempid: [ { required: false, message: '请选择温度单位', trigger: 'change' } ], tempid: [{ required: false, message: '请选择温度单位', trigger: 'change' }],
tempmin: [ { required: false, message: '请输入最低温度', trigger: 'change' } ], tempmin: [{ required: false, message: '请输入最低温度', trigger: 'change' }],
tempmax: [ { required: false, message: '请输入最高温度', trigger: 'change' } ], tempmax: [{ required: false, message: '请输入最高温度', trigger: 'change' }],
humidity: [ { required: false, message: '请输入湿度', trigger: 'change' } ], humidity: [{ required: false, message: '请输入湿度', trigger: 'change' }],
dclass: [ { required: false, message: '请输入危险品等级', trigger: 'change' } ], dclass: [{ required: false, message: '请输入危险品等级', trigger: 'change' }],
dunno: [ { required: false, message: '请输入危险品编号', trigger: 'change' } ], dunno: [{ required: false, message: '请输入危险品编号', trigger: 'change' }],
dpage: [ { required: false, message: '请输入危险品页号', trigger: 'change' } ], dpage: [{ required: false, message: '请输入危险品页号', trigger: 'change' }],
dlabel: [ { required: false, message: '请输入危险品标签', trigger: 'change' } ], dlabel: [{ required: false, message: '请输入危险品标签', trigger: 'change' }],
linkman: [ { required: false, message: '请输入危险品联系人', trigger: 'change' } ], linkman: [{ required: false, message: '请输入危险品联系人', trigger: 'change' }]
}, },
remarksRules: { remarksRules: {
soremark: [ { required: false, message: '请输入订舱备注', trigger: 'change' } ], soremark: [{ required: false, message: '请输入订舱备注', trigger: 'change' }],
siremark: [ { required: false, message: '请输入截单备注', trigger: 'change' } ], siremark: [{ required: false, message: '请输入截单备注', trigger: 'change' }]
}, },
ediRules: { ediRules: {
'bookingEDIExt.sendCode': [{ required: false, message: '请输入发送方EDI代码', trigger: 'change' }], 'bookingEDIExt.sendCode': [{ required: false, message: '请输入发送方EDI代码', trigger: 'change' }],
@ -406,9 +430,9 @@ export default {
this.$emit('changeHB', this.sedOrderList) this.$emit('changeHB', this.sedOrderList)
} }
// if (nval !== oval) { // if (nval !== oval) {
// localStorage.setItem(`${this.id}`, true) // localStorage.setItem(`${this.id}`, true)
// this.sedOrderList[this.editIndex].isNoSave = true // this.sedOrderList[this.editIndex].isNoSave = true
// console.log(this.editIndex, this.sedOrderList[this.editIndex].isNoSave) // console.log(this.editIndex, this.sedOrderList[this.editIndex].isNoSave)
// } // }
}, },
deep: true deep: true
@ -426,7 +450,7 @@ export default {
} }
} }
}, },
checkFrom (nval, oval) { checkFrom(nval, oval) {
this.checkFromInit() this.checkFromInit()
} }
}, },
@ -463,7 +487,7 @@ export default {
// }, 1500) // }, 1500)
}, },
methods: { methods: {
checkFromInit () { checkFromInit() {
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
@ -586,6 +610,14 @@ export default {
this.bookingOrderAdd() this.bookingOrderAdd()
} }
}, },
FnBookingOrderGet() {
BookingOrderGet({
id: this.id
}).then(res => {
this.editDetails = { ...res.data.hbList[this.editIndex] }
this.$forceUpdate()
})
},
bookingOrderUpdate() { bookingOrderUpdate() {
if (!this.editDetails.hblno) { if (!this.editDetails.hblno) {
@ -675,6 +707,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.inSave = false this.inSave = false
}, 1000) }, 1000)
this.FnBookingOrderGet()
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
@ -783,6 +816,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.inSave = false this.inSave = false
}, 1000) }, 1000)
this.FnBookingOrderGet()
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
@ -838,10 +872,10 @@ export default {
openNav() { openNav() {
this.showSecNav = !this.showSecNav this.showSecNav = !this.showSecNav
}, },
pkgsEnCapitalFun (data) { pkgsEnCapitalFun(data) {
this.editDetails.totalno = data this.editDetails.totalno = data
}, },
changeMainTab (e) { changeMainTab(e) {
this.mainOrderActiveKey = e this.mainOrderActiveKey = e
}, },
changeParentTabs(type) { changeParentTabs(type) {
@ -1126,21 +1160,24 @@ export default {
transition: 0.5s all; transition: 0.5s all;
} }
/deep/ .ant-select-selection__clear{ /deep/ .ant-select-selection__clear {
right: 10px !important; right: 10px !important;
margin-top: -4px !important; margin-top: -4px !important;
} }
/deep/ form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear{ /deep/ form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear {
right: 10px !important; right: 10px !important;
margin-top: -4px !important; margin-top: -4px !important;
} }
/deep/ form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{ /deep/ form .has-feedback .ant-input-affix-wrapper .ant-input-suffix {
right: 0px !important; right: 0px !important;
padding-right: 10px; padding-right: 10px;
} }
/deep/ form .has-feedback .ant-calendar-picker-icon, form .has-feedback .ant-time-picker-icon, form .has-feedback .ant-calendar-picker-clear, form .has-feedback .ant-time-picker-clear{ /deep/ form .has-feedback .ant-calendar-picker-icon,
form .has-feedback .ant-time-picker-icon,
form .has-feedback .ant-calendar-picker-clear,
form .has-feedback .ant-time-picker-clear {
right: 10px !important; right: 10px !important;
} }
@ -1188,8 +1225,9 @@ export default {
// color: @primary-color; // color: @primary-color;
// font-size: 14px; // font-size: 14px;
// } // }
.active{ .active {
input, label{ input,
label {
top: 0; top: 0;
background: #fff; background: #fff;
color: @primary-color; color: @primary-color;
@ -1215,5 +1253,4 @@ export default {
// display: block; // display: block;
// } // }
} }
</style> </style>

@ -2,7 +2,9 @@
<div class="operation-area"> <div class="operation-area">
<a-card :bordered="false" :bodyStyle="{ padding: '10px', 'margin-bottom': '10px' }"> <a-card :bordered="false" :bodyStyle="{ padding: '10px', 'margin-bottom': '10px' }">
<div class="btn-list more-view"> <div class="btn-list more-view">
<div class="area-order-title" v-if="scrollTop > 100 "><i class="iconfont icon-dingdan"></i> <span>{{ details.hblno }}</span></div> <div class="area-order-title" v-if="scrollTop > 100">
<i class="iconfont icon-dingdan"></i> 当前分单号 <span>{{ details.hblno }}</span>
</div>
<button @click="copyFun"><span class="iconfont icon-fuzhi1"></span>复制</button> <button @click="copyFun"><span class="iconfont icon-fuzhi1"></span>复制</button>
<button @click="saveFun"><span class="iconfont icon-icon_baocun"></span>保存</button> <button @click="saveFun"><span class="iconfont icon-icon_baocun"></span>保存</button>
<button @click="FSnhowPrintModal"><span class="iconfont icon-printing"></span>打印</button> <button @click="FSnhowPrintModal"><span class="iconfont icon-printing"></span>打印</button>

Loading…
Cancel
Save