fix:辅料采购入库,半成品采购入库,以及辅料出入库详情

This commit is contained in:
shijing 2025-06-20 17:25:15 +08:00
parent fc0c344074
commit ea9395bf14
2 changed files with 18 additions and 8 deletions

View File

@ -143,9 +143,9 @@
</el-row> </el-row>
<el-row v-if="mTracking==20&&form.count>1&&(form.type == 'pur_in'||form.type == 'other_in')"> <el-row v-if="mTracking==20&&form.count>1&&(form.type == 'pur_in'||form.type == 'other_in')">
<el-col :md="12" :sm="24" v-for="i in form.count" :key="i"> <el-col :md="12" :sm="24" v-for="i in form.count" :key="i">
<el-form-item :label="'编号'+i"> <el-form-item :label="'编号'+i" required>
<!-- <el-input-number v-if="i==1" v-model="mioitems[0]" @change="firstNumberChange" placeholder="请输入编号" controls-position="right" style="width:100%"/> --> <!-- <el-input-number v-if="i==1" v-model="mioitems[0]" @change="firstNumberChange" placeholder="请输入编号" controls-position="right" style="width:100%"/> -->
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="true" /> <el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -421,7 +421,7 @@ export default {
var that = this; var that = this;
var type = this.form.type; var type = this.form.type;
that.form.material = that.selectObj.id; that.form.material = that.selectObj.id;
that.form.batch = that.selectObj.bin_number_main; that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:that.selectObj.batch;
that.mTracking = that.selectObj.tracking; that.mTracking = that.selectObj.tracking;
if (type == "do_in") { if (type == "do_in") {
if (that.selectObj.is_assemb) { if (that.selectObj.is_assemb) {
@ -446,7 +446,7 @@ export default {
selectBatchChange(item) { selectBatchChange(item) {
this.form.batch = item.batch; this.form.batch = item.batch;
this.form.mb = item.id; this.form.mb = item.id;
this.form.count = 0; this.form.count = Number(item.count);
this.form.warehouse = item.warehouse; this.form.warehouse = item.warehouse;
this.warehouseDisable = true; this.warehouseDisable = true;
this.inputBatchDisable = true; this.inputBatchDisable = true;
@ -477,7 +477,7 @@ export default {
for(let i=0;i<that.form.count;i++){ for(let i=0;i<that.form.count;i++){
let indexs = i+1; let indexs = i+1;
indexs = indexs<10?'0'+indexs:indexs; indexs = indexs<10?'0'+indexs:indexs;
that.mioitems[i] = that.form.batch+'-'+indexs; that.mioitems[i] = that.cate == "halfgood"?'': that.form.batch+'-'+indexs;
let obj = {}; let obj = {};
obj.number = that.mioitems[i]; obj.number = that.mioitems[i];
that.mioitemw.push(obj); that.mioitemw.push(obj);
@ -521,8 +521,18 @@ export default {
}); });
} }
} }
that.form.mioitemw = that.mioitemw; if(that.mTracking==20&&that.form.count>1&&(that.form.type == 'pur_in'||that.form.type == 'other_in')){
// console.log(that.form); let mioitemw = [];
that.mioitems.forEach((item,index) => {
mioitemw[index]={ number: item };
})
if(mioitemw.length==that.mioitems.length){
that.form.mioitemw = mioitemw;
}else{
that.$message.error("请输入正确数量的编号")
return;
}
}
try { try {
let res; let res;
if (that.mode == "add") { if (that.mode == "add") {

View File

@ -108,7 +108,7 @@ export default {
data() { data() {
return { return {
apiObj: null, apiObj: null,
params: {with_mio:'yes'}, params: {with_mio:'yes',material__type:30,mio__state:20},
selection: [], selection: [],
tableData:[], tableData:[],
query: { query: {