台账,复制,航线管理等

szh_zidingyibiaoti
lilu 2 years ago
parent bcf1879fd2
commit ccc23c8701

@ -34,6 +34,7 @@ const booking = {
docInitList: [], // 单证 docInitList: [], // 单证
custserviceInitList: [], // 客服 custserviceInitList: [], // 客服
routeInitList: [], // 航线操作 routeInitList: [], // 航线操作
lineManageInitList: [],
// 收发通信息 // 收发通信息
customserInitList: [], // 报关行 customserInitList: [], // 报关行
truckerInitList: [], // 车队 truckerInitList: [], // 车队
@ -293,6 +294,7 @@ const booking = {
allData['docInitList'] = $data.result allData['docInitList'] = $data.result
allData['custserviceInitList'] = $data.result allData['custserviceInitList'] = $data.result
allData['routeInitList'] = $data.result allData['routeInitList'] = $data.result
allData['lineManageInitList'] = $data.result
break break
case 'contractno': case 'contractno':
allData['contractnoInitList'] = $data allData['contractnoInitList'] = $data

@ -359,6 +359,9 @@ export default {
return this.blfrtList return this.blfrtList
case 'lineName': case 'lineName':
return this.lineList return this.lineList
case 'shippingMethod':
const arr = this.$options.filters['dictData']('ShippingMethod') || []
return arr
} }
}, },
filterOption(input, option) { filterOption(input, option) {
@ -413,7 +416,7 @@ export default {
this.$refs.selectView.$refs.vcSelect.focus() this.$refs.selectView.$refs.vcSelect.focus()
} }
this.open = true this.open = true
if (['cargoid', 'nobill', 'copynobill', 'carrierid', 'yard', 'kindpkgs', 'issuetype', 'blfrt', 'masterBolIndicator', 'salerCode'].includes(this.type)) { if (['cargoid', 'nobill', 'copynobill', 'carrierid', 'yard', 'kindpkgs', 'issuetype', 'blfrt', 'masterBolIndicator', 'salerCode', 'shippingMethod'].includes(this.type)) {
this.selectList = this.emnuData(this.type) this.selectList = this.emnuData(this.type)
this.inLoading = false this.inLoading = false
return false return false
@ -583,7 +586,7 @@ export default {
} }
} }
.copy-btn{ .copy-btn{
width: 30px; width: 24px;
text-align: center; text-align: center;
color: #bbb; color: #bbb;
font-size: 13px; font-size: 13px;

@ -310,13 +310,17 @@ const initDetail = {
exRemark4: '', exRemark4: '',
// == == // == ==
consigneeEdiCode: '', consigneeEdiCode: '',
shipperEdiCode: 'CN218868', shipperEdiCode: '',
notifyCdoe: '', notifyCdoe: '',
salerCode: 'CN087', // salerCode: 'CN087',
salerCodeName: 'GRACE SUN', // salerCodeName: 'GRACE SUN',
salerCode: '',
salerCodeName: '',
emanifestHbl: '', emanifestHbl: '',
masterBolIndicator: '3', // masterBolIndicator: '3',
masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', // masterBolIndicatorName: 'Not Applicable/Straight bl | HBL',
masterBolIndicator: '',
masterBolIndicatorName: '',
s0CC0C: '', s0CC0C: '',
ckhi: '', ckhi: '',
cncm: '', cncm: '',
@ -353,13 +357,17 @@ const bookingEDIExt = {
exRemark4: '', exRemark4: '',
// == == // == ==
consigneeEdiCode: '', consigneeEdiCode: '',
shipperEdiCode: 'CN218868', shipperEdiCode: '',
notifyCdoe: '', notifyCdoe: '',
salerCode: 'CN087', // salerCode: 'CN087',
salerCodeName: 'GRACE SUN', // salerCodeName: 'GRACE SUN',
salerCode: '',
salerCodeName: '',
emanifestHbl: '', emanifestHbl: '',
masterBolIndicator: '3', // masterBolIndicator: '3',
masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', // masterBolIndicatorName: 'Not Applicable/Straight bl | HBL',
masterBolIndicator: '',
masterBolIndicatorName: '',
s0CC0C: '', s0CC0C: '',
ckhi: '', ckhi: '',
cncm: '', cncm: '',
@ -740,7 +748,7 @@ export default {
this.detailsLoadOver = false this.detailsLoadOver = false
this.bookingDetails.carrierid = this.type this.bookingDetails.carrierid = this.type
this.bookingDetails.carrier = this.type this.bookingDetails.carrier = this.type
// this.getDefaultVal() this.getDefaultVal()
setTimeout(() => { setTimeout(() => {
if (Object.keys(this.$refs).includes('sedOrder')) { if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init([]) this.$refs.sedOrder.init([])
@ -760,7 +768,7 @@ export default {
}).then(res => { }).then(res => {
const defaultData = JSON.parse(res.data.configJson) const defaultData = JSON.parse(res.data.configJson)
this.defaultData = defaultData this.defaultData = defaultData
console.log(defaultData) console.log('==== 获取默认值设置 ====', defaultData)
defaultData.map((item, index) => { defaultData.map((item, index) => {
const field = item.field.split('.') const field = item.field.split('.')
let label = field[1].toLowerCase() let label = field[1].toLowerCase()
@ -946,7 +954,6 @@ export default {
delete item.id delete item.id
}) })
} }
if (!res.data.bookingEDIExt) { if (!res.data.bookingEDIExt) {
res.data.bookingEDIExt = bookingEDIExt res.data.bookingEDIExt = bookingEDIExt
} }
@ -969,7 +976,6 @@ export default {
} }
if (res.data.hbList.length > 0) { if (res.data.hbList.length > 0) {
res.data.hbList.map((item, index) => { res.data.hbList.map((item, index) => {
// item.bookingEDIExt.shipperEdiCode = item.bookingEDIExt.shipperEdiCode ? item.bookingEDIExt.shipperEdiCode : 'CN218868'
const newBookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...item.bookingEDIExt } const newBookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...item.bookingEDIExt }
item = { ...JSON.parse(JSON.stringify(initDetail)), ...item, ...{ bookingEDIExt: newBookingEDIExt } } item = { ...JSON.parse(JSON.stringify(initDetail)), ...item, ...{ bookingEDIExt: newBookingEDIExt } }
if (item.ctnInputs.length > 0) { if (item.ctnInputs.length > 0) {
@ -985,11 +991,10 @@ export default {
}) })
} }
res.data.feeself = !!res.data.feeself res.data.feeself = !!res.data.feeself
// res.data.bookingEDIExt.shipperEdiCode = res.data.bookingEDIExt.shipperEdiCode ? res.data.bookingEDIExt.shipperEdiCode : 'CN218868'
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt } const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } }) this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } })
this.inPageLoading = false this.inPageLoading = false
// this.getDefaultVal() this.getDefaultVal()
setTimeout(() => { setTimeout(() => {
// console.log('== 5. - false ==') // console.log('== 5. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })
@ -1124,7 +1129,11 @@ export default {
let FnOk = () => { let FnOk = () => {
const _data = JSON.parse(JSON.stringify(that.bookingDetails)) const _data = JSON.parse(JSON.stringify(that.bookingDetails))
delete _data.hbList delete _data.hbList
if (this.isCopy) {
delete _data.bookingno
}
this.$message.loading({ content: '保存中...' }) this.$message.loading({ content: '保存中...' })
BookingOrderSave(_data) BookingOrderSave(_data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {

@ -198,6 +198,20 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</template> </template>
<template v-if="details.carrierid === 'CSL' || details.carrierid === 'WHL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="7">
<a-form-model-item
class="from-label"
label="真提单号"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="tmblno"
>
<inputView type="tmblno" :parentVal="details.tmblno" @getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
</a-row> </a-row>
<div class="from-box2"> <div class="from-box2">
<a-row :gutter="10"> <a-row :gutter="10">
@ -388,12 +402,12 @@
</a-row> </a-row>
</div> </div>
<a-row class="from-box3" :gutter="10"> <a-row class="from-box3" :gutter="10">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
label="揽货人" label="揽货人"
:labelCol="labelCol" :labelCol="userLabelCol"
:wrapperCol="wrapperCol" :wrapperCol="userWrapperCol"
has-feedback has-feedback
prop="sale" prop="sale"
> >
@ -412,8 +426,8 @@
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
label="操作" label="操作"
:labelCol="labelCol" :labelCol="userLabelCol1"
:wrapperCol="wrapperCol" :wrapperCol="userWrapperCol1"
has-feedback has-feedback
prop="op" prop="op"
> >
@ -432,8 +446,8 @@
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
label="单证" label="单证"
:labelCol="labelCol" :labelCol="userLabelCol1"
:wrapperCol="wrapperCol" :wrapperCol="userWrapperCol1"
has-feedback has-feedback
prop="doc" prop="doc"
> >
@ -452,8 +466,8 @@
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
label="客服" label="客服"
:labelCol="labelCol" :labelCol="userLabelCol1"
:wrapperCol="wrapperCol" :wrapperCol="userWrapperCol1"
has-feedback has-feedback
prop="custservice" prop="custservice"
> >
@ -468,12 +482,12 @@
></selectView> ></selectView>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
label="航线操作" label="航线操作"
:labelCol="labelCol" :labelCol="userLabelCol"
:wrapperCol="wrapperCol" :wrapperCol="userWrapperCol"
has-feedback has-feedback
prop="route" prop="route"
> >
@ -488,6 +502,26 @@
></selectView> ></selectView>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
<a-form-model-item
class="from-label"
label="航线管理"
:labelCol="userLabelCol"
:wrapperCol="userWrapperCol"
has-feedback
prop="lineManage"
>
<selectView
type="lineManage"
:defaultVal="details.lineManage"
searchApi="GetSysUserPage"
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
</a-form-model-item>
</a-col>
</a-row> </a-row>
<a-row class="from-box4" :gutter="10"> <a-row class="from-box4" :gutter="10">
<a-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12"> <a-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
@ -651,6 +685,26 @@ export default {
sm: { span: 19 }, sm: { span: 19 },
md: { span: 19 } md: { span: 19 }
}, },
userLabelCol: {
xs: { span: 24 },
sm: { span: 8 },
md: { span: 8 }
},
userWrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
md: { span: 16 }
},
userLabelCol1: {
xs: { span: 24 },
sm: { span: 8 },
md: { span: 6 }
},
userWrapperCol1: {
xs: { span: 24 },
sm: { span: 16 },
md: { span: 18 }
},
form: this.$form.createForm(this), form: this.$form.createForm(this),
// / - start // / - start
customerType: '', customerType: '',
@ -795,7 +849,7 @@ export default {
// / - end // / - end
customerContactsData: [], customerContactsData: [],
ContactType: [], ContactType: [],
customerContactsDataList: [], customerContactsDataList: []
} }
}, },
watch: { watch: {
@ -1118,9 +1172,13 @@ export default {
} else if (type === 'shipagency') { } else if (type === 'shipagency') {
this.details.shipagency = res.name || '' this.details.shipagency = res.name || ''
this.details.shipagencyid = res.code || '' this.details.shipagencyid = res.code || ''
} else if (['sale', 'op', 'doc', 'custservice', 'route'].includes(type)) { } else if (['sale', 'op', 'doc', 'custservice', 'route', 'lineManage'].includes(type)) {
this.details[type] = res.name || '' this.details[type] = res.name || ''
this.details[`${type}id`] = res.id || '' if (type === 'lineManage') {
this.details.lineManageID = res.id || ''
} else {
this.details[`${type}id`] = res.id || ''
}
} else if (type === 'lineName') { } else if (type === 'lineName') {
this.details[type] = res.name || '' this.details[type] = res.name || ''
this.$emit('editLineName', true) this.$emit('editLineName', true)

@ -246,7 +246,6 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<!-- 这里显示仓库后台字段未添加暂时隐藏 -->
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
label="仓库" label="仓库"
@ -266,6 +265,26 @@
></selectView> ></selectView>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item
class="from-label"
label="装运方式"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="shippingMethod"
>
<selectView
type="shippingMethod"
:defaultVal="details.shippingMethod"
searchApi="ShippingMethod"
:searchQuery="{ name: ''}"
:showLabel="['name']"
:openSearch="false"
@change="getSelectViewRes"
></selectView>
</a-form-model-item>
</a-col>
</div> </div>
<a-col :span="12"> <a-col :span="12">
@ -1453,6 +1472,9 @@ export default {
this.details.kindpkgs = res['name'] || '' this.details.kindpkgs = res['name'] || ''
const enCapitalRes = this.SetTOTALNO(this.details.pkgs) const enCapitalRes = this.SetTOTALNO(this.details.pkgs)
this.$emit('pkgsEnCapital', enCapitalRes) this.$emit('pkgsEnCapital', enCapitalRes)
} else if (['shippingMethod'].includes(type)) {
//
this.details.shippingMethod = res['name'] || ''
} }
}, },
dateChangeFun ({ type, value }) { dateChangeFun ({ type, value }) {

@ -302,13 +302,17 @@ const sedDetail = {
exRemark4: '', exRemark4: '',
// == == // == ==
consigneeEdiCode: '', consigneeEdiCode: '',
shipperEdiCode: 'CN218868', shipperEdiCode: '',
notifyCdoe: '', notifyCdoe: '',
salerCode: 'CN087', // salerCode: 'CN087',
salerCodeName: 'GRACE SUN', // salerCodeName: 'GRACE SUN',
salerCode: '',
salerCodeName: '',
emanifestHbl: '', emanifestHbl: '',
masterBolIndicator: '3', // masterBolIndicator: '3',
masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', // masterBolIndicatorName: 'Not Applicable/Straight bl | HBL',
masterBolIndicator: '',
masterBolIndicatorName: '',
s0CC0C: '', s0CC0C: '',
ckhi: '', ckhi: '',
cncm: '', cncm: '',
@ -346,13 +350,17 @@ const bookingEDIExt = {
exRemark4: '', exRemark4: '',
// == == // == ==
consigneeEdiCode: '', consigneeEdiCode: '',
shipperEdiCode: 'CN218868', shipperEdiCode: '',
notifyCdoe: '', notifyCdoe: '',
salerCode: 'CN087', // salerCode: 'CN087',
salerCodeName: 'GRACE SUN', // salerCodeName: 'GRACE SUN',
salerCode: '',
salerCodeName: '',
emanifestHbl: '', emanifestHbl: '',
masterBolIndicator: '3', // masterBolIndicator: '3',
masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', // masterBolIndicatorName: 'Not Applicable/Straight bl | HBL',
masterBolIndicator: '',
masterBolIndicatorName: '',
s0CC0C: '', s0CC0C: '',
ckhi: '', ckhi: '',
cncm: '', cncm: '',

@ -263,5 +263,9 @@
/deep/ .ant-form-item-label{ /deep/ .ant-form-item-label{
margin-top: 2px; margin-top: 2px;
} }
/deep/ .ant-col{
padding-left: 0 !important;
// padding-right: 0 !important;
}
} }

@ -466,6 +466,7 @@
} }
.right-content{ .right-content{
padding-bottom: 5px;
/deep/ .ant-form-item-label { /deep/ .ant-form-item-label {
height:36px !important; height:36px !important;
line-height: 36px !important; line-height: 36px !important;

@ -675,30 +675,30 @@ export default {
...mapGetters(['bookingList', 'bookingGridOptions']) ...mapGetters(['bookingList', 'bookingGridOptions'])
}, },
beforeRouteLeave (to, from, next) { beforeRouteLeave (to, from, next) {
const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data)) // const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data))
const first = copyArr.splice(0, 20) // const first = copyArr.splice(0, 20)
this.setBookingGridOptions(this.gridOptions) this.setBookingGridOptions(this.gridOptions)
this.gridOptions = { // this.gridOptions = {
border: false, // border: false,
resizable: true, // resizable: true,
showOverflow: true, // showOverflow: true,
loading: false, // loading: false,
stripe: true, // stripe: true,
round: true, // round: true,
autoResize: true, // autoResize: true,
align: 'left', // align: 'left',
columnConfig: { resizable: true }, // columnConfig: { resizable: true },
importConfig: {}, // importConfig: {},
exportConfig: {}, // exportConfig: {},
pagerConfig: { // pagerConfig: {
total: 0, // total: 0,
currentPage: 1, // currentPage: 1,
pageSize: 10, // pageSize: 10,
pageSizes: [10, 20, 50, 100, 200, 500] // pageSizes: [10, 20, 50, 100, 200, 500]
}, // },
columns: this.gridOptions.columns, // columns: this.gridOptions.columns,
data: first // data: first
} // }
next() next()
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
@ -730,7 +730,16 @@ export default {
}, },
upDate () { upDate () {
if (Object.keys(this.gridOptions).length > 0) { if (Object.keys(this.gridOptions).length > 0) {
if (Object.keys(this.bookingGridOptions) === 0) { return false } if (Object.keys(this.bookingGridOptions).length === 0) { return false }
const newData = JSON.parse(JSON.stringify(this.bookingGridOptions))
if (newData && newData.data.length > this.gridOptions.data.length) {
console.log('这里插入最新舱单', newData.data.length, this.gridOptions.data.length)
}
}
},
upDate1 () {
if (Object.keys(this.gridOptions).length > 0) {
if (Object.keys(this.bookingGridOptions).length === 0) { return false }
const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) const newData = JSON.parse(JSON.stringify(this.bookingGridOptions))
// N // N
if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) {
@ -746,7 +755,6 @@ export default {
}, 600) }, 600)
}, 10) }, 10)
} }
// //
// if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { // if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) {
// console.log(this.gridOptions.loading) // console.log(this.gridOptions.loading)

Loading…
Cancel
Save