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

View File

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