签收记录查询导出
This commit is contained in:
parent
4b47213d65
commit
260b78e7b9
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<XdPageContainer class="app-container">
|
<XdPageContainer class="app-container">
|
||||||
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px" v-show="showSearch" @search="getList" @reset="resetQuery">
|
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px" v-show="showSearch" @search="getList" @reset="resetQuery">
|
||||||
<el-form-item label="" prop="billCode">
|
<el-form-item label="" prop="billCode">
|
||||||
<div slot="label">
|
<div slot="label">
|
||||||
<el-radio-group class="query-label" v-model="queryParams.params.queryOrderType">
|
<el-radio-group class="query-label" v-model="queryParams.params.queryOrderType">
|
||||||
<el-radio label="1">运单号</el-radio>
|
<el-radio label="1">运单号</el-radio>
|
||||||
<el-radio label="0">订单号</el-radio>
|
<el-radio label="0">订单号</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-input
|
<!-- <el-input
|
||||||
v-model="queryParams.billCode"
|
v-model="queryParams.billCode"
|
||||||
:placeholder="$t('多个流水号逗号或换行隔开')"
|
:placeholder="$t('多个流水号逗号或换行隔开')"
|
||||||
clearable
|
clearable
|
||||||
@ -21,40 +21,40 @@
|
|||||||
clearable
|
clearable
|
||||||
:rows="2"
|
:rows="2"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
<!-- <el-col :span="16"> -->
|
<!-- <el-col :span="16"> -->
|
||||||
<el-form-item label="签收时间" prop="dateTimeRange">
|
<el-form-item label="签收时间" prop="dateTimeRange">
|
||||||
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
<!-- <el-col :span="8"> -->
|
<!-- <el-col :span="8"> -->
|
||||||
<el-form-item :label="$t('签收网点')" prop="signSiteCode" label-width="70px">
|
<el-form-item :label="$t('签收网点')" prop="signSiteCode" label-width="70px">
|
||||||
<EmisSiteSimplePicker v-model="queryParams.signSiteCode" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker>
|
<EmisSiteSimplePicker v-model="queryParams.signSiteCode" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
<!-- <el-col :span="8"> -->
|
<!-- <el-col :span="8"> -->
|
||||||
<el-form-item :label="$t('签收图片')" prop="isUploadPic">
|
<el-form-item :label="$t('签收图片')" prop="isUploadPic">
|
||||||
<el-select v-model="queryParams.params.isUploadPic" clearable :placeholder="$t('全部')" value="0">
|
<el-select v-model="queryParams.params.isUploadPic" clearable :placeholder="$t('全部')" value="0">
|
||||||
<el-option :label="$t('未上传')" value="0"></el-option>
|
<el-option :label="$t('未上传')" value="0"></el-option>
|
||||||
<el-option :label="$t('已上传')" value="1"></el-option>
|
<el-option :label="$t('已上传')" value="1"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
<!-- <el-col :span="8"> -->
|
<!-- <el-col :span="8"> -->
|
||||||
<el-form-item :label="$t('派件员')" prop="dispatchOrSendManCode">
|
<el-form-item :label="$t('派件员')" prop="dispatchOrSendManCode">
|
||||||
<EmisUserSimplePicker v-model="queryParams.dispatchOrSendManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
|
<EmisUserSimplePicker v-model="queryParams.dispatchOrSendManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
|
|
||||||
<!-- <el-col :span="8"> -->
|
<!-- <el-col :span="8"> -->
|
||||||
<el-form-item :label="$t('收件国家')" prop="country" label-width="70px">
|
<el-form-item :label="$t('收件国家')" prop="country" label-width="70px">
|
||||||
<CountryPicker v-model="queryParams.country" @onChange="onCountrySelect" ></CountryPicker>
|
<CountryPicker v-model="queryParams.country" @onChange="onCountrySelect" ></CountryPicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- </el-col> -->
|
<!-- </el-col> -->
|
||||||
|
|
||||||
|
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
|
|
||||||
|
|
||||||
<xd-table
|
<xd-table
|
||||||
@ -62,7 +62,7 @@
|
|||||||
slot="pageContent"
|
slot="pageContent"
|
||||||
slot-scope="slotProps"
|
slot-scope="slotProps"
|
||||||
:height="(slotProps.contentHeight)+'px'"
|
:height="(slotProps.contentHeight)+'px'"
|
||||||
|
ref="refTable"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
border
|
border
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -78,15 +78,15 @@
|
|||||||
>
|
>
|
||||||
<div slot="toolbar">
|
<div slot="toolbar">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
@ -109,26 +109,26 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column :label="$t('寄件日期')" align="center" prop="sendDate" min-width="170" >
|
<el-table-column :label="$t('寄件日期')" align="center" prop="sendDate" min-width="170" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.waybillDetail.sendDate) }}</span>
|
<span>{{ parseTime(scope.row.waybillDetail.sendDate) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="150" >
|
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="150" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.waybillDetail.estimateDate) }}</span>
|
<span>{{ parseTime(scope.row.waybillDetail.estimateDate) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('线路')" align="center" prop="" min-width="100">
|
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.waybillDetail.transLineTypeName }}</span>
|
<span>{{ scope.row.waybillDetail.transLineTypeName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('支付方式')" align="center" prop="paymentType" min-width="80" :show-overflow-tooltip="true" >
|
<el-table-column :label="$t('支付方式')" align="center" prop="paymentType" min-width="80" :show-overflow-tooltip="true" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.waybillDetail.paymentType"/>
|
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.waybillDetail.paymentType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('产品类型')" align="center" prop="" min-width="100">
|
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.waybillDetail.productTypeName }}</span>
|
<span>{{ scope.row.waybillDetail.productTypeName }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -162,8 +162,8 @@
|
|||||||
<el-table-column :label="$t('签收网点')" align="center" prop="signSite" min-width="100" />
|
<el-table-column :label="$t('签收网点')" align="center" prop="signSite" min-width="100" />
|
||||||
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" min-width="150">
|
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="ellipsis">{{ scope.row.waybillDetail.customerName }}</span>
|
<span class="ellipsis">{{ scope.row.waybillDetail.customerName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('数据产生来源')" align="center" prop="dataFrom" min-width="150">
|
<el-table-column :label="$t('数据产生来源')" align="center" prop="dataFrom" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -320,22 +320,7 @@ export default {
|
|||||||
/** 查询扫描记录列表 */
|
/** 查询扫描记录列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
console.log("---->this.queryParams,", this.queryParams);
|
let queryParams = this.initQueryParams();
|
||||||
let queryParams = Object.assign({},this.queryParams);
|
|
||||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
|
||||||
queryParams.params.beginScanDate = dateToStr(new Date(this.dateTimeRange[0]));
|
|
||||||
queryParams.params.endScanDate = dateToStr(new Date(this.dateTimeRange[1]));
|
|
||||||
}else{
|
|
||||||
queryParams.params.beginScanDate = null;
|
|
||||||
queryParams.params.endScanDate = null;
|
|
||||||
}
|
|
||||||
if(this.queryParams.params.queryOrderType == "1"){
|
|
||||||
queryParams.orderSN=null;
|
|
||||||
}else if(this.queryParams.params.queryOrderType == "0"){
|
|
||||||
queryParams.orderSN=this.queryParams.billCode;
|
|
||||||
queryParams.billCode=null;
|
|
||||||
}
|
|
||||||
queryParams.scanType="50";
|
|
||||||
listEmisTmsScanRecord(queryParams).then(response => {
|
listEmisTmsScanRecord(queryParams).then(response => {
|
||||||
this.tmsScanList = [];
|
this.tmsScanList = [];
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -356,6 +341,24 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
initQueryParams() {
|
||||||
|
let qParam = Object.assign({}, this.queryParams);
|
||||||
|
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||||
|
qParam.params.beginScanDate = dateToStr(new Date(this.dateTimeRange[0]));
|
||||||
|
qParam.params.endScanDate = dateToStr(new Date(this.dateTimeRange[1]));
|
||||||
|
} else {
|
||||||
|
qParam.params.beginScanDate = null;
|
||||||
|
qParam.params.endScanDate = null;
|
||||||
|
}
|
||||||
|
if (this.queryParams.params.queryOrderType == "1") {
|
||||||
|
qParam.orderSN = null;
|
||||||
|
} else if (this.queryParams.params.queryOrderType == "0") {
|
||||||
|
qParam.orderSN = this.queryParams.billCode;
|
||||||
|
qParam.billCode = null;
|
||||||
|
}
|
||||||
|
qParam.scanType = "50";
|
||||||
|
return qParam;
|
||||||
|
},
|
||||||
onStaffSelect(item){
|
onStaffSelect(item){
|
||||||
this.form.dispatchOrSendMan=item.empName || this.$store.getters.empName;
|
this.form.dispatchOrSendMan=item.empName || this.$store.getters.empName;
|
||||||
this.form.dispatchOrSendManCode=item.empCode || this.$store.getters.empCode;
|
this.form.dispatchOrSendManCode=item.empCode || this.$store.getters.empCode;
|
||||||
@ -440,25 +443,12 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const loadingInstance = this.$loading({
|
const loadingInstance = this.$loading({
|
||||||
text: '正在导出...'
|
text: '正在导出...'
|
||||||
})
|
})
|
||||||
let queryParams = Object.assign({},this.queryParams);
|
let queryParams = this.initQueryParams();
|
||||||
queryParams.pageNum=1;
|
queryParams.pageNum = 1;
|
||||||
queryParams.pageSize=5000;
|
queryParams.pageSize = 5000;
|
||||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
|
||||||
queryParams.params.beginSignDate = this.dateTimeRange[0];
|
|
||||||
queryParams.params.endSignDate = this.dateTimeRange[1];
|
|
||||||
}else{
|
|
||||||
queryParams.params.beginSignDate = null;
|
|
||||||
queryParams.params.endSignDate = null;
|
|
||||||
}
|
|
||||||
if(this.queryParams.params.queryOrderType == "1"){
|
|
||||||
queryParams.orderSN=null;
|
|
||||||
}else if(this.queryParams.params.queryOrderType == "0"){
|
|
||||||
queryParams.orderSN=this.queryParams.billCode;
|
|
||||||
queryParams.billCode=null;
|
|
||||||
}
|
|
||||||
listEmisTmsScanRecord(queryParams).then(response => {
|
listEmisTmsScanRecord(queryParams).then(response => {
|
||||||
this.downloadLoading = false
|
this.downloadLoading = false
|
||||||
let rows = response.rows;
|
let rows = response.rows;
|
||||||
@ -467,40 +457,27 @@ export default {
|
|||||||
this.$modal.msgError("未查到单号");
|
this.$modal.msgError("未查到单号");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// for (let index = 0; index < rows.length; index++) {
|
|
||||||
// let scanRstItem = rows[index];
|
|
||||||
// console.log(scanRstItem);
|
|
||||||
// let record =Object.assign({}, scanRstItem)
|
|
||||||
// record.queryType = this.queryParams.queryType;
|
|
||||||
// record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
|
||||||
// record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
|
||||||
// this.tmsScanList.push(record);
|
|
||||||
// }
|
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
const curList = []
|
this.exportData(rows,loadingInstance);
|
||||||
for (let index = 0; index < response.rows.length; index++) {
|
|
||||||
let scanRstItem = response.rows[index];
|
|
||||||
let record =Object.assign({}, scanRstItem)
|
|
||||||
record.orderType = this.queryParams.orderType;
|
|
||||||
record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
|
||||||
record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
|
||||||
curList.push(record);
|
|
||||||
}
|
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
|
||||||
const tHeader = ['id','单号','单号类型','车牌号','扫描时间','扫描类型','扫描网点','上/下一网点','扫描员','录入时间','扫描重量'];
|
|
||||||
const filterVal = ['id','billCode','orderType','carNo','scanDate','scanType','scanSite','preOrNextStation','scanMan','createTime','scanWeight'];
|
|
||||||
const data = this.formatJson(filterVal, curList, curList)
|
|
||||||
excel.export_json_to_excel({
|
|
||||||
header: tHeader,
|
|
||||||
data,
|
|
||||||
filename: '签收记录',
|
|
||||||
autoWidth: true
|
|
||||||
})
|
|
||||||
loadingInstance.close()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
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) {
|
formatJson(filterVal, jsonData, resData) {
|
||||||
let index = 0
|
let index = 0
|
||||||
return jsonData.map(v => filterVal.map(j => {
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
@ -508,18 +485,50 @@ export default {
|
|||||||
return ++index
|
return ++index
|
||||||
}
|
}
|
||||||
if (j === 'status') {
|
if (j === 'status') {
|
||||||
var statusStr='xxx'
|
return '已签收';
|
||||||
if(v[j] == 10){
|
}
|
||||||
statusStr='xxx'
|
if (j === 'sendDate') {
|
||||||
}
|
//formatJson
|
||||||
return statusStr;
|
return v['waybillDetail']?.[j]||'';
|
||||||
|
}
|
||||||
|
//waybillDetail.estimateDate
|
||||||
|
if (j === 'estimateDate') {
|
||||||
|
return v['waybillDetail']?.[j]||'';
|
||||||
|
}
|
||||||
|
//waybillDetail.transLineTypeName
|
||||||
|
if (j === 'transLineTypeName') {
|
||||||
|
return v['waybillDetail']?.[j]||'';
|
||||||
|
}
|
||||||
|
//paymentType
|
||||||
|
if (j === 'paymentType') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_payment_type,v['waybillDetail'][j]);
|
||||||
|
}
|
||||||
|
//waybillDetail.timeType
|
||||||
|
if (j === 'timeType') {
|
||||||
|
return v['waybillDetail']?.[j]||'';
|
||||||
|
}
|
||||||
|
//waybillDetail.customerName
|
||||||
|
if (j === 'customerName') {
|
||||||
|
return v['waybillDetail']?.[j]||'';
|
||||||
|
}
|
||||||
|
//waybillDetail.receiveCountryName
|
||||||
|
if (j === 'waybillDetail.receiveCountryName') {
|
||||||
|
return v['waybillDetail']?.['receiveCountryName']||'';
|
||||||
|
}
|
||||||
|
// waybillDetail.receiveProvinceName
|
||||||
|
if (j === 'waybillDetail.receiveProvinceName') {
|
||||||
|
return v['waybillDetail']?.['receiveProvinceName']||'';
|
||||||
|
}
|
||||||
|
//waybillDetail.productTypeName
|
||||||
|
if (j === 'productTypeName') {
|
||||||
|
return v['waybillDetail']?.[j]||'';
|
||||||
}
|
}
|
||||||
return v[j]
|
return v[j]
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
/** 列索引函数 */
|
/** 列索引函数 */
|
||||||
getIndex($index) {
|
getIndex($index) {
|
||||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -527,26 +536,26 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-divider{
|
.el-divider{
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
background: 0 0;
|
background: 0 0;
|
||||||
border-top: 1px solid #E6EBF5;
|
border-top: 1px solid #E6EBF5;
|
||||||
}
|
}
|
||||||
.el-divider__text {
|
.el-divider__text {
|
||||||
color: #0955ee;
|
color: #0955ee;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.query-label {
|
.query-label {
|
||||||
.el-radio{
|
.el-radio{
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 23px;
|
line-height: 23px;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
.ellipsis {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
vertical-align: top;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
vertical-align: top;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user