出入库记录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: {
type__in: 'sale_out,do_in',
item_mio__material__type: 10
// item_mio__material__type: 10
},
form: {

View File

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

View File

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

View File

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

View File

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