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" :apiObj="apiObj"
v-model="form.material" v-model="form.material"
v-model:obj="selectObj" v-model:obj="selectObj"
:labelField="'full_name'" :labelField="type=='sale_out'&&project_code=='bxerp'?'material_name':'full_name'"
style="width:100%" style="width:100%"
:params="query" :params="query"
@change="selectMaterialChange" @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> </xtSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -332,7 +337,7 @@ export default {
mtype:null, mtype:null,
batchcount:null, batchcount:null,
mTracking:10, mTracking:10,
apiObj:this.$API.mtm.material.list, apiObj:null,
}; };
}, },
mounted() { mounted() {
@ -470,10 +475,12 @@ export default {
} else if (type == "sale_out") { } else if (type == "sale_out") {
// //
query = { query = {
page: 0, // page: 0,
type__in: 10, // type__in: 10,
is_hidden: false, // is_hidden: false,
orderitem_material__order: this.mioObj.order, // orderitem_material__order: this.mioObj.order,
count__gte: 1,
material__type: 10
}; };
this.inputBatchDisable = true; this.inputBatchDisable = true;
} else if (type == "other_out") { } else if (type == "other_out") {
@ -493,10 +500,12 @@ export default {
this.inputBatchDisable = false; this.inputBatchDisable = false;
} }
this.query = query; this.query = query;
if(type == "sale_out"&&this.project_code=='bxerp'){
this.apiObj=this.$API.inm.warehouse.batch;
}else{
this.apiObj=this.$API.mtm.material.list; this.apiObj=this.$API.mtm.material.list;
// this.$API.mtm.material.list.req(query).then((res) => { }
// this.materialOptions = res;
// });
}, },
async initAssemb(item) { async initAssemb(item) {
this.selectBatchDisable = true; this.selectBatchDisable = true;
@ -550,7 +559,19 @@ export default {
var that = this; var that = this;
if(that.selectObj.id!==undefined&&that.selectObj.id!==null){ if(that.selectObj.id!==undefined&&that.selectObj.id!==null){
sessionStorage.setItem("mioitemSelecObj",JSON.stringify(that.selectObj)); sessionStorage.setItem("mioitemSelecObj",JSON.stringify(that.selectObj));
console.log("mioitemSelecObj",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; var type = this.form.type;
that.form.material = that.selectObj.id; that.form.material = that.selectObj.id;
that.form.unit = that.selectObj.unit; that.form.unit = that.selectObj.unit;
@ -572,6 +593,7 @@ export default {
that.form.batch = '无' that.form.batch = '无'
} }
} }
}
}, },
getItem(options, id) { getItem(options, id) {
for (var i = 0; i < options.length; i++) { for (var i = 0; i < options.length; i++) {
@ -618,8 +640,7 @@ export default {
} }
that.form.batch = items.batch; that.form.batch = items.batch;
that.form.mb = items.id; that.form.mb = items.id;
that.batchcount = canDo; that.form.count =canDo>50?50: canDo;
that.form.count =canDo>50?50: that.wprList.length;
that.form.warehouse = items.warehouse; that.form.warehouse = items.warehouse;
that.inputBatchDisable = true; that.inputBatchDisable = true;
}) })
@ -627,7 +648,6 @@ export default {
that.$API.wpm.wpr.list.req({ page: 0, mb: items.id }).then((res) => { that.$API.wpm.wpr.list.req({ page: 0, mb: items.id }).then((res) => {
that.wprList = res; that.wprList = res;
}) })
// that.getnumberOutLast();
that.form.batch = items.batch; that.form.batch = items.batch;
that.form.mb = items.id; that.form.mb = items.id;
that.batchcount = Number(items.count_canmio); that.batchcount = Number(items.count_canmio);