|
@@ -7,7 +7,7 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="创建时间">
|
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
+ <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -69,15 +69,16 @@
|
|
|
:columns="subColumns"
|
|
|
:data-source="listData[index].subList"
|
|
|
:pagination="false"
|
|
|
- bordered>
|
|
|
+ :bordered="false"
|
|
|
+ style="margin: 15px 10px;">
|
|
|
</a-table>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button>
|
|
|
- <a-button size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
|
|
|
- <a-button size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
|
|
|
- <a-button size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">入库</a-button>
|
|
|
- <a-button size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
|
|
|
+ <a-button v-if="record.billState=='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button>
|
|
|
+ <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
|
|
|
+ <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
|
|
|
+ <a-button v-if="record.billState=='WAIT_CHECK'" size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">签收</a-button>
|
|
|
+ <a-button v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
<!-- 确认 -->
|
|
@@ -93,8 +94,8 @@
|
|
|
<!-- 打印贴签 -->
|
|
|
<print-sticker-modal :openModal="openPrintStickerModal" :nowData="nowData" @ok="handlePrintStickerOk" @close="handleCancel" />
|
|
|
<!-- 出库 -->
|
|
|
- <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleValidate" @close="handleCancel" />
|
|
|
- <!-- 入库 -->
|
|
|
+ <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleOutWarehousingOk" @close="handleCancel" />
|
|
|
+ <!-- 签收 -->
|
|
|
<put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
@@ -103,6 +104,7 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import shelfSList from '@/views/common/shelfList.vue'
|
|
|
import confirmModal from './confirmModal.vue'
|
|
@@ -121,10 +123,15 @@ export default {
|
|
|
tableHeight: 0,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
curBizType: 'ALL',
|
|
|
+ time: [
|
|
|
+ getDate.getCurrMonthDays().starttime,
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
+ ],
|
|
|
+ // 查询参数
|
|
|
queryParam: {
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime,
|
|
|
bizType: 'ALL',
|
|
|
- beginDate: null,
|
|
|
- endDate: null,
|
|
|
replenishBillNo: '',
|
|
|
shelfSn: undefined,
|
|
|
productCode: '',
|
|
@@ -138,8 +145,8 @@ export default {
|
|
|
{ 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: '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' }
|
|
|
+ { title: '签收总量', dataIndex: 'totalPutQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '18%', align: 'left' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -167,7 +174,7 @@ export default {
|
|
|
{ title: '产品名称', dataIndex: 'productName', width: '28%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ 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: '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: [],
|
|
@@ -189,11 +196,6 @@ export default {
|
|
|
this.nowData = row
|
|
|
this.openConfirmModal = true
|
|
|
},
|
|
|
- // 确认 ok
|
|
|
- handleConfirmOk () {
|
|
|
- // 校验产品库存是否足够
|
|
|
- this.openStockModal = true
|
|
|
- },
|
|
|
// cancel
|
|
|
handleCancel () {
|
|
|
this.nowData = null
|
|
@@ -224,7 +226,11 @@ export default {
|
|
|
this.openPrintStickerModal = true
|
|
|
},
|
|
|
// 打印贴签 ok
|
|
|
- handlePrintStickerOk () {},
|
|
|
+ handlePrintStickerOk () {
|
|
|
+ this.nowData = null
|
|
|
+ this.openPrintStickerModal = false
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
// 出库
|
|
|
handleOutWarehousing (row) {
|
|
|
this.nowData = row
|
|
@@ -232,7 +238,9 @@ export default {
|
|
|
},
|
|
|
// 出库 ok
|
|
|
handleOutWarehousingOk () {
|
|
|
-
|
|
|
+ this.nowData = null
|
|
|
+ this.openOutWarehousingModal = false
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
},
|
|
|
handleValidate (type, params) {
|
|
|
// 校验产品库存是否足够
|
|
@@ -261,14 +269,16 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 入库
|
|
|
+ // 签收
|
|
|
handlePutWarehousing (row) {
|
|
|
this.nowData = row
|
|
|
this.openPutWarehousingModal = true
|
|
|
},
|
|
|
- // 入库 ok
|
|
|
+ // 签收 ok
|
|
|
handlePutWarehousingOk () {
|
|
|
+ this.nowData = null
|
|
|
this.openPutWarehousingModal = false
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 取消补货单
|
|
|
handleCancelOrder (row) {
|
|
@@ -295,14 +305,6 @@ export default {
|
|
|
shelfChange (obj) {
|
|
|
this.queryParam.shelfSn = obj.key || undefined
|
|
|
},
|
|
|
- // 自定义展开图标
|
|
|
- customExpandIcon (props) {
|
|
|
- if (props.expanded) {
|
|
|
- return <a style={{ color: 'black', marginRight: 8 }} onClick={e => { props.onExpand(props.record, e) }}><a-button size="small" type="link" class="button-primary">收起</a-button></a>
|
|
|
- } else {
|
|
|
- return <a style={{ color: 'black', marginRight: 8 }} onClick={e => { props.onExpand(props.record, e) }}><a-button size="small" type="link" class="button-primary">展开</a-button></a>
|
|
|
- }
|
|
|
- },
|
|
|
expandFun (expanded, record) {
|
|
|
if (expanded) {
|
|
|
this.getSubItem(record) // 获取表格内部数据
|
|
@@ -333,10 +335,10 @@ export default {
|
|
|
},
|
|
|
// 重置数据
|
|
|
resetData () {
|
|
|
- this.$refs.rangeDate.resetDate()
|
|
|
+ this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
this.queryParam.bizType = this.curBizType
|
|
|
- this.queryParam.beginDate = null
|
|
|
- this.queryParam.endDate = null
|
|
|
this.queryParam.replenishBillNo = ''
|
|
|
this.queryParam.shelfSn = undefined
|
|
|
this.$refs.shelfList.resetForm()
|
|
@@ -364,11 +366,11 @@ export default {
|
|
|
if (res.data && res.status == 200) {
|
|
|
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 }
|
|
|
+ { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
|
|
|
+ { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
|
|
|
+ { bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
|
|
|
+ { bizName: '已完成', bizType: 'FINISH', countNum: null },
|
|
|
+ { bizName: '已取消', bizType: 'CANCEL', countNum: null }
|
|
|
]
|
|
|
this.queryParam.bizType = 'ALL'
|
|
|
this.tabPaneData[1].countNum = res.data.dqr || 0
|