未签收列表导出
This commit is contained in:
parent
ad8a43fc1e
commit
aff24f6062
@ -10,7 +10,7 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
border
|
border
|
||||||
size="mini"
|
size="mini"
|
||||||
|
ref="refTable"
|
||||||
storageName="emisStatRecordList_main_240817"
|
storageName="emisStatRecordList_main_240817"
|
||||||
|
|
||||||
:data="emisStatRecordList"
|
:data="emisStatRecordList"
|
||||||
@ -24,6 +24,19 @@
|
|||||||
@sort-change="handleSortChange"
|
@sort-change="handleSortChange"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
<div slot="toolbar">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['emis:emisSettleInvoiceRecord:export']"
|
||||||
|
>导出</el-button> </el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
|
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
|
||||||
<el-table-column :label="$t('扫描时间')" align="center" prop="scanDate" min-width="170" >
|
<el-table-column :label="$t('扫描时间')" align="center" prop="scanDate" min-width="170" >
|
||||||
@ -61,7 +74,7 @@
|
|||||||
<span>{{ (scope.row.waybillDetail.destinationName) }}</span>
|
<span>{{ (scope.row.waybillDetail.destinationName) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('寄件网点')" align="center" prop="registerSiteName" min-width="100">
|
<el-table-column :label="$t('寄件网点')" align="center" prop="sendSiteName" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.waybillDetail.sendSiteName) }}</span>
|
<span>{{ (scope.row.waybillDetail.sendSiteName) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -111,6 +124,20 @@
|
|||||||
<span class="ellipsis">{{ (scope.row.waybillDetail.receiveAddress) }}</span>
|
<span class="ellipsis">{{ (scope.row.waybillDetail.receiveAddress) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('报关方式')" align="center" prop="waybillDetail.customsEclaration" min-width="80" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.emis_declare_mode" :value="scope.row.waybillDetail.customsEclaration"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('清关方式')" align="center" prop="waybillDetail.customsClear" min-width="80" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.emis_customs_clear" :value="scope.row.waybillDetail.customsClear"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('始发网点')" align="center" prop="waybillDetail.startSiteName" min-width="80" >
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="120" >
|
||||||
|
</el-table-column>
|
||||||
</xd-table>
|
</xd-table>
|
||||||
</XdPageContainer>
|
</XdPageContainer>
|
||||||
</template>
|
</template>
|
||||||
@ -127,7 +154,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: { },
|
components: { },
|
||||||
dicts: ['emis_scan_type'],
|
dicts: ['emis_scan_type','emis_declare_mode','emis_customs_clear'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 调整表格的高度,不允许滚动
|
// 调整表格的高度,不允许滚动
|
||||||
@ -191,6 +218,113 @@ export default {
|
|||||||
// this.queryParams.isAsc = column.order;
|
// this.queryParams.isAsc = column.order;
|
||||||
// this.queryData();
|
// this.queryData();
|
||||||
},
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const loadingInstance = this.$loading({
|
||||||
|
text: '正在导出...'
|
||||||
|
})
|
||||||
|
if (this.selectList && this.selectList.length > 0) {
|
||||||
|
this.exportData(this.selectList, loadingInstance);
|
||||||
|
} else {
|
||||||
|
queryScanStatRecordList({...this.queryInfo,pageSize:10000}).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 === 'status') {
|
||||||
|
var statusStr = 'xxx'
|
||||||
|
if (v[j] == 10) {
|
||||||
|
statusStr = 'xxx'
|
||||||
|
}
|
||||||
|
return statusStr;
|
||||||
|
}
|
||||||
|
//报关方式
|
||||||
|
if (j === 'waybillDetail.customsEclaration') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_declare_mode,v['waybillDetail']['customsEclaration']);
|
||||||
|
}
|
||||||
|
//清关方式
|
||||||
|
if (j === 'waybillDetail.customsClear') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_customs_clear,v['waybillDetail']['customsClear']);
|
||||||
|
}
|
||||||
|
//始发网点
|
||||||
|
if (j === 'waybillDetail.startSiteName') {
|
||||||
|
return v['waybillDetail']['startSiteName'];
|
||||||
|
}
|
||||||
|
//销售联系人
|
||||||
|
if (j === 'waybillDetail.salesmen') {
|
||||||
|
return v['waybillDetail']['salesmen'];
|
||||||
|
}
|
||||||
|
// 目的地
|
||||||
|
if (j === 'destinationName') {
|
||||||
|
return v['waybillDetail']['destinationName'];
|
||||||
|
}
|
||||||
|
// 寄件网点
|
||||||
|
if (j === 'sendSiteName') {
|
||||||
|
return v['waybillDetail']['sendSiteName'];
|
||||||
|
}
|
||||||
|
// 目的网点
|
||||||
|
if (j === 'dispatchUnderlingSiteName') {
|
||||||
|
return v['waybillDetail']['dispatchUnderlingSiteName'];
|
||||||
|
}
|
||||||
|
//件数
|
||||||
|
if (j === 'parcelQty') {
|
||||||
|
return v['waybillDetail']['parcelQty'];
|
||||||
|
}
|
||||||
|
// 实际重量
|
||||||
|
if (j === 'billWeight') {
|
||||||
|
return v['waybillDetail']['billWeight'];
|
||||||
|
}
|
||||||
|
// 子单号
|
||||||
|
if (j === 'billCodeSub') {
|
||||||
|
return v['waybillDetail']['billCodeSub'];
|
||||||
|
}
|
||||||
|
// 产品类型
|
||||||
|
if(j=== 'productTypeName'){
|
||||||
|
return v['waybillDetail']['productTypeName'];
|
||||||
|
}
|
||||||
|
// 预计送达时间
|
||||||
|
if (j === 'estimateDate') {
|
||||||
|
return v['waybillDetail']['estimateDate'];
|
||||||
|
}
|
||||||
|
// 收件人
|
||||||
|
if (j === 'receiveName') {
|
||||||
|
return v['waybillDetail']['receiveName'];
|
||||||
|
}
|
||||||
|
// 收件电话
|
||||||
|
if (j === 'receiveMobile') {
|
||||||
|
return v['waybillDetail']['receiveMobile'];
|
||||||
|
}
|
||||||
|
//收件地址
|
||||||
|
if (j === 'receiveAddress') {
|
||||||
|
return v['waybillDetail']['receiveAddress'];
|
||||||
|
}
|
||||||
|
return v[j]
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user