签收记录查询导出
This commit is contained in:
parent
4b47213d65
commit
260b78e7b9
@ -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"
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<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>
|
||||||
@ -128,7 +128,7 @@
|
|||||||
<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>
|
||||||
@ -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;
|
||||||
@ -443,22 +446,9 @@ export default {
|
|||||||
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,39 +457,26 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
exportData(selData, loadingInstance) {
|
||||||
|
const curList = selData
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
const tHeader = ['id','单号','单号类型','车牌号','扫描时间','扫描类型','扫描网点','上/下一网点','扫描员','录入时间','扫描重量'];
|
const exportParam = this.$refs.refTable.getExportParam();
|
||||||
const filterVal = ['id','billCode','orderType','carNo','scanDate','scanType','scanSite','preOrNextStation','scanMan','createTime','scanWeight'];
|
const tHeader = exportParam.header;
|
||||||
const data = this.formatJson(filterVal, curList, curList)
|
const filterVal = exportParam.filter;
|
||||||
|
const data = this.formatJson(filterVal, curList, selData)
|
||||||
excel.export_json_to_excel({
|
excel.export_json_to_excel({
|
||||||
header: tHeader,
|
header: tHeader,
|
||||||
data,
|
data,
|
||||||
filename: '签收记录',
|
filename: '签收记录列表',
|
||||||
autoWidth: true
|
autoWidth: true
|
||||||
})
|
})
|
||||||
loadingInstance.close()
|
loadingInstance.close()
|
||||||
})
|
})
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
formatJson(filterVal, jsonData, resData) {
|
formatJson(filterVal, jsonData, resData) {
|
||||||
let index = 0
|
let index = 0
|
||||||
@ -508,11 +485,43 @@ export default {
|
|||||||
return ++index
|
return ++index
|
||||||
}
|
}
|
||||||
if (j === 'status') {
|
if (j === 'status') {
|
||||||
var statusStr='xxx'
|
return '已签收';
|
||||||
if(v[j] == 10){
|
|
||||||
statusStr='xxx'
|
|
||||||
}
|
}
|
||||||
return statusStr;
|
if (j === 'sendDate') {
|
||||||
|
//formatJson
|
||||||
|
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]
|
||||||
}))
|
}))
|
||||||
@ -530,23 +539,23 @@ export default {
|
|||||||
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 {
|
.ellipsis {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user