|
@@ -44,25 +44,9 @@
|
|
|
<!-- 标签页 -->
|
|
|
<a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs ">
|
|
|
<a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
|
|
|
- <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
|
|
|
+ <p slot="tab">{{ item.bizName }}<span v-if="item.countNum || item.countNum==0">({{ item.countNum }})</span></p>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
- <!-- 列表 -->
|
|
|
- <!-- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
- ref="table"
|
|
|
- :style="{ height: tableHeight+84.5+'px' }"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- @expand="expandFun"
|
|
|
- :expandRowByClick="true"
|
|
|
- :scroll="{ y: tableHeight }"
|
|
|
- :expandIcon="(props) => this.customExpandIcon(props)"
|
|
|
- :showPagination="false"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered> -->
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
|
ref="table"
|
|
@@ -120,8 +104,9 @@ import stockModal from './stockModal.vue'
|
|
|
import printStickerModal from './printStickerModal.vue'
|
|
|
import outWarehousingModal from './outWarehousingModal.vue'
|
|
|
import putWarehousingModal from './putWarehousingModal.vue'
|
|
|
-import { settleReceiptQuery, queryByTypeSum } from '@/api/settleReceipt'
|
|
|
-import { storeCallOutTypeList } from '@/api/storeCallOutType'
|
|
|
+import { queryByTypeSum } from '@/api/settleReceipt'
|
|
|
+import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel } from '@/api/shelfReplenish'
|
|
|
+
|
|
|
export default {
|
|
|
components: { STable, VSelect, rangeDate, custList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
|
|
|
mixins: [commonMixin],
|
|
@@ -142,19 +127,19 @@ export default {
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '补货单号', dataIndex: 'salesBfillNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '货架名称', dataIndex: 'dealerProductEntity.name', width: '21%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '状态', dataIndex: 'salesBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '补货应发总量', dataIndex: 'qsty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: '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: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '入库总量', dataIndex: 'qtssy', 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: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return settleReceiptQuery(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return shelfReplenishList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -172,12 +157,12 @@ export default {
|
|
|
},
|
|
|
subColumns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'salesBilslNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'name', width: '28%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '28%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '补货应发总量', dataIndex: 'qsty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '实发总量', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '入库总量', dataIndex: 'qtssy', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', dataIndex: 'salesBisslslNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
listData: [],
|
|
|
tabPaneData: [],
|
|
@@ -256,16 +241,16 @@ export default {
|
|
|
content: '确认取消补货单吗?',
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
- // _this.spinning = true
|
|
|
- // storeCallOutOut({ storeCallOutSn: row.storeCallOutSn }).then(res => {
|
|
|
- // if (res.status == 200) {
|
|
|
- // _this.$message.success(res.message)
|
|
|
- // _this.$refs.table.refresh()
|
|
|
- // _this.spinning = false
|
|
|
- // } else {
|
|
|
- // _this.spinning = false
|
|
|
- // }
|
|
|
- // })
|
|
|
+ _this.spinning = true
|
|
|
+ shelfReplenishCancel({ replenishBillSn: record.replenishBillSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -285,13 +270,11 @@ export default {
|
|
|
// 获取子节点数据
|
|
|
getSubItem (record) {
|
|
|
this.spinning = true
|
|
|
- storeCallOutTypeList({ pageNo: 1, pageSize: 20 }).then(res => {
|
|
|
+ shelfReplenishDetailList({ replenishBillSn: record.replenishBillSn }).then(res => {
|
|
|
const ind = this.listData.findIndex(item => item.id == record.id)
|
|
|
if (ind >= 0) {
|
|
|
- // if (res.status == 200 && res.data && res.data.length) {
|
|
|
- if (res.status == 200 && res.data && res.data.list.length) {
|
|
|
- // this.listData[ind].subList = res.data
|
|
|
- this.listData[ind].subList = res.data.list
|
|
|
+ if (res.status == 200 && res.data && res.data.length) {
|
|
|
+ this.listData[ind].subList = res.data
|
|
|
} else {
|
|
|
this.listData[ind].subList = []
|
|
|
}
|
|
@@ -331,8 +314,18 @@ export default {
|
|
|
queryByTypeSum () {
|
|
|
queryByTypeSum({}).then(res => {
|
|
|
if (res.data && res.status == 200) {
|
|
|
- this.tabPaneData = res.data
|
|
|
- this.queryParam.bizType = res.data[0].bizType
|
|
|
+ this.tabPaneData = [
|
|
|
+ { bizName: '全部', bizType: 'ALL', countNum: null },
|
|
|
+ { bizName: '待确认', bizType: 'SAF', countNum: 0 },
|
|
|
+ { bizName: '待出库', bizType: 'DFG', countNum: 0 },
|
|
|
+ { bizName: '待入库', bizType: 'CDE', countNum: 0 },
|
|
|
+ { bizName: '已完成', bizType: 'VBN', countNum: null },
|
|
|
+ { bizName: '已取消', bizType: 'XCV', countNum: null }
|
|
|
+ ]
|
|
|
+ this.queryParam.bizType = 'ALL'
|
|
|
+ this.tabPaneData[1].countNum = res.data.dqr || 0
|
|
|
+ this.tabPaneData[2].countNum = res.data.dck || 0
|
|
|
+ this.tabPaneData[3].countNum = res.data.drk || 0
|
|
|
this.$refs.table.refresh(true)
|
|
|
}
|
|
|
})
|