仓库字典修改

master
anthonywj 3 years ago
parent 8c44f12d02
commit 60f9ecfe5a

@ -46,7 +46,7 @@
</el-upload> </el-upload>
<el-button type="primary" icon="search" @click="exportInvwarehouse"></el-button> <el-button type="primary" icon="search" @click="exportInvwarehouse"></el-button>
<el-button type="primary" icon="search" @click="uploadInvwarehouse">UDI</el-button> <!-- <el-button type="primary" icon="search" @click="uploadInvwarehouse">UDI</el-button>-->
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
@ -131,16 +131,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-tree-->
<!-- :data="mergeList"-->
<!-- :props="defaultProps"-->
<!-- node-key="id"-->
<!-- style="width: 50%"-->
<!-- default-expand-all-->
<!-- :expand-on-click-node="false"-->
<!-- :render-content="renderContent"-->
<!-- >-->
<!-- </el-tree>-->
</el-card> </el-card>
<div> <div>
<el-card style="width: 49%; float: left; margin-right: 0px;"> <el-card style="width: 49%; float: left; margin-right: 0px;">
@ -517,6 +507,23 @@
<el-dialog title="关联仓库" :visible.sync="thrWareHouseVisible"> <el-dialog title="关联仓库" :visible.sync="thrWareHouseVisible">
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="thirdQuery.key"
clearable
placeholder="仓库名称"
style="width: 400px"
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="search" @click="intentSelect"></el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-table <el-table
:data="thrWarehouseData" :data="thrWarehouseData"
style="width: 100%;margin-top: 10px;" style="width: 100%;margin-top: 10px;"
@ -550,7 +557,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
>
</el-pagination>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="hideThrWarehouseTable()">取消</el-button> <el-button @click.native="hideThrWarehouseTable()">取消</el-button>
<el-button <el-button
@ -667,7 +680,14 @@ export default {
sysList: [], sysList: [],
checkThrWarehouseRow: null, checkThrWarehouseRow: null,
currentSysId: null, currentSysId: null,
thirdSysVisible: false thirdSysVisible: false,
total: 0,
thirdQuery: {
key:null,
page: 1,
limit: 10
, thirdSysFk: "thirdId",
}
}; };
}, },
methods: { methods: {
@ -1220,17 +1240,27 @@ export default {
}) })
}, },
intentSelect(row) { intentSelect(row) {
this.currentSysId = row.sysId; if (row != null)
this.currentSysId = row.sysId;
// //
filterThrList().then((res) => { this.thirdQuery.thirdSysFk = this.currentSysId;
filterThrList(this.thirdQuery).then((res) => {
this.thrWarehouseData = res.data.list; this.thrWarehouseData = res.data.list;
this.total = res.data.total || 0;
this.thrWareHouseVisible = true; this.thrWareHouseVisible = true;
}).catch((error) => { }).catch((error) => {
this.thrWarehouseData = []; this.thrWarehouseData = [];
this.total = 0;
this.thrWareHouseVisible = true; this.thrWareHouseVisible = true;
this.$message.error("第三方仓库数据加载失败"); this.$message.error("第三方仓库数据加载失败");
}); });
}, },
handleCurrentChange(val) {
this.thirdQuery.page = val;
this.intentSelect();
},
changeThrWarehouse(row) { changeThrWarehouse(row) {
this.checkThrWarehouseRow = row; this.checkThrWarehouseRow = row;
}, },

