|
|
|
@ -1051,6 +1051,60 @@ export default {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let FnOk = () => {
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
|
|
|
|
|
delete _data.hbList
|
|
|
|
|
BookingOrderAddOrUpdate(_data)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
that.$message.success('保存成功')
|
|
|
|
|
if (that.isAdd) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (that.$route.query.mblno === that.bookingDetails.mblno) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
console.log('1.1 == 保存成功 - 不切换路由 ==', that.id)
|
|
|
|
|
// that.init()
|
|
|
|
|
that.checkSaveFun({ type: 'hbList', hasChange: false })
|
|
|
|
|
that.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
} else {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
// console.log('1.2 == 保存成功 - 刷新路由 ==', that.id)
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: that.id,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// that.init()
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
that.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
that.$message.error('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kgs = 0
|
|
|
|
|
let cbm = 0
|
|
|
|
@ -1073,58 +1127,7 @@ export default {
|
|
|
|
|
okType: 'danger',
|
|
|
|
|
cancelText: '否',
|
|
|
|
|
onOk() {
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
|
|
|
|
|
delete _data.hbList
|
|
|
|
|
BookingOrderAddOrUpdate(_data)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
that.$message.success('保存成功')
|
|
|
|
|
if (that.isAdd) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (that.$route.query.mblno === that.bookingDetails.mblno) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
console.log('1.1 == 保存成功 - 不切换路由 ==', that.id)
|
|
|
|
|
// that.init()
|
|
|
|
|
that.checkSaveFun({ type: 'hbList', hasChange: false })
|
|
|
|
|
that.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
} else {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
// console.log('1.2 == 保存成功 - 刷新路由 ==', that.id)
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: that.id,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// that.init()
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
that.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
that.$message.error('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
FnOk()
|
|
|
|
|
},
|
|
|
|
|
onCancel() {
|
|
|
|
|
return false
|
|
|
|
@ -1134,6 +1137,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
let WText = ''
|
|
|
|
|
if (parseFloat(pkgs) != parseFloat(this.bookingDetails.pkgs)) {
|
|
|
|
|
console.log(parseFloat(pkgs), parseFloat(this.bookingDetails.pkgs))
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},件数`
|
|
|
|
|
} else {
|
|
|
|
@ -1141,6 +1145,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(kgs) != parseFloat(this.bookingDetails.kgs)) {
|
|
|
|
|
console.log(parseFloat(kgs), parseFloat(this.bookingDetails.kgs))
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},重量`
|
|
|
|
|
} else {
|
|
|
|
@ -1148,13 +1153,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(cbm) != parseFloat(this.bookingDetails.cbm)) {
|
|
|
|
|
console.log(parseFloat(cbm), parseFloat(this.bookingDetails.cbm))
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},尺码`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `尺码`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
confirm(WText)
|
|
|
|
|
if (WText) {
|
|
|
|
|
confirm(WText)
|
|
|
|
|
} else {
|
|
|
|
|
FnOk()
|
|
|
|
|
}
|
|
|
|
|
// 自定义必填项验证 - end
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -1232,6 +1242,60 @@ export default {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let FnOk = () => {
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
|
|
|
|
|
delete _data.hbList
|
|
|
|
|
BookingOrderAddOrUpdate(_data)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
that.$message.success('保存成功')
|
|
|
|
|
if (that.isAdd) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (that.$route.query.mblno === that.bookingDetails.mblno) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
console.log('1.1 == 保存成功 - 不切换路由 ==', that.id)
|
|
|
|
|
// that.init()
|
|
|
|
|
that.checkSaveFun({ type: 'hbList', hasChange: false })
|
|
|
|
|
that.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
} else {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
// console.log('1.2 == 保存成功 - 刷新路由 ==', that.id)
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: that.id,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// that.init()
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
that.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
that.$message.error('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kgs = 0
|
|
|
|
|
let cbm = 0
|
|
|
|
@ -1254,58 +1318,7 @@ export default {
|
|
|
|
|
okType: 'danger',
|
|
|
|
|
cancelText: '否',
|
|
|
|
|
onOk() {
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
|
|
|
|
|
delete _data.hbList
|
|
|
|
|
BookingOrderAddOrUpdate(_data)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
that.$message.success('保存成功')
|
|
|
|
|
if (that.isAdd) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (that.$route.query.mblno === that.bookingDetails.mblno) {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
console.log('1.1 == 保存成功 - 不切换路由 ==', that.id)
|
|
|
|
|
// that.init()
|
|
|
|
|
that.checkSaveFun({ type: 'hbList', hasChange: false })
|
|
|
|
|
that.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
} else {
|
|
|
|
|
that.isCopy = false
|
|
|
|
|
that.isAdd = false
|
|
|
|
|
// console.log('1.2 == 保存成功 - 刷新路由 ==', that.id)
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: that.id,
|
|
|
|
|
type: that.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: that.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// that.init()
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
that.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
that.$message.error('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
FnOk()
|
|
|
|
|
},
|
|
|
|
|
onCancel() {
|
|
|
|
|
return false
|
|
|
|
@ -1315,6 +1328,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
let WText = ''
|
|
|
|
|
if (parseFloat(pkgs) != parseFloat(this.bookingDetails.pkgs)) {
|
|
|
|
|
console.log(parseFloat(pkgs), parseFloat(this.bookingDetails.pkgs))
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},件数`
|
|
|
|
|
} else {
|
|
|
|
@ -1322,6 +1336,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(kgs) != parseFloat(this.bookingDetails.kgs)) {
|
|
|
|
|
console.log(parseFloat(kgs), parseFloat(this.bookingDetails.kgs))
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},重量`
|
|
|
|
|
} else {
|
|
|
|
@ -1329,13 +1344,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(cbm) != parseFloat(this.bookingDetails.cbm)) {
|
|
|
|
|
console.log(parseFloat(cbm), parseFloat(this.bookingDetails.cbm))
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},尺码`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `尺码`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
confirm(WText)
|
|
|
|
|
if (WText) {
|
|
|
|
|
confirm(WText)
|
|
|
|
|
} else {
|
|
|
|
|
FnOk()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
spliceMorefun(str) {
|
|
|
|
|