|
|
|
@ -975,8 +975,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
bookingOrderUpdate() {
|
|
|
|
|
console.log(this.bookingDetails)
|
|
|
|
|
// if (!this.bookingDetails.mblno) {
|
|
|
|
|
// this.$message.error('请输入提单号')
|
|
|
|
|
// return false
|
|
|
|
@ -1051,59 +1051,111 @@ export default {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 自定义必填项验证 - end
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(this.bookingDetails))
|
|
|
|
|
delete _data.hbList
|
|
|
|
|
BookingOrderAddOrUpdate(_data)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
if (this.isAdd) {
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
this.isAdd = false
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: this.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: this.bookingDetails.mblno
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kgs = 0
|
|
|
|
|
let cbm = 0
|
|
|
|
|
this.bookingDetails.ctnInputs.forEach(item => {
|
|
|
|
|
if (parseFloat(item.pkgs)) {
|
|
|
|
|
pkgs = pkgs + parseFloat(item.pkgs)
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(item.kgs)) {
|
|
|
|
|
kgs = kgs + parseFloat(item.kgs)
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(item.cbm)) {
|
|
|
|
|
cbm = cbm + parseFloat(item.cbm)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
let that = this
|
|
|
|
|
let confirm = text => {
|
|
|
|
|
this.$confirm({
|
|
|
|
|
title: `${text}不一致,是否继续?`,
|
|
|
|
|
okText: '是',
|
|
|
|
|
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('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (this.$route.query.mblno === this.bookingDetails.mblno) {
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
this.isAdd = false
|
|
|
|
|
console.log('1.1 == 保存成功 - 不切换路由 ==', this.id)
|
|
|
|
|
// this.init()
|
|
|
|
|
this.checkSaveFun({ type: 'hbList', hasChange: false })
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
} else {
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
this.isAdd = false
|
|
|
|
|
// 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
|
|
|
|
|
}
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// this.init()
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
},
|
|
|
|
|
onCancel() {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
class: 'test'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
let WText = ''
|
|
|
|
|
if (parseFloat(pkgs) != parseFloat(this.bookingDetails.pkgs)) {
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},件数`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `件数`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(kgs) != parseFloat(this.bookingDetails.kgs)) {
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},重量`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `重量`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(cbm) != parseFloat(this.bookingDetails.cbm)) {
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},尺码`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `尺码`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
confirm(WText)
|
|
|
|
|
// 自定义必填项验证 - end
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
bookingOrderAdd() {
|
|
|
|
@ -1180,37 +1232,110 @@ export default {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 自定义必填项验证 - end
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(this.bookingDetails))
|
|
|
|
|
delete _data.hbList
|
|
|
|
|
BookingOrderAddOrUpdate(_data)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.isAdd = false
|
|
|
|
|
this.id = res.data
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
// this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data,
|
|
|
|
|
type: this.bookingDetails.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: this.bookingDetails.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof res.message === 'string') {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('保存失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kgs = 0
|
|
|
|
|
let cbm = 0
|
|
|
|
|
this.bookingDetails.ctnInputs.forEach(item => {
|
|
|
|
|
if (parseFloat(item.pkgs)) {
|
|
|
|
|
pkgs = pkgs + parseFloat(item.pkgs)
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(item.kgs)) {
|
|
|
|
|
kgs = kgs + parseFloat(item.kgs)
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(item.cbm)) {
|
|
|
|
|
cbm = cbm + parseFloat(item.cbm)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
let that = this
|
|
|
|
|
let confirm = text => {
|
|
|
|
|
this.$confirm({
|
|
|
|
|
title: `${text}不一致,是否继续?`,
|
|
|
|
|
okText: '是',
|
|
|
|
|
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)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onCancel() {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
class: 'test'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
let WText = ''
|
|
|
|
|
if (parseFloat(pkgs) != parseFloat(this.bookingDetails.pkgs)) {
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},件数`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `件数`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(kgs) != parseFloat(this.bookingDetails.kgs)) {
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},重量`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `重量`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(cbm) != parseFloat(this.bookingDetails.cbm)) {
|
|
|
|
|
if (WText) {
|
|
|
|
|
WText = `${WText},尺码`
|
|
|
|
|
} else {
|
|
|
|
|
WText = `尺码`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
confirm(WText)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
spliceMorefun(str) {
|
|
|
|
@ -1460,7 +1585,7 @@ export default {
|
|
|
|
|
pkgsEnCapitalFun(data) {
|
|
|
|
|
this.bookingDetails.totalno = data
|
|
|
|
|
},
|
|
|
|
|
changeParentTabs (type) {
|
|
|
|
|
changeParentTabs(type) {
|
|
|
|
|
this.mainOrderActiveKey = type
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1603,27 +1728,33 @@ export default {
|
|
|
|
|
right: 16px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ form .has-feedback > .ant-select .ant-select-arrow, form .has-feedback > .ant-select .ant-select-selection__clear, form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-arrow, form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear{
|
|
|
|
|
/deep/ form .has-feedback > .ant-select .ant-select-arrow,
|
|
|
|
|
form .has-feedback > .ant-select .ant-select-selection__clear,
|
|
|
|
|
form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-arrow,
|
|
|
|
|
form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear {
|
|
|
|
|
right: 9px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{
|
|
|
|
|
/deep/ form .has-feedback .ant-input-affix-wrapper .ant-input-suffix {
|
|
|
|
|
right: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
/deep/ form .has-feedback .ant-calendar-picker-icon, form .has-feedback .ant-time-picker-icon, form .has-feedback .ant-calendar-picker-clear, form .has-feedback .ant-time-picker-clear{
|
|
|
|
|
/deep/ form .has-feedback .ant-calendar-picker-icon,
|
|
|
|
|
form .has-feedback .ant-time-picker-icon,
|
|
|
|
|
form .has-feedback .ant-calendar-picker-clear,
|
|
|
|
|
form .has-feedback .ant-time-picker-clear {
|
|
|
|
|
right: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// === 0217更新样式 ===
|
|
|
|
|
.booking-detail{
|
|
|
|
|
.booking-detail {
|
|
|
|
|
margin-top: -16px;
|
|
|
|
|
margin-left: -16px;
|
|
|
|
|
margin-right: -16px;
|
|
|
|
|
|
|
|
|
|
/deep/ .ant-card-body{
|
|
|
|
|
/deep/ .ant-card-body {
|
|
|
|
|
margin-bottom: 2px !important;
|
|
|
|
|
}
|
|
|
|
|
/deep/ .ant-collapse-header{
|
|
|
|
|
/deep/ .ant-collapse-header {
|
|
|
|
|
padding: 4px 10px !important;
|
|
|
|
|
}
|
|
|
|
|
// /deep/ .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
|
|
|
|
@ -1633,20 +1764,21 @@ export default {
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.parent-tabs-box{
|
|
|
|
|
.parent-tabs-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
// float: none;
|
|
|
|
|
list-style: none;
|
|
|
|
|
position: relative;
|
|
|
|
|
text-align: left;
|
|
|
|
|
padding: 29px 0 0 0;
|
|
|
|
|
.parents-tabs-top{
|
|
|
|
|
position:absolute;
|
|
|
|
|
top: 0;left: 0;
|
|
|
|
|
.parents-tabs-top {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
li {
|
|
|
|
|
float: left;
|
|
|
|
|
}
|
|
|
|
|
input[type="radio"] {
|
|
|
|
|
input[type='radio'] {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: -9999px;
|
|
|
|
|
left: -9999px;
|
|
|
|
@ -1670,14 +1802,14 @@ export default {
|
|
|
|
|
// transition: all 0.2s ease-in-out;
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
}
|
|
|
|
|
[id^="tab"]:checked + label {
|
|
|
|
|
[id^='tab']:checked + label {
|
|
|
|
|
top: 0;
|
|
|
|
|
background: #fff;
|
|
|
|
|
color: @primary-color;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.parents-tabs-content{
|
|
|
|
|
.parents-tabs-content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
@ -1685,7 +1817,7 @@ export default {
|
|
|
|
|
.tab-content {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
transition: .5s all;
|
|
|
|
|
transition: 0.5s all;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 10px 0;
|
|
|
|
@ -1695,5 +1827,4 @@ export default {
|
|
|
|
|
// display: block;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|