@ -4,9 +4,9 @@
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
v-model="query.name" v-model="query.key"
clearable clearable
placeholder="仓库名称" placeholder="关键字搜索"
style="width: 400px" style="width: 400px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -45,6 +45,7 @@
border border
default-expand-all default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column <el-table-column
prop="code" prop="code"
label="仓库编码" label="仓库编码"
@ -54,7 +55,6 @@
prop="name" prop="name"
label="仓库名称" label="仓库名称"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="advanceType" prop="advanceType"
@ -63,14 +63,11 @@
<span>{{ enableMap[scope.row.advanceType] }}</span> <span>{{ enableMap[scope.row.advanceType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column--> <el-table-column prop="thirdName" label="第三方系统名称">
<!-- prop="isDefault"--> <template slot-scope="scope">
<!-- label="是否默认库存">--> <span>{{ getThirdSysFkName(scope.row.thirdSysFk) }}</span>
<!-- <template slot-scope="scope">--> </template>
<!-- <span>{{ enableMap[scope.row.isDefault] }}</span>--> </el-table-column>
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="thirdName" label="第三方系统名称"></el-table-column>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@ -90,22 +87,17 @@
</el-button </el-button
> >
</template> </template>
<!-- :disabled="scope.row.code==1000 ||scope.row.code==1001"-->
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-tree-->
<!-- :data="mergeList"-->
<!-- :props="defaultProps"-->
<!-- node-key="id"-->
<!-- style="width: 50%"-->
<!-- default-expand-all-->
<!-- :expand-on-click-node="false"-->
<!-- :render-content="renderContent"-->
<!-- >-->
<!-- </el-tree>-->
</el-card> </el-card>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
>
</el-pagination>
<!--表单界面--> <!--表单界面-->
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
@ -171,8 +163,6 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -184,7 +174,7 @@
> >
<el-form :model="formData" :rules="formRules" ref="dataForm"> <el-form :model="formData" :rules="formRules" ref="dataForm">
<el-form-item label="仓库编码" prop="code" class="query-form-item"> <el-form-item label="仓库编码" prop="title" class="query-form-item">
<el-input <el-input
v-model="formData.code" style="width: 80%" v-model="formData.code" style="width: 80%"
auto-complete="off" auto-complete="off"
@ -204,7 +194,7 @@
<el-option label="仓库" :value='false'></el-option> <el-option label="仓库" :value='false'></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" prop="thirdSysFk" label="第三方系统:"> <el-form-item class="query-form-item" prop="thirdSysFk" label="第三方系统:">
<el-select v-model="formData.thirdSysFk" placeholder="请选择第三方系统" clearable> <el-select v-model="formData.thirdSysFk" placeholder="请选择第三方系统" clearable>
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
@ -222,7 +212,6 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button> <el-button @click.native="hideForm">取消</el-button>
@ -253,7 +242,9 @@ const formJson = {
code: null, code: null,
status: 1, status: 1,
advanceType: false, advanceType: false,
isDefault: false isDefault: false,
page: 1,
limit: 20,
}; };
export default { export default {
data() { data() {
@ -265,7 +256,9 @@ export default {
code: null, code: null,
status: null, status: null,
advanceType: null, advanceType: null,
isDefault: null isDefault: null,
page: 1,
limit: 20,
}, },
mergeList: [], mergeList: [],
node: null, node: null,
@ -273,6 +266,7 @@ export default {
children: "children", children: "children",
label: "name" label: "name"
}, },
total: 0,
treeList: [], treeList: [],
loading: true, loading: true,
index: null, index: null,
@ -307,16 +301,12 @@ export default {
}; };
}, },
methods: { methods: {
/*eslint-disable */
// <el-button
// style="font-size: 12px;"
// type="text"
// on-click={() => this.handleSubForm(node, data, "add")}
// >
//
// </el-button>
handleCurrentChange(val) {
this.query.page = val;
this.getList();
},
renderContent(h, {node, data, store}) { renderContent(h, {node, data, store}) {
return ( return (
<span <span
@ -368,12 +358,14 @@ export default {
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.mergeList = response.data.list || []; this.mergeList = response.data.list || [];
this.total = response.data.total || 0;
this.treeList = response.data.tree_list || []; this.treeList = response.data.tree_list || [];
this.getQueryThirdSysFkName(this.query.thirdSysFk); this.getQueryThirdSysFkName(this.query.thirdSysFk);
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.mergeList = []; this.mergeList = [];
this.total = 0;
this.treeList = []; this.treeList = [];
}); });
}, },
@ -391,6 +383,13 @@ export default {
} }
}) })
}, },
getThirdSysFkName(thirdSys) {
for (let i = 0; i < this.thirdSys.length; i++) {
if (this.thirdSys[i].thirdId === thirdSys) {
return this.thirdSys[i].thirdName;
}
}
},
// //
resetForm() { resetForm() {
if (this.$refs["dataForm"]) { if (this.$refs["dataForm"]) {
@ -597,8 +596,8 @@ export default {
}, },
created() { created() {
// //
this.getList();
this.getBasicThirdSys(); this.getBasicThirdSys();
this.getList();
}, },
}; };
</script> </script>

Loading…
Cancel
Save