|
|
|
@ -56,10 +56,17 @@
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-form-item label="物料组名称" prop="groupName">
|
|
|
|
|
<el-input v-model="form.groupName" placeholder="请输入物料组名称" />
|
|
|
|
|
<el-select v-model="form.groupCode" filterable clearable placeholder="请选择物料组">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(item,index) in OriginalGroupList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="item.groupName"
|
|
|
|
|
:value="item.groupCode">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料组编码" prop="groupCode">
|
|
|
|
|
<el-input v-model="form.groupCode" placeholder="请输入物料组编码" disabled/>
|
|
|
|
|
<el-form-item v-show="true" label="物料组编码" prop="groupCode">
|
|
|
|
|
<el-input v-model="form.groupName" placeholder="请输入物料组编码"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -78,7 +85,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
getGroupList,
|
|
|
|
|
getOriginalGroupList,
|
|
|
|
|
addMaterialGroup,
|
|
|
|
|
delMaterialGroup,
|
|
|
|
|
updateMaterialGroup,
|
|
|
|
@ -117,6 +124,8 @@ export default {
|
|
|
|
|
groupName: undefined,
|
|
|
|
|
// 物料组表格数据
|
|
|
|
|
materialGroupList: [],
|
|
|
|
|
// 物料组原始数据
|
|
|
|
|
OriginalGroupList: [],
|
|
|
|
|
//当前点击的节点数据
|
|
|
|
|
nodeData: {},
|
|
|
|
|
// 弹出层标题
|
|
|
|
@ -150,6 +159,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getMaterialTree();
|
|
|
|
|
this.getOriginalGroup();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 取消按钮
|
|
|
|
@ -175,6 +185,13 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
/** 获取初始物料组 */
|
|
|
|
|
getOriginalGroup() {
|
|
|
|
|
getOriginalGroupList(this.queryParams).then((response) => {
|
|
|
|
|
this.OriginalGroupList = response.rows;
|
|
|
|
|
//this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 查询部门下拉树结构 */
|
|
|
|
|
getMaterialTree() {
|
|
|
|
|
materialTreeSelect().then((response) => {
|
|
|
|
|