|
@@ -56,6 +56,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
@expand="expandFun"
|
|
@expand="expandFun"
|
|
:expandRowByClick="true"
|
|
:expandRowByClick="true"
|
|
:scroll="{ y: tableHeight }"
|
|
:scroll="{ y: tableHeight }"
|
|
@@ -63,6 +64,7 @@
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
<a-table
|
|
<a-table
|
|
|
|
+ v-if="listData&&listData[index]"
|
|
slot="expandedRowRender"
|
|
slot="expandedRowRender"
|
|
slot-scope="record, index"
|
|
slot-scope="record, index"
|
|
size="small"
|
|
size="small"
|
|
@@ -160,22 +162,29 @@ export default {
|
|
productCode: '',
|
|
productCode: '',
|
|
productName: ''
|
|
productName: ''
|
|
},
|
|
},
|
|
|
|
+ expandedRowKeys: [],
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '补货单号', dataIndex: 'replenishBillNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '货架名称', dataIndex: 'shelfName', width: '21%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '补货单号', dataIndex: 'replenishBillNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '补货应发总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '补货应发总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '实发总量', dataIndex: 'totalConfirmQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '实发总量', dataIndex: 'totalConfirmQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '签收总量', dataIndex: 'totalPutQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '签收总量', dataIndex: 'totalPutQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '18%', align: 'left' }
|
|
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'left' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return shelfReplenishList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ this.expandedRowKeys = []
|
|
|
|
+ parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ delete params.index
|
|
|
|
+ delete params.tableId
|
|
|
|
+ delete params.bizType
|
|
|
|
+ return shelfReplenishList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -270,7 +279,7 @@ export default {
|
|
handlePrintStickerOk () {
|
|
handlePrintStickerOk () {
|
|
this.nowData = null
|
|
this.nowData = null
|
|
this.openPrintStickerModal = false
|
|
this.openPrintStickerModal = false
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.queryByTypeSum()
|
|
},
|
|
},
|
|
// 出库
|
|
// 出库
|
|
handleOutWarehousing (row) {
|
|
handleOutWarehousing (row) {
|
|
@@ -281,7 +290,7 @@ export default {
|
|
handleOutWarehousingOk () {
|
|
handleOutWarehousingOk () {
|
|
this.nowData = null
|
|
this.nowData = null
|
|
this.openOutWarehousingModal = false
|
|
this.openOutWarehousingModal = false
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.queryByTypeSum()
|
|
},
|
|
},
|
|
handleValidate (type, params) {
|
|
handleValidate (type, params) {
|
|
// 校验产品库存是否足够
|
|
// 校验产品库存是否足够
|
|
@@ -319,7 +328,7 @@ export default {
|
|
handlePutWarehousingOk () {
|
|
handlePutWarehousingOk () {
|
|
this.nowData = null
|
|
this.nowData = null
|
|
this.openPutWarehousingModal = false
|
|
this.openPutWarehousingModal = false
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.queryByTypeSum()
|
|
},
|
|
},
|
|
// 取消补货单
|
|
// 取消补货单
|
|
handleCancelOrder (row) {
|
|
handleCancelOrder (row) {
|
|
@@ -348,7 +357,11 @@ export default {
|
|
},
|
|
},
|
|
expandFun (expanded, record) {
|
|
expandFun (expanded, record) {
|
|
if (expanded) {
|
|
if (expanded) {
|
|
|
|
+ this.expandedRowKeys.push(record.id)
|
|
this.getSubItem(record) // 获取表格内部数据
|
|
this.getSubItem(record) // 获取表格内部数据
|
|
|
|
+ } else {
|
|
|
|
+ const i = this.expandedRowKeys.findIndex(item => item == record.id)
|
|
|
|
+ this.expandedRowKeys.splice(i, 1)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取子节点数据
|
|
// 获取子节点数据
|
|
@@ -393,9 +406,12 @@ export default {
|
|
},
|
|
},
|
|
// 选择类型
|
|
// 选择类型
|
|
handleTabChange (key) {
|
|
handleTabChange (key) {
|
|
- this.queryParam.bizType = key
|
|
|
|
- this.$refs.table.refresh(true)
|
|
|
|
- this.curBizType = key
|
|
|
|
|
|
+ this.expandedRowKeys = []
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.queryParam.bizType = key
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ this.curBizType = key
|
|
|
|
+ }, 100)
|
|
},
|
|
},
|
|
// 客户 change
|
|
// 客户 change
|
|
custChange (obj) {
|
|
custChange (obj) {
|
|
@@ -406,18 +422,20 @@ export default {
|
|
shelfReplenishStateCount({}).then(res => {
|
|
shelfReplenishStateCount({}).then(res => {
|
|
if (res.data && res.status == 200) {
|
|
if (res.data && res.status == 200) {
|
|
this.tabPaneData = [
|
|
this.tabPaneData = [
|
|
- { bizName: '全部', bizType: 'ALL', countNum: null },
|
|
|
|
|
|
+ { bizName: '全部', bizType: 'ALL', countNum: 0 },
|
|
{ bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
|
|
{ bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
|
|
{ bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
|
|
{ bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
|
|
{ bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
|
|
{ bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
|
|
- { bizName: '已完成', bizType: 'FINISH', countNum: null },
|
|
|
|
- { bizName: '已取消', bizType: 'CANCEL', countNum: null }
|
|
|
|
|
|
+ { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
|
|
|
|
+ { bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
|
|
]
|
|
]
|
|
this.queryParam.bizType = 'ALL'
|
|
this.queryParam.bizType = 'ALL'
|
|
this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
|
|
this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
|
|
this.tabPaneData[2].countNum = res.data.WAIT_OUT_STOCK || 0
|
|
this.tabPaneData[2].countNum = res.data.WAIT_OUT_STOCK || 0
|
|
this.tabPaneData[3].countNum = res.data.WAIT_CHECK || 0
|
|
this.tabPaneData[3].countNum = res.data.WAIT_CHECK || 0
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.tabPaneData[4].countNum = res.data.FINISH || 0
|
|
|
|
+ this.tabPaneData[5].countNum = res.data.CANCEL || 0
|
|
|
|
+ this.$refs.table.refresh()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|