|
|
|
@ -20,6 +20,7 @@
|
|
|
|
|
@changePage="changePageFun"
|
|
|
|
|
@copy="copyBookingFun"
|
|
|
|
|
@addSedList="addSedList"
|
|
|
|
|
@FnOcrChenga="FnOcrChenga"
|
|
|
|
|
></operationArea>
|
|
|
|
|
<a-tabs type="card">
|
|
|
|
|
<a-tab-pane key="1-1" tab="基础信息">
|
|
|
|
@ -39,15 +40,15 @@
|
|
|
|
|
<!-- 备注信息 -->
|
|
|
|
|
<remarksInfo :details="bookingDetails" @changeDetail="changeDetailFun"></remarksInfo>
|
|
|
|
|
<!-- 箱型 -->
|
|
|
|
|
<goodsTable :details="bookingDetails" @changeDetail="changeDetailFun" v-if="!inPageLoading"></goodsTable>
|
|
|
|
|
<goodsTable
|
|
|
|
|
:details="bookingDetails"
|
|
|
|
|
@changeDetail="changeDetailFun"
|
|
|
|
|
v-if="!inPageLoading"
|
|
|
|
|
></goodsTable>
|
|
|
|
|
</div>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
<a-tab-pane key="2-2" tab="EDI补充信息">
|
|
|
|
|
<ediMore
|
|
|
|
|
class="pane-box"
|
|
|
|
|
:details="bookingDetails"
|
|
|
|
|
@changeDetail="changeDetailFun"
|
|
|
|
|
></ediMore>
|
|
|
|
|
<ediMore class="pane-box" :details="bookingDetails" @changeDetail="changeDetailFun"></ediMore>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
</a-tabs>
|
|
|
|
|
</template>
|
|
|
|
@ -275,9 +276,13 @@ export default {
|
|
|
|
|
this.init()
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
window.addEventListener('scroll', () => {
|
|
|
|
|
window.addEventListener(
|
|
|
|
|
'scroll',
|
|
|
|
|
() => {
|
|
|
|
|
this.scrollTop = document.getElementById('app').scrollTop
|
|
|
|
|
}, true)
|
|
|
|
|
},
|
|
|
|
|
true
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
beforeRouteUpdate(to, from, next) {
|
|
|
|
|
// console.log('fromId:', from.query.id, '| toId:', to.query.id)
|
|
|
|
@ -369,7 +374,7 @@ export default {
|
|
|
|
|
next()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 2000);
|
|
|
|
|
}, 2000)
|
|
|
|
|
},
|
|
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
|
|
next(vm => {
|
|
|
|
@ -379,7 +384,11 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
...mapActions(['setNeedSavePages']),
|
|
|
|
|
getRouterHis() {
|
|
|
|
|
console.log('Router 2.3 === beforeRouteEnter - getRouterHis ===', Object.keys(this.historyData), this.$route.query.id)
|
|
|
|
|
console.log(
|
|
|
|
|
'Router 2.3 === beforeRouteEnter - getRouterHis ===',
|
|
|
|
|
Object.keys(this.historyData),
|
|
|
|
|
this.$route.query.id
|
|
|
|
|
)
|
|
|
|
|
this.inChildLoading = true
|
|
|
|
|
const newId = this.$route.query.id
|
|
|
|
|
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
|
|
|
|
@ -477,7 +486,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.inPageLoading = true
|
|
|
|
|
this.inChildLoading = true
|
|
|
|
|
this.$message.loading({ content: '加载中...' });
|
|
|
|
|
this.$message.loading({ content: '加载中...' })
|
|
|
|
|
// console.log('4.1 == 获取详情 ==', this.id)
|
|
|
|
|
BookingOrderGet({
|
|
|
|
|
id: this.id
|
|
|
|
@ -534,18 +543,17 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ifCompare(object1, object2) {
|
|
|
|
|
var o1keys = Object.keys(object1);
|
|
|
|
|
var o2keys = Object.keys(object2);
|
|
|
|
|
if (o2keys.length !== o1keys.length) return false;
|
|
|
|
|
var o1keys = Object.keys(object1)
|
|
|
|
|
var o2keys = Object.keys(object2)
|
|
|
|
|
if (o2keys.length !== o1keys.length) return false
|
|
|
|
|
for (let i = 0; i <= o1keys.length - 1; i++) {
|
|
|
|
|
let key = o1keys[i];
|
|
|
|
|
if (!o2keys.includes(key)) return false;
|
|
|
|
|
if (object2[key] !== object1[key]) return false;
|
|
|
|
|
let key = o1keys[i]
|
|
|
|
|
if (!o2keys.includes(key)) return false
|
|
|
|
|
if (object2[key] !== object1[key]) return false
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bookingOrderUpdate() {
|
|
|
|
|
if (!this.bookingDetails.mblno) {
|
|
|
|
|
this.$message.error('请输入提单号')
|
|
|
|
@ -566,13 +574,18 @@ export default {
|
|
|
|
|
// console.log('1.2 == 保存成功 - 刷新路由 ==', this.id)
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: { id: this.id, type: this.bookingDetails.carrierid, noOpenTab: true, mblno: this.bookingDetails.mblno }
|
|
|
|
|
query: {
|
|
|
|
|
id: this.id,
|
|
|
|
|
type: this.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: this.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// this.init()
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof (res.message) === 'string') {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('保存失败')
|
|
|
|
@ -599,11 +612,16 @@ export default {
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: { id: res.data, type: this.bookingDetails.carrierid, noOpenTab: true, mblno: this.bookingDetails.mblno }
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: this.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: this.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof (res.message) === 'string') {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('保存失败')
|
|
|
|
@ -642,7 +660,10 @@ export default {
|
|
|
|
|
changePageFun(type) {
|
|
|
|
|
const _this = this
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
if (Object.keys(this.needSavePages).includes(key) && (this.needSavePages[key].details || this.needSavePages[key].hbList)) {
|
|
|
|
|
if (
|
|
|
|
|
Object.keys(this.needSavePages).includes(key) &&
|
|
|
|
|
(this.needSavePages[key].details || this.needSavePages[key].hbList)
|
|
|
|
|
) {
|
|
|
|
|
// console.log('== 切换上一票下一票 - biu 弹窗出现 ==')
|
|
|
|
|
this.$confirm({
|
|
|
|
|
title: '请确认无未保存数据!',
|
|
|
|
@ -704,6 +725,10 @@ export default {
|
|
|
|
|
query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
FnOcrChenga(data) {
|
|
|
|
|
this.bookingDetails = data
|
|
|
|
|
console.log(this.bookingDetails)
|
|
|
|
|
},
|
|
|
|
|
addSedList() {
|
|
|
|
|
if (this.isAdd) {
|
|
|
|
|
this.$message.error('请先保存主单')
|
|
|
|
@ -749,16 +774,16 @@ export default {
|
|
|
|
|
// console.log('== vuex 配置更新信息 ==', this.needSavePages)
|
|
|
|
|
},
|
|
|
|
|
calc(num1, num2, calcStr) {
|
|
|
|
|
var str1; // 转换为字符串的数字
|
|
|
|
|
var str2;
|
|
|
|
|
var ws1 = 0; // ws1,ws2 用来存储传入的num的小数点后的数字的位数
|
|
|
|
|
var ws2 = 0; // 赋默认值,解决当整数和小数运算时倍数计算错误导致的结果误差
|
|
|
|
|
var bigger; // bigger和smaller用于加,减,除法找出小的那个数字,给后面补0,解决位数不对从而造成的计算错误的问题;乘法需要将结果除两个数字的倍数之和
|
|
|
|
|
var smaller; // 例如:加减除法中1.001 + 2.03 ,如果不给2.03进行补0,最后会变成1001+203,数字错位导致结果错误;乘法中1.12*1.1会放大为112*11,所以结果需要除以1000才会是正确的结果,112*11/1000=1.232
|
|
|
|
|
var zeroCount; // 需要补充0的个数
|
|
|
|
|
var isExistDot1; // 传入的数字是否存在小数点
|
|
|
|
|
var isExistDot2;
|
|
|
|
|
var sum;
|
|
|
|
|
var str1 // 转换为字符串的数字
|
|
|
|
|
var str2
|
|
|
|
|
var ws1 = 0 // ws1,ws2 用来存储传入的num的小数点后的数字的位数
|
|
|
|
|
var ws2 = 0 // 赋默认值,解决当整数和小数运算时倍数计算错误导致的结果误差
|
|
|
|
|
var bigger // bigger和smaller用于加,减,除法找出小的那个数字,给后面补0,解决位数不对从而造成的计算错误的问题;乘法需要将结果除两个数字的倍数之和
|
|
|
|
|
var smaller // 例如:加减除法中1.001 + 2.03 ,如果不给2.03进行补0,最后会变成1001+203,数字错位导致结果错误;乘法中1.12*1.1会放大为112*11,所以结果需要除以1000才会是正确的结果,112*11/1000=1.232
|
|
|
|
|
var zeroCount // 需要补充0的个数
|
|
|
|
|
var isExistDot1 // 传入的数字是否存在小数点
|
|
|
|
|
var isExistDot2
|
|
|
|
|
var sum
|
|
|
|
|
var beishu = 1
|
|
|
|
|
// 将数字转换为字符串
|
|
|
|
|
str1 = num1.toString()
|
|
|
|
@ -945,7 +970,7 @@ export default {
|
|
|
|
|
// padding-top: 60px;
|
|
|
|
|
}
|
|
|
|
|
.normal-nav {
|
|
|
|
|
transition: .5s all;
|
|
|
|
|
transition: 0.5s all;
|
|
|
|
|
}
|
|
|
|
|
.fixed-nav {
|
|
|
|
|
position: fixed;
|
|
|
|
@ -953,6 +978,6 @@ export default {
|
|
|
|
|
box-shadow: 0px 15px 10px -15px #ccc;
|
|
|
|
|
z-index: 999;
|
|
|
|
|
background: #fff;
|
|
|
|
|
transition: .5s all;
|
|
|
|
|
transition: 0.5s all;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|