429 lines
14 KiB
Vue
429 lines
14 KiB
Vue
<template>
|
|
<XdPageContainer >
|
|
<el-form slot="pageHeader" ref="queryForm" size="mini" :model="queryParams" :rules="rules" label-width="100px">
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
<el-col :span="16">
|
|
<el-col :span="16">
|
|
<el-form-item label="扫描时间" prop="dateTimeRange">
|
|
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item :label="$t('扫描站点')" prop="scanSiteCode" label-width="70px">
|
|
<!-- <EmisSiteSimplePicker v-model="queryParams.scanSiteCode" :parentSiteCode="$store.getters.ownerSiteCode" :blIncludeChildSite="1" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker> -->
|
|
|
|
<EmisSiteSimplePicker v-model="queryParams.scanSiteCode" ></EmisSiteSimplePicker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item :label="$t('扫描类型')" prop="scanType">
|
|
<el-select v-model="queryParams.scanType" :placeholder="$t('全部')" value="0">
|
|
<el-option :label="$t('网点发件')" value="20"></el-option>
|
|
<el-option :label="$t('网点到件')" value="30"></el-option>
|
|
<el-option :label="$t('网点派件')" value="40"></el-option>
|
|
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item :label="$t('上/下一网点')" prop="preOrNextStationCode" label-width="90px">
|
|
<EmisSiteSimplePicker v-model="queryParams.preOrNextStationCode" @onChange="onPreOrNextSiteSelect" ></EmisSiteSimplePicker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item :label="$t('扫描人')" prop="scanManCode">
|
|
<EmisUserSimplePicker v-model="queryParams.scanManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<!-- <el-col :span="16">
|
|
<el-form-item :label="$t('')" prop="thisSiteScanType" label-width="70px">
|
|
<el-radio-group v-model="queryParams.params.thisSiteScanType">
|
|
<el-radio :label="20">本站发件</el-radio>
|
|
<el-radio :label="30">本站到件</el-radio>
|
|
<el-radio :label="40">本站派件</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-col> -->
|
|
</el-col>
|
|
</el-row >
|
|
</el-form>
|
|
|
|
<xd-table
|
|
slot="pageContent"
|
|
slot-scope="slotProps"
|
|
:height="(slotProps.contentHeight-60)+'px'"
|
|
|
|
ref="refTable"
|
|
|
|
v-loading="loading"
|
|
border
|
|
size="mini"
|
|
|
|
storageName="emisStatList_main_240702"
|
|
|
|
:data="emisStatList"
|
|
:showSearch.sync="showSearch"
|
|
:queryParams="queryParams"
|
|
:total="total"
|
|
|
|
@selection-change="handleSelectionChange"
|
|
@sort-change="handleSortChange"
|
|
@row-dblclick="onDblClick"
|
|
highlight-current-row
|
|
>
|
|
<div slot="toolbar">
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
size="mini"
|
|
@click="getList"
|
|
>查询</el-button>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
size="mini"
|
|
@click="getList"
|
|
>导出</el-button>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column :label="$t('网点名称')" align="center" prop="scanSiteName" min-width="100" />
|
|
<el-table-column :label="$t('扫描票数')" align="center" prop="scanCount" min-width="150" />
|
|
<el-table-column :label="$t('已签收票数')" align="center" prop="signCount" min-width="150" />
|
|
<el-table-column :label="$t('未签收票数')" align="center" prop="destName" min-width="150">
|
|
<template slot-scope="scope">
|
|
<span>{{ (scope.row.scanCount - scope.row.signCount) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('签收率')" align="center" prop="registerSite" min-width="100">
|
|
<template slot-scope="scope">
|
|
<span>{{ ((scope.row.signCount / scope.row.scanCount) * 100).toFixed(2) + '%' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</xd-table>
|
|
|
|
</XdPageContainer>
|
|
</template>
|
|
|
|
<script>
|
|
import { listEmisTmsScanRecord, queryStatList, queryScanStatRecordList } from "@/api/emis/emisTmsScanRecord";
|
|
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
|
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
|
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
import { getDateTimeToString } from '@/utils/payutils'
|
|
import {dateToStr} from '@/utils/custom'
|
|
|
|
export default {
|
|
name: "SignatureAbnormalComparison",
|
|
components: { EmisUserSimplePicker,elDateAdvPicker, EmisSiteSimplePicker, EmisGetNextSitePicker, CountryPicker },
|
|
dicts: ['emis_scan_type'],
|
|
data() {
|
|
return {
|
|
// 调整表格的高度,不允许滚动
|
|
tableHeight: 200,
|
|
// 遮罩层
|
|
loading: false,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 创建时间搜索
|
|
dateTimeRange:[],
|
|
// 总条数
|
|
total: 0,
|
|
recordTotal:0,
|
|
// 网点电子面单申请表格数据
|
|
emisStatList: [],
|
|
emisStatRecordList:[],
|
|
// 弹出层标题
|
|
title: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
|
|
activeName: 'first',
|
|
|
|
openForm: false,
|
|
titleForm: "",
|
|
|
|
titleEmisElectronicPagApply: "",
|
|
openEmisElectronicPagApply: false,
|
|
|
|
// 显示编辑框更多
|
|
moreInputVisible: false,
|
|
|
|
dataMap:new Map(),
|
|
|
|
// 弹出展示层
|
|
currentId:null,
|
|
id:null,
|
|
titleView:"",
|
|
openView: false,
|
|
// 备注时间范围
|
|
daterangeApplyDate: [],
|
|
// 备注时间范围
|
|
daterangeCreateTime: [],
|
|
// 备注时间范围
|
|
daterangeUpdateTime: [],
|
|
|
|
tempQueryParams:null,
|
|
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum:1,
|
|
pageSize:20,
|
|
scanType:null,
|
|
scanSiteCode:this.$store.getters.ownerSiteCode,
|
|
preOrNextStationCode:null,
|
|
scanManCode:null,
|
|
params:{
|
|
beginScanDate:null,
|
|
endScanDate:null,
|
|
},
|
|
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
rules: {
|
|
id: [
|
|
{ required: true, message: "id不能为空", trigger: "blur" }
|
|
],
|
|
}
|
|
};
|
|
},
|
|
created() {
|
|
this.queryParams.scanType='20';
|
|
// this.getList();
|
|
this.$nextTick(function() {
|
|
let queryFormEl = this.$refs.queryForm.$el;
|
|
let tableH = queryFormEl.offsetHeight+190;
|
|
this.tableHeight = window.innerHeight - tableH;
|
|
});
|
|
},
|
|
mounted() {
|
|
const end = new Date()
|
|
const start = new Date()
|
|
start.setHours(0,0,0,0)
|
|
end.setHours(23,59,59,0)
|
|
this.dateTimeRange=[start,end];
|
|
// this.getList();
|
|
},
|
|
methods: {
|
|
/** 查询统计信息 */
|
|
getList() {
|
|
this.loading = true;
|
|
console.log("---->this.queryParams,", this.dateTimeRange);
|
|
|
|
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
|
this.queryParams.params.beginScanDate = dateToStr(this.dateTimeRange[0]);
|
|
this.queryParams.params.endScanDate = dateToStr(this.dateTimeRange[1]);
|
|
}else{
|
|
this.queryParams.params.beginScanDate = null;
|
|
this.queryParams.params.endScanDate = null;
|
|
}
|
|
this.tempQueryParams = {...this.queryParams};
|
|
queryStatList(this.tempQueryParams).then(response => {
|
|
if(!response ||response.code != 200){
|
|
this.$modal.msgError(response && response.msg || "未知错误")
|
|
return;
|
|
}
|
|
this.emisStatList = response.rows;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
});
|
|
},
|
|
/** 查询明细列表 */
|
|
onDblClick(row, column, event) {
|
|
// this.loading = true;
|
|
this.tempQueryParams.scanSiteCode = row.scanSiteCode;
|
|
console.log("===>onDblClick====>",this.tempQueryParams);
|
|
this.$emit("onSelect", this.tempQueryParams);
|
|
},
|
|
onStaffSelect(item){
|
|
this.queryParams.scanMan=item.empName || this.$store.getters.empName;
|
|
this.queryParams.scanManCode=item.empCode || this.$store.getters.empCode;
|
|
},
|
|
onScanSiteSelect(item){
|
|
this.queryParams.scanSite=item && item.siteName;
|
|
this.queryParams.scanSiteCode=item && item.siteCode;
|
|
},
|
|
onPreOrNextSiteSelect(item){
|
|
this.queryParams.preOrNextStation=item && item.siteName;
|
|
this.queryParams.preOrNextStationCode=item && item.siteCode;
|
|
},
|
|
onDestinationSelect(item){
|
|
this.queryParams.destCode=item && item.destCode;
|
|
this.queryParams.destName=item && item.destName;
|
|
},
|
|
onDateSelect(value){
|
|
console.log("date picker---->", value)
|
|
this.dateTimeRange=value;
|
|
},
|
|
|
|
handleTypeSelect(selection){
|
|
this.sctype = selection.value;
|
|
},
|
|
handleQuery(){
|
|
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.selectionList=selection;
|
|
this.ids = selection.map(item => item.id)
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
|
handleSortChange(column) {
|
|
this.queryParams.orderByColumn = column.prop;
|
|
this.queryParams.isAsc = column.order;
|
|
this.getList();
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
const loadingInstance = this.$loading({
|
|
text: '正在导出...'
|
|
})
|
|
|
|
|
|
if(this.selectionList&&this.selectionList.length>0){
|
|
this.exportData(this.selectionList,loadingInstance);
|
|
}
|
|
else{
|
|
let qExportParam=this.initQueryParams();
|
|
qExportParam.pageNum=1;
|
|
qExportParam.pageSize=5000;
|
|
|
|
listEmisWaybill(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 === '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]
|
|
}))
|
|
},
|
|
|
|
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.el-divider{
|
|
margin-top: 0px;
|
|
background: 0 0;
|
|
border-top: 1px solid #E6EBF5;
|
|
}
|
|
.el-divider__text {
|
|
color: #0955ee;
|
|
cursor: pointer;
|
|
}
|
|
.ellipsis {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
vertical-align: top;
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|