张同海 1 year ago
commit d1c698812e

@ -48,7 +48,7 @@ export default {
onEdit(targetKey, action) { onEdit(targetKey, action) {
const _that = this const _that = this
if (targetKey.includes('BookingDetail')) { if (targetKey.includes('BookingDetail')) {
console.log(Object.keys(this.needSavePages).includes(targetKey), this.needSavePages[targetKey], this.needSavePages[targetKey]) console.log(Object.keys(this.needSavePages).includes(targetKey), this.needSavePages[targetKey].details, this.needSavePages[targetKey].hbList)
if ( if (
Object.keys(this.needSavePages).includes(targetKey) && Object.keys(this.needSavePages).includes(targetKey) &&
(this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)

@ -36,6 +36,7 @@ const getters = {
countryList: state => state.booking.countryList, countryList: state => state.booking.countryList,
saveFlag: state => state.booking.saveFlag, saveFlag: state => state.booking.saveFlag,
firstFlag: state => state.user.firstFlag, firstFlag: state => state.user.firstFlag,
topDown: state => state.booking.topDown,
dpTreeList: state => state.booking.dpTreeList, dpTreeList: state => state.booking.dpTreeList,
inBookingDetailsSave: state => state.booking.inBookingDetailsSave, inBookingDetailsSave: state => state.booking.inBookingDetailsSave,
kdAddData: state => state.KD.kdAddData kdAddData: state => state.KD.kdAddData

@ -20,7 +20,8 @@ const booking = {
copyPages: { number: 0, path: '' }, copyPages: { number: 0, path: '' },
yardList: [], yardList: [],
saveNeedNumber: '', saveNeedNumber: '',
deleteId:'', deleteId: '',
topDown: false,
saveFlag: false, saveFlag: false,
packageList: [], packageList: [],
issuetypeList: [], issuetypeList: [],
@ -115,7 +116,11 @@ const booking = {
}, },
SET_SAVENEEDCar: (state, id) => { SET_SAVENEEDCar: (state, id) => {
state.saveNeedCar = id state.saveNeedCar = id
},
SET_SAVETOPDOWN: (state, bool) => {
state.topDown = bool
} }
}, },
actions: { actions: {

@ -18,6 +18,7 @@
:scrollTop="scrollTop" :scrollTop="scrollTop"
@refresh="refreshPage" @refresh="refreshPage"
@save="saveFun" @save="saveFun"
@ocrUpflie="ocrUpflie"
@rules="getRules" @rules="getRules"
@changePage="changePageFun" @changePage="changePageFun"
@copy="copyBookingFun" @copy="copyBookingFun"
@ -111,6 +112,7 @@
:details="bookingDetails" :details="bookingDetails"
:excuteRules="excuteRules" :excuteRules="excuteRules"
:excuteRulesType="excuteRulesType" :excuteRulesType="excuteRulesType"
@fileNewUpadte="fileNewUpadte"
@changeAtd="changeAtd" @changeAtd="changeAtd"
@changeDetail="changeDetailFun" @changeDetail="changeDetailFun"
@handleComplete="handleComplete" @handleComplete="handleComplete"
@ -280,6 +282,7 @@ const initDetail = {
scaccode: '', scaccode: '',
itncode: '', itncode: '',
iscontainersoc: 0, iscontainersoc: 0,
tempFiles: [],
bookingEDIExt: { bookingEDIExt: {
weiTuoFang: '', weiTuoFang: '',
ediAttn: '', ediAttn: '',
@ -445,7 +448,8 @@ export default {
'packageList', 'packageList',
'issuetypeList', 'issuetypeList',
'blfrtList', 'blfrtList',
'inBookingDetailsSave' 'inBookingDetailsSave',
'topDown'
]) ])
}, },
created() { created() {
@ -739,6 +743,10 @@ export default {
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData } this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
} else { } else {
this.bookingDetails = $data.bookingDetails this.bookingDetails = $data.bookingDetails
console.log(this.topDown)
if (this.topDown) {
this.getDetail()
}
this.getRightAll() this.getRightAll()
} }
setTimeout(() => { setTimeout(() => {
@ -836,6 +844,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)
const Fn = item => { const Fn = item => {
const field = item.field.split('.') const field = item.field.split('.')
let label = field[1].toLowerCase() let label = field[1].toLowerCase()
@ -917,10 +926,11 @@ export default {
if (item.Carrier) { if (item.Carrier) {
if (this.bookingDetails.carrierid == item.Carrier) { if (this.bookingDetails.carrierid == item.Carrier) {
Fn(item) Fn(item)
} else {
item.code = ''
Fn(item)
} }
// else {
// item.code = ''
// Fn(item)
// }
} else { } else {
Fn(item) Fn(item)
} }
@ -1076,9 +1086,11 @@ export default {
.then(res => { .then(res => {
this.$message.destroy() this.$message.destroy()
this.setDeatilsFun(res, false) this.setDeatilsFun(res, false)
this.$store.commit('SET_SAVETOPDOWN', false)
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)
this.$store.commit('SET_SAVETOPDOWN', false)
}) })
}, },
@ -1086,6 +1098,12 @@ export default {
if (!res.data.bookingEDIExt) { if (!res.data.bookingEDIExt) {
res.data.bookingEDIExt = bookingEDIExt res.data.bookingEDIExt = bookingEDIExt
} }
if (res.data.cargoid == 'R') {
this.cargoRules['goodsname'][0].required = true
}
if (res.data.cargoid != 'R') {
this.cargoRules['goodsname'][0].required = false
}
if (res.data.ctnInputs.length > 0) { if (res.data.ctnInputs.length > 0) {
res.data.ctnInputs.map((item, index) => { res.data.ctnInputs.map((item, index) => {
if (item.weightype === '累加') { if (item.weightype === '累加') {
@ -1183,7 +1201,18 @@ export default {
}, 1200) }, 1200)
this.$forceUpdate() this.$forceUpdate()
}, },
ocrUpflie(file) {
this.bookingDetails.tempFiles.push({
tempPathName: file
})
},
fileNewUpadte(file) {
this.bookingDetails.tempFiles.push({
tempPathName: file.tempPathName,
typeCode: file.TypeCode,
typeName: file.TypeName
})
},
getRightAll() { getRightAll() {
GetAllData({ GetAllData({
bookingId: this.$route.query.id bookingId: this.$route.query.id
@ -1554,6 +1583,7 @@ export default {
const $data = this.needSavePages const $data = this.needSavePages
delete $data[this.$route.fullPath] delete $data[this.$route.fullPath]
this.setNeedSavePages($data) this.setNeedSavePages($data)
this.$store.commit('SET_SAVETOPDOWN', true)
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetail',
query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true } query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true }
@ -1568,6 +1598,7 @@ export default {
const $data = this.needSavePages const $data = this.needSavePages
delete $data[this.$route.fullPath] delete $data[this.$route.fullPath]
this.setNeedSavePages($data) this.setNeedSavePages($data)
this.$store.commit('SET_SAVETOPDOWN', true)
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetail',
query: { id: nextId, type: nextType, mblno: this.bookingList[nextId].mblno, noOpenTab: true } query: { id: nextId, type: nextType, mblno: this.bookingList[nextId].mblno, noOpenTab: true }

@ -41,7 +41,7 @@
</a-col> </a-col>
<a-col :span="10"> <a-col :span="10">
<div class="line"> <div class="line">
<div <!-- <div
class="left" class="left"
:class="{ 'required': rules['description'] && rules['description'][0].required }" :class="{ 'required': rules['description'] && rules['description'][0].required }"
v-if="details.carrierid !== 'PIL'"> v-if="details.carrierid !== 'PIL'">
@ -50,8 +50,8 @@
@click="handleOpen(2)" @click="handleOpen(2)"
style="cursor: pointer;" style="cursor: pointer;"
class="copy-btn iconfont icon-bianji"></span></div> class="copy-btn iconfont icon-bianji"></span></div>
</div> </div> -->
<div class="left" v-else> <div class="left" >
<div class="title" :class="{ 'required': rules['description'] && rules['description'][0].required }"> <div class="title" :class="{ 'required': rules['description'] && rules['description'][0].required }">
<span <span
@click="handleOpen(2)" @click="handleOpen(2)"
@ -64,6 +64,7 @@
label="" label=""
:class="{ 'goods-name-box': rules['goodsname'] && rules['goodsname'][0].required }"> :class="{ 'goods-name-box': rules['goodsname'] && rules['goodsname'][0].required }">
<i <i
style="top: 4px;"
class="icon required goods-required" class="icon required goods-required"
v-if="rules['goodsname'] && rules['goodsname'][0].required"></i> v-if="rules['goodsname'] && rules['goodsname'][0].required"></i>
<!-- :showLabel="['goodsNameEN', 'goodsCode']" --> <!-- :showLabel="['goodsNameEN', 'goodsCode']" -->
@ -819,9 +820,9 @@ export default {
} else if (type === 'cargoid') { } else if (type === 'cargoid') {
this.details.cargoid = res.code || '' this.details.cargoid = res.code || ''
if (res.code == 'R') { if (res.code == 'R') {
this.rules['description'][0].required = true this.rules['goodsname'][0].required = true
} else { } else {
this.rules['description'][0].required = false this.rules['goodsname'][0].required = false
} }
} else if (['kindpkgs'].includes(type)) { } else if (['kindpkgs'].includes(type)) {
this.details.kindpkgs = res['name'] || '' this.details.kindpkgs = res['name'] || ''

@ -1353,11 +1353,25 @@ export default {
formData.append('file', file.file) formData.append('file', file.file)
// formData.append('bookingId', this.id) // formData.append('bookingId', this.id)
const type = file.file.type const type = file.file.type
BookingOrderOcrUpFile({ data: formData, parameter: { bookingId: this.id } }).then(res => { let id = this.id
this.fileName = res.data if (this.$route.query.isCopy) {
BookingOrderOcrGetImg({ fileName: this.fileName, scale: this.scale }).then(res => { id = 0
this.imgSrc = window.URL.createObjectURL(new Blob([res], { type: `${type};chartset=UTF-8` })) }
}) if (!this.id) {
id = 0
}
BookingOrderOcrUpFile({ data: formData, parameter: { bookingId: id } }).then(res => {
if (res.success) {
this.fileName = res.data.ocrFileName
if (id == 0) {
this.$emit('ocrUpflie', res.data.uploadFileName)
}
BookingOrderOcrGetImg({ fileName: this.fileName, scale: this.scale }).then(res => {
this.imgSrc = window.URL.createObjectURL(new Blob([res], { type: `${type};chartset=UTF-8` }))
})
} else {
this.$message.error(res.message)
}
}) })
}, },
ShowOCR() { ShowOCR() {
@ -2064,5 +2078,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url('../style/operationArea.less'); @import url('../style/operationArea.less');
</style> </style>

@ -788,10 +788,10 @@ export default {
} }
}, },
addFile() { addFile() {
if (!this.id) { // if (!this.id) {
this.$message.error('请先保存主单') // this.$message.error('')
return false // return false
} // }
this.fileModelvisible = true this.fileModelvisible = true
}, },
fileModelCancel() { fileModelCancel() {
@ -829,9 +829,16 @@ export default {
this.$message.error('请选择附件类型') this.$message.error('请选择附件类型')
return false return false
} }
let id = this.id
if (this.$route.query.isCopy) {
id = 0
}
if (!this.id) {
id = 0
}
const formData = new FormData() const formData = new FormData()
formData.append('file', upFileList[0]) formData.append('file', upFileList[0])
formData.append('BookingId', this.id) formData.append('BookingId', id)
formData.append('TypeCode', attachCode) formData.append('TypeCode', attachCode)
formData.append('TypeName', attachName) formData.append('TypeName', attachName)
this.uploading = true this.uploading = true
@ -839,7 +846,16 @@ export default {
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$message.success('上传成功') this.$message.success('上传成功')
this.$emit('upDateRight') if (id != 0) {
this.$emit('upDateRight')
}
if (id == 0) {
this.$emit('fileNewUpadte', {
tempPathName: res.data,
TypeCode: attachCode,
TypeName: attachName
})
}
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }

@ -130,8 +130,11 @@
</div> </div>
<div class="content"> <div class="content">
<div class="box-list"> <div class="box-list">
<div v-for="(serive, sindex) in booGoodsStatusItem" :class="{isBr:!changeGoods && serive.isBr}" :key="`${serive.configId}_${sindex}`"> <div
<a-tooltip > v-for="(serive, sindex) in booGoodsStatusItem"
:class="{ isBr: !changeGoods && serive.isBr }"
:key="`${serive.configId}_${sindex}`">
<a-tooltip>
<template v-if="(serive.actDate || serive.actRemark) && !serive.isBr" #title> <template v-if="(serive.actDate || serive.actRemark) && !serive.isBr" #title>
<p v-if="serive.actDate">{{ serive.actDate }}</p> <p v-if="serive.actDate">{{ serive.actDate }}</p>
<p v-if="serive.actRemark">{{ serive.actRemark }}</p> <p v-if="serive.actRemark">{{ serive.actRemark }}</p>
@ -139,29 +142,36 @@
</template> </template>
<div v-if="changeGoods" style="display: flex;align-items: center;margin-top: 10px;"> <div v-if="changeGoods" style="display: flex;align-items: center;margin-top: 10px;">
<div <div
class="items items1" class="items"
v-if="changeGoods && !serive.isBr" v-if="changeGoods && !serive.isBr"
:class="{ active: serive.isYield, active1: serive.actRemark && !serive.isYield }" :class="{ active: serive.isYield, active1: serive.actRemark && !serive.isYield }"
@click="saveGoodsStatus(serive)"> @click="saveGoodsStatus(serive)">
{{ serive.showName }} {{ serive.showName }}
<div class="edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div> <div class="edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
</div> </div>
<div class="box-line" style="margin: 0 5px 0 0;" v-if="changeGoods && !serive.isEnd && !serive.isBr" :class="{ active: serive.isYield}"></div> <!-- <div
class="box-line"
style="margin: 0 5px 0 0;"
v-if="changeGoods && !serive.isEnd && !serive.isBr"
:class="{ active: serive.isYield }"></div> -->
</div> </div>
<div v-if="!changeGoods && !serive.isBr" class="goods-box"> <div v-if="!changeGoods && !serive.isBr" class="goods-box">
<div class="goods-content" :class="{ active: serive.isYield}" @click="saveGoodsStatus(serive)"> <div class="goods-content" :class="{ active: serive.isYield }" @click="saveGoodsStatus(serive)">
<div class="round" :class="{ active: serive.isYield}"> <!-- <div class="round" :class="{ active: serive.isYield }">
<a-icon v-if="serive.isYield" style="color:rgb(22, 119, 255);font-size: 8px;" type="check" /> <a-icon v-if="serive.isYield" style="color:rgb(48,172,214);font-size: 10px;" type="check" />
</div> -->
<a-icon v-if="serive.isYield" class="serve-icon" type="check-circle" />
<div v-else class="round" >
</div> </div>
<div>{{ serive.showName }}</div> <div class="showName">{{ serive.showName }}</div>
</div> </div>
<!-- <a-icon type="right" style="color: rgb(179, 175, 175);" /> --> <!-- <a-icon type="right" style="color: rgb(179, 175, 175);" /> -->
<div class="box-line" v-if="!changeGoods && !serive.isEnd" :class="{ active: serive.isYield}"></div> <div class="box-line" v-if="!changeGoods && !serive.isEnd" :class="{ active: serive.isYield }"></div>
<div class="box-edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div> <div class="box-edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
</div> </div>
</a-tooltip> </a-tooltip>
</div> </div>
<br/> <br />
</div> </div>
</div> </div>
</a-spin> </a-spin>
@ -1243,11 +1253,13 @@ export default {
padding: 2px; padding: 2px;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
align-items: flex-start;
margin-top: 5px;
&:hover { &:hover {
.goods-content { .goods-content {
border: 1px dashed rgb(19, 194, 194); // border: 1px dashed rgb(19, 194, 194);
background-color: rgb(237, 251, 251); // background-color: rgb(237, 251, 251);
} }
.box-edit { .box-edit {
@ -1256,27 +1268,34 @@ export default {
} }
.goods-content { .goods-content {
display: flex; // display: flex;
border: 1px dashed white; border: 1px dashed white;
font-size: 12px; font-size: 14px;
font-weight: bold; font-weight: bold;
&.active{
color: rgb(22, 119, 255); &.active {
color: rgb(48,172,214);
} }
} }
.serve-icon{
font-size:22px;
display: block;
margin: 0 auto;
margin-bottom: 5px;
}
.round { .round {
width: 15px; width: 22px;
height: 15px; height: 22px;
line-height: 11px; line-height: 15px;
border-radius: 50%; border-radius: 50%;
margin-right: 3px; // margin-right: 3px;
font-size: 12px; margin: 0 auto;
font-size: 15px;
text-align: center; text-align: center;
border: 1px solid rgb(146, 146, 146); border: 2px solid rgb(146, 146, 146);
margin-bottom: 5px;
&.active { &.active {
border: 1px solid rgb(22, 119, 255); border: 1px solid rgb(48,172,214);
} }
} }
@ -1284,25 +1303,33 @@ export default {
width: 17px; width: 17px;
height: 17px; height: 17px;
border-radius: 0 3px 0 0; border-radius: 0 3px 0 0;
background: #c9c9c9; // background: #c9c9c9;
display: none; display: none;
position: absolute; position: absolute;
right: -1px; left: 0px;
top: -1px; top: -1px;
text-align: center; text-align: center;
line-height: 17px; line-height: 17px;
} }
} }
.box-line{ .showName{
height: 1px; width: 48px;
width: 10px; font-size: 12px;
background: rgb(179, 175, 175); text-align: center;
margin-left: 3px; }
&.active { .box-line {
border: 1px solid rgb(22, 119, 255); height: 1px;
} width: 10px;
} background: rgb(179, 175, 175);
.isBr{ // margin-left: 3px;
width: 100%; margin-top: 10px;
&.active {
border: 1px solid rgb(48,172,214);
} }
}
.isBr {
width: 100%;
}
</style> </style>

Loading…
Cancel
Save