Browse Source

报工部分代码修改

master
DouDou 2 years ago
parent
commit
1d4ccecb62
  1. 4
      src/api/scheduleReport/com_die_cutting_report.js
  2. 4
      src/api/scheduleReport/com_fqc_report.js
  3. 34
      src/views/modules/label/print_die_cutting_label.js
  4. 35
      src/views/modules/label/print_fqc_label.js
  5. 27
      src/views/modules/scheduleReport/com_die_cutting_report.vue
  6. 78
      src/views/modules/scheduleReport/com_fqc_report.vue
  7. 8
      src/views/modules/scheduleReport/com_separate_roll.vue

4
src/api/scheduleReport/com_die_cutting_report.js

@ -15,4 +15,8 @@ export const getSoFinalRollsByCon = data => createAPI('schedule/getSoFinalRollsB
// 删除成品卷
export const deleteSoFinalRoll = data => createAPI('schedule/deleteSoFinalRoll', 'POST', data)
// 获取模切工站的打印信息
export const getDieCuttingFinalRollPrintData = data => createAPI('schedule/getDieCuttingFinalRollPrintData', 'POST', data)

4
src/api/scheduleReport/com_fqc_report.js

@ -12,3 +12,7 @@ export const scanFinalRollNo = data => createAPI('schedule/scanFinalRollNo', 'PO
// 取消检验成品卷
export const cancelCheckSoFinalRoll = data => createAPI('schedule/cancelCheckSoFinalRoll', 'POST', data)
// 获取fqc入库的标签
export const getFqcFinalRollPrintData = data => createAPI('schedule/getFqcFinalRollPrintData', 'POST', data)

34
src/views/modules/label/print_die_cutting_label.js

@ -0,0 +1,34 @@
/*调用js打印标签*/
import getLodop from '@/utils/LodopFuncs.js'
/*打印材料卷标签*/
export function printDieCuttingLabel(printList) {
const LODOP = getLodop()
if (LODOP) {
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,660,570,"");
LODOP.ADD_PRINT_BARCODE(5,5,105,105,"QRCode", printData.rollNo);
LODOP.ADD_PRINT_TEXT(110,10,245,25,"卷号: "+printData.rollNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(10,105,140,20,"工单号: "+printData.orderNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(35,105,140,20,"料号: "+printData.partNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(135,10,245,40,"描述: "+printData.partDesc);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(60,105,140,20,"数量: "+printData.rollQty);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(85,105,140,20,"操作人: admin"+printData.createdBy);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(180,10,250,25,"下机时间: "+printData.createdDate);
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
}
LODOP.PRINT_DESIGN();
// LODOP.PREVIEW();
// LODOP.PRINT();
console.log("操作成功!")
}
}

35
src/views/modules/label/print_fqc_label.js

@ -0,0 +1,35 @@
/*调用js打印标签*/
import getLodop from '@/utils/LodopFuncs.js'
/*打印材料卷标签*/
export function printFqcLabel(printData) {
const LODOP = getLodop()
if (LODOP) {
//循环调用打印机
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,800,1250,"");
LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE",1);
LODOP.ADD_PRINT_BARCODE(5,15,160,160,"QRCode",printData.qrCode);
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(140,15,300,20,"发料时间: "+printData.outTime);
LODOP.ADD_PRINT_TEXT(160,15,300,20,"入库时间: "+printData.stockTime);
LODOP.ADD_PRINT_TEXT(180,15,300,20,"原料时间: "+printData.materialTime);
LODOP.ADD_PRINT_TEXT(200,15,300,20,"系统批次: "+printData.systemBatchNo);
LODOP.ADD_PRINT_TEXT(220,15,300,20,"原料批号: "+printData.rawMaterialBatchNo);
LODOP.ADD_PRINT_TEXT(240,15,300,20,"有效期: "+printData.expiredTime);
LODOP.ADD_PRINT_TEXT(260,15,300,20,"回温次数: "+printData.reheatingNums);
LODOP.ADD_PRINT_TEXT(280,15,300,20,"暴露时间: "+printData.exposureHours);
LODOP.ADD_PRINT_TEXT(310,108,123,36,"阶段 "+printData.phaseDesc);
LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
LODOP.ADD_PRINT_TEXT(350,195,120,20,"工单号: "+printData.orderNo);
LODOP.ADD_PRINT_TEXT(380,195,120,20,"检验员: "+printData.fqcBy);
LODOP.ADD_PRINT_TEXT(380,40,150,20,"800#: "+printData.partNo);
LODOP.ADD_PRINT_TEXT(410,195,120,20,"数量: "+printData.rollQty);
LODOP.ADD_PRINT_TEXT(410,40,150,20,"客户料号:"+printData.customerPartNo);
LODOP.PRINT_DESIGN();
// LODOP.PREVIEW();
// LODOP.PRINT();
console.log("操作成功!")
}
}

27
src/views/modules/scheduleReport/com_die_cutting_report.vue

@ -120,6 +120,9 @@
<a class="customer-a" v-if="scope.row.statusCode === 0"
@click="deleteFinalRollConfirm(scope.row)"
>删除</a>
<a class="customer-a" v-if="scope.row.statusCode === 0"
@click="reprintFinalRoll(scope.row)"
>补打标签</a>
</template>
</el-table-column>
</el-table>
@ -147,11 +150,13 @@ import {
getSfdcRollOpsByCon,
getSoFinalRollsByCon,
deleteSoFinalRoll,
getDieCuttingFinalRollPrintData,
} from "@/api/scheduleReport/com_die_cutting_report.js";
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/scheduleReport/print_roll_label.js"
printDieCuttingLabel,
} from "@/views/modules/label/print_die_cutting_label.js"
import comScanMaterial from './com_scan_material' /* 扫描卷的组件 */
import comSeparateRoll from "./com_separate_roll";
@ -1086,14 +1091,16 @@ export default {
});
},
/*开始调机modal*/
startProduceModal() {
//1.
//checkProduceButton('startProduceFlag');
//
this.$nextTick(() => {
this.showProduceFlag = true;
this.$refs.comStartProduce.init(this.scheduleData)
/*补打标签*/
reprintFinalRoll(printRow) {
//
getDieCuttingFinalRollPrintData(printRow).then(({data}) =>{
if(data.code == 200) {
//
printDieCuttingLabel(data.printList);
}else {
this.$message.error(data.msg);
}
});
},

78
src/views/modules/scheduleReport/com_fqc_report.vue

@ -86,6 +86,9 @@
<a class="customer-a" v-if="scope.row.statusCode === 1"
@click="confirmCancelCheckFinalRoll(scope.row)"
>取消检验</a>
<a class="customer-a" v-if="scope.row.statusCode === 1"
@click="reprintFinalRoll(scope.row)"
>补打标签</a>
</template>
</el-table-column>
</el-table>
@ -103,14 +106,17 @@ import {
getSoFinalRollsByCon,
scanFinalRollNo,
cancelCheckSoFinalRoll,
getFqcFinalRollPrintData,
} from "@/api/scheduleReport/com_fqc_report.js";
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/scheduleReport/print_roll_label.js"
printDieCuttingLabel,
} from "@/views/modules/label/print_fqc_label.js"
import comScanMaterial from './com_scan_material' /* 扫描卷的组件 */
import comSeparateRoll from "./com_separate_roll";
import {printFqcLabel} from "../label/print_fqc_label";
var functionId = 'C10000004';
export default {
@ -825,6 +831,8 @@ export default {
//
scanFinalRollNo(this.searchData).then(({data}) => {
if (data.code == 200){
//
printFqcLabel(data.printRow);
this.getSoFinalList();
this.searchData.rollNo = '';
}else{
@ -917,69 +925,19 @@ export default {
});
},
/*结束使用 工具确认功能*/
warnFinishToolConfirm(toolRow) {
this.$confirm(this.labels.sureEndThisToolUsed, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//使
this.finishToolOperation(toolRow);
});
},
/*执行删除sfdcRolls的数据功能*/
finishToolOperation(toolRow) {
let toolData = {
'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'histSeqNo': toolRow.histSeqNo, 'toolInstanceId': toolRow.toolInstanceId
};
//
processFinishTool(toolData).then(({data}) => {
//
if (data.code == 500) {
/*补打标签*/
reprintFinalRoll(printRow) {
//
getFqcFinalRollPrintData(printRow).then(({data}) =>{
if(data.code == 200) {
//
printFqcLabel(data.printRow);
}else {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.refreshPageData();
}
});
},
/*结束使用 材料确认功能*/
warnFinishMaterialWithNoRemainderConfirm(materialRow) {
this.$confirm(this.labels.sureEndThisToolUsed, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//使
this.finishMaterialWithNoRemainderOperation(materialRow);
});
},
/*执行结束使用 材料的数据功能*/
finishMaterialWithNoRemainderOperation(materialRow) {
let materialData = {
'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'histSeqNo': materialRow.histSeqNo, 'rollNo': materialRow.rollNo
};
//使
finishMaterialWithNoRemainder(materialData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.refreshPageData();
}
});
},
},
created() {

8
src/views/modules/scheduleReport/com_separate_roll.vue

@ -37,8 +37,8 @@ import {
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/scheduleReport/print_roll_label.js";
printDieCuttingLabel,
} from "@/views/modules/label/print_die_cutting_label.js"
var functionId = 'C10000003';
@ -179,6 +179,7 @@ export default {
languageCode: this.$i18n.locale,
objectType: 'label'
},
printList: [],
}
},
methods: {
@ -280,6 +281,9 @@ export default {
//
this.pageData.rollQty = this.pageData.standardRollQty;
this.pageData.rollNums = 1;
this.printList = data.printList;
//
printDieCuttingLabel(this.printList);
} else {
this.$message.error(data.msg);
}

Loading…
Cancel
Save