fix;
This commit is contained in:
parent
df5410dc42
commit
8778dc7ebd
|
@ -125,7 +125,18 @@
|
|||
v-model="form.count"
|
||||
:min="1"
|
||||
:precision="3"
|
||||
:disabled="form.type == 'do_out'"
|
||||
style="width: 100%"
|
||||
@change="countChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="mTracking==20&&form.type == 'sale_out'&&project_code=='bxerp'">
|
||||
<el-form-item label="数量">
|
||||
<el-input-number
|
||||
v-model="form.count"
|
||||
:min="0"
|
||||
:precision="3"
|
||||
:max="batchcount"
|
||||
style="width: 100%"
|
||||
@change="countChange"
|
||||
/>
|
||||
|
@ -136,6 +147,7 @@
|
|||
<el-input-number
|
||||
v-model="form.count"
|
||||
:min="1"
|
||||
:disabled="form.type == 'do_out'"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -151,11 +163,14 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</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>0&&(form.type == 'pur_in'||form.type == 'other_in'||(form.type == 'sale_out'&&project_code=='bxerp'))">
|
||||
<el-col :md="12" :sm="24" v-for="i in form.count" :key="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 v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
|
||||
<template v-if="form.type == 'sale_out'&&project_code=='bxerp'">
|
||||
<el-input v-if="i==1" v-model="mioitems[0]" @change="firstNumberChange" placeholder="请输入编号" style="width:100%"/>
|
||||
<el-input v-else v-model="mioitems[i-1]" placeholder="请输入编号" disabled />
|
||||
</template>
|
||||
<el-input v-else v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -280,8 +295,11 @@ export default {
|
|||
wbatchOptions: [],
|
||||
mioitems:[''],
|
||||
mioitemw:[],
|
||||
wprList:[],
|
||||
prefix:'',
|
||||
project_code:'',
|
||||
mtype:null,
|
||||
batchcount:null,
|
||||
mTracking:10,
|
||||
apiObj:this.$API.mtm.material.list,
|
||||
};
|
||||
|
@ -298,6 +316,12 @@ export default {
|
|||
this.getMaterialOptions();
|
||||
this.getWarehouseOptions();
|
||||
},
|
||||
getnumberOutLast(){
|
||||
let that = this;
|
||||
that.$API.wpm.wpr.numberOutLast.req({prefix:that.prefix}).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
getWarehouseOptions() {
|
||||
let that = this;
|
||||
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
||||
|
@ -450,6 +474,7 @@ export default {
|
|||
},
|
||||
selectMaterialChange() {
|
||||
var that = this;
|
||||
console.log('that.selectObj',that.selectObj);
|
||||
var type = this.form.type;
|
||||
that.form.material = that.selectObj.id;
|
||||
that.form.unit = that.selectObj.unit;
|
||||
|
@ -477,12 +502,19 @@ export default {
|
|||
}
|
||||
},
|
||||
selectBatchChange(item) {
|
||||
this.form.batch = item.batch;
|
||||
this.form.mb = item.id;
|
||||
this.form.count = Number(item.count);
|
||||
this.form.warehouse = item.warehouse;
|
||||
// this.warehouseDisable = true;
|
||||
this.inputBatchDisable = true;
|
||||
let that = this;
|
||||
if(item){
|
||||
that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => {
|
||||
that.wprList = res;
|
||||
})
|
||||
// that.getnumberOutLast();
|
||||
that.form.batch = item.batch;
|
||||
that.form.mb = item.id;
|
||||
that.batchcount = Number(item.count);
|
||||
that.form.count = Number(item.count);
|
||||
that.form.warehouse = item.warehouse;
|
||||
that.inputBatchDisable = true;
|
||||
}
|
||||
},
|
||||
selectBatchClear() {
|
||||
this.form.mb = "";
|
||||
|
@ -566,6 +598,16 @@ export default {
|
|||
that.$message.error("请输入正确数量的编号")
|
||||
return;
|
||||
}
|
||||
}else if(that.form.type == 'sale_out'&&that.project_code=='bxerp'){
|
||||
let mioitemw = [];
|
||||
that.mioitems.forEach((item,index) => {
|
||||
mioitemw[index]={
|
||||
number: item ,
|
||||
number_out : item,
|
||||
wpr:that.wprList[index]? that.wprList[index].id:null
|
||||
}
|
||||
})
|
||||
that.form.mioitemw = mioitemw.filter(item=>item.wpr!==null);
|
||||
}
|
||||
try {
|
||||
let res;
|
||||
|
|
Loading…
Reference in New Issue