|
@@ -6,32 +6,34 @@
|
|
|
<!-- 标签页 -->
|
|
|
<a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs">
|
|
|
<a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
|
|
|
- <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
|
|
|
+ <p slot="tab" :id="'tab-'+item.bizType">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24" v-if="queryParam.bizType=='WAIT_CHECK'">
|
|
|
<a-form-item label="出库时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
+ <rangeDate id="replenishmentManagementList-otime" ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" v-else-if="queryParam.bizType=='FINISH'">
|
|
|
<a-form-item label="签收时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
+ <rangeDate id="replenishmentManagementList-qstime" ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" v-else>
|
|
|
<a-form-item label="创建时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
+ <rangeDate id="replenishmentManagementList-ctime" ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="补货单号"><a-input id="replenishmentManagementList-replenishBillNo" v-model.trim="queryParam.replenishBillNo" 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="货架名称">
|
|
|
- <shelfSList :showAll="true" v-model="queryParam.shelfSn"></shelfSList>
|
|
|
+ <shelfSList id="replenishmentManagementList-shlefsn" :showAll="true" v-model="queryParam.shelfSn"></shelfSList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
@@ -48,7 +50,7 @@
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" style="margin-left: 5px" @click="queryByTypeSum" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
|
|
|
- <a @click="advanced = !advanced" style="margin-left: 5px">
|
|
|
+ <a @click="advanced = !advanced" style="margin-left: 5px" id="replenishmentManagementList-advanced">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
</a>
|
|
@@ -58,7 +60,7 @@
|
|
|
</a-form>
|
|
|
<!-- 操作按钮 -->
|
|
|
<div class="table-operator">
|
|
|
- <a-button type="primary" class="button-error" @click="openSlodOut=true">待补货产品</a-button>
|
|
|
+ <a-button id="replenishmentManagementList-bhcp" type="primary" class="button-error" @click="openSlodOut=true">待补货产品</a-button>
|
|
|
<span style="margin-left:10px;color:#999;">请点击此按钮,选择需要补货的产品创建补货单</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -90,16 +92,40 @@
|
|
|
</a-table>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <!-- <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="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>
|
|
|
- <a-button v-if="record.billState=='CANCEL'" size="small" type="link" class="button-error" @click.stop="handleDelete(record)">删除</a-button>
|
|
|
+ <!-- <a-button :id="'rmpList-confirm-'+record.id" v-if="record.billState=='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button> -->
|
|
|
+ <a-button
|
|
|
+ :id="'rmpList-outstock-'+record.id"
|
|
|
+ v-if="record.billState=='WAIT_OUT_STOCK'"
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ @click.stop="handleOutWarehousing(record)">出库</a-button>
|
|
|
+ <a-button
|
|
|
+ :id="'rmpList-sign-'+record.id"
|
|
|
+ v-if="record.billState=='WAIT_CHECK'"
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ @click.stop="handlePutWarehousing(record)">签收</a-button>
|
|
|
+ <a-button
|
|
|
+ :id="'rmpList-cancel-'+record.id"
|
|
|
+ v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'"
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ @click.stop="handleCancelOrder(record)">取消补货单</a-button>
|
|
|
+ <a-button
|
|
|
+ :id="'rmpList-del-'+record.id"
|
|
|
+ v-if="record.billState=='CANCEL'"
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-error"
|
|
|
+ @click.stop="handleDelete(record)">删除</a-button>
|
|
|
<a-button v-if="record.billState!='CANCEL'&&record.billState!='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
|
|
|
</template>
|
|
|
<!-- 货架名称 -->
|
|
|
<template slot="shelfName" slot-scope="text, record">
|
|
|
- {{text}}
|
|
|
+ {{ text }}
|
|
|
<a-badge count="已注销" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='WRITE_OFF'"></a-badge>
|
|
|
<a-badge count="已暂停" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='SUSPEND'"></a-badge>
|
|
|
<a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='DISABLED'"></a-badge>
|
|
@@ -155,24 +181,24 @@ export default {
|
|
|
isNotProd: false,
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- curBizType: 'ALL',
|
|
|
- time: [
|
|
|
+ curBizType: 'ALL', // 当前页签值
|
|
|
+ time: [ // 时间默认值
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
],
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- bDate: getDate.getCurrMonthDays().starttime,
|
|
|
- eDate: getDate.getCurrMonthDays().endtime,
|
|
|
- bizType: 'ALL',
|
|
|
- replenishBillNo: '',
|
|
|
- shelfSn: undefined,
|
|
|
- productCode: '',
|
|
|
- productName: ''
|
|
|
+ bDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
|
+ eDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
+ bizType: 'ALL', // 全部
|
|
|
+ replenishBillNo: '', // 补货单号
|
|
|
+ shelfSn: undefined, // 货架sn
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: '' // 产品名称
|
|
|
},
|
|
|
- expandedRowKeys: [],
|
|
|
+ expandedRowKeys: [], // 展开的key
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -180,13 +206,13 @@ export default {
|
|
|
this.expandedRowKeys = []
|
|
|
parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
- if (params.billState == 'WAIT_CHECK') {
|
|
|
+ if (params.billState == 'WAIT_CHECK') { // 待签收
|
|
|
params.outStockTimeBegin = this.queryParam.bDate
|
|
|
params.outStockTimeEnd = this.queryParam.eDate
|
|
|
- } else if (params.billState == 'FINISH') {
|
|
|
+ } else if (params.billState == 'FINISH') { // 已完结
|
|
|
params.putStockTimeBegin = this.queryParam.bDate
|
|
|
params.putStockTimeEnd = this.queryParam.eDate
|
|
|
- } else {
|
|
|
+ } else { // 其它
|
|
|
params.beginDate = this.queryParam.bDate
|
|
|
params.endDate = this.queryParam.eDate
|
|
|
}
|
|
@@ -209,6 +235,7 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
+ // 子表格列
|
|
|
subColumns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '货位号', dataIndex: 'shelfPlaceCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -218,8 +245,8 @@ export default {
|
|
|
{ title: '签收数量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
- listData: [],
|
|
|
- tabPaneData: [
|
|
|
+ listData: [], // 表格数据
|
|
|
+ tabPaneData: [ // tab业务状态列表数据
|
|
|
{ bizName: '全部', bizType: 'ALL', countNum: 0 },
|
|
|
// { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
|
|
|
{ bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
|
|
@@ -227,17 +254,17 @@ export default {
|
|
|
{ bizName: '已完成', bizType: 'FINISH', countNum: 0 },
|
|
|
{ bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
|
|
|
],
|
|
|
- nowData: null,
|
|
|
- openConfirmModal: false,
|
|
|
- openStockModal: false,
|
|
|
- openPrintStickerModal: false,
|
|
|
- openOutWarehousingModal: false,
|
|
|
- openPutWarehousingModal: false,
|
|
|
- openDetailModal: false,
|
|
|
- openSlodOut: false,
|
|
|
- validateType: 'confirm',
|
|
|
- stockList: [],
|
|
|
- paramsData: null
|
|
|
+ nowData: null, // 当前操作数据
|
|
|
+ openConfirmModal: false, // 是否打开确认弹框
|
|
|
+ openStockModal: false, // 是否打开库存不足,确认弹框
|
|
|
+ openPrintStickerModal: false, // 是否打开打印页签弹框
|
|
|
+ openOutWarehousingModal: false, // 是否打开出库弹框
|
|
|
+ openPutWarehousingModal: false, // 是否打开签收弹框
|
|
|
+ openDetailModal: false, // 是否打开详情弹框
|
|
|
+ openSlodOut: false, // 是否打开待补货弹框
|
|
|
+ validateType: 'confirm', // 弹框类型
|
|
|
+ stockList: [], // 库存不足明细
|
|
|
+ paramsData: null // 参数
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -252,9 +279,9 @@ export default {
|
|
|
{ title: '签收总量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'left' }
|
|
|
]
|
|
|
- if (this.queryParam.bizType == 'WAIT_CHECK') {
|
|
|
+ if (this.queryParam.bizType == 'WAIT_CHECK') { // 待签收
|
|
|
ret.splice(1, 1, { title: '出库时间', dataIndex: 'outStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
- } else if (this.queryParam.bizType == 'FINISH') {
|
|
|
+ } else if (this.queryParam.bizType == 'FINISH') { // 已完成
|
|
|
ret.splice(1, 1, { title: '签收时间', dataIndex: 'putStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
}
|
|
|
return ret
|
|
@@ -304,7 +331,7 @@ export default {
|
|
|
this.openOutWarehousingModal = false
|
|
|
this.queryByTypeSum(true)
|
|
|
},
|
|
|
- // cancel
|
|
|
+ // 弹框关闭后
|
|
|
handleCancel () {
|
|
|
this.nowData = null
|
|
|
this.openConfirmModal = false
|
|
@@ -314,6 +341,7 @@ export default {
|
|
|
this.openPutWarehousingModal = false
|
|
|
this.openDetailModal = false
|
|
|
},
|
|
|
+ // 确认后
|
|
|
handleValidate (type, params) {
|
|
|
if (type == 'confirm') { // 确认
|
|
|
this.confirmFun(params)
|
|
@@ -378,7 +406,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 删除
|
|
|
+ // 删除补货单
|
|
|
handleDelete (row) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
@@ -399,6 +427,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 展开表格获取子表格数据
|
|
|
expandFun (expanded, record) {
|
|
|
if (expanded) {
|
|
|
this.expandedRowKeys.push(record.id)
|
|
@@ -426,12 +455,12 @@ export default {
|
|
|
this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
- // 重置
|
|
|
+ // 重置列表
|
|
|
resetSearchForm () {
|
|
|
this.resetData()
|
|
|
this.queryByTypeSum()
|
|
|
},
|
|
|
- // 重置数据
|
|
|
+ // 重置筛选数据
|
|
|
resetData () {
|
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
|
this.queryParam.bDate = getDate.getCurrMonthDays().starttime
|
|
@@ -442,7 +471,7 @@ export default {
|
|
|
this.queryParam.productCode = ''
|
|
|
this.queryParam.productName = ''
|
|
|
},
|
|
|
- // 时间 change
|
|
|
+ // 选择时间 change
|
|
|
dateChange (date) {
|
|
|
this.queryParam.bDate = date[0] || null
|
|
|
this.queryParam.eDate = date[1] || null
|
|
@@ -454,7 +483,7 @@ export default {
|
|
|
this.curBizType = key
|
|
|
this.resetSearchForm()
|
|
|
},
|
|
|
- // 客户 change
|
|
|
+ // 选择客户 change
|
|
|
custChange (obj) {
|
|
|
this.queryParam.customerSn = obj.key || undefined
|
|
|
},
|
|
@@ -486,18 +515,23 @@ export default {
|
|
|
this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 200
|
|
|
},
|
|
|
+ // 页面初始化
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.isNotProd = !!process.env.VUE_APP_ENVTIPS
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
+ // 默认tab
|
|
|
this.curBizType = this.$route.query && this.$route.query.bizType || this.curBizType
|
|
|
+ // 获取类型列表
|
|
|
this.queryByTypeSum()
|
|
|
+ // 是否自动打开补货弹框
|
|
|
if (this.$route.query && this.$route.query.bizType == 'ALL') {
|
|
|
this.openSlodOut = true
|
|
|
}
|