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

yangwl
A0010407 3 months ago
parent 5f2b0662fa
commit c85d77eb29

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

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

@ -314,12 +314,12 @@
/>
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="审核意见"
align="center"
prop="auditOpinion"
width="100"
/> -->
width="150"
/>
<el-table-column
label="报修单号"
align="center"
@ -1310,7 +1310,7 @@
<!-- 维修结果审核 -->
<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="0"></el-radio>
<row></row>
@ -1841,6 +1841,10 @@ export default {
auditOpinion: null,
//
orderCodes: [],
//
workStatus: [],
//
resultInspect: [],
//
queryParams: {
pageNum: 1,
@ -2212,6 +2216,8 @@ export default {
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.workId);
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.multiple = !selection.length;
},
@ -2452,6 +2458,7 @@ export default {
}
});
},
//
clickInspect() {
if (this.ids.length == 0 || this.ids == null) {
@ -2461,10 +2468,38 @@ export default {
});
return;
}
//
//
this.inspectDialog = true;
this.inspect = "1";
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.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) => {
this.getList();
this.inspectDialog = false;
this.$message({
if(response.code = 500 ){
this.$message({
message: response.msg,
type: "warning",
});
}else{
this.$message({
message: "提交成功!",
type: "success",
});
}
});
},
//

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

Loading…
Cancel
Save