|
@@ -5,7 +5,10 @@
|
|
|
<el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
|
|
|
</div>
|
|
|
<div class="filter-container">
|
|
|
- <el-date-picker v-model="monthDate" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime" />
|
|
|
+ <el-date-picker v-model="monthDate" type="monthrange" :clearable="false" range-separator="至" start-placeholder="开始月份" class="filter-item" end-placeholder="结束月份" @change="changeTime" />
|
|
|
+ <el-select v-model="isZeroStock" placeholder="是否零库存" class="filter-item" style="width: 120px;" @change="changeIsZeroStock">
|
|
|
+ <el-option v-for="item in isZeroStockList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
<el-button class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
|
|
|
</div>
|
|
|
<div v-if="isTable1" class="table">
|
|
@@ -115,6 +118,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
monthDate:[parseTime(new Date(), '{y}-{m}'), parseTime(new Date(), '{y}-{m}')],
|
|
|
+ isZeroStock:0,
|
|
|
+ isZeroStockList:[{id:0,'name':'非零库存'},{id:1,'name':'零库存'}],
|
|
|
rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
|
|
|
cellStyle: { padding: 0 + 'px' },
|
|
|
types: [{ id: 0, name: '按供应商' }, { id: 1, name: '按备件类别' }],
|
|
@@ -208,6 +213,9 @@ export default {
|
|
|
}
|
|
|
this.get_table_data()
|
|
|
},
|
|
|
+ changeIsZeroStock(item){
|
|
|
+ this.get_table_data()
|
|
|
+ },
|
|
|
get_table_data() {
|
|
|
this.listLoading = true
|
|
|
if (Cookies.get('pastureid') == 18) {
|
|
@@ -217,6 +225,7 @@ export default {
|
|
|
}
|
|
|
this.getdataListParm.parammaps.startDate = this.monthDate[0]
|
|
|
this.getdataListParm.parammaps.endDate = this.monthDate[1]
|
|
|
+ this.getdataListParm.parammaps.isZeroStock = this.isZeroStock
|
|
|
GetDataByName(this.getdataListParm).then(response => {
|
|
|
if (response.data.list !== null) {
|
|
|
console.log('table数据', response.data.list)
|