曹晨晨 2 years ago
commit 3bfc612522

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

Loading…
Cancel
Save