|
|
@ -14,12 +14,20 @@
|
|
|
|
v-for="(sedDetail, sindex) in sedOrderList"
|
|
|
|
v-for="(sedDetail, sindex) in sedOrderList"
|
|
|
|
:key="sindex"
|
|
|
|
:key="sindex"
|
|
|
|
:class="{ active: editIndex === sindex }"
|
|
|
|
:class="{ active: editIndex === sindex }"
|
|
|
|
@click="changeOrder(sindex)"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<i class="iconfont icon-dingdan"></i>
|
|
|
|
<div class="left" @click.stop="changeOrder(sindex)">
|
|
|
|
分单{{ sindex + 1 }}: {{ sedDetail.hblno || '请填写分单号' }}
|
|
|
|
<i class="iconfont icon-dingdan"></i>分单{{ sindex + 1 }}: {{ sedDetail.hblno || '请填写分单号' }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<span class="no-save" v-if="sedDetail.isNoSave && editIndex !== sindex">(未保存) </span>
|
|
|
|
<span class="no-save" v-if="sedDetail.isNoSave && editIndex !== sindex">(未保存) </span>
|
|
|
|
<!-- <i class="remove-btn iconfont icon-shanchu1"></i> -->
|
|
|
|
<a-popconfirm
|
|
|
|
|
|
|
|
title="确定删除分单?"
|
|
|
|
|
|
|
|
ok-text="是"
|
|
|
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
|
|
|
@confirm.stop="removeSedOrderFun(sedDetail, sindex)"
|
|
|
|
|
|
|
|
@cancel="cancelRemove"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<span class="remove-btn iconfont icon-shanchu1"></span>
|
|
|
|
|
|
|
|
</a-popconfirm>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="sed-order-btn" @click="addSedOrder"><i class="iconfont icon-jiahao2fill"></i>添加分单</div>
|
|
|
|
<div class="sed-order-btn" @click="addSedOrder"><i class="iconfont icon-jiahao2fill"></i>添加分单</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -36,6 +44,7 @@
|
|
|
|
:class="scrollTop < 100 ? 'normal-nav' : 'fixed-nav'"
|
|
|
|
:class="scrollTop < 100 ? 'normal-nav' : 'fixed-nav'"
|
|
|
|
@save="saveFun"
|
|
|
|
@save="saveFun"
|
|
|
|
@copy="copyFun"
|
|
|
|
@copy="copyFun"
|
|
|
|
|
|
|
|
@remove="removeFun"
|
|
|
|
></sedOperationArea>
|
|
|
|
></sedOperationArea>
|
|
|
|
<ul class="sec-parent-tabs-box">
|
|
|
|
<ul class="sec-parent-tabs-box">
|
|
|
|
<div class="parents-tabs-top">
|
|
|
|
<div class="parents-tabs-top">
|
|
|
@ -146,7 +155,7 @@ import remarksInfo from './remarksInfo'
|
|
|
|
import goodsTable from './goodsTable'
|
|
|
|
import goodsTable from './goodsTable'
|
|
|
|
import ediMore from './ediMore'
|
|
|
|
import ediMore from './ediMore'
|
|
|
|
import rules from '../rules'
|
|
|
|
import rules from '../rules'
|
|
|
|
import { BookingOrderSave } from '@/api/modular/main/BookingLedger'
|
|
|
|
import { BookingOrderSave, DeleteBookingOrder } from '@/api/modular/main/BookingLedger'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'SedOrder',
|
|
|
|
name: 'SedOrder',
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
@ -376,7 +385,7 @@ export default {
|
|
|
|
ediAttnMail: ''
|
|
|
|
ediAttnMail: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.ifCompare(this.sedOrderList[this.editIndex], detail) && !this.inSecLoad) {
|
|
|
|
if (this.ifCompare(this.sedOrderList[this.editIndex], detail) && !this.inSecLoad && type !== 'save') {
|
|
|
|
this.sedOrderList[this.editIndex].isNoSave = true
|
|
|
|
this.sedOrderList[this.editIndex].isNoSave = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.editDetails = detail
|
|
|
|
this.editDetails = detail
|
|
|
@ -556,6 +565,60 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeParentTabs(type) {
|
|
|
|
changeParentTabs(type) {
|
|
|
|
this.mainOrderActiveKey = type
|
|
|
|
this.mainOrderActiveKey = type
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
removeSedOrderFun (data, index) {
|
|
|
|
|
|
|
|
this.deleteBookingOrder(data.id, index)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
removeFun () {
|
|
|
|
|
|
|
|
this.deleteBookingOrder(this.editDetails.id, this.editIndex)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
deleteBookingOrder (id, index) {
|
|
|
|
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
|
|
|
|
if (id == 0) {
|
|
|
|
|
|
|
|
this.removeSucc(id, index)
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.inSecLoad = true
|
|
|
|
|
|
|
|
DeleteBookingOrder([id].toString()).then(res => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
|
|
|
this.removeSucc(id, index)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(err => {
|
|
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
removeSucc (id, index) {
|
|
|
|
|
|
|
|
const removeIndex = index
|
|
|
|
|
|
|
|
console.log('当前删除分单index为', removeIndex)
|
|
|
|
|
|
|
|
this.sedOrderList.splice(removeIndex, 1)
|
|
|
|
|
|
|
|
this.$emit('sedOrderRemove', this.sedOrderList)
|
|
|
|
|
|
|
|
if (this.sedOrderList.length === 0) {
|
|
|
|
|
|
|
|
console.log('== 子单列表删除完毕 ==')
|
|
|
|
|
|
|
|
this.editIndex = 0
|
|
|
|
|
|
|
|
this.editDetails = null
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.editDetails.id === id) {
|
|
|
|
|
|
|
|
console.log('== 删除数据为当前编辑数据 ==')
|
|
|
|
|
|
|
|
const num = this.editIndex === 0 ? 0 : this.editIndex - 1
|
|
|
|
|
|
|
|
this.editIndex = num > this.sedOrderList.length ? this.sedOrderList.length - 1 : num
|
|
|
|
|
|
|
|
this.editDetails = this.sedOrderList[this.editIndex]
|
|
|
|
|
|
|
|
console.log('== 删除数据为当前编辑数据 end ==', this.editIndex, this.editDetails)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.editIndex = removeIndex < this.editIndex ? this.editIndex - 1 : this.editIndex
|
|
|
|
|
|
|
|
console.log('== 删除分单 index ==', this.editIndex)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.inSecLoad = false
|
|
|
|
|
|
|
|
}, 200)
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
cancelRemove () {
|
|
|
|
|
|
|
|
console.log('== 取消删除 ==')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|