diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue index b17f9a03..f389e4c3 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue @@ -561,7 +561,7 @@ export default { }, //重新打印-门板 handleUpdate(row) { - var MBVin1 = []; + var MBVin1 = []; let myalert = ""; //声明变量,其变量必须在此声明后使用 if (row) { //单行 diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue index 83226746..a06b1171 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue @@ -99,9 +99,16 @@ type="success" icon="el-icon-s-shop" @click="handleUpdate()" - >重打打印当前页 + 打印全部 - @@ -244,6 +251,7 @@ export default { customerInfo: { printType: "1", productLine: "", + partType: "", }, // 高级搜索 filterObj: { @@ -261,6 +269,8 @@ export default { HostSN: undefined, beginPrintDate: undefined, endPrintDate: undefined, + beginVin: undefined, + endVin: undefined, }, listPLQuery: { BillType: 2, @@ -344,21 +354,16 @@ export default { tempsTabs.push({ label: "单据顺号", prop: "billSerialNum", width: 120 }); tempsTabs.push({ label: "起始顺序号", prop: "beginHostSN", width: 120 }); tempsTabs.push({ label: "结束顺序号", prop: "endHostSN", width: 120 }); - tempsTabs.push({ - label: "左或右", - prop: "billLocation", - width: 150, - }); - tempsTabs.push({ - label: "供应商厂家代码", - prop: "providerCode", - width: 150, - }); tempsTabs.push({ label: "零件类型", prop: "partType", width: 180, }); + tempsTabs.push({ + label: "左或右", + prop: "billLocation", + width: 150, + }); tempsTabs.push({ label: "器具容量", prop: "capacity", @@ -379,7 +384,6 @@ export default { prop: "productLine", width: 120, }); - tempsTabs.push({ label: "起始底盘号", prop: "beginVin", @@ -390,6 +394,11 @@ export default { prop: "endVin", width: 160, }); + tempsTabs.push({ + label: "供应商厂家代码", + prop: "providerCode", + width: 150, + }); return tempsTabs; }, ...mapGetters(["userInfo"]), //获取当前用户信息 @@ -425,7 +434,7 @@ export default { ifr.setAttribute("name", "printPdf" + date); ifr.src = window.URL.createObjectURL(blob); document.body.appendChild(ifr); - this.doPrint("printPdf" + date);alert("ifr.src:"+JSON.stringify(ifr.src)) + this.doPrint("printPdf" + date); //alert("ifr.src:"+JSON.stringify(ifr.src)) window.URL.revokeObjectURL(ifr.src); // 释放URL 对象 this.dialogFormVisible = false; }, @@ -463,7 +472,7 @@ export default { if (this.listQuery.Vin != "") { this.listQuery.Vin = this.listQuery.Vin; } - this.listQuery.partType = this.listQuery.partType; + //this.listQuery.partType = this.listQuery.partType; var getdate5 = JSON.stringify(this.PrintTimeValue); if (getdate5 != "[]") { this.listQuery.beginPrintDate = this.PrintTimeValue @@ -487,20 +496,14 @@ export default { this.listQuery ) .then((response) => { - response.items.forEach((item)=>{ - if(item.printType == 0) - { + response.items.forEach((item) => { + if (item.printType == 0) { item.printType = "正常打印"; - } - else if(item.printType == 1) - { + } else if (item.printType == 1) { item.printType = "重打"; - } - else - { + } else { item.printType = "补打"; } - }); this.list = response.items; this.totalCount = response.totalCount; @@ -515,26 +518,167 @@ export default { }, //重新打印-门板 handleUpdate(row) { - var beginVin1 = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - beginVin1.push(row.id); - myalert = row.name; - } else { - //多选 - this.multipleSelection.forEach((element) => { - let id = element.id; - beginVin1.push(id); + this.isEdit = true; + if (this.multipleSelection.length != 1) { + this.$message({ + message: "重新打印必须选择单行,不能多选!", + type: "warning", }); - myalert = "选中项"; + return; + } else { + //this.fetchData(this.multipleSelection[0].id); + //重新打印方法 + let beginVin1 = this.multipleSelection[0].id; + let ZHBId = [beginVin1]; + var params = { + printType: "1", + productLine: this.customerInfo.productLine, + reportIdList: ZHBId, + partType: this.multipleSelection[0].partType, + dataResultType: "2", + }; + console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); + this.$axios + .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + .then((response) => { + console.log("柱护版-打印返回的状态:" + response.status); + const index = this.list.indexOf(row); + if (response.status === false) { + this.$message({ + message: response.message, + type: "error", + }); + return; + } else { + this.fileQuery.dataname = JSON.stringify(response.item); + console.log( + "柱板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" + + JSON.stringify(this.fileQuery.dataname) + ); + + debugger + let partNum = 0; + if(params.partType == "A上C上") + { + partNum = 1; + } + else if(params.partType == "B柱下") + { + partNum = 2; + } + else if(params.partType == "A柱下A中") + { + partNum = 3; + } + else if(params.partType == "B柱上") + { + partNum = 4; + } + else if(params.partType == "D柱") + { + partNum = 5; + } + else if(params.partType == "后轮上装饰板") + { + partNum = 6; + } + this.$axios + .posts( + "/Handlers/Handler1.ashx?report=zhuhuban&returnfile="+partNum, + qs.stringify(this.fileQuery) + ) + .then((response) => { + this.printpdf(response); //打印我文件流 + }); + this.getList(); + } + }) + .catch(() => {}); } - //let beginVin1 = this.multipleSelection[0].id; - let ZHBId = beginVin1; + // var ZHBVin1 = []; + // ZHBVin1.push(row.id); + // let myalert = ""; //声明变量,其变量必须在此声明后使用 + // this.isEdit = true; + // if (this.multipleSelection.length != 1) { + // this.$message({ + // message: "重新打印必须选择单行,不能多选!", + // type: "warning", + // }); + // return; + // } else { + // // //多选 + // // this.$message({ + // // message: "重新打印必须选择单行,不能多选!", + // // type: "warning", + // // }); + // // return; + // // this.multipleSelection.forEach((element) => { + // // let id = element.id; + // // beginVin1.push(id); + // // }); + // // myalert = "选中项"; + + // //let beginVin1 = this.multipleSelection[0].id; + + // let ZHBId = ZHBVin1; + + // var params = { + // printType: 1, + // productLine: this.customerInfo.productLine, + // reportIdList: ZHBId, + // }; + // console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); + // this.$axios + // .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + // .then((response) => { + // console.log("柱护版-打印返回的状态:" + response.status); + // const index = this.list.indexOf(row); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else { + // this.fileQuery.dataname = JSON.stringify(response.item); + // console.log( + // "柱板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" + + // JSON.stringify(this.fileQuery.dataname) + // ); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=zhuhuban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // this.printpdf(response); //打印我文件流 + // }); + // this.getList(); + // } + // }) + // .catch(() => {}); + // } + }, + handleUpdateall(row) { + this.isEdit = true; + if (this.multipleSelection.length != 1) { + this.$message({ + message: "重新打印必须选择单行,不能多选!", + type: "warning", + }); + return; + } else { + //this.fetchData(this.multipleSelection[0].id); + //重新打印方法 + debugger; + let beginVin1 = this.multipleSelection[0].id; + let ZHBId = [beginVin1]; var params = { printType: "1", productLine: this.customerInfo.productLine, reportIdList: ZHBId, + //partType: this.multipleSelection[0].partType, + dataResultType: "1", }; console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); this.$axios @@ -562,10 +706,11 @@ export default { .then((response) => { this.printpdf(response); //打印我文件流 }); - this.getList(); + this.getList(); } }) .catch(() => {}); + } }, //作废操作,支持批量操作-门板 handleDelete(row) { diff --git a/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue b/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue index d300b26a..360409f5 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue @@ -201,7 +201,7 @@ append-to-body="true" :visible.sync="dialogTableVisible" > - + diff --git a/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue index 4256dae6..8ee1d67b 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue @@ -36,22 +36,9 @@ - + - - - - - - - 作废(支持批量) @@ -200,13 +187,15 @@ /> -
+
- + {}); // }, fetchData(id) { @@ -888,6 +880,10 @@ export default { margin-left: 5px; margin-right: 5px; } +.dialogDiv { + max-height:300px; + overflow: auto; + } diff --git a/vue/src/views/pg-fis/basedate/m100Online/detailZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/detailZHB.vue index 9133f4b4..1dc8f57f 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/detailZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/detailZHB.vue @@ -547,7 +547,7 @@ export default { let beginVin1 = this.multipleSelection[0].beginVin1; let endVin1 = this.multipleSelection[0].endVin1; var params = { - printType: "1", + printType: 1, productLine: this.customerInfo.productLine, beginVin: beginVin1, endVin: endVin1, diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index 3912ce51..4c0d451b 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -111,6 +111,30 @@ plain >柱护板作废 + + + +
+
+ {{ content01 }} +              + {{ content05 }} +              + {{ content07 }} +              + {{ content08 }} +
+
@@ -385,6 +409,7 @@ import RepetitionMB from "./RepetitionMB.vue"; import RepetitionZHB from "./RepetitionZHB.vue"; import ScrapMB from "./ScrapMB.vue"; import ScrapZHB from "./ScrapZHB.vue"; +import { forEach } from "jszip/lib/object"; export default { name: "M100Online", @@ -421,7 +446,16 @@ export default { } }; return { + content01: "", + content05: "", + content07: "", + content08: "", + // minute01: this.timeoutMinutes, + // minute05: this.timeoutMinutes, + // lastTime01: "14:00", + // lastTime05: "14:40", crmType: "M100Online", + //productLineList:null, isDisable: false, drawerMBPrint: false, drawerMBDelete: false, @@ -569,6 +603,10 @@ export default { this.tableHeight = offsetHei - boxH - 67 - 79; //57为footer高度,79为页面上部标签高度 //this.tableHeight = offsetHei -260 }); + + let timer = setInterval(() => { + this.open(); + }, 50000); }, created() { this.billState.forEach((element, index) => { @@ -650,6 +688,99 @@ export default { ...mapGetters(["userInfo"]), //获取当前用户信息 }, methods: { + open() { + //console.log("门版-主界面传过来的值:11111111111111111111111111111111111111111" ); + + let productLineList = { productLineList: [this.listQuery.productLine] }; + + console.log("门版-主界面传过来的值:" + JSON.stringify(productLineList)); + this.$axios + .posts( + "/api/newjit/bill-m100/product-line-timeout-remind", + productLineList + ) + .then((response) => { + if (response.status == false) { + this.$message({ + message: response.message, + type: "warning", + }); + return; + } else { + console.log( + "超时提醒-接口传过来的值:" + JSON.stringify(response.item) + ); + + if (response.item !== null) { + response.item.forEach((JKITEM) => { + if (JKITEM.productLine = "01") { + + this.content01 = "01生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文"; + if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) { + //写提示信息 + console.log( + "222222222222222222222222222222222222222222222222" + ); + this.$refs.sp01.style.color = "red"; + this.$refs.sp01.style.fontWeight = "bold"; + } + else{ + this.$refs.sp01.style.color = "green"; + } + } + if(JKITEM.productLine = "05") { + this.content05 = "05生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文"; + if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) { + //写提示信息 + console.log( + "222222222222222222222222222222222222222222222222" + ); + this.$refs.sp05.style.color = "red"; + this.$refs.sp05.style.fontWeight = "bold"; + } + else{ + this.$refs.sp05.style.color = "green"; + } + } + if(JKITEM.productLine = "07") { + this.content07 = "07生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文"; + if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) { + //写提示信息 + console.log( + "222222222222222222222222222222222222222222222222" + ); + this.$refs.sp07.style.color = "red"; + this.$refs.sp07.style.fontWeight = "bold"; + } + else{ + this.$refs.sp07.style.color = "green"; + } + } + if(JKITEM.productLine = "08") { + this.content08 = JKITEM.productLine+"生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文"; + if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) { + //写提示信息 + console.log( + "222222222222222222222222222222222222222222222222" + ); + this.$refs.sp08.style.color = "red"; + this.$refs.sp08.style.fontWeight = "bold"; + } + else{ + this.$refs.sp08.style.color = "green"; + } + } + }); + } else { + this.$message({ + message: "获取接口数据", + type: "warning", + }); + return; + } + } + }); + }, debounceClick() { console.log("2秒内点击无数次,都只会触发一次"); }, @@ -922,6 +1053,7 @@ export default { console.log( "日常打印M100查询条件:" + JSON.stringify(this.listQueryList) ); + //this.click(); this.$axios .gets("/api/newjit/bill-m100/list", this.listQueryList) .then((response) => { @@ -1354,7 +1486,9 @@ export default { } }); }) - .catch(() => { this.isDisable = false;}); + .catch(() => { + this.isDisable = false; + }); } else { //无断号 //门板 @@ -1391,12 +1525,12 @@ export default { console.log("获取文件base64编码"); console.log(response); this.formLoading = false; - this.isDisable = false; + this.isDisable = false; this.printpdf(response); //打印我文件流 }) .catch((error) => { this.formLoading = false; - this.isDisable = false; + this.isDisable = false; }); } }) @@ -1405,7 +1539,7 @@ export default { message: response.message, type: "error", }); - this.isDisable = false; + this.isDisable = false; return; }); } @@ -1484,7 +1618,9 @@ export default { } }); }) - .catch(() => {this.isDisable = false;}); + .catch(() => { + this.isDisable = false; + }); } else { //无断号 //门板 @@ -1521,7 +1657,7 @@ export default { console.log("获取文件base64编码"); console.log(response); this.formLoading = false; - this.isDisable = false + this.isDisable = false; this.printpdf(response); //打印我文件流 }) .catch((error) => { @@ -1535,7 +1671,7 @@ export default { message: response.message, type: "error", }); - this.isDisable = false; + this.isDisable = false; return; }); } @@ -2130,9 +2266,11 @@ export default { }, //获取所有产线 getProductLine() { - this.listPLQuery.UserId = this.userInfo.userId; - console.log("this.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserId"+this.listPLQuery.UserId); + console.log( + "this.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserId" + + this.listPLQuery.UserId + ); this.$axios .gets("/api/newjit/product-line/list", this.listPLQuery) .then((response) => { diff --git a/vue/src/views/pg-fis/basedate/r100Online/index.vue b/vue/src/views/pg-fis/basedate/r100Online/index.vue index 01b67e69..c38e11f0 100644 --- a/vue/src/views/pg-fis/basedate/r100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/r100Online/index.vue @@ -329,7 +329,7 @@ export default { ], }, billState: [ - { id: 2, name: "已匹配" }, + { id: 2, name: "未导出" }, { id: 3, name: "已导出" }, ], valueSelect: "", @@ -512,7 +512,7 @@ export default { this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; console.log(JSON.stringify(this.listQuery)); this.$axios - .posts("/api/newjit/bill-r100/export", this.listQuery) + .posts("//api/newjit/bill-r100/export-erp-assembly-code", this.listQuery) .then((res) => { let filename = res.item; this.$axios @@ -719,7 +719,43 @@ export default { this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.toggleRowSelection(row); }, - SAPExport() {}, + SAPExport() { + this.listLoading = true; + // this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; + // this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; + console.log(JSON.stringify(this.listQuery)); + this.$axios + .posts("/api/newjit/bill-r100/export-erp-assembly-code", this.listQuery) + .then((res) => { + let filename = res.item; + this.$axios + .BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) + .then((response) => { + if (filename.indexOf("_") != -1) { + let downName = + filename.slice(0, filename.lastIndexOf("_")) + + filename.slice(filename.lastIndexOf(".")); + downloadFile(response, downName); + this.$notify({ + title: "成功", + message: "数据-导出成功!", + type: "success", + duration: 2000, + }); + } else { + downloadFile(response, filename); + this.$notify({ + title: "成功", + message: "数据-导出成功!", + type: "success", + duration: 2000, + }); + } + this.listLoading = false; + }); + }); + this.listLoading = false; + }, //获取所有产线 getProductLine() { this.listPLQuery.UserId = this.userInfo.userId; diff --git a/vue/src/views/pg-fis/basedate/repeatR100/index.vue b/vue/src/views/pg-fis/basedate/repeatR100/index.vue index 5bb9dd60..61f7da45 100644 --- a/vue/src/views/pg-fis/basedate/repeatR100/index.vue +++ b/vue/src/views/pg-fis/basedate/repeatR100/index.vue @@ -2,122 +2,181 @@