fix:玻纤采购入库编号自动生成
This commit is contained in:
parent
2f9c0edd00
commit
0564c5f6da
|
|
@ -141,11 +141,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="project_code=='bxerp'&&form.type == 'pur_in'">
|
<el-row v-if="project_code=='bxerp'&&form.type == 'pur_in'&&form.count>1">
|
||||||
<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">
|
||||||
<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-else v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="true" />
|
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -282,8 +282,16 @@ export default {
|
||||||
this.getWarehouseOptions();
|
this.getWarehouseOptions();
|
||||||
},
|
},
|
||||||
getWarehouseOptions() {
|
getWarehouseOptions() {
|
||||||
|
let that = this;
|
||||||
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
||||||
this.warehouseOptions = res;
|
this.warehouseOptions = res;
|
||||||
|
if(that.form.type=='pur_in'){
|
||||||
|
res.forEach((item) => {
|
||||||
|
if (item.name == "原料库") {
|
||||||
|
that.form.warehouse = item.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
|
|
@ -458,22 +466,19 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.project_code=='bxerp'){
|
if(that.project_code=='bxerp'){
|
||||||
if(that.form.type == "pur_in"){
|
if(that.form.type == "pur_in"){
|
||||||
let numbers = that.mioitems[0];
|
|
||||||
that.mioitems = [];that.mioitemw = [];
|
that.mioitems = [];that.mioitemw = [];
|
||||||
for(let i=0;i<that.form.count;i++){
|
for(let i=0;i<that.form.count;i++){
|
||||||
if(numbers!=''&&numbers!=null&&numbers!=undefined){
|
let indexs = i+1;
|
||||||
that.mioitems[i] = Number(numbers)+i;
|
indexs = indexs<10?'0'+indexs:indexs;
|
||||||
let obj = {};
|
that.mioitems[i] = that.form.batch+'-'+indexs;
|
||||||
obj.number = that.mioitems[i];
|
let obj = {};
|
||||||
that.mioitemw.push(obj);
|
obj.number = that.mioitems[i];
|
||||||
}else{
|
that.mioitemw.push(obj);
|
||||||
that.mioitems[i] = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}else if(that.form.type == "do_out"){
|
}else if(that.form.type == "do_out"){
|
||||||
for(let i=0;i<that.form.count;i++){
|
for(let i=0;i<that.form.count;i++){
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.number = that.form.batch+'0'+(i+1);
|
obj.number = that.form.batch+'-'+(i+1);
|
||||||
that.mioitemw.push(obj);
|
that.mioitemw.push(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,10 +491,13 @@ export default {
|
||||||
for(let i=0;i<that.form.count;i++){
|
for(let i=0;i<that.form.count;i++){
|
||||||
that.mioitems[i] = Number(numbers)+i;
|
that.mioitems[i] = Number(numbers)+i;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.number = that.mioitems[i];
|
obj.number = that.form.batch+'-'+(i+1);
|
||||||
that.mioitemw.push(obj);
|
that.mioitemw.push(obj);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
validateInput(i){
|
||||||
|
this.mioitems[i] = this.mioitems[i].replace(/\D/g, '');
|
||||||
|
},
|
||||||
//提交
|
//提交
|
||||||
submit() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue