This commit is contained in:
linfso 2024-11-25 13:31:36 +08:00
parent 33fff1c7b9
commit 5526865c61
3 changed files with 126 additions and 9 deletions

View File

@ -168,16 +168,16 @@
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
</template>
</el-table-column>
<el-table-column :label="$t('运输号')" align="center" prop="bizNo" min-width="170">
<el-table-column :label="$t('运输号')" align="center" prop="carNo" min-width="170">
<template slot-scope="scope">
{{scope.row.carNo}}
</template>
</el-table-column>
<el-table-column :label="$t('承运重量')" align="center" prop="transWeight" min-width="100" />
<el-table-column :label="$t('包裹数')" align="center" prop="packNum" min-width="100" />
<el-table-column :label="$t('发出时间')" align="center" prop="etd" min-width="100" >
<el-table-column :label="$t('发出时间')" align="center" prop="carTime" min-width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.etd, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.carTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column :label="$t('异常信息')" align="center" prop="remark" min-width="170">

View File

@ -318,8 +318,6 @@
总运费:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalFreight:0}}</span>
</div>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="120" :show-overflow-tooltip="true" >
<template slot-scope="scope">

View File

@ -54,7 +54,9 @@
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
v-loading="loading"
ref="refTable"
v-loading="loading"
border stripe
size="mini"
@ -126,16 +128,15 @@
v-hasPermi="['emis:emisWaybillAjustApply:remove']"
>删除</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['emis:emisWaybillAjustApply:export']"
>导出</el-button>
</el-col> -->
</el-col>
</el-row>
</div>
@ -279,6 +280,8 @@ export default {
// 运单调整申请表格数据
emisWaybillAjustApplyList: [],
selectionList:[],
currentId:null,
openForm: false,
titleForm: "",
@ -360,6 +363,8 @@ export default {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
this.selectionList=selection;
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
@ -424,6 +429,120 @@ export default {
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const loadingInstance = this.$loading({
text: '正在导出...'
})
if(this.selectionList&&this.selectionList.length>0){
this.exportData(this.selectionList,loadingInstance);
}
else{
let qExportParam=this.addDateRange(this.queryParams, this.dateTimeRange,'applyDate');
qExportParam.pageNum=1;
qExportParam.pageSize=20000;
listEmisWaybillAjustApply(qExportParam).then(response => {
if (response.code === 200) {
this.exportData(response.rows,loadingInstance);
}
});
}
},
exportData(selData,loadingInstance){
const curList =selData
import('@/vendor/Export2Excel').then(excel => {
const exportParam=this.$refs.refTable.getExportParam();
const tHeader = exportParam.header;
const filterVal = exportParam.filter;
const data = this.formatJson(filterVal, curList, selData)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '寄件运单列表',
autoWidth: true
})
loadingInstance.close()
})
},
formatJson(filterVal, jsonData, resData) {
let index = 0
return jsonData.map(v => filterVal.map(j => {
if (j === 'index') {
return ++index
}
if (j === 'kjlx') {
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
}
if (j === 'fjr') {
return v['sendName']+'--'+v['receiveName'];
}
if (j === 'custName') {
let paymentType=v['paymentType'];
if(paymentType==2 || paymentType==4 || paymentType==5 ){
return v['custName'];
}else{
return "";
}
}
if (j === 'sendMobile') {
return "";
}
if (j === 'paymentStatus') {
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
}
if (j === 'pickupMethod') {
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
}
if (j === 'customsEclaration') {
return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
}
if (j === 'customsClear') {
return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
}
if (j === 'packType') {
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
}
if (j === 'dispatchMethod') {
if(v[j] == 1){
return '派送';
}else{
return '自提';
}
}
if (j === 'blMessage') {
if(v[j] == 1){
return '发送';
}else{
return '不发送';
}
}
if (j === 'blAcceptMessage') {
if(v[j] == 1){
return '发送';
}else{
return '不发送';
}
}
if (j === 'blSign') {
if(v[j] == 1){
return '已签收';
}else{
return '未签收';
}
}
if (j === 'paymentType') {
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
}
return v[j]
}))
},
/** 列索引函数 */
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1