内部航次

szh_zidingyibiaoti
lilu 2 years ago
parent d76f3e711c
commit 677f246e2a

@ -38,7 +38,6 @@
<div class="parents-tabs-content">
<div id="tab-content1" class="tab-content" v-show="mainOrderActiveKey === '1-1'">
<div class="pane-box">
<!-- 基本信息 -->
<basicInfo
ref="basicInfo"
:type="type"
@ -49,7 +48,6 @@
@changeDetail="changeDetailFun"
@editLineName="editLineNameFun"
></basicInfo>
<!-- 收发通信息 -->
<mailingInfo
ref="mailingInfo"
:details="bookingDetails"
@ -59,7 +57,6 @@
@spliceMore="spliceMorefun"
@pkgsEnCapital="pkgsEnCapitalFun"
></mailingInfo>
<!-- 货物信息 -->
<cargoInfo
ref="cargoInfo"
:details="bookingDetails"
@ -68,7 +65,6 @@
isParent="parent"
@changeDetail="changeDetailFun"
></cargoInfo>
<!-- 签单信息 -->
<billInfo
ref="billInfo"
:details="bookingDetails"
@ -76,7 +72,6 @@
isParent="parent"
@changeDetail="changeDetailFun"
></billInfo>
<!-- 备注信息 -->
<remarksInfo
ref="remarksInfo"
:details="bookingDetails"
@ -84,7 +79,6 @@
isParent="parent"
@changeDetail="changeDetailFun"
></remarksInfo>
<!-- 箱型 -->
<goodsTable
ref="goodsTable"
:details="bookingDetails"
@ -155,20 +149,15 @@ import sedOrder from './modules/sedOrder'
import {
BookingOrderGet,
// BookingOrderUpdate,
// BookingOrderAdd,
// BookingOrderAddOrUpdate,
BookingOrderSave,
getDjyTenantConfig,
GetAllData
} from '@/api/modular/main/BookingLedger'
import { mapActions, mapGetters } from 'vuex'
import rules from './rules'
// import { string } from 'clipboard'
const initDetail = {
id: 0,
parentId: 0,
//
customername: '',
customerid: '',
carrier: 'CMA',
@ -201,10 +190,8 @@ const initDetail = {
custserviceid: '',
route: '',
routeid: '',
// ,
dzRemark: '',
czRemark: '',
//
shipper: '',
feeself: false,
consignee: '',
@ -246,7 +233,6 @@ const initDetail = {
pkgstotal: '',
kgstotal: '',
cbmtotal: '',
//
marks: '',
goodsname: '',
goodscode: '',
@ -254,7 +240,6 @@ const initDetail = {
hscode: '',
description: '',
totalno: '',
//
issuetype: '',
issuedate: '',
issueplace: '',
@ -279,12 +264,9 @@ const initDetail = {
dpage: '',
dlabel: '',
linkman: '',
//
soremark: '',
siremark: '',
//
ctnInputs: [],
// edi (edi)
weituo: '',
freightpayer: '',
scaccode: '',
@ -309,17 +291,12 @@ const initDetail = {
exRemark2: '',
exRemark3: '',
exRemark4: '',
// == ==
consigneeEdiCode: '',
shipperEdiCode: '',
notifyCdoe: '',
// salerCode: 'CN087',
// salerCodeName: 'GRACE SUN',
salerCode: '',
salerCodeName: '',
emanifestHbl: '',
// masterBolIndicator: '3',
// masterBolIndicatorName: 'Not Applicable/Straight bl | HBL',
masterBolIndicator: '',
masterBolIndicatorName: '',
s0CC0C: '',
@ -328,9 +305,7 @@ const initDetail = {
wncm: '',
acihbl: ''
},
//
hbList: [],
//
remark: [],
file: [],
log: [],
@ -356,17 +331,12 @@ const bookingEDIExt = {
exRemark2: '',
exRemark3: '',
exRemark4: '',
// == ==
consigneeEdiCode: '',
shipperEdiCode: '',
notifyCdoe: '',
// salerCode: 'CN087',
// salerCodeName: 'GRACE SUN',
salerCode: '',
salerCodeName: '',
emanifestHbl: '',
// masterBolIndicator: '3',
// masterBolIndicatorName: 'Not Applicable/Straight bl | HBL',
masterBolIndicator: '',
masterBolIndicatorName: '',
s0CC0C: '',
@ -377,7 +347,6 @@ const bookingEDIExt = {
}
export default {
name: 'BookingDetail',
activated: function() { }, //
inject: ['reload'],
components: {
operationArea,
@ -397,7 +366,6 @@ export default {
id: this.$route.query.id,
isCopy: this.$route.query.isCopy || false,
inPageLoading: false,
// bookingDetails: {},
bookingDetails: JSON.parse(JSON.stringify(initDetail)),
tabBarStyle: {
background: '#fff',
@ -584,7 +552,6 @@ export default {
getRouterHis() {
this.inChildLoading = true
const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
// debugger
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
this.id = this.$route.query.id
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
@ -619,7 +586,6 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
// this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
}, 500)
this.$forceUpdate()
@ -663,7 +629,6 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
// this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
}, 500)
this.$forceUpdate()
@ -769,7 +734,6 @@ export default {
}).then(res => {
const defaultData = JSON.parse(res.data.configJson)
this.defaultData = defaultData
console.log('==== 获取默认值设置 ====', defaultData)
defaultData.map((item, index) => {
const field = item.field.split('.')
let label = field[1].toLowerCase()
@ -777,7 +741,6 @@ export default {
if (['EPCODE', 'DZREMARK', 'CZREMARK', 'Warehouse'].includes(field[1])) {
label = this.emnuDefaultLabel(field[1])
}
console.log('initData ----', label)
if (Object.keys(initDetail).includes(label)) {
initDetail[label] = item.code
this.bookingDetails[label] = this.bookingDetails[label] && this.bookingDetails[label] !== '' ? this.bookingDetails[label] : item.code
@ -801,7 +764,6 @@ export default {
} else if (typeArr2.includes(field[1]) || typeArr4.includes(field[1])) {
label = this.emnuDefaultLabel(field[1])
}
console.log('edi --- ', label)
initDetail.bookingEDIExt[label] = item.code
bookingEDIExt[label] = item.code
this.bookingDetails.bookingEDIExt[label] = this.bookingDetails.bookingEDIExt[label] && this.bookingDetails.bookingEDIExt[label] !== '' ? this.bookingDetails.bookingEDIExt[label] : item.code
@ -923,7 +885,6 @@ export default {
},
getDetail() {
// this.inPageLoading = false
if (this.inPageLoading) {
return false
}
@ -993,7 +954,6 @@ export default {
this.inPageLoading = false
this.getDefaultVal()
setTimeout(() => {
// console.log('== 5. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false })
this.detailsLoadOver = true
this.inChildLoading = false
@ -1037,7 +997,6 @@ export default {
changeDetailFun(data) {
const { detail, type } = data
if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) {
// console.log('== 6. - true ==')
this.checkSaveFun({ type: 'details', hasChange: true })
}
this.bookingDetails = detail
@ -1094,7 +1053,6 @@ export default {
return false
}
} else {
// edi
Object.keys(this.ediRules).map((item, index) => {
if (this.checkFrom.includes(item) && !this.bookingDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
@ -1107,7 +1065,6 @@ export default {
}
}
//
if (this.hasTableRules && this.bookingDetails.shippingMethod !== '拼箱') {
if (this.bookingDetails.ctnInputs.length === 0) {
this.$message.error('保存失败,箱信息未填写')
@ -1293,7 +1250,6 @@ export default {
} else {
FnOk()
}
// - end
},
spliceMorefun(str) {
@ -1304,7 +1260,6 @@ export default {
this.mainOrderActiveKey = e
},
//
refreshPage() {
this.init()
this.$refs.rightContent.init()
@ -1355,7 +1310,6 @@ export default {
name: 'BookingDetail',
query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true }
})
// this.$route.query.id = 1123
} else {
if (index === arr.length - 1) {
this.$message.error('当前已经是最后一票')
@ -1381,8 +1335,6 @@ export default {
query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid }
})
},
//
//
changeTab(e) {
console.log('== 切换顶部标签 ==', this.detailsLoadOver, this.inChildLoading)
const _this = this
@ -1391,13 +1343,11 @@ export default {
_this.$refs.sedOrder.init(_this.bookingDetails.hbList)
}, 100)
},
//
addSedList() {
if (this.isAdd) {
this.$message.error('请先保存主单')
return false
}
// this.$message.loading('...')
const data = JSON.parse(JSON.stringify(this.bookingDetails))
data.isNoSave = true
data.hblno = ''
@ -1417,7 +1367,6 @@ export default {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}, 200)
},
//
changeHBFun(data) {
const arr = []
data.map((item, index) => {
@ -1426,16 +1375,11 @@ export default {
if (arr.includes(true)) {
this.$set(this.bookingDetails, 'hbList', data)
this.checkSaveFun({ type: 'hbList', hasChange: true })
// console.log('== ==')
} else {
this.checkSaveFun({ type: 'hbList', hasChange: false })
// console.log('== ==')
}
},
checkSaveFun(data) {
// if (this.inPageLoading) {
// return false
// }
if (this.inGoodsSave) { return false }
const key = this.$route.fullPath
const lastPages = this.needSavePages
@ -1448,7 +1392,6 @@ export default {
} else if (data.type === 'hbList') {
this.$set($data, 'hbList', data.hasChange)
}
// console.log('== ==', this.detailsLoadOver, this.inPageLoading, this.inChildLoading)
this.$set(lastPages, key, $data)
this.setNeedSavePages(lastPages)
},
@ -1456,7 +1399,6 @@ export default {
this.inGoodsSave = data
},
//
calc(num1, num2, calcStr) {
var str1 //
var str2
@ -1566,16 +1508,13 @@ export default {
}
},
sedOrderRemoveFun(sedData) {
// console.log('== ==', sedData, this.bookingDetails.hbList)
this.$set(this.bookingDetails, 'hbList', sedData)
if (sedData.length === 0) {
// console.log('== ==')
this.Showtabs = false
this.tabActiveKey = '1'
}
},
changeCtnInfoFun ({ type, val }) {
console.log('获取数据')
if (type === 'kindpkgs') {
this.bookingDetails.kindpkgs = val
}

@ -166,16 +166,6 @@
:showLabel="['contractNo']"
@select="getAutoViewRes"
></autoView>
<!-- <selectView
class="copy-input"
type="contractno"
:defaultVal="details.contractno"
searchApi="getContractno"
:searchQuery="{ queryItem: '', top: 50 }"
:showLabel="['contractNo']"
:openSearch="true"
@change="getSelectViewRes"
></selectView> -->
</template>
<template v-else>
<inputView type="contractno" :parentVal="details.contractno" @getInputChange="inputChange" />
@ -240,6 +230,19 @@
</a-form-model-item>
</a-col>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5">
<a-form-model-item
class="from-label"
label="内部航次"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="voynoinner"
>
<!-- 内部航次暂无接口 暂时改为输入框 -->
<inputView type="voynoinner" :parentVal="details.voynoinner" @getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<!-- <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5">
<a-form-model-item
class="from-label"
@ -269,7 +272,7 @@
</a-col>
</template>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-model-item
class="from-label"
label="航次"
@ -314,14 +317,11 @@
@dateChange="dateChangeFun"
style="margin-top: -5px;"
></datePickerView>
<!-- <a-date-picker size="small" class="date-picker" format="YYYY-MM-DD" v-model="details.etd" @change="changeEtd">
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker> -->
<span class="week" v-if="etdWeek && etdWeek !== 'NaN'">W{{ etdWeek || '--' }}</span>
</div>
</a-form-model-item>
</a-col>
<template v-if="details.carrierid === 'ESL'">
<!-- <template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5">
<a-form-model-item
class="from-label"
@ -340,16 +340,13 @@
@dateChange="dateChangeFun"
style="margin-top: -5px;"
></datePickerView>
<!-- <a-date-picker size="small" class="date-picker" format="YYYY-MM-DD" v-model="details.atd">
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker> -->
</div>
</a-form-model-item>
</a-col>
</template>
</template> -->
</a-row>
<a-row :gutter="10">
<template v-if="details.carrierid !== 'ESL'">
<template>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-model-item
class="from-label"
@ -368,15 +365,12 @@
@dateChange="dateChangeFun"
style="margin-top: -5px;"
></datePickerView>
<!-- <a-date-picker size="small" class="date-picker" format="YYYY-MM-DD" v-model="details.atd">
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker> -->
</div>
</a-form-model-item>
</a-col>
</template>
<template>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="details.carrierid === 'ESL'? 6 : 5">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5">
<a-form-model-item
class="from-label"
label="船司航线"
@ -390,7 +384,7 @@
</a-form-model-item>
</a-col>
</template>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="details.carrierid === 'ESL'? 5 : 6">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-model-item
class="from-label"
label="船代"
@ -638,8 +632,7 @@ import {
DjyCustomerdetail,
BookingOrderContactSavebatch,
BookingOrderContactPage,
DjyCustomerContacts,
getContractno,
DjyCustomerContacts
} from '@/api/modular/main/BookingLedger'
let timer
@ -650,7 +643,7 @@ export default {
inputView,
selectView,
datePickerView,
autoView,
autoView
},
props: {
details: {
@ -737,7 +730,6 @@ export default {
md: { span: 18 }
},
form: this.$form.createForm(this),
// / - start
customerType: '',
customerVisible: false,
customerModelconfirm: false,
@ -747,18 +739,14 @@ export default {
},
cellAutofillOption: true,
editOption: {
// cell value change
cellValueChange: ({ row, column }) => {
// console.log('', row, column)
}
},
checkboxOption: {
hideSelectAll: false,
//
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
this.selectArr = selectedRowKeys
},
//
selectedAllChange: ({ isSelected, selectedRowKeys }) => {
if (isSelected) {
this.selectArr = selectedRowKeys
@ -767,7 +755,6 @@ export default {
}
}
},
//
clipboardOption: {
copy: true,
paste: true,
@ -877,7 +864,6 @@ export default {
etdWeek: '',
selectArr: [],
customerContacts: [],
// / - end
customerContactsData: [],
ContactType: [],
customerContactsDataList: []
@ -887,7 +873,6 @@ export default {
details: {
handler(nval, oval) {
if (!this.inSave) {
// console.log('', this.inSave, nval)
this.$emit('changeDetail', {
detail: nval,
type: 'baseInfo'
@ -965,10 +950,6 @@ export default {
// ---------- ----------
async insertEvent(row) {
// const $table = this.$refs.xTable
// const record = {}
// const { row: newRow } = await $table.insertAt(record, row)
// await $table.setActiveCell(newRow, 'name')
const data = {
email: '',
name: '',
@ -1001,10 +982,8 @@ export default {
})
const data = JSON.parse(JSON.stringify(fullData))
data.forEach(item => {
// if (item.WroleCode) {
item.roleCode = item.WroleCode
delete item.rowKey
// }
})
BookingOrderContactSavebatch(this.$route.query.id, data).then(res => {
if (res.success) {
@ -1148,7 +1127,6 @@ export default {
this.$forceUpdate()
},
getSelectViewRes({ type, res }) {
console.log('=== 获取到选择数据 ===', type, res)
if (type === 'customername') {
this.details.customername = res.shortName || ''
this.details.customerid = Number(res.id) || ''
@ -1189,13 +1167,6 @@ export default {
} else {
this.details.item = []
}
// if (res.id) {
// DjyCustomerdetail({ id: res.id }).then(res => {
// console.log(res.id)
// this.details.sale = res.data.sale || ''
// this.details.saleid = res.data.saleid || ''
// })
// }
} else if (type === 'carrierid') {
this.details.carrier = res.enName || ''
this.details.carrierid = res.code || ''
@ -1237,7 +1208,6 @@ export default {
this.$refs.vesselView.handleSearch('')
}, 600)
}
console.log('== 日期修改 ==', type, value, this.details[type])
},
getAutoViewRes ({ type, res }) {
console.log(type, res)

@ -67,6 +67,26 @@
</a-col>
</a-row>
</a-form>
<!-- <template v-for="(formLabel, findex) in formData" v-if="(findex < 4 && !advanced) || advanced">
<div class="form-box" :key="findex">
<div class="form-label">
<span class="label">{{ formLabel.title }}</span>
</div>
<div class="form-content">
<formLabel
:ref="`fromlabel-${formLabel.label}`"
:labelData="formLabel"
:formRes="formRes"
:resetType="ResetType"
:formIndex="findex"
@change="formChange"
@pressEnter="pressEnterFun"
@getCompleteList="getCompleteListFun"
@selectFirst="getSelectFirst"
></formLabel>
</div>
</div>
</template> -->
</div>
</x-card>
<x-card class="content-table" style="margin-top:-6px;">
@ -1121,6 +1141,8 @@ export default {
toggleAdvanced() {
this.advanced = !this.advanced
let start = new Date().getTime()
console.log('== 点击展开 ==')
if (!this.advanced) {
const len = this.formData.length % 4
if (this.formData.length === 4 || this.formData.length > 4) {
@ -1133,6 +1155,7 @@ export default {
// this.formBtnCol = 24 - len * 4
this.formBtnCol = 24 - len * 4 === 4 ? 24 : 24 - len * 4
}
console.log('== 展开结束 ==', new Date().getTime() - start)
},
tableRefresh() {
const data = { ...this.formRes }
@ -1629,7 +1652,7 @@ export default {
KeyWord: value,
type: 'booking_agent'
}
} else if (['SALE', 'CUSTSERVICE', 'DOC', 'ROUTE'].includes(form.label)) {
} else if (['SALE', 'CUSTSERVICE', 'DOC', 'ROUTE', 'OP'].includes(form.label)) {
// , 线
query = {
name: value
@ -2161,7 +2184,7 @@ export default {
.active {
cursor: pointer;
// color: @primary-color;
color: #15a4a4;
color: #004d11;
}
}
}
@ -2199,7 +2222,7 @@ export default {
.active {
cursor: pointer;
// color: @primary-color;
color: #15a4a4;
color: #004d11;
}
&:nth-of-type(3) {
i {

Loading…
Cancel
Save