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