|
@@ -11,20 +11,20 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="补货单号"><a-input id="replenishmentManagementList-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入补货单号" /></a-form-item>
|
|
|
+ <a-form-item label="补货单号"><a-input id="replenishmentManagementList-replenishBillNo" v-model.trim="queryParam.replenishBillNo" allowClear placeholder="请输入补货单号" /></a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="货架名称">
|
|
|
- <custList ref="custList" @change="custChange" :itemSn="queryParam.customerSn"></custList>
|
|
|
+ <shelfSList ref="shelfList" @change="shelfChange" :itemSn="queryParam.shelfSn"></shelfSList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品编码"><a-input id="replenishmentManagementList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
|
|
|
+ <a-form-item label="产品编码"><a-input id="replenishmentManagementList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码" /></a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
|
- <a-input id="replenishmentManagementList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
|
|
|
+ <a-input id="replenishmentManagementList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -83,7 +83,13 @@
|
|
|
<!-- 确认 -->
|
|
|
<confirm-modal :openModal="openConfirmModal" :nowData="nowData" @ok="handleValidate" @close="handleCancel" />
|
|
|
<!-- 库存不足,确认弹框 -->
|
|
|
- <stock-modal :openModal="openStockModal" :type="validateType" :nowData="nowData" @ok="handleStockOk" @close="handleStockCancel" />
|
|
|
+ <stock-modal
|
|
|
+ :openModal="openStockModal"
|
|
|
+ :type="validateType"
|
|
|
+ :params="paramsData"
|
|
|
+ :listData="stockList"
|
|
|
+ @ok="handleStockOk"
|
|
|
+ @close="handleStockCancel" />
|
|
|
<!-- 打印贴签 -->
|
|
|
<print-sticker-modal :openModal="openPrintStickerModal" :nowData="nowData" @ok="handlePrintStickerOk" @close="handleCancel" />
|
|
|
<!-- 出库 -->
|
|
@@ -98,17 +104,15 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import custList from '@/views/common/custList.vue'
|
|
|
+import shelfSList from '@/views/common/shelfList.vue'
|
|
|
import confirmModal from './confirmModal.vue'
|
|
|
import stockModal from './stockModal.vue'
|
|
|
import printStickerModal from './printStickerModal.vue'
|
|
|
import outWarehousingModal from './outWarehousingModal.vue'
|
|
|
import putWarehousingModal from './putWarehousingModal.vue'
|
|
|
-import { queryByTypeSum } from '@/api/settleReceipt'
|
|
|
-import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel } from '@/api/shelfReplenish'
|
|
|
-
|
|
|
+import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm } from '@/api/shelfReplenish'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, rangeDate, custList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
|
|
|
+ components: { STable, VSelect, rangeDate, shelfSList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
@@ -121,8 +125,10 @@ export default {
|
|
|
bizType: 'ALL',
|
|
|
beginDate: null,
|
|
|
endDate: null,
|
|
|
- customerSn: undefined,
|
|
|
- billStatus: undefined
|
|
|
+ replenishBillNo: '',
|
|
|
+ shelfSn: undefined,
|
|
|
+ productCode: '',
|
|
|
+ productName: ''
|
|
|
},
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
@@ -131,7 +137,7 @@ export default {
|
|
|
{ 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: '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: '操作', scopedSlots: { customRender: 'action' }, width: '18%', align: 'center' }
|
|
|
],
|
|
@@ -159,9 +165,9 @@ export default {
|
|
|
{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
|
|
|
{ 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: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '实发总量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '入库总量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '单位', dataIndex: 'productUnit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
listData: [],
|
|
@@ -172,7 +178,9 @@ export default {
|
|
|
openPrintStickerModal: false,
|
|
|
openOutWarehousingModal: false,
|
|
|
openPutWarehousingModal: false,
|
|
|
- validateType: 'confirm'
|
|
|
+ validateType: 'confirm',
|
|
|
+ stockList: [],
|
|
|
+ paramsData: null
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -196,13 +204,18 @@ export default {
|
|
|
this.openPutWarehousingModal = false
|
|
|
},
|
|
|
// 库存不足 确认 ok
|
|
|
- handleStockOk () {
|
|
|
+ handleStockOk (type, params) {
|
|
|
this.openStockModal = false
|
|
|
this.openConfirmModal = false
|
|
|
this.openOutWarehousingModal = false
|
|
|
+ if (type == 'confirm') { // 确认
|
|
|
+ this.confirmFun(params)
|
|
|
+ }
|
|
|
},
|
|
|
// 库存不足 确认 cancel
|
|
|
handleStockCancel () {
|
|
|
+ this.stockList = []
|
|
|
+ this.validateType = 'confirm'
|
|
|
this.openStockModal = false
|
|
|
},
|
|
|
// 打印贴签
|
|
@@ -221,9 +234,32 @@ export default {
|
|
|
handleOutWarehousingOk () {
|
|
|
|
|
|
},
|
|
|
- handleValidate (type) {
|
|
|
+ handleValidate (type, params) {
|
|
|
// 校验产品库存是否足够
|
|
|
- this.openStockModal = true
|
|
|
+ shelfReplenishDetailStock(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
+ this.stockList = res.data
|
|
|
+ this.validateType = 'confirm'
|
|
|
+ this.paramsData = params
|
|
|
+ this.openStockModal = true
|
|
|
+ } else {
|
|
|
+ if (type == 'confirm') { // 确认
|
|
|
+ this.confirmFun(params)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 提交确认
|
|
|
+ confirmFun (params) {
|
|
|
+ shelfReplenishConfirm(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message.success('确认补货成功')
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ this.handleCancel()
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 入库
|
|
|
handlePutWarehousing (row) {
|
|
@@ -243,7 +279,7 @@ export default {
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- shelfReplenishCancel({ replenishBillSn: record.replenishBillSn }).then(res => {
|
|
|
+ shelfReplenishCancel({ replenishBillSn: row.replenishBillSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|
|
@@ -255,6 +291,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 货架 change
|
|
|
+ shelfChange (obj) {
|
|
|
+ this.queryParam.shelfSn = obj.key || undefined
|
|
|
+ },
|
|
|
// 自定义展开图标
|
|
|
customExpandIcon (props) {
|
|
|
if (props.expanded) {
|
|
@@ -275,6 +315,9 @@ export default {
|
|
|
const ind = this.listData.findIndex(item => item.id == record.id)
|
|
|
if (ind >= 0) {
|
|
|
if (res.status == 200 && res.data && res.data.length) {
|
|
|
+ res.data.map((item, index) => {
|
|
|
+ item.no = index + 1
|
|
|
+ })
|
|
|
this.listData[ind].subList = res.data
|
|
|
} else {
|
|
|
this.listData[ind].subList = []
|
|
@@ -292,9 +335,13 @@ export default {
|
|
|
resetData () {
|
|
|
this.$refs.rangeDate.resetDate()
|
|
|
this.queryParam.bizType = this.curBizType
|
|
|
- this.queryParam.customerSn = undefined
|
|
|
this.queryParam.beginDate = null
|
|
|
this.queryParam.endDate = null
|
|
|
+ this.queryParam.replenishBillNo = ''
|
|
|
+ this.queryParam.shelfSn = undefined
|
|
|
+ this.$refs.shelfList.resetForm()
|
|
|
+ this.queryParam.productCode = ''
|
|
|
+ this.queryParam.productName = ''
|
|
|
},
|
|
|
// 时间 change
|
|
|
dateChange (date) {
|
|
@@ -313,7 +360,7 @@ export default {
|
|
|
},
|
|
|
// 获取类型
|
|
|
queryByTypeSum () {
|
|
|
- queryByTypeSum({}).then(res => {
|
|
|
+ shelfReplenishStateCount({}).then(res => {
|
|
|
if (res.data && res.status == 200) {
|
|
|
this.tabPaneData = [
|
|
|
{ bizName: '全部', bizType: 'ALL', countNum: null },
|