fix:光芯输入物料表单优化
This commit is contained in:
parent
125c9759b8
commit
cc17dde1dc
|
@ -804,6 +804,7 @@ export default {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open();
|
this.$refs.saveDialog.open();
|
||||||
|
this.codeText = '';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSaveSuccess() {
|
handleSaveSuccess() {
|
||||||
|
|
|
@ -18,6 +18,27 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="批次号" prop="wm_in">
|
<el-form-item label="批次号" prop="wm_in">
|
||||||
|
<xtSelect
|
||||||
|
:apiObj="apiObjM"
|
||||||
|
v-model="form.wm_in"
|
||||||
|
v-model:obj="selectObj"
|
||||||
|
:labelField="'batch'"
|
||||||
|
style="width: 100%;"
|
||||||
|
:params = "paramsM"
|
||||||
|
>
|
||||||
|
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
|
||||||
|
<el-table-column label="物料" prop="full_name">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||||
|
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||||
|
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
|
||||||
|
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" width="110px"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="批次号" prop="wm_in">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.wm_in"
|
v-model="form.wm_in"
|
||||||
placeholder="物料"
|
placeholder="物料"
|
||||||
|
@ -34,6 +55,8 @@
|
||||||
>
|
>
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<div>
|
<div>
|
||||||
|
<span v-if="item.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||||
|
<span v-if="item.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||||
<span>{{ item.batch }}({{ item.material_name }})</span>
|
<span>{{ item.batch }}({{ item.material_name }})</span>
|
||||||
<span v-if="item.defect_name !== null" style="color: orangered">{{ item.defect_name }}</span>
|
<span v-if="item.defect_name !== null" style="color: orangered">{{ item.defect_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="关联任务">
|
<el-form-item label="关联任务">
|
||||||
|
@ -76,7 +99,7 @@
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item :label="mgroupMtype==10?'领用数量':'批次总数'">
|
<el-form-item :label="mgroupMtype==10?'领用数量':'批次总数'">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_use"
|
v-model="selectObj.count_cando"
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@ -238,6 +261,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
selectObj:{count:0},
|
||||||
batch_count:null,
|
batch_count:null,
|
||||||
codeBatch:"",
|
codeBatch:"",
|
||||||
materialFix:"",
|
materialFix:"",
|
||||||
|
@ -249,20 +273,37 @@ export default {
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
|
apiObjM:this.$API.wpm.wmaterial.list,
|
||||||
|
paramsM:{},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.paramsM.mtaskx =that.form.mtask;
|
||||||
|
that.paramsM.mgroup = that.mgroup;
|
||||||
|
// that.paramsM.query = "{id,batch,count,material,material_name,defect_name}";
|
||||||
|
that.paramsM.page =0;
|
||||||
|
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
|
||||||
|
that.paramsM.tag = 'canfix';
|
||||||
|
}else{
|
||||||
|
that.paramsM.material =that.materialIn;
|
||||||
|
that.paramsM.state =10;
|
||||||
|
that.paramsM.tag = 'todo';
|
||||||
|
}
|
||||||
if(that.codeText!==''){
|
if(that.codeText!==''){
|
||||||
let id = that.codeText.split('#')[1];
|
let id = that.codeText.split('#')[1];
|
||||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
that.codeBatch = res.batch;
|
that.codeBatch = res.batch;
|
||||||
this.getMaterial();
|
that.paramsM.search = that.codeBatch;
|
||||||
|
that.apiObjM = that.$API.wpm.wmaterial.list;
|
||||||
|
// this.getMaterial();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
that.getMaterial();
|
that.apiObjM = that.$API.wpm.wmaterial.list;
|
||||||
|
// that.getMaterial();
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
that.getMaterial();
|
that.apiObjM = that.$API.wpm.wmaterial.list;
|
||||||
|
// that.getMaterial();
|
||||||
}
|
}
|
||||||
if(that.is_fix){}else{
|
if(that.is_fix){}else{
|
||||||
this.getdefects();
|
this.getdefects();
|
||||||
|
@ -292,6 +333,8 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.mtaskx =that.form.mtask;
|
obj.mtaskx =that.form.mtask;
|
||||||
obj.mgroup = that.mgroup;
|
obj.mgroup = that.mgroup;
|
||||||
|
obj.search = that.codeBatch;
|
||||||
|
// obj.query = "{id,batch,count,material,material_name,defect_name}";
|
||||||
obj.page =0;
|
obj.page =0;
|
||||||
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
|
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
|
||||||
obj.tag = 'canfix';
|
obj.tag = 'canfix';
|
||||||
|
@ -413,6 +456,8 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.form.mlog = that.mlog;
|
that.form.mlog = that.mlog;
|
||||||
|
that.form.batch = that.selectObj.batch;
|
||||||
|
that.form.count_use = that.selectObj.count_cando;
|
||||||
if(that.mgroupMtype==10&&that.cellsList.length>0){
|
if(that.mgroupMtype==10&&that.cellsList.length>0){
|
||||||
that.form.count_json_from = that.cellsList;
|
that.form.count_json_from = that.cellsList;
|
||||||
}
|
}
|
||||||
|
@ -428,6 +473,8 @@ export default {
|
||||||
})
|
})
|
||||||
that.form.mlogbdefect = mlogbdefect;
|
that.form.mlogbdefect = mlogbdefect;
|
||||||
that.form.count_pn_jgqbl = count_pn_jgqbl;
|
that.form.count_pn_jgqbl = count_pn_jgqbl;
|
||||||
|
console.log(that.form);
|
||||||
|
console.log(that.selectObj);
|
||||||
that.$API.wpm.mlogb.in.req(that.form).then((res) => {
|
that.$API.wpm.mlogb.in.req(that.form).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.$emit("success");
|
that.$emit("success");
|
||||||
|
|
Loading…
Reference in New Issue