Browse Source

修改各个功能打印标签功能

master
赵宏斌 5 months ago
parent
commit
56759c4c97
  1. 10
      src/views/modules/print/print_package_label-NOOREVIEW.js
  2. 10
      src/views/modules/production/bagLabels.vue
  3. 2
      src/views/modules/production/bagPrint.vue
  4. 2
      src/views/modules/production/generateReport.vue
  5. 63
      src/views/modules/production/reworkRecord.vue

10
src/views/modules/print/print_package_label-NOOREVIEW.js

@ -98,11 +98,11 @@ export function printPackageLabelNoPreview(printList) {
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(92,274,99,25,"BAG:"+printData.tcpValue+"g");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(92,274,99,25,"BAG:"+printData.tcpValue+"g");
// LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
// LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
if(printData.code==='CODE128') {
LODOP.ADD_PRINT_BARCODE(40,143,236,23, "128A",printData.partSpec);
}else {

10
src/views/modules/production/bagLabels.vue

@ -163,7 +163,7 @@ export default {
//
getPackagePrintDataList(params).then(({data}) => {
if (data && data.code === 0) {
data.rows[0].tcpValue=this.weight
data.rows[0].tcpValue = 0
printPackageLabelNoPreview(data.rows);
this.searchData.flag = '';
this.flag = false
@ -424,10 +424,10 @@ export default {
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"
:min="1" v-model="number" @keyup.enter.native="selectBySeqNo"></el-input-number>
</el-form-item>
<el-form-item label="重量">
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"
:min="1" v-model="weight" @keyup.enter.native="selectBySeqNo"></el-input-number>
</el-form-item>
<!-- <el-form-item label="重量">-->
<!-- <el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"-->
<!-- :min="1" v-model="weight" @keyup.enter.native="selectBySeqNo"></el-input-number>-->
<!-- </el-form-item>-->
</el-form>
<div style="height: 20px;width: 100%"></div>
<div style="text-align: center;margin-bottom: 5px">

2
src/views/modules/production/bagPrint.vue

@ -35,7 +35,7 @@ export default {
packagePrintDataList(row){
packagePrintDataList(row).then(({data}) => {
if (data && data.code === 0) {
data.rows[0].tcpValue = 1
data.rows[0].tcpValue = 0
printPackageLabelNoPreview(data.rows);
} else {
this.$message.warning(data.msg)

2
src/views/modules/production/generateReport.vue

@ -962,7 +962,7 @@
// }
getPackagePrintDataList(params).then(({data}) => {
if (data && data.code === 0) {
data.rows[0].tcpValue = 1
data.rows[0].tcpValue = 0
printPackageLabelNoPreview(data.rows);
}
})

63
src/views/modules/production/reworkRecord.vue

@ -6,11 +6,17 @@ import {
saveRework,
getRework,
removeRework,
cancelRework, queryOperator, getPackagePrintDataList, getSOScheduleRoutingDataPrint, checkIsPacking
cancelRework,
queryOperator,
getPackagePrintDataList,
getSOScheduleRoutingDataPrint,
checkIsPacking,
packagePrintDataList
} from '../../../api/production/generateReport'
import dayjs from 'dayjs'
import decimal, {Decimal} from 'decimal.js'
import {printPackageLabelNoPreview} from "../print/print_package_label-NOOREVIEW";
import {format} from "nightwatch/lib/util/utils";
export default {
components:{
chooseList,
@ -41,7 +47,6 @@ export default {
site:this.$store.state.user.site,
type:undefined,
},
weight:0,
soScheduleRouting: {},
printDataList: [],
reportWorkDialog:false,
@ -130,6 +135,21 @@ export default {
})
})
},
printLabel2(row){
// this.$message.success(row)
row.printQty = row.qualifiedQty
packagePrintDataList(row).then(({data}) => {
this.$message.success(data)
if (data && data.code === 0) {
data.rows[0].tcpValue = 0
data.rows[0].inspector = row.operatorId
// data.rows[0].receiveDate = row.createTime
printPackageLabelNoPreview(data.rows)
} else {
this.$message.warning(data.msg)
}
})
},
clickReportWork(row,type){
this.saveRework = {...row}
this.saveRework.reworkStartDate = new Date()
@ -213,6 +233,12 @@ export default {
if (data && data.code === 0){
this.$message.success(data.msg)
this.reportWorkDialog = false;
console.log("***"+this.saveRework.seqNo)
//
this.unitQty = this.saveRework.qualifiedQty
this.createTime2 = this.saveRework.createTime2
this.operatorId = this.saveRework.operatorId
this.getSOScheduleRoutingData(this.saveRework.seqNo)
this.selectRework();
}else {
this.$alert(data.msg, '错误信息', {
@ -253,7 +279,7 @@ export default {
this.soScheduleRouting.operatorName2 = data.data.operatorName;
this.soScheduleRouting.approveQty2 = data.data.qtyApprove;
}
this.printLabel()
this.printLabel(seqNo)
} else {
this.$message.warning(data.msg)
}
@ -276,11 +302,11 @@ export default {
this.soScheduleRouting = {}
})
},
printLabel() {
if (!this.saveRework.seqNo ||this.saveRework.seqNo=='' || this.saveRework.seqNo == null){
this.$message.warning("请输入描派工单号");
return;
}
printLabel(seqNo) {
// if (!this.saveRework.seqNo || this.saveRework.seqNo=='' || this.saveRework.seqNo == null){
// this.$message.warning("");
// return;
// }
if (!this.soScheduleRouting.site) {
this.$message.warning("请先扫描派工单号")
return
@ -293,7 +319,7 @@ export default {
previousSeqNo: this.soScheduleRouting.previousSeqNo,
site: this.soScheduleRouting.site,
orderNo: this.soScheduleRouting.orderNo,
seqNo: this.saveRework.seqNo
seqNo: seqNo
}
this.printPackageLabelNoPreview(params)
},
@ -304,13 +330,12 @@ export default {
}
//
getPackagePrintDataList(params).then(({data}) => {
this.printDataList = data.rows
this.printDataList.forEach(item => {
item.receiveDate = this.saveRework.createTime2
item.inspector = this.saveRework.operatorId
item.unitQty = this.saveRework.qtyApprove
item.tcpValue = this.weight
item.receiveDate = this.createTime2
item.inspector = this.operatorId
item.unitQty = this.unitQty
item.tcpValue = 0
})
if (data && data.code === 0) {
printPackageLabelNoPreview(this.printDataList);
@ -329,7 +354,6 @@ export default {
let params = {
seqNo: this.saveRework.seqNo
}
let seqNo = this.saveRework.seqNo
getRework(params).then(({data})=>{
if (data && data.code === 0){
this.seqNoReworkRecordDialog = false;
@ -340,8 +364,6 @@ export default {
this.saveRework.productionTime = new Decimal(dayjs(new Date()).diff(this.saveRework.createTime,'hour',true)).toFixed(2, Decimal.ROUND_HALF_UP)
this.saveRework.productionTime = new Decimal(this.saveRework.productionTime).toSignificantDigits()
})
//
this.getSOScheduleRoutingData(seqNo)
this.reportWorkDialog = true
}else {
this.$alert(data.msg, '错误信息', {
@ -483,10 +505,6 @@ export default {
<el-form-item label="派工单号" prop="seqNo">
<el-input ref="seqNoR" type="number" v-model="saveRework.seqNo" @keydown.native.enter="getRework"></el-input>
</el-form-item>
<el-form-item label="打印标签-重量">
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"
:min="1" v-model="weight"></el-input-number>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="getRework">确定</el-button>
@ -782,13 +800,14 @@ export default {
<el-table-column
header-align="center"
align="center"
width="100"
width="125"
label="操作">
<template slot-scope="scope" class="foo_container">
<a style="cursor: pointer;" v-if="scope.row.reworkStatus === '返工中'" @click="clickReportWork(scope.row)">报工</a>
<a style="cursor: pointer;" v-if="scope.row.reworkStatus === '已结束'" @click="cancelReportWork(scope.row)">取消</a>
<a style="cursor: pointer;" @click="removeReportWork(scope.row)">删除</a>
<a style="cursor: pointer;" @click="clickReportWork(scope.row,0)">详情</a>
<a style="cursor: pointer;" @click="printLabel2(scope.row)">补打</a>
</template>
</el-table-column>
<el-table-column

Loading…
Cancel
Save