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