|
@@ -23,17 +23,17 @@
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品编码">
|
|
<a-form-item label="产品编码">
|
|
- <a-input allowClear placeholder="请输入产品编码" v-model.tirm="queryParam.code"/>
|
|
|
|
|
|
+ <a-input allowClear placeholder="请输入产品编码" v-model.tirm="queryParam.productCode"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品名称">
|
|
<a-form-item label="产品名称">
|
|
- <a-input allowClear placeholder="请输入产品名称" v-model.tirm="queryParam.name"/>
|
|
|
|
|
|
+ <a-input allowClear placeholder="请输入产品名称" v-model.tirm="queryParam.productName"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="getSumByType" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
|
|
<a @click="advanced=!advanced" style="margin-left: 5px" v-if="activeKey==0">
|
|
<a @click="advanced=!advanced" style="margin-left: 5px" v-if="activeKey==0">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -43,7 +43,7 @@
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</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">
|
|
<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>
|
|
<p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
@@ -57,24 +57,27 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ y:tableHeight }"
|
|
:scroll="{ y:tableHeight }"
|
|
- @expand="expand"
|
|
|
|
- :defaultLoadData="true"
|
|
|
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
|
+ @expand="expandFun"
|
|
:expandRowByClick="true"
|
|
:expandRowByClick="true"
|
|
- :defaultExpandAllRows="true"
|
|
|
|
|
|
+ :defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
|
|
+ v-if="record.billState=='WAIT_CONFIRM'"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
@click.stop="handleRecall(record)"
|
|
@click.stop="handleRecall(record)"
|
|
id="shelfMonitoringList-warehousing-btn">退库</a-button>
|
|
id="shelfMonitoringList-warehousing-btn">退库</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
|
|
+ v-if="record.billState=='WAIT_CONFIRM'"
|
|
type="link"
|
|
type="link"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
@click.stop="handleCancel(record)"
|
|
@click.stop="handleCancel(record)"
|
|
id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
|
|
id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
|
|
|
|
+ <span v-if="record.billState!='WAIT_CONFIRM'" style="display: inline-block;margin-left: 7px;">--</span>
|
|
</template>
|
|
</template>
|
|
<a-table
|
|
<a-table
|
|
v-if="innerData&&innerData[index]"
|
|
v-if="innerData&&innerData[index]"
|
|
@@ -82,7 +85,7 @@
|
|
class="inner-table"
|
|
class="inner-table"
|
|
slot-scope="record,index"
|
|
slot-scope="record,index"
|
|
slot="expandedRowRender"
|
|
slot="expandedRowRender"
|
|
- :rowKey="(rec) => rec.id"
|
|
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
:columns="innerColumns"
|
|
:columns="innerColumns"
|
|
:data-source="innerData[index].innerData"
|
|
:data-source="innerData[index].innerData"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
@@ -102,6 +105,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
import recallModal from './recallModal.vue'
|
|
import recallModal from './recallModal.vue'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
|
|
+import { toThousands } from '@/libs/tools.js'
|
|
import shelfList from '@/views/common/shelfList.vue'
|
|
import shelfList from '@/views/common/shelfList.vue'
|
|
import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel, shelfRecallStateCount } from '@/api/shelfRecall.js'
|
|
import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel, shelfRecallStateCount } from '@/api/shelfRecall.js'
|
|
export default {
|
|
export default {
|
|
@@ -117,6 +121,8 @@ export default {
|
|
currentData: null,
|
|
currentData: null,
|
|
activeKey: 0, // 默认的tab
|
|
activeKey: 0, // 默认的tab
|
|
tabsList: [],
|
|
tabsList: [],
|
|
|
|
+ currentType: 'ALL',
|
|
|
|
+ expandedRowKeys: [],
|
|
time: [
|
|
time: [
|
|
getDate.getCurrMonthDays().starttime,
|
|
getDate.getCurrMonthDays().starttime,
|
|
getDate.getCurrMonthDays().endtime
|
|
getDate.getCurrMonthDays().endtime
|
|
@@ -126,24 +132,24 @@ export default {
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
recallBillNo: '',
|
|
recallBillNo: '',
|
|
shelfSn: undefined, // 数字货架sn
|
|
shelfSn: undefined, // 数字货架sn
|
|
- billState: 'ALL'
|
|
|
|
|
|
+ bizType: 'ALL'
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '调回单号', dataIndex: 'recallBillNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '调回单号', dataIndex: 'recallBillNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '状态', dataIndex: 'billStateDictValue', width: '7%', align: 'center', 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: 'totalQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text) : '--' } },
|
|
|
|
+ { title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text) : '--' } },
|
|
{ title: '操作', width: '10%', align: 'left', scopedSlots: { customRender: 'action' } }
|
|
{ title: '操作', width: '10%', align: 'left', scopedSlots: { customRender: 'action' } }
|
|
],
|
|
],
|
|
innerColumns: [
|
|
innerColumns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'product.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'product.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '调回数量', dataIndex: 'qty', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '实退数量', dataIndex: 'confirmQty', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '调回数量', dataIndex: 'qty', width: '15%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text) : '--' } },
|
|
|
|
+ { title: '实退数量', dataIndex: 'confirmQty', width: '15%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text) : '--' } },
|
|
{ title: '单位', dataIndex: 'product.unit', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
{ title: '单位', dataIndex: 'product.unit', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
],
|
|
],
|
|
innerData: [],
|
|
innerData: [],
|
|
@@ -151,10 +157,10 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
|
|
+ this.expandedRowKeys = []
|
|
|
|
+ parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
- if (params.billState == 'ALL') {
|
|
|
|
- params.billState = ''
|
|
|
|
- }
|
|
|
|
|
|
+ // delete params.bizType
|
|
return shelfRecallList(Object.assign(parameter, params)).then(res => {
|
|
return shelfRecallList(Object.assign(parameter, params)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -190,29 +196,39 @@ export default {
|
|
// 切换tab
|
|
// 切换tab
|
|
tabChange (key) {
|
|
tabChange (key) {
|
|
console.log(key)
|
|
console.log(key)
|
|
- this.activeKey = key
|
|
|
|
- this.queryParam.billState = key
|
|
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.expandedRowKeys = []
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.queryParam.bizType = key
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ this.currentType = key
|
|
|
|
+ }, 100)
|
|
},
|
|
},
|
|
// 获取各类型下的数量
|
|
// 获取各类型下的数量
|
|
getSumByType () {
|
|
getSumByType () {
|
|
- shelfRecallStateCount({}).then(res => {
|
|
|
|
|
|
+ const params = JSON.parse(JSON.stringify(this.queryParam))
|
|
|
|
+ params.billState = params.bizType == 'ALL' ? '' : params.bizType
|
|
|
|
+ delete params.bizType
|
|
|
|
+ shelfRecallStateCount(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.tabsList = [
|
|
this.tabsList = [
|
|
{ code: 'ALL', name: '全部', countNum: 0 }, { code: 'WAIT_CONFIRM', name: '待退库', countNum: 0 }, { code: 'FINISH', name: '已完成', countNum: 0 }, { code: 'CANCEL', name: '已取消', countNum: 0 }
|
|
{ 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[1].countNum = res.data.WAIT_CONFIRM || 0
|
|
this.tabsList[2].countNum = res.data.FINISH || 0
|
|
this.tabsList[2].countNum = res.data.FINISH || 0
|
|
this.tabsList[3].countNum = res.data.CANCEL || 0
|
|
this.tabsList[3].countNum = res.data.CANCEL || 0
|
|
- this.$refs.table.refresh()
|
|
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 点击行或图标触发接口
|
|
// 点击行或图标触发接口
|
|
- expand (expanded, record) {
|
|
|
|
|
|
+ expandFun (expanded, record) {
|
|
if (expanded) {
|
|
if (expanded) {
|
|
|
|
+ this.expandedRowKeys.push(record.id)
|
|
this.getinnerData(record) // 获取表格内部数据
|
|
this.getinnerData(record) // 获取表格内部数据
|
|
|
|
+ } else {
|
|
|
|
+ const i = this.expandedRowKeys.findIndex(item => item == record.id)
|
|
|
|
+ this.expandedRowKeys.splice(i, 1)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取子表格数据
|
|
// 获取子表格数据
|
|
@@ -235,16 +251,23 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
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.$refs.rangeDate.resetDate(this.time)
|
|
|
|
+ this.queryParam.bizType = 'ALL'
|
|
this.queryParam = {
|
|
this.queryParam = {
|
|
beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
recallBillNo: '', // 调回单号
|
|
recallBillNo: '', // 调回单号
|
|
- shelfSn: undefined, // 数字货架sn
|
|
|
|
- billState: 'ALL'
|
|
|
|
|
|
+ shelfSn: undefined // 数字货架sn
|
|
}
|
|
}
|
|
this.$refs.shelfList.resetForm()
|
|
this.$refs.shelfList.resetForm()
|
|
- this.$refs.table.refresh(true)
|
|
|
|
},
|
|
},
|
|
// 退库
|
|
// 退库
|
|
handleRecall (row) {
|
|
handleRecall (row) {
|
|
@@ -287,7 +310,7 @@ export default {
|
|
mounted () {
|
|
mounted () {
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
this.pageInit()
|
|
this.pageInit()
|
|
- this.resetSearchForm()
|
|
|
|
|
|
+ this.resetData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -305,7 +328,7 @@ export default {
|
|
// 如果是新页签打开,则重置当前页面
|
|
// 如果是新页签打开,则重置当前页面
|
|
if (this.$store.state.app.isNewTab) {
|
|
if (this.$store.state.app.isNewTab) {
|
|
this.pageInit()
|
|
this.pageInit()
|
|
- this.resetSearchForm()
|
|
|
|
|
|
+ this.resetData()
|
|
}
|
|
}
|
|
// 仅刷新列表,不重置页面
|
|
// 仅刷新列表,不重置页面
|
|
if (this.$store.state.app.updateList) {
|
|
if (this.$store.state.app.updateList) {
|