fix:快速报工调整
This commit is contained in:
parent
a94c30deff
commit
45062e3333
|
@ -358,12 +358,6 @@
|
||||||
style="margin-right: 10px;"
|
style="margin-right: 10px;"
|
||||||
@click="table_out_check(scope.row)"
|
@click="table_out_check(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<!-- 单个 -->
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
v-if="mlogItem.material_out_&&mlogItem.material_out_.tracking==20||scope.row.material_out_tracking==20"
|
|
||||||
@click="table_out_check_single(scope.row,'outs')"
|
|
||||||
>详情</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
@change="formWminChange(wm_in)"
|
@change="formWminChange(wm_in)"
|
||||||
style="width: 100%;top: -7px;"
|
style="width: 100%;top: -7px;"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
<span style="color: red;line-height: 12px;font-size: 14px;">*请扫同一批次的物料码</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -55,7 +56,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
<el-form-item label="领用数量:">
|
<el-form-item label="领用数量:">
|
||||||
<el-input-number v-model="form.count_use" clearable style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.count_use" :disabled="materialTracking==20" style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='ladansi'||route_code=='yicifusi'||route_code=='ercifusi'||route_code=='zlybcl'">
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='ladansi'||route_code=='yicifusi'||route_code=='ercifusi'||route_code=='zlybcl'">
|
||||||
|
@ -160,11 +161,19 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
equipment: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择生产设备",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
wm_in: "",
|
wm_in: "",
|
||||||
route_code:"",
|
route_code:"",
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
materialTracking:10,
|
||||||
options: [],
|
options: [],
|
||||||
bwItemForms: [],
|
bwItemForms: [],
|
||||||
routeOptions: [],
|
routeOptions: [],
|
||||||
|
@ -262,18 +271,20 @@ export default {
|
||||||
})
|
})
|
||||||
that.wm_in = '';
|
that.wm_in = '';
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
that.routeOptions = [];
|
|
||||||
that.form.batch = arr[0].batch;
|
that.form.batch = arr[0].batch;
|
||||||
that.form.wm_in = arr[0].id;
|
that.form.wm_in = arr[0].id;
|
||||||
that.form.count_use = arr[0].count_cando;
|
that.form.count_use = arr[0].count_cando;
|
||||||
that.wm_in = arr[0].batch;
|
that.wm_in = arr[0].batch;
|
||||||
that.routeOriginOptions.forEach((item)=>{
|
that.materialTracking = arr[0].material_.tracking;
|
||||||
if(item.material_in==arr[0].material){
|
if(that.routeOptions.length==0){
|
||||||
that.routeOptions.push(item);
|
that.routeOriginOptions.forEach((item)=>{
|
||||||
|
if(item.material_in==arr[0].material){
|
||||||
|
that.routeOptions.push(item);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(that.routeOptions.length==1){
|
||||||
|
that.form.route = that.routeOptions[0].id;
|
||||||
}
|
}
|
||||||
})
|
|
||||||
if(that.routeOptions.length==1){
|
|
||||||
that.form.route = that.routeOptions[0].id;
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.$message.error("批次号不存在,或没有可操作数量");
|
that.$message.error("批次号不存在,或没有可操作数量");
|
||||||
|
@ -298,14 +309,11 @@ export default {
|
||||||
bwitem.number=res[index].number;
|
bwitem.number=res[index].number;
|
||||||
bwitem.wpr=res[index].id;
|
bwitem.wpr=res[index].id;
|
||||||
if(that.routeOptions.length==0){
|
if(that.routeOptions.length==0){
|
||||||
console.log('that.routeOriginOptions',that.routeOriginOptions);
|
|
||||||
console.log('res[index].material',res[index].material);
|
|
||||||
that.routeOriginOptions.forEach((item)=>{
|
that.routeOriginOptions.forEach((item)=>{
|
||||||
if(item.material_in==res[index].material){
|
if(item.material_in==res[index].material){
|
||||||
that.routeOptions.push(item);
|
that.routeOptions.push(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('that.routeOptions',that.routeOptions);
|
|
||||||
if(that.routeOptions.length==1){
|
if(that.routeOptions.length==1){
|
||||||
that.form.route = that.routeOptions[0].id;
|
that.form.route = that.routeOptions[0].id;
|
||||||
}
|
}
|
||||||
|
@ -318,6 +326,7 @@ export default {
|
||||||
if(that.form.batch==''||that.form.batch==batch){
|
if(that.form.batch==''||that.form.batch==batch){
|
||||||
that.form.batch = batch;
|
that.form.batch = batch;
|
||||||
that.form.wm_in = arr[0].id;
|
that.form.wm_in = arr[0].id;
|
||||||
|
that.materialTracking = arr[0].material_.tracking;
|
||||||
let arr1 = that.bwItemForms.filter((item)=>{
|
let arr1 = that.bwItemForms.filter((item)=>{
|
||||||
return item.number == bwitem.number;
|
return item.number == bwitem.number;
|
||||||
})
|
})
|
||||||
|
@ -351,10 +360,22 @@ export default {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.form.mgroup = that.mgroup;
|
that.form.mgroup = that.mgroup;
|
||||||
that.$API.wpm.mlog.quick.req(that.form).then((res) => {
|
that.$API.wpm.mlog.quick.req(that.form).then((res) => {
|
||||||
that.isSaveing = false;
|
if(that.bwItemForms.length>0){
|
||||||
that.$emit("success",res.mlog);
|
that.bwItemForms.forEach(item=>{
|
||||||
that.visible = false;
|
item.mlogb = res.mlogbin;
|
||||||
that.$message.success("操作成功");
|
})
|
||||||
|
that.$API.wpm.mlogbw.create.req(that.bwItemForms).then((res1) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success",res.mlog);
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success",res.mlog);
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
}
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue