出入库记录mioitem新增时选项限制

This commit is contained in:
shijing 2023-12-26 14:03:33 +08:00
parent 95d2b1ca42
commit 12b25518c3
5 changed files with 37 additions and 42 deletions

View File

@ -91,7 +91,7 @@ export default {
}, },
query: { query: {
type__in: 'sale_out,do_in', type__in: 'sale_out,do_in',
item_mio__material__type: 10 // item_mio__material__type: 10
}, },
form: { form: {

View File

@ -91,7 +91,7 @@ export default {
}, },
query: { query: {
type__in: 'do_in,do_out', type__in: 'do_in,do_out',
item_mio__material__type: 20 // item_mio__material__type: 20
}, },
form: { form: {

View File

@ -85,8 +85,8 @@ export default {
save: false, save: false,
}, },
query: { query: {
type__in: 'pur_in,do_out', type__in: 'pur_in',
item_mio__material__type: 40 // item_mio__material__type: 40
}, },
form: { form: {

View File

@ -91,7 +91,7 @@ export default {
}, },
query: { query: {
type__in: 'pur_in,do_out', type__in: 'pur_in,do_out',
item_mio__material__type: 30 // item_mio__material__type: 30
}, },
form: { form: {

View File

@ -210,50 +210,45 @@ export default {
getMaterialOptions() { getMaterialOptions() {
var type = this.form.type; var type = this.form.type;
var cate = this.cate; var cate = this.cate;
var query var query = {};
// if(cate=='good'){ // 'do_out': '',
// query={ page: 0, is_hidden: false,count__gte:1,material__type:10} // 'sale_out': '',
// }else if(cate=='halfgood'){ // 'pur_in': '',
// if(type == 'do_in'){ // 'do_in': '',
// query={ page: 0, is_hidden: false,count__gte:1} // 'other_in': '',
// }else if(type == 'do_out'){ // 'other_out': '',
// query={ page: 0, is_hidden: false,count__gte:1,material__type:20} //(10, ''), (20, ''), (30, ''),
// } // (40, ''), (50, ''), (60, ''), (70, '')
// }else if(cate=='mainso'){// let type__in='';
// query={ page: 0, is_hidden: false,count__gte:1,material__type__in:30} if(cate=='good'){
// }else if(cate=='helpso'){ type__in = '10'
// query={ page: 0, is_hidden: false,count__gte:1,material__type__in:40} }else if(cate=='halfgood'){
// }else{ type__in = '20'
}else if(cate=='mainso'){
// } type__in = '30'
// if(type == 'do_in'){ }else if(cate=='helpso'){
// this.$API.inm.warehouse.batch.req(query).then(res => { type__in = '40'
// this.materialOptions = res }
// }) if (type == 'do_out') {//'10, 20, 30'
// }else{ query = { page: 0, type__in: type__in, is_hidden: false, is_assemb: false };
// this.$API.wpm.wmaterial.list.req(query).then(res => { this.inputBatchDisable = true
// this.materialOptions = res
// })
// }
if (type == 'do_out') {
query = { page: 0, type__in: '10, 20, 30', is_hidden: false, is_assemb: false }
this.inputBatchDisable = true
} }
else if (type == 'do_in') { else if (type == 'do_in') {//
query = { page: 0, type__in: '10, 20', is_hidden: false } query = { page: 0, type__in: type__in, is_hidden: false }
this.inputBatchDisable = false this.inputBatchDisable = false;
} }
else if (type == 'pur_in') { else if (type == 'pur_in') {//
query = { page: 0, type__in: 30, is_hidden: false, pu_orderitem_material__pu_order: this.mioObj.pu_order } query = { page: 0, type__in: type__in, is_hidden: false, pu_orderitem_material__pu_order: this.mioObj.pu_order }
this.inputBatchDisable = false this.inputBatchDisable = false
} }
else if (type == 'sale_out') { else if (type == 'sale_out') {//
query = { page: 0, type__in: 10, is_hidden: false, orderitem_material__order: this.mioObj.order } query = { page: 0, type__in: 10, is_hidden: false, orderitem_material__order: this.mioObj.order }
this.inputBatchDisable = true this.inputBatchDisable = true;
} }
else { else {
query = { page: 0 } query = { page: 0 }
} }
this.$API.mtm.material.list.req(query).then(res => { this.$API.mtm.material.list.req(query).then(res => {
this.materialOptions = res this.materialOptions = res
}) })