Browse Source

保存、打印分离

FoShanPG
lyf 2 years ago
parent
commit
d3552be0f9
  1. 1
      vue/src/router/index.js
  2. BIN
      vue/src/views/pg-fis/basedate.zip
  3. 99
      vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue
  4. 68
      vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue
  5. 129
      vue/src/views/pg-fis/basedate/m100Online/budaMB.vue
  6. 139
      vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue
  7. 917
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

1
vue/src/router/index.js

@ -67,6 +67,7 @@ export const constantRoutes = [
component: () => import('@/views/login/index'), component: () => import('@/views/login/index'),
//component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one //component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one
//component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one //component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one
//component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),
hidden: true hidden: true
}, },
{ {

BIN
vue/src/views/pg-fis/basedate.zip

Binary file not shown.

99
vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue

@ -576,15 +576,49 @@ export default {
myalert = "选中项"; myalert = "选中项";
} }
// let MBVin1 = this.multipleSelection[0].id; // let MBVin1 = this.multipleSelection[0].id;
let MBId = MBVin1; // let MBId = MBVin1;
var params = { // var params = {
printType: 1, // printType: 1,
productLine: this.customerInfo.productLine, // productLine: this.customerInfo.productLine,
reportIdList: MBId, // reportIdList: MBId,
}; // };
// debugger //
// console.log("-" + JSON.stringify(params));
// this.$axios
// .posts("/api/newjit/bill-m100/print-menban-packing-list", params)
// .then((response) => {
// //alert(response.status);
// const index = this.list.indexOf(row);
// if (response.status === false) {
// this.$message({
// message: response.message,
// type: "error",
// });
// return;
// } else if (response.status === true) {
// this.fileQuery.dataname = JSON.stringify(response.item);
// console.log(
// "-Handlers/Handler1.ashx?report=menban" +
// JSON.stringify(this.fileQuery.dataname)
// );
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=menban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// this.printpdf(response); //
// });
// this.getList();
// }
// })
// .catch(() => {});
debugger //
var params = MBVin1; //ID
console.log("门板打印-主界面传过来的值:" + JSON.stringify(params)); console.log("门板打印-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
.posts("/api/newjit/bill-m100/print-menban-packing-list", params) .posts("/api/newjit/bill-m100/load-menban-report", params)
.then((response) => { .then((response) => {
//alert(response.status); //alert(response.status);
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
@ -614,57 +648,6 @@ export default {
.catch(() => {}); .catch(() => {});
// this.isEdit = true;
// if (this.multipleSelection.length != 1) {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// } else {
// //this.fetchData(this.multipleSelection[0].id);
// //
// let MBVin1 = this.multipleSelection[0].id;
// let MBId = [MBVin1];
// var params = {
// printType: 1,
// productLine: this.customerInfo.productLine,
// reportIdList: MBId,
// };
// console.log("-" + JSON.stringify(params));
// this.$axios
// .posts("/api/newjit/bill-m100/print-menban-packing-list", params)
// .then((response) => {
// //alert(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=menban" +
// JSON.stringify(this.fileQuery.dataname)
// );
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=menban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// this.printpdf(response); //
// });
// this.getList();
// }
// })
// .catch(() => {});
// }
}, },
//- //-

68
vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue

@ -539,7 +539,8 @@ export default {
}; };
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.posts("/api/newjit/bill-m100/load-zhuhuban-report", params)
.then((response) => { .then((response) => {
console.log("柱护版-打印返回的状态:" + response.status); console.log("柱护版-打印返回的状态:" + response.status);
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
@ -595,69 +596,7 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
} }
// 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) { handleUpdateall(row) {
this.isEdit = true; this.isEdit = true;
@ -682,7 +621,8 @@ export default {
}; };
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.posts("/api/newjit/bill-m100/load-zhuhuban-report", params)
.then((response) => { .then((response) => {
console.log("柱护版-打印返回的状态:" + response.status); console.log("柱护版-打印返回的状态:" + response.status);
const index = this.list.indexOf(row); const index = this.list.indexOf(row);

129
vue/src/views/pg-fis/basedate/m100Online/budaMB.vue

@ -519,37 +519,110 @@ export default {
}); });
console.log("门板补打输入参数:" + JSON.stringify(params)); console.log("门板补打输入参数:" + JSON.stringify(params));
this.$axios debugger //
.posts("/api/newjit/bill-m100/print-menban-packing-list", params) // this.$axios
.then((response) => { // .posts("/api/newjit/bill-m100/print-menban-packing-list", params)
// .then((response) => {
if (response.status === false) {
this.$message({ // if (response.status === false) {
message: response.message, // this.$message({
type: "error", // message: response.message,
}); // type: "error",
return; // });
} else if (response.status === true) { // return;
this.fileQuery.dataname = JSON.stringify(response.item); // } else if (response.status === true) {
console.log( // this.fileQuery.dataname = JSON.stringify(response.item);
"门板-调用Handlers/Handler1.ashx?report=menban传的值:" + // console.log(
JSON.stringify(this.fileQuery.dataname) // "-Handlers/Handler1.ashx?report=menban" +
); // JSON.stringify(this.fileQuery.dataname)
this.$axios // );
.posts( // this.$axios
"/Handlers/Handler1.ashx?report=menban", // .posts(
qs.stringify(this.fileQuery) // "/Handlers/Handler1.ashx?report=menban",
) // qs.stringify(this.fileQuery)
.then((response) => { // )
this.printpdf(response); // // .then((response) => {
this.getList(); // // this.printpdf(response); //
}); // this.getList(); //
} // });
}) // }
.catch(() => {}); // })
// .catch(() => {});
this.private_printMenBan(params);
} }
}, },
/**
* 保存加载打印门板
*/
private_printMenBan(input)
{
debugger
this.$axios
.posts(
"/api/newjit/bill-m100/save-menban-report",
input
)
.then((response) => {
console.log("保存门板报表");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
let loadInput = response.item;
//-------------------------------------------
this.$axios
.posts(
"/api/newjit/bill-m100/load-menban-report",
loadInput
)
.then((response) => {
console.log("加载门板报表");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
}
});
//-------------------------------------------
}
});
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery(refName) { resetQuery(refName) {

139
vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue

@ -519,39 +519,118 @@ export default {
}); });
console.log("柱护板补打输入参数:" + JSON.stringify(params)); console.log("柱护板补打输入参数:" + JSON.stringify(params));
this.$axios // this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) // .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.then((response) => { // .then((response) => {
if (response.status === false) { // if (response.status === false) {
this.$message({ // this.$message({
message: response.message, // message: response.message,
type: "error", // type: "error",
}); // });
return; // return;
} else if (response.status === true) { // } else if (response.status === true) {
this.fileQuery.dataname = JSON.stringify(response.item); // this.fileQuery.dataname = JSON.stringify(response.item);
console.log( // console.log(
"柱护板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" + // "-Handlers/Handler1.ashx?report=zhuhuban" +
JSON.stringify(this.fileQuery.dataname) // JSON.stringify(this.fileQuery.dataname)
); // );
this.$axios // this.$axios
.posts( // .posts(
"/Handlers/Handler1.ashx?report=zhuhuban", // "/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery) // qs.stringify(this.fileQuery)
) // )
.then((response) => { // .then((response) => {
this.printpdf(response); // // this.printpdf(response); //
this.getList(); // // this.getList(); //
}); // });
} // }
}) // })
.catch(() => {}); // .catch(() => {});
this.private_printZhuHuBan(params);
} }
}, },
/**
* 保存加载打印柱护板
*/
private_printZhuHuBan(input)
{
debugger
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/save-zhuhuban-report",
input
)
.then((response) => {
console.log("保存柱护板报表");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
let loadInput = {};
loadInput.dataResultType = "1"; //
loadInput.reportIdList = response.item;
// //--------------------------------------
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/load-zhuhuban-report",
loadInput
)
.then((response) => {
console.log("加载柱护板报表");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
}
});
//--------------------------------------
}
});
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery(refName) { resetQuery(refName) {

917
vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

@ -1533,48 +1533,7 @@ export default {
.then(() => { .then(() => {
// //
// //
this.$axios this.private_printMenBan();
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
}
});
}) })
.catch(() => { .catch(() => {
this.isDisable = false; this.isDisable = false;
@ -1583,57 +1542,7 @@ export default {
// //
// //
// //
this.$axios this.private_printMenBan();
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
this.isDisable=false;
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
this.isDisable = false;
return;
});
} }
}); });
} else if (this.listQuery.productType === 2) { } else if (this.listQuery.productType === 2) {
@ -1667,48 +1576,7 @@ export default {
.then(() => { .then(() => {
// //
// //
this.$axios this.private_printZhuHuBan(true);
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
}
});
}) })
.catch(() => { .catch(() => {
this.isDisable = false; this.isDisable = false;
@ -1717,169 +1585,12 @@ export default {
// //
// //
// //
this.$axios this.private_printZhuHuBan(true);
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
this.isDisable = false;
return;
});
} }
}); });
// //
// this.hostCheckQuery.beginHostSN = parseInt(this.form.beginHostSN);
// this.hostCheckQuery.endHostSN = parseInt(this.form.endHostSN);
// this.hostCheckQuery.productLine = this.listQuery.productLine;
// this.$axios
// .posts(
// "/api/newjit/bill-m100/check-zhb-hostsn-break-num",
// this.hostCheckQuery
// )
// .then((response) => {
// console.log("-");
// if (response.item.length > 0) {
// //
// this.$confirm(
// "?" + response.item,
// "",
// {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// }
// )
// .then(() => {
// //
// //
// this.$axios
// .posts(
// "/api/newjit/bill-m100/print-zhuhuban-packing-list",
// this.hostPrintQuery
// )
// .then((response) => {
// console.log("");
// console.log(response);
// console.log(response.status);
// if (response.status === false) {
// this.$message({
// message: response.message,
// type: "error",
// });
// return;
// } else {
// //grid++jsonbase64
// //this.fileQuery.report = "menban";
// this.fileQuery.dataname = JSON.stringify(
// response.item
// );
// //this.fileQuery.dataname = "";
// console.log("json");
// console.log(this.fileQuery.dataname);
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=menban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// console.log("base64");
// console.log(response);
// this.printpdf(response); //
// });
// }
// });
// })
// .catch(() => {});
// } //
// else {
// //
// //
// this.$axios
// .posts(
// "/api/newjit/bill-m100/print-zhuhuban-packing-list",
// this.hostPrintQuery
// )
// .then((response) => {
// console.log("");
// console.log(response);
// if (response.status === false) {
// this.$message({
// message: response.message,
// type: "error",
// });
// return;
// } else {
// //grid++jsonbase64
// //this.fileQuery.report = "menban";
// this.fileQuery.dataname = JSON.stringify(
// response.item
// );
// //this.fileQuery.dataname = "";
// console.log("json");
// console.log(this.fileQuery.dataname);
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=menban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// console.log("base64");
// console.log(response);
// this.printpdf(response); //
// });
// }
// })
// .catch(() => {
// this.$message({
// message: response.message,
// type: "error",
// });
// return;
// });
// }
// });
} }
} else { } else {
/**接口1获取打印数据,接口2获得grid++模板的base64编码 */ /**接口1获取打印数据,接口2获得grid++模板的base64编码 */
@ -1887,476 +1598,168 @@ export default {
this.hostPrintQuery.endVin = this.form.endVin; this.hostPrintQuery.endVin = this.form.endVin;
//productType //productType
if (this.listQuery.productType === 1) { if (this.listQuery.productType === 1) {
// //
// //
this.$axios this.private_printMenBan();
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log(
"重新或补打打印门板装箱单" +
JSON.stringify(this.hostPrintQuery)
);
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
} else if (this.listQuery.productType === 2) { } else if (this.listQuery.productType === 2) {
// //
// //
this.$axios this.private_printZhuHuBan(true);
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "zhuhuban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
} }
} }
} }
}); });
}, },
/**保存*/
save1() {
//this.listLoaddingPrint = true;
if (this.isShowHostSN === true) {
if (this.form.beginHostSN === "" || this.form.endHostSN === "") {
this.$message({
message: "请输入完整的顺序号起始范围",
type: "error",
});
return;
} else {
if (this.listQuery.productType === 1) {
//
if (
parseInt(this.form.endHostSN) - parseInt(this.form.beginHostSN) <=
0
) {
this.$message({
message: "起止大众顺序号相减不能为零!",
type: "error",
});
return;
}
} else if (this.listQuery.productType === 2) {
//
if (
parseInt(this.form.endHostSN) - parseInt(this.form.beginHostSN) >
23
) {
this.$message({
message:
"最多只能打印24个顺序号,终止顺序号不能大于" +
(parseInt(this.form.beginHostSN) + 23),
type: "error",
});
return;
}
}
}
}
if (this.isShowVin === true) {
if (this.form.beginVin === "" || this.form.endVin === "") {
this.$message({
message: "请输入完整的底盘号起始范围",
type: "error",
});
return;
}
}
/**打印时传递大众顺序号范围,接口1获取大众顺序号,接口2验证是否断号,接口3获取打印数据,接口4获得grid++模板的base64编码 */
if (
this.formTitle === "打印-门板发货排序单" ||
this.formTitle === "打印-柱护板发货排序单"
) {
this.hostPrintQuery.beginHostSN = parseInt(this.form.beginHostSN);
this.hostPrintQuery.endHostSN = parseInt(this.form.endHostSN);
if (this.listQuery.productType === 1) { /**
//- * 保存加载打印门板
this.$axios */
.posts( private_printMenBan()
"/api/newjit/bill-m100/check-mb-hostsn-break-num", {
this.hostCheckQuery debugger
) this.$axios
.then((response) => { .posts(
console.log("检查门板-大众顺序号是否断号"); "/api/newjit/bill-m100/save-menban-report",
if (response.item.length > 0) { this.hostPrintQuery
// )
this.$confirm( .then((response) => {
"本次打印存在断号是否继续?" + response.item, console.log("保存门板报表");
"提示", console.log(response);
{ console.log(response.status);
confirmButtonText: "确定", if (response.status === false) {
cancelButtonText: "取消", this.$message({
type: "warning", message: response.message,
} type: "error",
) });
.then(() => { return;
// } else if (response.status === true) {
// let loadInput = response.item;
this.$axios //-------------------------------------------
.posts( this.$axios
"/api/newjit/bill-m100/print-menban-packing-list", .posts(
this.hostPrintQuery "/api/newjit/bill-m100/load-menban-report",
) loadInput
.then((response) => { )
console.log("打印门板装箱单"); .then((response) => {
console.log(response); console.log("加载门板报表");
console.log(response.status); console.log(response);
if (response.status === false) { console.log(response.status);
this.$message({ if (response.status === false) {
message: response.message, this.$message({
type: "error", message: response.message,
}); type: "error",
return; });
} else if (response.status === true) { return;
//grid++jsonbase64 } else if (response.status === true) {
//this.fileQuery.report = "menban"; //grid++jsonbase64
this.fileQuery.dataname = JSON.stringify( //this.fileQuery.report = "menban";
response.item this.fileQuery.dataname = JSON.stringify(
); response.item
//this.fileQuery.dataname = ""; );
console.log("打印json"); //this.fileQuery.dataname = "";
console.log(this.fileQuery.dataname); console.log("打印json");
this.$axios console.log(this.fileQuery.dataname);
.posts( this.$axios
"/Handlers/Handler1.ashx?report=menban", .posts(
qs.stringify(this.fileQuery) "/Handlers/Handler1.ashx?report=menban",
) qs.stringify(this.fileQuery)
.then((response) => { )
console.log("获取文件base64编码"); .then((response) => {
console.log(response); console.log("获取文件base64编码");
this.formLoading = false; console.log(response);
this.printpdf(response); // this.formLoading = false;
}) this.isDisable = false;
.catch((error) => { this.printpdf(response); //
this.formLoading = false; })
}); .catch((error) => {
} this.formLoading = false;
}); this.isDisable = false;
}) });
.catch(() => {}); }
} else { });
// //-------------------------------------------
// }
// });
this.$axios },
.posts(
"/api/newjit/bill-m100/print-menban-packing-list", /**
this.hostPrintQuery * 保存加载打印柱护板
) */
.then((response) => { private_printZhuHuBan(isSelAll = true)
console.log("打印门板装箱单"); {
console.log(response); debugger
if (response.status === false) { //
this.$message({ //
message: response.message, this.$axios
type: "error", .posts(
}); "/api/newjit/bill-m100/save-zhuhuban-report",
return; this.hostPrintQuery
} else if (response.status === true) { )
//grid++jsonbase64 .then((response) => {
//this.fileQuery.report = "menban"; console.log("保存柱护板报表");
this.fileQuery.dataname = JSON.stringify(response.item); console.log(response);
//this.fileQuery.dataname = ""; console.log(response.status);
console.log("打印json"); if (response.status === false) {
console.log(this.fileQuery.dataname); this.$message({
this.$axios message: response.message,
.posts( type: "error",
"/Handlers/Handler1.ashx?report=menban", });
qs.stringify(this.fileQuery) return;
) } else if (response.status === true) {
.then((response) => { let loadInput = {};
console.log("获取文件base64编码"); loadInput.dataResultType = (isSelAll == true) ? "1" : "2";
console.log(response); loadInput.reportIdList = response.item;
this.formLoading = false; //--------------------------------------
this.printpdf(response); // //
}) //
.catch((error) => { this.$axios
this.formLoading = false; .posts(
}); "/api/newjit/bill-m100/load-zhuhuban-report",
} loadInput
}) )
.catch(() => { .then((response) => {
this.$message({ console.log("加载柱护板报表");
message: response.message, console.log(response);
type: "error", console.log(response.status);
}); if (response.status === false) {
return; this.$message({
}); message: response.message,
} type: "error",
}); });
} else if (this.listQuery.productType === 2) { return;
// } else if (response.status === true) {
this.$axios //grid++jsonbase64
.posts( //this.fileQuery.report = "menban";
"/api/newjit/bill-m100/check-zhb-hostsn-break-num", this.fileQuery.dataname = JSON.stringify(
this.hostCheckQuery response.item
) );
.then((response) => { //this.fileQuery.dataname = "";
console.log("检查柱护板-大众顺序号是否断号"); console.log("打印json");
if (response.item.length > 0) { console.log(this.fileQuery.dataname);
// this.$axios
this.$confirm( .posts(
"本次打印存在断号是否继续?" + response.item, "/Handlers/Handler1.ashx?report=zhuhuban",
"提示", qs.stringify(this.fileQuery)
{ )
confirmButtonText: "确定", .then((response) => {
cancelButtonText: "取消", console.log("获取文件base64编码");
type: "warning", console.log(response);
} this.formLoading = false;
) this.isDisable = false;
.then(() => { this.printpdf(response); //
// })
// .catch((error) => {
this.$axios this.formLoading = false;
.posts( this.isDisable = false;
"/api/newjit/bill-m100/print-zhuhuban-packing-list", });
this.hostPrintQuery }
) });
.then((response) => { //--------------------------------------
console.log("打印门板装箱单"); }
console.log(response); });
console.log(response.status); },
if (response.status === false) {
this.$message({ //线
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
});
})
.catch(() => {});
} //
else {
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
}
});
}
} else {
/**接口1获取打印数据,接口2获得grid++模板的base64编码 */
this.hostPrintQuery.beginVin = this.form.beginVin;
this.hostPrintQuery.endVin = this.form.endVin;
//productType
if (this.listQuery.productType === 1) {
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log(
"重新或补打打印门板装箱单" + JSON.stringify(this.hostPrintQuery)
);
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
} else if (this.listQuery.productType === 2) {
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else if (response.status === true) {
//grid++jsonbase64
//this.fileQuery.report = "zhuhuban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
}
}
},
//线
getProductLine() { getProductLine() {
this.listPLQuery.UserId = this.userInfo.userId; this.listPLQuery.UserId = this.userInfo.userId;
console.log( console.log(

Loading…
Cancel
Save