fix:输入输出物料显示条件修改

This commit is contained in:
shijing 2024-07-29 17:01:54 +08:00
parent e15f03142a
commit e24b10019f
2 changed files with 14 additions and 5 deletions

View File

@ -72,7 +72,9 @@
placeholder="物料"
clearable
filterable
:value-on-clear="null"
style="width: 100%"
@clear="clearHandle('material_in')"
>
<el-option
v-for="item in materialsIn"
@ -103,7 +105,9 @@
placeholder="物料"
clearable
filterable
:value-on-clear="null"
style="width: 100%"
@clear="clearHandle('material_out')"
>
<el-option
v-for="item in materialsOut"
@ -206,6 +210,9 @@ export default {
this.form.routepack = this.routepack;
},
methods: {
clearHandle(key) {
this.form[key] = null;
},
getMgroup() {
let that = this;
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
@ -223,7 +230,7 @@ export default {
getMaterialOut() {
let that = this;
this.$API.mtm.material.list
.req({ page: 0, type__in: "10,20", is_hidden: false })
.req({ page: 0, type__in: "10,20" })
.then((res) => {
this.materialsOut = res;
});

View File

@ -152,7 +152,7 @@
style="margin-right: 4px"
>{{ item.name }}</el-button
>
<el-button @click="submitOut" type="warning"
<el-button @click="$emit('closed')" type="warning"
>退出</el-button
>
</div>
@ -197,7 +197,7 @@ export default {
materials: [],
apiObj: null,
query: {
material: "",
routepack: "",
},
rules: {
name: [{ required: true, message: "请输入" }],
@ -249,9 +249,11 @@ export default {
.req(that.form.id, that.form)
.then((res) => {
that.routepack = res.id;
that.query.routepack = res.id;
console.log("that.query", that.query);
that.apiObj = that.$API.mtm.route.list;
that.active = 1;
this.query.material = this.form.material;
this.apiObj = this.$API.mtm.route.list;
// that.$refs.tables.refresh();
});
} else {
that.$API.mtm.routepack.create.req(form).then((res) => {