|
|
@ -5,6 +5,7 @@ import { |
|
|
|
fileStorage |
|
|
|
} |
|
|
|
from "@/api/wms-api" |
|
|
|
import { initPrintAllData } from "@/mixins/printMixin" |
|
|
|
export const TableHeaderMixins = { |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -151,6 +152,64 @@ export const TableHeaderMixins = { |
|
|
|
listUrl:this.getMOrDUrlSuffix() |
|
|
|
}) |
|
|
|
} |
|
|
|
// 批量打印(xbcll)
|
|
|
|
if(val == "printManyXbcll"){ |
|
|
|
// 数据模拟
|
|
|
|
// this.copyData()
|
|
|
|
if(this.multipleSelection.length <= 0){ |
|
|
|
return this.$warningMsg("请选择要打印的数据!") |
|
|
|
} |
|
|
|
// 按申请单号汇总
|
|
|
|
let _requestNumbers = [] |
|
|
|
let _requestInfos = {} |
|
|
|
let _numberAndItems = [] |
|
|
|
this.multipleSelection.forEach(out=>{ |
|
|
|
if(_requestNumbers.indexOf(out.requestNumber) < 0){ |
|
|
|
_requestNumbers.push(out.requestNumber) |
|
|
|
_requestInfos[out.requestNumber] = JSON.parse(JSON.stringify(out)) |
|
|
|
_requestInfos[out.requestNumber].details = [] |
|
|
|
} |
|
|
|
out.details.forEach(item=>{ |
|
|
|
let _name = out.requestNumber + '_' + item.itemCode |
|
|
|
if(_numberAndItems.indexOf(_name) < 0){ |
|
|
|
_numberAndItems.push(_name) |
|
|
|
} |
|
|
|
_requestInfos[out.requestNumber].details.push(item) |
|
|
|
}) |
|
|
|
}) |
|
|
|
let _printDataArr = [] |
|
|
|
for(let i in _requestInfos){ |
|
|
|
_printDataArr.push(_requestInfos[i]) |
|
|
|
} |
|
|
|
|
|
|
|
// 按照同物料及同调入储位汇总明细
|
|
|
|
_printDataArr.forEach(print=>{ |
|
|
|
let _newDetail = {} |
|
|
|
let _detailArr = [] |
|
|
|
print.details.forEach(item=>{ |
|
|
|
let _copy = JSON.parse(JSON.stringify(item)) |
|
|
|
let _name = _copy.itemCode + "_" + _copy.handledToLocationErpCode |
|
|
|
if(!_newDetail[_name]){ |
|
|
|
_newDetail[_name] = _copy |
|
|
|
}else{ |
|
|
|
_newDetail[_name].handledToQty += _copy.handledToQty |
|
|
|
_newDetail[_name].requestQty += _copy.requestQty |
|
|
|
} |
|
|
|
}) |
|
|
|
for(let i in _newDetail){ _detailArr.push(_newDetail[i]) } |
|
|
|
print.details = JSON.parse(JSON.stringify(_detailArr)) |
|
|
|
}) |
|
|
|
|
|
|
|
// 循环打印
|
|
|
|
_printDataArr.forEach(async print=>{ |
|
|
|
print.details.forEach(item=>{ |
|
|
|
item.handledToLot = item.handledToLot + " " |
|
|
|
item.boxQtyShow = print.enumIssueSendType == 2 ? item.requestQty : '' |
|
|
|
}) |
|
|
|
let data = await initPrintAllData(print,'xbcll.rdlx',false,false,true); |
|
|
|
this.Print(data) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取主子表列表url模块
|
|
|
|
getMOrDUrlMoudle(url){ |
|
|
|