This commit is contained in:
linfso 2025-08-14 14:49:30 +08:00
commit 46cea9f4f8
3 changed files with 71 additions and 11 deletions

View File

@ -402,15 +402,22 @@
}
}
}else{
newOrderList=[...orderList];
}
// else{
// newOrderList=[...orderList];
// }
// console.log("tnprint===>",newOrderList);
// console.log("tnprint===>",that.selTplCode);
this.printOrderList=newOrderList;
// this.printOrderList=newOrderList;
this.selTplCode.forEach(item=>{
that.tanexPrinter.batchPrint(item,that.selPrinterName,newOrderList,this.printManCode)
let paramsOrderList = [];
if(item=="TAN-GC-130" || item=="TAN-ENGC-130" || item=="VT-ENNOLOGO"){
paramsOrderList = newOrderList;
}else{
paramsOrderList = [...orderList]
}
that.tanexPrinter.batchPrint(item,that.selPrinterName,paramsOrderList,this.printManCode)
})
},
@ -548,15 +555,16 @@
}
}
}else{
newOrderList=[...orderList];
}
// else{
// newOrderList=[...orderList];
// }
const loadingInstance = this.$loading({
text: '正在生成预览...'
})
this.printOrderList=newOrderList;
// this.printOrderList=newOrderList;
let orderSeqMap = new Map();
for(let i=0; i<newOrderList.length; i++){
@ -573,7 +581,13 @@
// that.showCounter++;
// console.log('promise',this.tanexPrinter.batchGetPDF(this.selTplCode[0], this.selPrinterName, newOrderList, this.printManCode,async function(code,msg,data){}))
this.selTplCode.forEach(element => {
this.tanexPrinter.batchGetPDF(element,this.selPrinterName,newOrderList,this.printManCode,async function(code,msg,data){
let paramsOrderList=[];
if(element=="TAN-GC-130"|| element=='TAN-ENGC-130' || element=='VT-ENNOLOGO' ){
paramsOrderList = newOrderList // 子单号
}else{
paramsOrderList = [...orderList] // 主单号
}
this.tanexPrinter.batchGetPDF(element,this.selPrinterName,paramsOrderList,this.printManCode,async function(code,msg,data){
loadingInstance.close();
if(code == 500){

View File

@ -228,7 +228,7 @@
</el-col>
<el-col :span="1.5" v-if="this.form.id!=null">
<el-button style="margin-right: 5px;" type="warning" plain icon="el-icon-download" size="mini"
@click="handleDownBatchDtl">导出</el-button>
@click="handleExport">导出</el-button>
</el-col>
</el-row>
</div>
@ -667,6 +667,7 @@ export default {
this.initBatchBillRel(this.form.batchNo);
if(this.isCopy){
this.form.batchNo = null;
getTmsGroupBatchNo().then(resPack=>{
this.form.batchNo = resPack.data;
});
@ -1306,6 +1307,43 @@ export default {
dateTimeChange(value){
this.dateTimeRange=value;
},
/** 导出按钮操作 */
handleExport() {
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisTmsSiteBatchDtl({batchNo: this.form.batchNo}).then(response => {
this.downloadLoading = false
if (response.code === 200) {
const curList = response.rows.map(item=>{
return {
"billCode":item.billCode,
...item.waybillDetail,
}
})
console.log(curList)
setTimeout(()=>{
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['运单号','寄件网点','寄件国家','目的国家','线路','产品类型','寄件日期','预计到达时间','总件数','实际重量','总体积','体积重量','结算重量','收件人','收件公司','报关方式','清关方式','取件方式','付款方式','运费','寄件人','寄件公司','录单备注'];
const filterVal = ['billCode','sendSiteName','sendCountryName','receiveCountryName','transLineTypeName','productTypeName','sendDate','estimateDate','parcelQty','billWeight','totalVolume','volumeWeight','settlementWeight','receiveName','receiveCompany','customsEclaration','customsClear','pickupMethod','paymentType','freight','sendName','sendCompany','remark'];
const data = this.formatJson(filterVal, curList, response.rows)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '批次明细导出',
autoWidth: true
})
loadingInstance.close()
})
},500 )
}
});
},
}
};
</script>

View File

@ -263,8 +263,16 @@ export default {
if (valid) {
let jsonData=this.$refs.refAdjustDetail.getJsonData();
console.log("====>jsonData==>",jsonData);
this.form.jsonData=JSON.stringify(jsonData);
addEmisWaybillAjustApply(this.form).then(response => {
const params={
"applyManCode":this.form.applyManCode,
"applyMemo":this.form.applyMemo,
"applySiteCode":this.form.applySiteCode,
"applyType":this.form.applyType,
"billCode":this.form.billCode,
"destConfirmSiteCode":this.form.destConfirmSiteCode,
"jsonData":JSON.stringify(jsonData),
}
addEmisWaybillAjustApply(params).then(response => {
this.$modal.msgSuccess("申请成功");
this.$emit("on-changed");
});