|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<div class="headTitle">京源环保生产管理系统</div>
|
|
|
|
|
|
|
|
|
|
<div class="chartBox chartBox1">
|
|
|
|
|
<div class="title">工单信息</div>
|
|
|
|
|
<div class="title">生产详细信息</div>
|
|
|
|
|
<div class="chart">
|
|
|
|
|
<div class="form">
|
|
|
|
|
|
|
|
|
@ -25,8 +25,10 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="text-align: center">
|
|
|
|
|
<el-button type="primary" @click="getMaterials" :disabled="!form.planCode">领料</el-button>
|
|
|
|
|
<el-button :disabled="form.planDetailStatus === '已完成' || !form.planDetailStatus" type="primary" @click="finish">完成</el-button>
|
|
|
|
|
<el-button type="primary" @click="getMaterials">领料</el-button>
|
|
|
|
|
<el-button v-if="($route.query && $route.query.id) === '2'" type="info" @click="handleBindBarcode">绑定</el-button>
|
|
|
|
|
<el-button v-if="($route.query && $route.query.id) === '2'" type="warning" @click="handleRawBack">返库</el-button>
|
|
|
|
|
<el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish">完成</el-button>
|
|
|
|
|
<el-popover
|
|
|
|
|
v-if="($route.query && $route.query.id) === '2'"
|
|
|
|
|
v-model="assignModel"
|
|
|
|
@ -45,6 +47,7 @@
|
|
|
|
|
<el-button slot="reference" type="success">下发
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-popover>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -297,6 +300,43 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="bindBarcodeVisible"
|
|
|
|
|
title="柜体绑定"
|
|
|
|
|
width="40%">
|
|
|
|
|
<el-form ref="bindBarcodeForm" :model="bindBarcodeForm" :rules="bindBarcodeRules" label-width="80px">
|
|
|
|
|
<el-form-item label="成品条码" prop="productBarcode">
|
|
|
|
|
<el-input v-model="bindBarcodeForm.productBarcode"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料条码" prop="materialBarcode">
|
|
|
|
|
<el-input v-model="bindBarcodeForm.materialBarcode"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitBindBarcode">确 定</el-button>
|
|
|
|
|
<el-button @click="cancelBindBarcode">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="rawBackVisible"
|
|
|
|
|
title="柜体返库"
|
|
|
|
|
width="40%">
|
|
|
|
|
<el-form ref="rawBackForm" :model="rawBackForm" :rules="rawBackRules" label-width="80px">
|
|
|
|
|
<el-form-item label="物料条码" prop="materialBarcode">
|
|
|
|
|
<el-input v-model="rawBackForm.materialBarcode"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitRawBack">确 定</el-button>
|
|
|
|
|
<el-button @click="cancelRawBack">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-dialog :visible.sync="assignModel" title="工位选择" width="80%">-->
|
|
|
|
|
|
|
|
|
|
<!-- <el-table :data="stationData" highlight-current-row-->
|
|
|
|
@ -343,7 +383,9 @@ import {
|
|
|
|
|
startNextProductPlanDetail,
|
|
|
|
|
applyRawOutstock,
|
|
|
|
|
getStockTotal,
|
|
|
|
|
getWarehouses
|
|
|
|
|
getWarehouses,
|
|
|
|
|
bindBarcode,
|
|
|
|
|
applyRawBack
|
|
|
|
|
} from "@/api/board";
|
|
|
|
|
|
|
|
|
|
const setState = (e) => {
|
|
|
|
@ -406,6 +448,30 @@ export default {
|
|
|
|
|
warehouseList: [],
|
|
|
|
|
searchMaterialValue: '',
|
|
|
|
|
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
|
|
|
|
|
|
|
|
|
|
bindBarcodeVisible: false,
|
|
|
|
|
bindBarcodeForm: {
|
|
|
|
|
productBarcode: null,
|
|
|
|
|
materialBarcode: null
|
|
|
|
|
},
|
|
|
|
|
bindBarcodeRules: {
|
|
|
|
|
productBarcode: [
|
|
|
|
|
{ required: true, message: "成品条码不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
materialBarcode: [
|
|
|
|
|
{ required: true, message: "物料条码不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
rawBackVisible: false,
|
|
|
|
|
rawBackForm: {
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
},
|
|
|
|
|
rawBackRules: {
|
|
|
|
|
materialBarcode: [
|
|
|
|
|
{ required: true, message: "物料条码不能为空", trigger: "blur" }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
@ -614,6 +680,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.form = data.data || {}
|
|
|
|
|
this.form.materialId = val.materialId
|
|
|
|
|
this.form.materialCode = val.materialCode
|
|
|
|
|
this.form.materialName = val.materialName
|
|
|
|
|
this.form.planDetailStatus = setState(data.data.planDetailStatus)
|
|
|
|
|
this.getInfo(val)
|
|
|
|
@ -623,6 +690,7 @@ export default {
|
|
|
|
|
const {data} = await getNewestProductPlanDetail({planId: val.planId})
|
|
|
|
|
this.form = data || {}
|
|
|
|
|
this.form.materialId = val.materialId
|
|
|
|
|
this.form.materialCode = val.materialCode
|
|
|
|
|
this.form.materialName = val.materialName
|
|
|
|
|
this.form.planDetailStatus = setState(data.planDetailStatus)
|
|
|
|
|
this.getInfo(val)
|
|
|
|
@ -1018,7 +1086,7 @@ export default {
|
|
|
|
|
warehouseId: this.form1.warehouseId,
|
|
|
|
|
materialName: val
|
|
|
|
|
}).then(e => {
|
|
|
|
|
this.$set(this.form1,'wmsRawOutstockDetailList',e.data.map(r => {
|
|
|
|
|
this.form1.wmsRawOutstockDetailList = e.data.map(r => {
|
|
|
|
|
return {
|
|
|
|
|
materialId: r.materialId,
|
|
|
|
|
materialCode: r.materialCode,
|
|
|
|
@ -1027,8 +1095,7 @@ export default {
|
|
|
|
|
unavailableAmount: r.occupyAmount + r.frozenAmount,
|
|
|
|
|
planAmount: r.planAmount
|
|
|
|
|
}
|
|
|
|
|
}))
|
|
|
|
|
console.log(this.form1)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -1057,7 +1124,76 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
assignClick() {
|
|
|
|
|
this.assignModel = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
resetBindBarcode() {
|
|
|
|
|
this.bindBarcodeForm = {
|
|
|
|
|
productBarcode: null,
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
planCode: this.form.planCode,
|
|
|
|
|
planDetailCode: this.form.planDetailCode
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("bindBarcodeForm");
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 柜体绑定按钮操作 */
|
|
|
|
|
handleBindBarcode() {
|
|
|
|
|
this.resetBindBarcode();
|
|
|
|
|
this.bindBarcodeVisible = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submitBindBarcode(){
|
|
|
|
|
this.$refs["bindBarcodeForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
bindBarcode(this.bindBarcodeForm).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("绑定成功");
|
|
|
|
|
this.cancelBindBarcode();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelBindBarcode(){
|
|
|
|
|
this.bindBarcodeVisible = false;
|
|
|
|
|
this.resetBindBarcode();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
resetRawBack() {
|
|
|
|
|
this.rawBackForm = {
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("rawBackForm");
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 成品入库按钮操作 */
|
|
|
|
|
handleRawBack(scope) {
|
|
|
|
|
this.resetRawBack();
|
|
|
|
|
this.rawBackVisible = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitRawBack(){
|
|
|
|
|
this.$refs["rawBackForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
applyRawBack(this.rawBackForm).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("申请成功");
|
|
|
|
|
this.cancelRawBack();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelRawBack(){
|
|
|
|
|
this.rawBackVisible = false;
|
|
|
|
|
this.resetRawBack();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|