fix:禅道180
This commit is contained in:
parent
618d620b4a
commit
f178953d86
|
|
@ -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;
|
||||||
this.apiObj=this.$API.mtm.material.list;
|
if(type == "sale_out"&&this.project_code=='bxerp'){
|
||||||
// this.$API.mtm.material.list.req(query).then((res) => {
|
this.apiObj=this.$API.inm.warehouse.batch;
|
||||||
// this.materialOptions = res;
|
|
||||||
// });
|
}else{
|
||||||
|
this.apiObj=this.$API.mtm.material.list;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async initAssemb(item) {
|
async initAssemb(item) {
|
||||||
this.selectBatchDisable = true;
|
this.selectBatchDisable = true;
|
||||||
|
|
@ -550,26 +559,39 @@ 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);
|
||||||
}
|
}
|
||||||
var type = this.form.type;
|
if(that.type == "sale_out"&&that.project_code=='bxerp'){
|
||||||
that.form.material = that.selectObj.id;
|
that.form.material = that.selectObj.material;
|
||||||
that.form.unit = that.selectObj.unit;
|
that.form.unit = that.selectObj.material_.unit;
|
||||||
that.form.unit_price = that.selectObj.unit_price;
|
that.form.unit_price = that.selectObj.material_.unit_price;
|
||||||
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:'';
|
that.form.batch = that.selectBatch = that.selectObj.batch;
|
||||||
that.mTracking = that.selectObj.tracking;
|
that.form.warehouse = that.selectObj.warehouse;
|
||||||
if (type == "do_in") {
|
that.batchcount = Number(that.selectObj.count_canmio);
|
||||||
if (that.selectObj.is_assemb) {
|
that.form.count = Number(that.selectObj.count_canmio);
|
||||||
this.initAssemb(that.selectObj);
|
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 {
|
} else {
|
||||||
that.getBatchOptions();
|
this.getBatchOptions();
|
||||||
}
|
}
|
||||||
} else {
|
if(that.form.type == 'pur_in'||that.form.type == 'other_in'||that.assembShow){
|
||||||
this.getBatchOptions();
|
that.batchcount = 99999999999;
|
||||||
}
|
if(that.project_code=='gx'){
|
||||||
if(that.form.type == 'pur_in'||that.form.type == 'other_in'||that.assembShow){
|
that.form.batch = '无'
|
||||||
that.batchcount = 99999999999;
|
}
|
||||||
if(that.project_code=='gx'){
|
|
||||||
that.form.batch = '无'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue