给商品库存报表的仓库选择设置为可以多选

This commit is contained in:
季圣华
2021-11-25 01:15:00 +08:00
parent 61b40f4726
commit 440df788c0
2 changed files with 14 additions and 14 deletions

View File

@@ -7,13 +7,14 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="3" :sm="24">
<a-col :md="4" :sm="24">
<a-form-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
mode="multiple" :maxTagCount="1"
optionFilterProp="children"
showSearch allow-clear style="width: 100%"
showSearch style="width: 100%"
placeholder="请选择仓库"
v-model="queryParam.depotId">
v-model="depotSelected">
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
{{ depot.depotName }}
</a-select-option>
@@ -40,7 +41,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="5" :sm="24">
<a-col :md="4" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" v-print="'#reportPrint'" icon="printer">打印</a-button>
@@ -49,7 +50,7 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item>
<span>当前总库存:{{currentStock}}当前总库存金额:{{currentStockPrice}}</span>
<span>总库存:{{currentStock}},总库存金额:{{currentStockPrice}}</span>
</a-form-item>
</a-col>
</a-row>
@@ -123,7 +124,6 @@
},
// 查询条件
queryParam: {
depotId:'',
categoryId:'',
materialParam:'',
zeroStock: '0',
@@ -133,6 +133,7 @@
pageSize: 11,
pageSizeOptions: ['11', '21', '31', '101', '201']
},
depotSelected:[],
depotList: [],
categoryTree:[],
currentStock: '',
@@ -154,8 +155,8 @@
{title: '单位', dataIndex: 'unitName', width: 60},
{title: '单价', dataIndex: 'purchaseDecimal', sorter: (a, b) => a.purchaseDecimal - b.purchaseDecimal, width: 60},
{title: '初始库存', dataIndex: 'initialStock', sorter: (a, b) => a.initialStock - b.initialStock, width: 60},
{title: '当前库存', dataIndex: 'currentStock', sorter: (a, b) => a.currentStock - b.currentStock, width: 60},
{title: '当前库存金额', dataIndex: 'currentStockPrice', sorter: (a, b) => a.currentStockPrice - b.currentStockPrice, width: 80},
{title: '库存', dataIndex: 'currentStock', sorter: (a, b) => a.currentStock - b.currentStock, width: 60},
{title: '库存金额', dataIndex: 'currentStockPrice', sorter: (a, b) => a.currentStockPrice - b.currentStockPrice, width: 80},
{ title: '库存流水', dataIndex: 'action', align:"center", width: 100,
scopedSlots: { customRender: 'action' }
}
@@ -173,6 +174,9 @@
moment,
getQueryParams() {
let param = Object.assign({}, this.queryParam, this.isorter);
if(this.depotSelected && this.depotSelected.length>0) {
param.depotIds = this.depotSelected.join()
}
param.field = this.getQueryField();
param.currentPage = this.ipagination.current;
param.pageSize = this.ipagination.pageSize-1;
@@ -205,15 +209,11 @@
this.loadData(1);
},
loadData(arg) {
if(!this.url.list){
this.$message.error("请设置url.list属性!")
return
}
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1;
}
var params = this.getQueryParams();//查询条件
let params = this.getQueryParams();//查询条件
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.code===200) {