fix:禅道180

This commit is contained in:
shijing 2026-01-06 16:35:01 +08:00
parent 618d620b4a
commit f178953d86
1 changed files with 51 additions and 31 deletions

View File

@ -24,12 +24,17 @@
:apiObj="apiObj"
v-model="form.material"
v-model:obj="selectObj"
:labelField="'full_name'"
:labelField="type=='sale_out'&&project_code=='bxerp'?'material_name':'full_name'"
style="width:100%"
:params="query"
@change="selectMaterialChange"
>
<el-table-column label="物料" prop="full_name"></el-table-column>
<el-table-column label="物料">
<template #default="scope">
<span v-if="scope.row.full_name">{{ scope.row.full_name }}</span>
<span v-else>{{ scope.row.material_name }}</span>
</template>
</el-table-column>
</xtSelect>
</el-form-item>
</el-col>
@ -332,7 +337,7 @@ export default {
mtype:null,
batchcount:null,
mTracking:10,
apiObj:this.$API.mtm.material.list,
apiObj:null,
};
},
mounted() {
@ -470,10 +475,12 @@ export default {
} else if (type == "sale_out") {
//
query = {
page: 0,
type__in: 10,
is_hidden: false,
orderitem_material__order: this.mioObj.order,
// page: 0,
// type__in: 10,
// is_hidden: false,
// orderitem_material__order: this.mioObj.order,
count__gte: 1,
material__type: 10
};
this.inputBatchDisable = true;
} else if (type == "other_out") {
@ -493,10 +500,12 @@ export default {
this.inputBatchDisable = false;
}
this.query = query;
this.apiObj=this.$API.mtm.material.list;
// this.$API.mtm.material.list.req(query).then((res) => {
// this.materialOptions = res;
// });
if(type == "sale_out"&&this.project_code=='bxerp'){
this.apiObj=this.$API.inm.warehouse.batch;
}else{
this.apiObj=this.$API.mtm.material.list;
}
},
async initAssemb(item) {
this.selectBatchDisable = true;
@ -550,26 +559,39 @@ export default {
var that = this;
if(that.selectObj.id!==undefined&&that.selectObj.id!==null){
sessionStorage.setItem("mioitemSelecObj",JSON.stringify(that.selectObj));
console.log("mioitemSelecObj",that.selectObj);
}
var type = this.form.type;
that.form.material = that.selectObj.id;
that.form.unit = that.selectObj.unit;
that.form.unit_price = that.selectObj.unit_price;
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:'';
that.mTracking = that.selectObj.tracking;
if (type == "do_in") {
if (that.selectObj.is_assemb) {
this.initAssemb(that.selectObj);
if(that.type == "sale_out"&&that.project_code=='bxerp'){
that.form.material = that.selectObj.material;
that.form.unit = that.selectObj.material_.unit;
that.form.unit_price = that.selectObj.material_.unit_price;
that.form.batch = that.selectBatch = that.selectObj.batch;
that.form.warehouse = that.selectObj.warehouse;
that.batchcount = Number(that.selectObj.count_canmio);
that.form.count = Number(that.selectObj.count_canmio);
that.mTracking = that.selectObj.material_.tracking;
that.selectBatchChange(that.selectObj)
}else{
var type = this.form.type;
that.form.material = that.selectObj.id;
that.form.unit = that.selectObj.unit;
that.form.unit_price = that.selectObj.unit_price;
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:'';
that.mTracking = that.selectObj.tracking;
if (type == "do_in") {
if (that.selectObj.is_assemb) {
this.initAssemb(that.selectObj);
} else {
that.getBatchOptions();
}
} else {
that.getBatchOptions();
this.getBatchOptions();
}
} else {
this.getBatchOptions();
}
if(that.form.type == 'pur_in'||that.form.type == 'other_in'||that.assembShow){
that.batchcount = 99999999999;
if(that.project_code=='gx'){
that.form.batch = '无'
if(that.form.type == 'pur_in'||that.form.type == 'other_in'||that.assembShow){
that.batchcount = 99999999999;
if(that.project_code=='gx'){
that.form.batch = '无'
}
}
}
},
@ -618,8 +640,7 @@ export default {
}
that.form.batch = items.batch;
that.form.mb = items.id;
that.batchcount = canDo;
that.form.count =canDo>50?50: that.wprList.length;
that.form.count =canDo>50?50: canDo;
that.form.warehouse = items.warehouse;
that.inputBatchDisable = true;
})
@ -627,7 +648,6 @@ export default {
that.$API.wpm.wpr.list.req({ page: 0, mb: items.id }).then((res) => {
that.wprList = res;
})
// that.getnumberOutLast();
that.form.batch = items.batch;
that.form.mb = items.id;
that.batchcount = Number(items.count_canmio);