|
@@ -509,9 +509,15 @@ export default {
|
|
|
// 打印
|
|
|
async toPrint() {
|
|
|
//
|
|
|
- console.log(this.printRow)
|
|
|
+ console.log(this.printRow);
|
|
|
//母粒编号 采购单编号 单位
|
|
|
- let { purchaseMaterielId, purchaseSerialNumber,purchaseUnits,purchaseQuantity,purchaseSpecification } = this.printRow;
|
|
|
+ let {
|
|
|
+ purchaseMaterielId,
|
|
|
+ purchaseSerialNumber,
|
|
|
+ purchaseUnits,
|
|
|
+ purchaseQuantity,
|
|
|
+ purchaseSpecification,
|
|
|
+ } = this.printRow;
|
|
|
let printData = {};
|
|
|
let payLoad = {
|
|
|
isEnablePaging: false,
|
|
@@ -523,9 +529,9 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
let res = await listTableData(payLoad);
|
|
|
- console.log(res,"ddddddd");
|
|
|
- console.log(res.rows[0].resultMap.units,"打印数据")
|
|
|
- console.log(res.rows[0].resultMap.specificationModel,"打印数据")
|
|
|
+ console.log(res, "ddddddd");
|
|
|
+ console.log(res.rows[0].resultMap.units, "打印数据");
|
|
|
+ console.log(res.rows[0].resultMap.specificationModel, "打印数据");
|
|
|
// let labelRes = await getDictLabel(purchaseMaterielId);
|
|
|
if (res.code == 200) {
|
|
|
let data = res.rows[0]?.resultMap;
|
|
@@ -534,10 +540,10 @@ export default {
|
|
|
// printData.materielName = data?.materielName;//母粒名称
|
|
|
printData.units = data.units;
|
|
|
printData.specificationModel = data.specificationModel;
|
|
|
- printData.quantity=purchaseQuantity
|
|
|
- printData.materielName=data?.materieEncoding;//默认是转码后的名称
|
|
|
- if(data.materieEncoding==""||data.materieEncoding==undefined){
|
|
|
- printData.materielName=data.materielName;
|
|
|
+ printData.quantity = purchaseQuantity;
|
|
|
+ printData.materielName = data?.materieEncoding; //默认是转码后的名称
|
|
|
+ if (data.materieEncoding == "" || data.materieEncoding == undefined) {
|
|
|
+ printData.materielName = data.materielName;
|
|
|
}
|
|
|
//printData.dictLabel = labelRes.msg;
|
|
|
}
|
|
@@ -546,11 +552,25 @@ export default {
|
|
|
console.log(this.printRow);
|
|
|
let allPringtData = [];
|
|
|
for (let i = 0; i < Number(this.printForm.num); i++) {
|
|
|
- let stringInner= printData.serialNumber+"@"+printData.materielId+"@"+printData.units+"@"+printData.quantity+"@"+printData.specificationModel+"@"+(i + 1)+"@"+new Date().getTime()+i;
|
|
|
- console.log(stringInner)
|
|
|
- // return ;
|
|
|
- allPringtData.push({
|
|
|
- codeData:stringInner,
|
|
|
+ let stringInner =
|
|
|
+ printData.serialNumber +
|
|
|
+ "@" +
|
|
|
+ printData.materielId +
|
|
|
+ "@" +
|
|
|
+ printData.units +
|
|
|
+ "@" +
|
|
|
+ printData.quantity +
|
|
|
+ "@" +
|
|
|
+ printData.specificationModel +
|
|
|
+ "@" +
|
|
|
+ (i + 1) +
|
|
|
+ "@" +
|
|
|
+ new Date().getTime() +
|
|
|
+ i;
|
|
|
+ console.log(stringInner);
|
|
|
+ // return ;
|
|
|
+ allPringtData.push({
|
|
|
+ codeData: stringInner,
|
|
|
showMsg: [
|
|
|
{
|
|
|
label: "编号",
|
|
@@ -1171,7 +1191,7 @@ export default {
|
|
|
// )
|
|
|
// ]
|
|
|
// );
|
|
|
- this.ids = selection.map((item) => item.saleOrderSaleNo);
|
|
|
+ this.ids = selection.map((item) => item.purchaseId);
|
|
|
this.single = selection.length != 1;
|
|
|
this.multiple = !selection.length;
|
|
|
},
|
|
@@ -1523,7 +1543,8 @@ export default {
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
let primary = camelCase(this.templateInfo.template?.primaryKey);
|
|
|
- let realyKey = camelCase(this.tableName + "_" + primary);
|
|
|
+ // let realyKey = camelCase(this.tableName + "_" + primary);
|
|
|
+ let realyKey = "purchaseId";
|
|
|
if (this.ids.length > 0) {
|
|
|
this.queryParams["execlMap"] = [];
|
|
|
this.ids.forEach((item) => {
|
|
@@ -1539,7 +1560,7 @@ export default {
|
|
|
}
|
|
|
this.queryParams.execlMap = JSON.stringify(this.queryParams.execlMap);
|
|
|
this.download(
|
|
|
- process.env.VUE_APP_BASE_API3 + "common/export",
|
|
|
+ process.env.VUE_APP_BASE_API1 + "common/export",
|
|
|
{
|
|
|
...this.queryParams,
|
|
|
},
|