|
@@ -43,7 +43,7 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <a-tabs type="card" v-model="queryParam.billState" @change="tabChange" class="replenishmentManagementList-tabs">
|
|
|
+ <a-tabs type="card" v-model="queryParam.bizType" @change="tabChange" class="replenishmentManagementList-tabs">
|
|
|
<a-tab-pane v-for="item in tabsList" :key="item.code">
|
|
|
<p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
|
|
|
</a-tab-pane>
|
|
@@ -66,15 +66,18 @@
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
+ v-if="record.billState=='WAIT_CONFIRM'"
|
|
|
class="button-primary"
|
|
|
@click.stop="handleRecall(record)"
|
|
|
id="shelfMonitoringList-warehousing-btn">退库</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
+ v-if="record.billState=='WAIT_CONFIRM'"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
@click.stop="handleCancel(record)"
|
|
|
id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
|
|
|
+ <span v-if="record.billState!='WAIT_CONFIRM'" style="display: inline-block;margin-left: 7px;">--</span>
|
|
|
</template>
|
|
|
<a-table
|
|
|
v-if="innerData&&innerData[index]"
|
|
@@ -117,6 +120,7 @@ export default {
|
|
|
currentData: null,
|
|
|
activeKey: 0, // 默认的tab
|
|
|
tabsList: [],
|
|
|
+ currentType: 'ALL',
|
|
|
expandedRowKeys: [],
|
|
|
time: [
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
@@ -127,7 +131,7 @@ export default {
|
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
recallBillNo: '',
|
|
|
shelfSn: undefined, // 数字货架sn
|
|
|
- billState: 'ALL'
|
|
|
+ bizType: 'ALL'
|
|
|
},
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
@@ -136,7 +140,7 @@ export default {
|
|
|
{ title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '状态', dataIndex: 'billStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '调回总量', dataIndex: 'totalQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
{ title: '操作', width: '10%', align: 'left', scopedSlots: { customRender: 'action' } }
|
|
|
],
|
|
|
innerColumns: [
|
|
@@ -153,8 +157,9 @@ export default {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
this.expandedRowKeys = []
|
|
|
+ parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
|
|
|
const params = this.queryParam
|
|
|
- params.billState = this.queryParam.billState == 'ALL' ? '' : this.queryParam.billState
|
|
|
+ // delete params.bizType
|
|
|
return shelfRecallList(Object.assign(parameter, params)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
@@ -192,20 +197,21 @@ export default {
|
|
|
console.log(key)
|
|
|
this.expandedRowKeys = []
|
|
|
setTimeout(() => {
|
|
|
- this.queryParam.billState = key
|
|
|
+ this.queryParam.bizType = key
|
|
|
this.$refs.table.refresh(true)
|
|
|
+ this.currentType = key
|
|
|
}, 100)
|
|
|
},
|
|
|
// 获取各类型下的数量
|
|
|
getSumByType () {
|
|
|
const params = JSON.parse(JSON.stringify(this.queryParam))
|
|
|
- params.billState = this.queryParam.billState == 'ALL' ? '' : this.queryParam.billState
|
|
|
+ delete params.bizType
|
|
|
shelfRecallStateCount(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.tabsList = [
|
|
|
{ code: 'ALL', name: '全部', countNum: 0 }, { code: 'WAIT_CONFIRM', name: '待退库', countNum: 0 }, { code: 'FINISH', name: '已完成', countNum: 0 }, { code: 'CANCEL', name: '已取消', countNum: 0 }
|
|
|
]
|
|
|
- this.queryParam.billState = 'ALL'
|
|
|
+ this.queryParam.bizType = 'ALL'
|
|
|
this.tabsList[1].countNum = res.data.WAIT_CONFIRM || 0
|
|
|
this.tabsList[2].countNum = res.data.FINISH || 0
|
|
|
this.tabsList[3].countNum = res.data.CANCEL || 0
|
|
@@ -243,16 +249,23 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
+ // this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ // this.queryParam.billState = this.currentType
|
|
|
+ // this.queryParam = {
|
|
|
+ this.resetData()
|
|
|
+
|
|
|
+ this.getSumByType()
|
|
|
+ },
|
|
|
+ resetData () {
|
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ this.queryParam.bizType = this.currentType
|
|
|
this.queryParam = {
|
|
|
beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
recallBillNo: '', // 调回单号
|
|
|
- shelfSn: undefined, // 数字货架sn
|
|
|
- billState: 'ALL'
|
|
|
+ shelfSn: undefined // 数字货架sn
|
|
|
}
|
|
|
this.$refs.shelfList.resetForm()
|
|
|
- this.getSumByType()
|
|
|
},
|
|
|
// 退库
|
|
|
handleRecall (row) {
|
|
@@ -295,7 +308,7 @@ export default {
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
this.pageInit()
|
|
|
- this.resetSearchForm()
|
|
|
+ this.resetData()
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -313,7 +326,7 @@ export default {
|
|
|
// 如果是新页签打开,则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab) {
|
|
|
this.pageInit()
|
|
|
- this.resetSearchForm()
|
|
|
+ this.resetData()
|
|
|
}
|
|
|
// 仅刷新列表,不重置页面
|
|
|
if (this.$store.state.app.updateList) {
|