|
|
|
|
@ -7,13 +7,18 @@
|
|
|
|
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<span class="selector-item__label">种类编码:</span>
|
|
|
|
|
<Input v-model="select.wzbm" style="width: 120px;margin-right: 10px;" placeholder="种类编码搜索" />
|
|
|
|
|
<el-input v-model="select.wzbm" style="width: 120px;margin-right: 10px;" placeholder="种类编码搜索" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<span class="selector-item__label">物资名称:</span>
|
|
|
|
|
<Input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="物资名称搜索" />
|
|
|
|
|
<el-input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="物资名称搜索" />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-cascader v-model="select.fenlei" ref="cascaders" clearable popper-class="select_popper"
|
|
|
|
|
style="margin-right: 10px;flex-basis: 20%;" :options="fenleiList" :props="{label:'name',value:'id'}"
|
|
|
|
|
@change="(e)=>{changeFenlei(e)}" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<!-- <div class="selector-item">
|
|
|
|
|
<span class="selector-item__label">入库数量:</span>
|
|
|
|
|
<Input v-model="select.rmin" clearable style="width: 60px;margin:0 3px" placeholder="" />
|
|
|
|
|
<span class="selector-item__label">~</span>
|
|
|
|
|
@ -24,12 +29,12 @@
|
|
|
|
|
<Input v-model="select.min" clearable style="width: 60px;margin:0 3px" placeholder="" />
|
|
|
|
|
<span class="selector-item__label">~</span>
|
|
|
|
|
<Input v-model="select.max" clearable style="width: 60px;margin:0 3px" placeholder="" />
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
<Button type="primary" style="margin-left: 10px;" @click="getindex">查询</Button>
|
|
|
|
|
<Button type="primary" style="margin-left: 10px;" @click="toprint">打印</Button>
|
|
|
|
|
<Button type="primary" style="margin-left: 10px;"
|
|
|
|
|
@click="exportExcel(new Date().getTime().toString())">导出</Button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="getindex">查询</el-button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="toprint">打印</el-button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;"
|
|
|
|
|
@click="exportExcel(new Date().getTime().toString())">导出</el-button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
@ -77,7 +82,10 @@
|
|
|
|
|
import {
|
|
|
|
|
index,
|
|
|
|
|
destroy
|
|
|
|
|
} from '@/api/inventory.js'
|
|
|
|
|
} from '@/api/inventory.js'
|
|
|
|
|
import {
|
|
|
|
|
index as getFenleilist
|
|
|
|
|
} from '@/api/fenlei.js'
|
|
|
|
|
import {
|
|
|
|
|
getInfo
|
|
|
|
|
} from '@/api/user.js'
|
|
|
|
|
@ -110,12 +118,14 @@
|
|
|
|
|
authName: '',
|
|
|
|
|
roleName: '',
|
|
|
|
|
isCkName: '',
|
|
|
|
|
isPandian: '',
|
|
|
|
|
isPandian: '',
|
|
|
|
|
fenleiList:[],
|
|
|
|
|
select: {
|
|
|
|
|
pageSize: 40,
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
keyword: '',
|
|
|
|
|
wzbm: '',
|
|
|
|
|
wzbm: '',
|
|
|
|
|
fenlei:'',
|
|
|
|
|
is_export: 0,
|
|
|
|
|
min: '',
|
|
|
|
|
max: '',
|
|
|
|
|
@ -293,7 +303,8 @@
|
|
|
|
|
if (path[1]) {
|
|
|
|
|
this.isPandian = 'pandian'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.getFenlei()
|
|
|
|
|
this.getField()
|
|
|
|
|
this.getindex()
|
|
|
|
|
this.getUserName()
|
|
|
|
|
@ -442,6 +453,37 @@
|
|
|
|
|
search() {
|
|
|
|
|
this.select.pageIndex = 1
|
|
|
|
|
this.getindex()
|
|
|
|
|
},
|
|
|
|
|
async getFenlei() {
|
|
|
|
|
const res = await getFenleilist({
|
|
|
|
|
tree: 1
|
|
|
|
|
})
|
|
|
|
|
this.fenleiList = this.removeEmptyChildren(res)
|
|
|
|
|
},
|
|
|
|
|
changeFenlei(e, row) {
|
|
|
|
|
console.log('e', e)
|
|
|
|
|
if (e) {
|
|
|
|
|
this.select.fenlei = e[e.length - 1]
|
|
|
|
|
} else {
|
|
|
|
|
this.select.fenlei = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 移除children=[]
|
|
|
|
|
removeEmptyChildren(node) {
|
|
|
|
|
if (Array.isArray(node)) {
|
|
|
|
|
return node.map(child => {
|
|
|
|
|
if (child.children) {
|
|
|
|
|
// 递归处理子节点
|
|
|
|
|
child.children = this.removeEmptyChildren(child.children);
|
|
|
|
|
// 若处理后 children 为空,删除该属性
|
|
|
|
|
if (child.children.length === 0) {
|
|
|
|
|
delete child.children;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return child;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
async getindex() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
@ -454,7 +496,8 @@
|
|
|
|
|
page: this.select.pageIndex,
|
|
|
|
|
table_name: 'inventorys',
|
|
|
|
|
sort_type: 'DESC',
|
|
|
|
|
sort_name: 'wuzibianma',
|
|
|
|
|
sort_name: 'wuzibianma',
|
|
|
|
|
fenlei:this.select.fenlei,
|
|
|
|
|
// is_export:this.select.is_export,
|
|
|
|
|
filter: [{
|
|
|
|
|
'key': 'wuzibianma',
|
|
|
|
|
|