修改 仓库查询问题

prod
wangwei 2 years ago
parent b3ae0076b2
commit ccb369a248

@ -9,6 +9,20 @@
placeholder="仓库名称"
></el-input>
</el-form-item>
<!-- <el-form-item class="query-form-item" label="仓库类型:">
<el-input
clearable
placeholder="仓库类型"
></el-input>
</el-form-item> -->
<el-form-item label="仓库类型" prop="advanceType">
<el-select v-model="subDataType.advanceType" placeholder="请选择仓库类型" style="width: 80%">
<el-option label="入账库" :value="1"/>
<el-option label="预验收库" :value="2"/>
<el-option label="寄售库" :value="3"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
@ -28,34 +42,48 @@
>
<el-table-column label="序号" type="index" ref="dataForm"></el-table-column>
<el-table-column
prop="name"
label="仓库名称"
prop="code"
width="140"
label="仓库编码"
>
</el-table-column>
<el-table-column
prop="code"
label="仓库编码"
width="160"
prop="name"
label="仓库名称"
>
</el-table-column>
<el-table-column
prop="parentName"
width="180"
label="所属部门"
>
</el-table-column>
<el-table-column width="160"
prop="parentInvName"
label="上级仓库"
>
</el-table-column>
<el-table-column
prop="parentInvName"
label="上级仓库"
width="140"
prop="advanceType"
label="仓库类型"
>
<template slot-scope="scope">
<span>{{ advanceTypeTypeMap[scope.row.advanceType] }}</span>
</template>
</el-table-column>
<!--<el-table-column label="允许供应商使用" prop="spUse">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="scope.row.spUse | spUerFilterType">{{-->
<!-- scope.row.spUse | spUerFilterName-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column label="操作" class-name="small-padding fixed-width">
<el-table-column label="允许供应商使用" prop="spUse" width="140">
<template slot-scope="scope">
<el-tag :type="scope.row.spUse | spUerFilterType">{{
scope.row.spUse | spUerFilterName
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="220">
<template slot-scope="scope">
<el-button
type="text"
@ -168,11 +196,12 @@
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="仓库类型" prop="advanceType" >
<el-select v-model="subData.advanceType" :disabled="invWouse != null" placeholder="请选择仓库类型" style="width: 80%">
<el-option label="入账库" value="1"/>
<el-option label="寄售库" value="2"/>
<el-option label="预验收库" value="3"/>
<el-form-item label="仓库类型" prop="advanceType">
<el-select v-model="subData.advanceType" :disabled="invWouse != null" placeholder="请选择仓库类型"
style="width: 80%">
<el-option label="入账库" value="1"/>
<el-option label="预验收库" value="2"/>
<el-option label="寄售库" value="3"/>
</el-select>
</el-form-item>
@ -395,17 +424,22 @@ export default {
// page: 1,
// limit: 10,
},
isAdvanceTypeShow:false,
isShow:false,
isAdvanceTypeShow: false,
isShow: false,
loading: true,
list: [],
isExpandAll: true,
total: 0,
advanceTypeTypeMap: {
1: "入账库",
3: "寄售库",
2: "预验收库",
},
formMap: {
add: "仓库信息-新增",
edit: "仓库信息-编辑"
},
invWouse:{},
invWouse: {},
formName: null,
configParms: {},
currentCode: null,
@ -424,6 +458,7 @@ export default {
]
},
subData: {},
subDataType:{},
fromDeptOptions: [],
invOptions: [],
thirdSubQuery: {
@ -448,6 +483,7 @@ export default {
},
sysList: [],
sysSubList: [],
advanceTypese: [],
};
},
methods: {
@ -460,6 +496,7 @@ export default {
name: "",
status: "",
};
this.subDataType.advanceType=null;
this.getList();
//
@ -472,6 +509,7 @@ export default {
},
onSubmit() { //
this.query.advanceType=this.subDataType.advanceType;
this.getList();
},
@ -483,6 +521,7 @@ export default {
this.loading = false;
let invlist = response.data || [];
this.list = this.handleTree(invlist, "code", "parentCode");
console.log(this.list);
})
.catch(() => {
this.loading = false;
@ -491,34 +530,38 @@ export default {
});
},
handleSubForm(data, formName) { //
if(data != null ){
this.invWouse=data;
if (data != null) {
this.invWouse = data;
}
this.formName = formName;
if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data));
this.subData.advanceType=this.subData.advanceType.toString();
if(this.subData.parentCode!=null && this.subData.parentCode!=""){
this.isAdvanceTypeShow=true;
this.isShow=false;
}else{
this.isAdvanceTypeShow=false;
this.isShow=true
this.subData.parentCode=null;
this.subData.advanceType = this.subData.advanceType.toString();
if (this.subData.parentCode != null && this.subData.parentCode != "") {
this.isAdvanceTypeShow = true;
this.isShow = false;
} else {
this.isAdvanceTypeShow = false;
this.isShow = true
this.subData.parentCode = null;
}
} else if (formName === "add") {
this.isShow=true
if(data==null){
this.isAdvanceTypeShow=false;
this.subData = {advanceType: '1', spUse: false,parentCode:null};
}else{
this.isAdvanceTypeShow=true;
this.subData = {advanceType: data.advanceType.toString(), spUse: false,parentCode:data.code};
this.isShow = true
if (data == null) {
this.isAdvanceTypeShow = false;
this.subData = {advanceType: '1', spUse: false, parentCode: null};
} else {
this.isAdvanceTypeShow = true;
this.subData = {advanceType: data.advanceType.toString(), spUse: false, parentCode: data.code};
}
}
//
let advanceTypese = this.subData.advanceType
this.subFormVisible = true;
this.getSubThrsysDetailData();
if(this.subData.parentCode!=null && this.subData.parentCode!=""){
if (this.subData.parentCode != null && this.subData.parentCode != "") {
filterSubAll(this.query)
.then((response) => {
let invList = response.data || [];

Loading…
Cancel
Save