修改问题

master
sunzehua 1 year ago
parent 39ef981065
commit 38f1528e90

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

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

@ -18,6 +18,7 @@
:scrollTop="scrollTop"
@refresh="refreshPage"
@save="saveFun"
@ocrUpflie="ocrUpflie"
@rules="getRules"
@changePage="changePageFun"
@copy="copyBookingFun"
@ -111,6 +112,7 @@
:details="bookingDetails"
:excuteRules="excuteRules"
:excuteRulesType="excuteRulesType"
@fileNewUpadte="fileNewUpadte"
@changeAtd="changeAtd"
@changeDetail="changeDetailFun"
@handleComplete="handleComplete"
@ -280,6 +282,7 @@ const initDetail = {
scaccode: '',
itncode: '',
iscontainersoc: 0,
tempFiles: [],
bookingEDIExt: {
weiTuoFang: '',
ediAttn: '',
@ -445,7 +448,8 @@ export default {
'packageList',
'issuetypeList',
'blfrtList',
'inBookingDetailsSave'
'inBookingDetailsSave',
'topDown'
])
},
created() {
@ -739,6 +743,10 @@ export default {
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
} else {
this.bookingDetails = $data.bookingDetails
console.log(this.topDown)
if (this.topDown) {
this.getDetail()
}
this.getRightAll()
}
setTimeout(() => {
@ -1078,9 +1086,11 @@ export default {
.then(res => {
this.$message.destroy()
this.setDeatilsFun(res, false)
this.$store.commit('SET_SAVETOPDOWN', false)
})
.catch(err => {
console.log(err)
this.$store.commit('SET_SAVETOPDOWN', false)
})
},
@ -1089,7 +1099,10 @@ export default {
res.data.bookingEDIExt = bookingEDIExt
}
if (res.data.cargoid == 'R') {
this.cargoRules['description'][0].required = true
this.cargoRules['goodsname'][0].required = true
}
if (res.data.cargoid != 'R') {
this.cargoRules['goodsname'][0].required = false
}
if (res.data.ctnInputs.length > 0) {
res.data.ctnInputs.map((item, index) => {
@ -1188,7 +1201,18 @@ export default {
}, 1200)
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() {
GetAllData({
bookingId: this.$route.query.id
@ -1559,6 +1583,7 @@ export default {
const $data = this.needSavePages
delete $data[this.$route.fullPath]
this.setNeedSavePages($data)
this.$store.commit('SET_SAVETOPDOWN', true)
this.$router.replace({
name: 'BookingDetail',
query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true }
@ -1573,6 +1598,7 @@ export default {
const $data = this.needSavePages
delete $data[this.$route.fullPath]
this.setNeedSavePages($data)
this.$store.commit('SET_SAVETOPDOWN', true)
this.$router.replace({
name: 'BookingDetail',
query: { id: nextId, type: nextType, mblno: this.bookingList[nextId].mblno, noOpenTab: true }

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

@ -1353,11 +1353,25 @@ export default {
formData.append('file', file.file)
// formData.append('bookingId', this.id)
const type = file.file.type
BookingOrderOcrUpFile({ data: formData, parameter: { bookingId: this.id } }).then(res => {
this.fileName = res.data
let id = this.id
if (this.$route.query.isCopy) {
id = 0
}
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() {
@ -2064,5 +2078,4 @@ export default {
</script>
<style lang="less" scoped>
@import url('../style/operationArea.less');
</style>

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

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

Loading…
Cancel
Save