2024-08-15 mes-领料单-打印生产物料+打印反冲 条码+设备审核意见优化

yangwl
A0010407 4 months ago
parent 5f2b0662fa
commit c85d77eb29

@ -46,6 +46,7 @@
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsbarcode": "^3.11.6",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"less": "^3.9.0", "less": "^3.9.0",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",

@ -897,6 +897,9 @@
<el-descriptions-item label="报修去向">{{ <el-descriptions-item label="报修去向">{{
form.repairDestination form.repairDestination
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="审核意见">{{
form.auditOpinion
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions <el-descriptions

@ -314,12 +314,12 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column <el-table-column
label="审核意见" label="审核意见"
align="center" align="center"
prop="auditOpinion" prop="auditOpinion"
width="100" width="150"
/> --> />
<el-table-column <el-table-column
label="报修单号" label="报修单号"
align="center" align="center"
@ -1310,7 +1310,7 @@
<!-- 维修结果审核 --> <!-- 维修结果审核 -->
<el-dialog title="维修结果审核" :visible.sync="inspectDialog" width="30%"> <el-dialog title="维修结果审核" :visible.sync="inspectDialog" width="30%">
<el-radio v-model="inspect" label="2"></el-radio> <!-- <el-radio v-model="inspect" label="2"></el-radio> -->
<el-radio v-model="inspect" label="1"></el-radio> <el-radio v-model="inspect" label="1"></el-radio>
<el-radio v-model="inspect" label="0"></el-radio> <el-radio v-model="inspect" label="0"></el-radio>
<row></row> <row></row>
@ -1841,6 +1841,10 @@ export default {
auditOpinion: null, auditOpinion: null,
// //
orderCodes: [], orderCodes: [],
//
workStatus: [],
//
resultInspect: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -2212,6 +2216,8 @@ export default {
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.workId); this.ids = selection.map((item) => item.workId);
this.orderCodes = selection.map((item) => item.workCode); this.orderCodes = selection.map((item) => item.workCode);
this.workStatus = selection.map((item) => item.workStatus);
this.resultInspect = selection.map((item) => item.resultInspect);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -2452,6 +2458,7 @@ export default {
} }
}); });
}, },
// //
clickInspect() { clickInspect() {
if (this.ids.length == 0 || this.ids == null) { if (this.ids.length == 0 || this.ids == null) {
@ -2461,10 +2468,38 @@ export default {
}); });
return; return;
} }
//
// let workStatusMsg = true;
this.workStatus.forEach((item) => {
if(item == '0'){
workStatusMsg = false;
}
});
let resultInspectMsg = true;
this.resultInspect.forEach((item) => {
if(item == '1'){
resultInspectMsg = false;
}
});
if (workStatusMsg && resultInspectMsg) {
this.inspectDialog = true; this.inspectDialog = true;
this.inspect = "1"; this.inspect = "1";//
this.auditOpinion = null;//
}else if(workStatusMsg == false){
this.$message({
message: "您选择的维修工单存在未完成的工单!",
type: "warning",
});
return;
}else if(resultInspectMsg == false){
this.$message({
message: "您选择的维修工单存在已经审核过的工单,不能再次审核!",
type: "warning",
});
return;
}
}, },
// //
@ -2479,10 +2514,17 @@ export default {
checkRepairWorkOrder(data).then((response) => { checkRepairWorkOrder(data).then((response) => {
this.getList(); this.getList();
this.inspectDialog = false; this.inspectDialog = false;
if(response.code = 500 ){
this.$message({
message: response.msg,
type: "warning",
});
}else{
this.$message({ this.$message({
message: "提交成功!", message: "提交成功!",
type: "success", type: "success",
}); });
}
}); });
}, },
// //

@ -233,8 +233,13 @@
<el-form :model="form"> <el-form :model="form">
<!-- 表头-工单信息 --> <!-- 表头-工单信息 -->
<el-row class="my-print-head"> <div class="my-print-barcode" :width="shengchan?'821px':'721px'">
<svg id="barcode"></svg>
</div>
<el-row>
<div class="my-print-head">
<el-col>生产订单备料单({{printData.printTitle}})</el-col> <el-col>生产订单备料单({{printData.printTitle}})</el-col>
</div>
</el-row> </el-row>
<!-- 导航栏 --> <!-- 导航栏 -->
<el-row class="my-print-nav"> <el-row class="my-print-nav">
@ -297,6 +302,8 @@
import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "@/api/mes/prepare"; import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "@/api/mes/prepare";
import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail"; import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail";
import moment from "moment/moment"; import moment from "moment/moment";
import JsBarcode from 'jsbarcode';
// import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail"; // import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail";
// import Detail from "./prepareDetail.vue"; // import Detail from "./prepareDetail.vue";
export default { export default {
@ -323,6 +330,7 @@ export default {
factory: null, factory: null,
productDate: null, productDate: null,
workTable: [], workTable: [],
barcode:null,//
}, },
printDialogVisible: false, printDialogVisible: false,
// //
@ -400,6 +408,9 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
mounted() {
this.generateBarcode();
},
methods: { methods: {
// //
productCodeFormate(row, column, cellValue){ productCodeFormate(row, column, cellValue){
@ -463,6 +474,8 @@ export default {
this.printData.prodLineCode = response.data.mesPrepare.prodLineCode this.printData.prodLineCode = response.data.mesPrepare.prodLineCode
this.refreshNewWorkerTable = true // refreshProTabletrue this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false this.newWorkerLoading = false // false
this.generateBarcode(this.selectPrepare[0].workorderCode); //
}) })
}, },
// () // ()
@ -503,8 +516,21 @@ export default {
this.printData.workTable = chunkedArray; this.printData.workTable = chunkedArray;
this.refreshNewWorkerTable = true // refreshProTabletrue this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false this.newWorkerLoading = false // false
this.generateBarcode(this.printData.printDate); //
}) })
}, },
//
generateBarcode(barcode){
JsBarcode("#barcode", barcode, {
format: "CODE128",
height:75,
width:2,
displayValue: true,
});
},
// //
indexMethod(index){ indexMethod(index){
return index+1 ; return index+1 ;
@ -629,10 +655,16 @@ export default {
</script> </script>
<style> <style>
.my-print-head { .my-print-head {
margin-top: 20px;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
.my-print-barcode {
margin-top: 0px;
margin-right: 40px;
text-align: right;
}
.my-print-nav { .my-print-nav {
margin-top: 15px; margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;

Loading…
Cancel
Save