光子分支
This commit is contained in:
parent
5980db9a50
commit
4255889281
|
@ -12,9 +12,9 @@
|
|||
:rules="rules"
|
||||
label-width="120px"
|
||||
>
|
||||
<!-- <el-form-item label="编号" prop="number">
|
||||
<el-form-item label="编号" prop="number">
|
||||
<el-input v-model="form.number" placeholder="编号" />
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="出入库日期">
|
||||
<el-date-picker
|
||||
v-model="form.inout_date"
|
||||
|
|
|
@ -15,7 +15,18 @@
|
|||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="物料" prop="material">
|
||||
<el-select
|
||||
<xtSelect
|
||||
:apiObj="apiObj"
|
||||
v-model="form.material"
|
||||
v-model:obj="selectObj"
|
||||
:labelField="'full_name'"
|
||||
style="width:100%"
|
||||
:params="query"
|
||||
@change="selectMaterialChange"
|
||||
>
|
||||
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||
</xtSelect>
|
||||
<!-- <el-select
|
||||
v-model="selectMaterial"
|
||||
value-key="id"
|
||||
clearable
|
||||
|
@ -40,7 +51,7 @@
|
|||
>隐</span
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
|
@ -53,6 +64,8 @@
|
|||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="inputBatchDisable"
|
||||
@clear="selectBatchClear"
|
||||
@change="selectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wbatchOptions"
|
||||
|
@ -81,7 +94,6 @@
|
|||
style="width: 100%"
|
||||
@change="selectBatchChange"
|
||||
@clear="selectBatchClear"
|
||||
:disabled="selectBatchDisable"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in batchOptions"
|
||||
|
@ -119,7 +131,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="cate == 'mainso'">
|
||||
<el-col :md="12" :sm="24" v-if="mTracking==20&&(form.type == 'do_in' ||form.type == 'pur_in'||form.type == 'other_in')">
|
||||
<el-form-item label="数量">
|
||||
<el-input-number
|
||||
v-model="form.count"
|
||||
|
@ -141,7 +153,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="project_code=='bxerp'&&form.type == 'pur_in'&&form.count>1">
|
||||
<el-row v-if="mTracking==20&&form.count>1&&(form.type == 'do_in'||form.type == 'pur_in'||form.type == 'other_in')">
|
||||
<el-col :md="12" :sm="24" v-for="i in form.count" :key="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%"/> -->
|
||||
|
@ -253,6 +265,7 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
selectObj:{},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
materialOptions: [],
|
||||
|
@ -269,6 +282,8 @@ export default {
|
|||
mioitems:[''],
|
||||
mioitemw:[],
|
||||
project_code:'',
|
||||
mTracking:10,
|
||||
apiObj:this.$API.mtm.material.list,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -347,7 +362,7 @@ export default {
|
|||
this.inputBatchDisable = true;
|
||||
} else if (type == "do_in") {
|
||||
//生产入库
|
||||
query = { page: 0, type__in: type__in };
|
||||
query = { page: 0,is_hidden: false, type__in: type__in };
|
||||
this.inputBatchDisable = false;
|
||||
} else if (type == "pur_in") {
|
||||
//采购入库
|
||||
|
@ -368,12 +383,13 @@ export default {
|
|||
};
|
||||
this.inputBatchDisable = true;
|
||||
} else {
|
||||
query = { page: 0 };
|
||||
query = { page: 0 ,is_hidden:false};
|
||||
}
|
||||
|
||||
this.$API.mtm.material.list.req(query).then((res) => {
|
||||
this.materialOptions = res;
|
||||
});
|
||||
this.query = query;
|
||||
this.apiObj=this.$API.mtm.material.list;
|
||||
// this.$API.mtm.material.list.req(query).then((res) => {
|
||||
// this.materialOptions = res;
|
||||
// });
|
||||
},
|
||||
async initAssemb(item) {
|
||||
this.selectBatchDisable = true;
|
||||
|
@ -410,23 +426,35 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
selectMaterialChange(item) {
|
||||
var that = this;
|
||||
var type = this.form.type;
|
||||
var material = item.id;
|
||||
that.form.material = material;
|
||||
|
||||
if (type == "do_in") {
|
||||
if (item.is_assemb) {
|
||||
this.initAssemb(item);
|
||||
} else {
|
||||
this.selectBatchDisable = false;
|
||||
this.components = [];
|
||||
this.assembShow = false;
|
||||
this.getBatchOptions();
|
||||
selectChange(item){
|
||||
console.log(item)
|
||||
let that = this;
|
||||
that.wbatchOptions.forEach((item) => {
|
||||
if(that.form.batch == item.batch){
|
||||
that.form.count = item.count;
|
||||
that.form.wm = item.id;
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
selectMaterialChange() {
|
||||
var that = this;
|
||||
if(that.form.material!==''&&that.form.material!==null&&that.form.material!==undefined){
|
||||
var type = that.form.type;
|
||||
that.form.material = that.selectObj.id;
|
||||
that.mTracking = that.selectObj.tracking;
|
||||
if (type == "do_in") {
|
||||
if (that.selectObj.is_assemb) {
|
||||
that.initAssemb(that.selectObj);
|
||||
} else {
|
||||
that.selectBatchDisable = false;
|
||||
that.components = [];
|
||||
that.assembShow = false;
|
||||
that.getBatchOptions();
|
||||
}
|
||||
} else {
|
||||
that.getBatchOptions();
|
||||
}
|
||||
} else {
|
||||
this.getBatchOptions();
|
||||
}
|
||||
},
|
||||
getItem(options, id) {
|
||||
|
@ -437,15 +465,18 @@ export default {
|
|||
}
|
||||
},
|
||||
selectBatchChange(item) {
|
||||
this.form.batch = item.batch;
|
||||
this.form.mb = item.id;
|
||||
this.form.count = item.count;
|
||||
this.form.warehouse = item.warehouse;
|
||||
this.warehouseDisable = true;
|
||||
this.inputBatchDisable = true;
|
||||
if(item!==''&&item!==null&&item!==undefined){
|
||||
this.form.batch = item.batch;
|
||||
this.form.mb = item.id;
|
||||
this.form.count = item.count;
|
||||
this.form.warehouse = item.warehouse;
|
||||
this.warehouseDisable = true;
|
||||
this.inputBatchDisable = true;
|
||||
}
|
||||
},
|
||||
selectBatchClear() {
|
||||
this.form.mb = "";
|
||||
this.form.wm = "";
|
||||
this.form.batch = "";
|
||||
this.form.count = "";
|
||||
this.form.warehouse = "";
|
||||
|
@ -464,23 +495,22 @@ export default {
|
|||
},
|
||||
countChange(){
|
||||
let that = this;
|
||||
if(that.project_code=='bxerp'){
|
||||
if(that.form.type == "pur_in"){
|
||||
that.mioitems = [];that.mioitemw = [];
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
let indexs = i+1;
|
||||
indexs = indexs<10?'0'+indexs:indexs;
|
||||
that.mioitems[i] = that.form.batch+'-'+indexs;
|
||||
let obj = {};
|
||||
obj.number = that.mioitems[i];
|
||||
that.mioitemw.push(obj);
|
||||
}
|
||||
}else if(that.form.type == "do_out"){
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
let obj = {};
|
||||
obj.number = that.form.batch+'-'+(i+1);
|
||||
that.mioitemw.push(obj);
|
||||
}
|
||||
if(that.mTracking == 20&&that.form.count>1&&( that.form.type == 'pur_in'|| that.form.type == 'other_in')){
|
||||
that.mioitems = [];that.mioitemw = [];
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
let indexs = i+1;
|
||||
indexs = indexs<10?'0'+indexs:indexs;
|
||||
that.mioitems[i] = that.form.batch+'-'+indexs;
|
||||
let obj = {};
|
||||
obj.number = that.mioitems[i];
|
||||
that.mioitemw.push(obj);
|
||||
}
|
||||
}else{
|
||||
//生产入库
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
let obj = {};
|
||||
obj.number = that.form.batch+'-'+(i+1);
|
||||
that.mioitemw.push(obj);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="任务编号" prop="number">
|
||||
<el-form-item label="任务编号" prop="number">
|
||||
<el-input
|
||||
v-model="form.number"
|
||||
placeholder="任务编号"
|
||||
:disabled="mode == 'edit'"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item :label="routeText" v-if="mode == 'add'">
|
||||
<el-select
|
||||
:placeholder="routeText"
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form ref="dialogForm" :model="form" :rules="rules" label-width="120px">
|
||||
<!-- <el-form-item label="任务编号" prop="number">
|
||||
<el-form-item label="任务编号" prop="number">
|
||||
<el-input v-model="form.number" placeholder="任务编号" :disabled="mode == 'edit'" />
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="产物" prop="material" v-if="mode == 'add'">
|
||||
<el-select placeholder="产物" v-model="form.material" filterable style="width:100%">
|
||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.full_name" :value="item.id">
|
||||
|
|
Loading…
Reference in New Issue