emis-frontend/src/views/emis/emisWaybill/CreditSendWaybillList.vue

967 lines
34 KiB
Vue
Raw Normal View History

2025-03-15 02:07:40 +00:00
<template>
<XdPageContainer class="app-container">
<XdTable
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
highlight-current-row
ref="refTable"
row-key="id"
2025-03-15 03:20:40 +00:00
storageName="CreditSendWaybillList_main_240702"
2025-03-15 02:07:40 +00:00
2025-06-10 02:58:56 +00:00
:showStatInfo="true"
2025-03-15 02:07:40 +00:00
v-loading="loading"
border
size="mini"
:data="emisWaybillList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
@row-dblclick="handleShowTraceInfo"
:row-class-name="tableRowClassName"
:virtual-scroll="{itemSize: 10}"
:data-options="{ cached: true }"
>
<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:emisWaybill:export']"
>导出</el-button>
</el-col>
</el-row>
</div>
<div slot="statInfo" style="font-size: 13px;">
总票数:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalNum:0}}</span>,
总件数:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalParcelQty:0}}</span>,
实际重量:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalBillWeight:0}}</span>,
体积:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalVolume:0}}</span>,
体积重量:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalVolumeWeight:0}}</span>,
结算重量:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalSettlementWeight:0}}</span>,
总运费:<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">
<span> {{scope.row.billCode}} </span>
<i v-if="scope.row.billCode"
style="margin-left: 4px; cursor: pointer"
class="el-icon-document-copy"
@click="handleCopy(scope.row,$event)"></i>
</template>
</el-table-column>
<el-table-column :label="$t('快件跟踪')" align="left" prop="lastTraceInfo" min-width="350" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<div >{{ scope.row.lastTraceInfo }}</div>
</template>
</el-table-column>
<!-- class="link-type" @click="handleShowTraceInfo(scope.row)" class="link-type" @click="handleShowTraceInfo(scope.row)" class="link-type" @click="handleShowTraceInfo(scope.row)" -->
<el-table-column :label="$t('跟踪预警')" align="center" prop="traceWaring" min-width="100" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<div v-if="scope.row.lastScanDate!=null" >
<div v-if="scope.row.blSign=='1'" >
已签收
</div>
<div v-else >
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}} 天
</span>
<span v-else >
{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}}天
</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('收款状态')" align="center" prop="paymentStatus" width="100" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_status" :value="scope.row.paymentStatus"/>
</template>
</el-table-column>
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" width="100" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
</template>
</el-table-column>
<el-table-column :label="$t('发件人')" align="center" prop="fjr" width="180" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.sendName }}--{{ scope.row.receiveName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('快件类型')" align="center" prop="kjlx" width="180" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.sendSiteName }}--{{ scope.row.dispatchUnderlingSiteName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('预计送达时间')" align="center" prop="estimateDate" min-width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.estimateDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('发货日期')" align="center" prop="sendDate" min-width="100" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收件员')" align="center" prop="takePieceEmployeeName" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.pickupMethod==2">{{scope.row.takePieceEmployeeName}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column :label="$t('合同号')" align="center" prop="custOrderId" width="100" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('操作员')" align="center" prop="operateEmployeeName" min-width="100" >
<template slot-scope="scope">
<span v-if="scope.row.pickupMethod==1">{{scope.row.operateEmployeeName}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('时效')" align="center" prop="timeType" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('报关方式')" align="center" prop="customsEclaration" min-width="80" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_declare_mode" :value="scope.row.customsEclaration"/>
</template>
</el-table-column>
<el-table-column :label="$t('清关方式')" align="center" prop="customsClear" min-width="80" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_customs_clear" :value="scope.row.customsClear"/>
</template>
</el-table-column>
<el-table-column :label="$t('录入人')" align="center" prop="registerManName" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('客户名称')" align="center" prop="custName" min-width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.paymentType==2 || scope.row.paymentType==4 || scope.row.paymentType==5">{{scope.row.custName}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column :label="$t('回款联系人')" align="center" prop="payee" min-width="100" />
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" min-width="100" />
<el-table-column :label="$t('是否问题件')" align="center" prop="blIsQuestion" min-width="80" >
<template slot-scope="scope">
<el-tag v-if="scope.row.blIsQuestion==1" type="danger">是</el-tag>
<el-tag v-else type="info">否</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('问题件类型')" align="center" prop="problemTypeName" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('问题件原因')" align="center" prop="problemCause" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件网点')" align="center" prop="sendSiteName" min-width="80" :show-overflow-tooltip="true"/>
// <el-table-column :label="$t('寄件财务中心')" align="center" prop="sendSiteFincailName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件手机')" align="center" prop="sendMobile" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件国家')" align="center" prop="sendCountryName" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('寄件省')" align="center" prop="sendProvinceName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件市')" align="center" prop="sendCityName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件区')" align="center" prop="sendCountyName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件地址')" align="center" prop="sendAddress" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件/签收短信')" align="center" prop="blMessage" min-width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div v-if="scope.row.blMessage==1" >发送</div>
<div v-else>不发送</div>
</template>
</el-table-column>
<el-table-column :label="$t('收货人')" align="center" prop="receiveName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货电话')" align="center" prop="receiveMobile" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货公司')" align="center" prop="receiveCompany" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货国家')" align="center" prop="receiveCountryName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货省')" align="center" prop="receiveProvinceName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货市')" align="center" prop="receiveCityName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货区')" align="center" prop="receiveCountyName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收货地址')" align="center" prop="receiveAddress" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('派货短信')" align="center" prop="blAcceptMessage" min-width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div v-if="scope.row.blAcceptMessage==1" >发送</div>
<div v-else>不发送</div>
</template>
</el-table-column>
<el-table-column :label="$t('目的地')" align="center" prop="destinationName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('目的网点')" align="center" prop="dispatchUnderlingSiteName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('货物名称')" align="center" prop="goodsInfo" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('包装类型')" align="center" prop="packType" min-width="80" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_tab_packing_type" :value="scope.row.packType"/>
</template>
</el-table-column>
<el-table-column :label="$t('件数')" align="center" prop="parcelQty" min-width="80" />
<el-table-column :label="$t('实际重量')" align="center" prop="billWeight" min-width="80" />
<el-table-column :label="$t('体积')" align="center" prop="totalVolume" min-width="80" />
<el-table-column :label="$t('体积重量')" align="center" prop="volumeWeight" min-width="80" />
<el-table-column :label="$t('结算重量')" align="center" prop="settlementWeight" min-width="80" />
<el-table-column :label="$t('派件方式')" align="center" prop="dispatchMethod" min-width="80" >
<template slot-scope="scope">
<div v-if="scope.row.dispatchMethod==1" >派送</div>
<div v-else>自提</div>
</template>
</el-table-column>
<el-table-column :label="$t('支付类型')" align="center" prop="paymentType" min-width="80" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
</template>
</el-table-column>
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="80" />
// <el-table-column :label="$t('保价金额')" align="center" prop="insureValue" min-width="80" :show-overflow-tooltip="true"/>
// <el-table-column :label="$t('保费')" align="center" prop="insureFee" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('费用备注')" align="center" prop="feeRemark" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('签收状态')" align="center" prop="blSign" width="80" >
<template slot-scope="scope">
<el-tag v-if="scope.row.blSign=='1'" type="success">已签收</el-tag>
<el-tag v-else type="danger">未签收</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('签收时间')" align="center" prop="signDate" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('签收人')" align="center" prop="signMan" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('派件人')" align="center" prop="dispatchManName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('派件网点')" align="center" prop="dispatchSiteName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('录单网点')" align="center" prop="registerSiteName" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('录单备注')" align="center" prop="remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('数据来源')" align="center" prop="dataFrom" min-width="80" />
<el-table-column :label="$t('图片上传')" align="center" prop="blUploadPic" min-width="100" >
<template slot-scope="scope">
<el-tag v-if="scope.row.goodsPics!=null && scope.row.goodsPics!=''" type="success">是</el-tag>
<el-tag v-else type="danger">否</el-tag>
</template>
</el-table-column>
</XdTable>
<el-dialog title="快件跟踪" :visible.sync="openTraceInfo" width="70%" :close-on-click-modal="false" v-dialogDrag append-to-body>
<TraceWaybillDetailView :key="currentTraceBillCode" :scanBillCode="currentTraceBillCode" :billDetail="currentTraceBillItem"></TraceWaybillDetailView>
</el-dialog>
</XdPageContainer>
</template>
<script>
import 'element-ui/lib/theme-chalk/display.css';
import VirtualScroll from "el-table-virtual-scroll";
import { VirtualColumn } from "el-table-virtual-scroll";
import { listEmisWaybill,getQueryStatInfoMap } from "@/api/emis/emisWaybill";
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
// import emisWaybillView from '@/views/emis/emisWaybill/emisWaybillView';
import emisWaybillForm from '@/views/emis/emisWaybill/emisWaybillForm';
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
import CountryPicker2 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
import ProvincePicker2 from '@/views/emis/EmisBaseTools/ProvincePicker.vue';
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
import EmisUserSimplePicker1 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
import EmisUserSimplePicker2 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
import ProblemTypeMultiplePicker from '@/views/emis/EmisBaseTools/ProblemTypeMultiplePicker.vue';
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
import TraceDetail from '@/views/emis/customerService/traceDetail.vue';
import WaybillDetailReadOnly from '@/views/emis/emisWaybill/waybillDetailReadOnly.vue';
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
import XdTable2 from '@/components/XdTable/index2.vue';
import { queryLastRecord } from "@/api/emis/emisTmsScanRecord";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
import { formatSearchStr,deepClone } from '@/utils/index'
import clip from '@/utils/clipboard'
export default {
name: "CreditSendWaybillList",
components: {
XdTable2,
VirtualScroll,
VirtualColumn,
TraceWaybillDetailView,
EmisMonthpayAccountPicker,
elDateAdvPicker,emisWaybillForm,
CountryPicker1,
CountryPicker2,ProvincePicker2,
TransLinePicker,TransProductPicker,
EmisUserSimplePicker0,
EmisUserSimplePicker1,
EmisUserSimplePicker2,
EmisSiteSimplePicker1,
EmisSiteSimplePicker2,
ProblemTypeMultiplePicker,
TraceDetail,
WaybillDetailReadOnly,
},
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
2025-08-21 07:08:13 +00:00
'emis_payment_status'
2025-03-15 02:07:40 +00:00
],
data() {
return {
tableHeight: 200,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 运单列表表格数据
emisWaybillList: [],
selectionList:[],
tableData: [],
currentId:null,
openForm: false,
titleForm: "",
billCode:null,
openTraceInfo:false,
currentTraceBillItem:null,
currentTraceBillCode:null,
queryOrderType:null,
queryOrderDateType:null,
queryExpireNotSign:null,
queryStatInfoMap:null,
// 弹出展示层
id:null,
titleView:"",
openView: false,
// 时间搜索
dateRange:[],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 20,
orderSn: null,
billCode: null,
billCodeSub: null,
orderStatus: null,
waybillStatus: null,
orderType: null,
orderDate: null,
customerCode: null,
customerName: null,
receiveCustomerCode: null,
receiveCustomerName: null,
thirdCustomerCode: null,
thirdCustomerName: null,
receiveName: null,
receiveCompany: null,
receiveMobile: null,
receiveTel: null,
receiveCountry: null,
receiveProvince: null,
receiveCity: null,
receiveCounty: null,
receiveTown: null,
receiveAddress: null,
receivePostcode: null,
receivePcd: null,
sendName: null,
sendCompany: null,
sendMobile: null,
sendTel: null,
sendCountry: null,
sendProvince: null,
sendCity: null,
sendCounty: null,
sendTown: null,
sendAddress: null,
sendPostcode: null,
sendPcd: null,
paymentType: null,
calcFeeType: null,
custNo: null,
transLineType: null,
productType: null,
timeType: null,
meterType: null,
customsClear: null,
customsEclaration: null,
estimateDate: null,
packType: null,
dispatchMethod: null,
pickupMethod: null,
pickStartDate: null,
pickFinishDate: null,
pickFailReason: null,
intoWarehouseCode: null,
intoWarehouseName: null,
intoWarehouseAddress: null,
intoWarehouseContact: null,
intoWarehousePhone: null,
intoWarehouseBillCode: null,
warehouseInNo: null,
customerDeliveryBeginTime: null,
customerDeliveryEndTime: null,
goodsType: null,
goodsInfo: null,
goodsPics: null,
blPrepareInFreight: null,
prepareInEstFee: null,
prepareInRealFee: null,
prepareInExpress: null,
prepareInBillCode: null,
prepareInRemark: null,
prepareInSupplier: null,
totalWeight: null,
totalVolume: null,
parcelQty: null,
billWeight: null,
volumeWeight: null,
currency: null,
settlementWeight: null,
feeWeight: null,
freight: null,
blOverLong: null,
blBill: null,
blOverWeight: null,
overWeightNumber: null,
feeRemark: null,
thirdCode: null,
realValue: null,
blInsure: null,
insureValue: null,
insureValueCurrency: null,
insureFeeCurrency: null,
insureFee: null,
insureRemark: null,
insureSiteCode: null,
insureDate: null,
blPrint: null,
printManCode: null,
printSite: null,
printDate: null,
printCount: null,
blDispFd: null,
transferCode: null,
transferBillcode: null,
dispFdDate: null,
dispFdReason: null,
currentSiteCode: null,
lastSiteCode: null,
registerSiteCode: null,
registerDate: null,
registerManCode: null,
takePieceEmployeeCode: null,
sendSiteCode: null,
sendDate: null,
dispatchManCode: null,
dispatchDate: null,
dispatchSiteCode: null,
produceBillDate: null,
produceBillSiteCode: null,
produceBillManCode: null,
destinationCode: null,
destinationProvince: null,
destinationCity: null,
destinationCounty: null,
dispatchUnderlingSiteCode: null,
destinationCenterCode: null,
marketManCode: null,
payee: null,
salesmen: null,
operateEmployeeCode: null,
blIsQuestion: null,
problemType: null,
problemCause: null,
problemDelayDays: null,
blMessage: null,
blAcceptMessage: null,
blGenSubbill: null,
signMan: null,
signManCode: null,
signSiteCode: null,
signDate: null,
billPicSendRmk: null,
billPicDispatchRmk: null,
timezoneOffset: null,
paymentStatus:null,
delFlag: null,
remark: null,
blSign:null,
params:{
expireNotSign:null,
problemQueryType:null,
problemQueryIds:null,
queryTabType:"1",
querySendType:"1",
blUploadGoodsPic:null,
settleType:null,
2025-04-30 01:56:14 +00:00
queryquotaType:null,
2025-03-15 02:07:40 +00:00
}
},
};
},
watch: {
$route () {
if(this.$route.query.action=='queryByCredit'){
if(this.$route.query.custNo!=null){
this.queryParams.custNo=this.$route.query.custNo;
this.queryParams.paymentType='2,4,5';
}
2025-03-19 05:16:54 +00:00
if(this.$route.query.payee!=null){
this.queryParams.payee=this.$route.query.payee;
2025-03-15 02:07:40 +00:00
this.queryParams.paymentType='1,3';
}
this.queryParams.carryType=this.$route.query.transType;
2025-04-30 02:40:14 +00:00
this.queryParams.params.queryQuotaType=this.$route.query.queryQuotaType;
2025-03-15 02:07:40 +00:00
this.queryParams.paymentStatus='0,2';
this.queryParams.params.problemQueryType=2;
this.queryParams.params.problemQueryIds="173,170,151";
let startTime=this.$route.query.startDate;
let endTime=this.$route.query.endDate;
this.dateRange=[timeFormat(startTime), timeFormat(endTime)]
this.queryOrderType="1";
this.queryOrderDateType="1";
this.getList();
}
}
},
created() {
if(this.$route.query.action=='queryByCredit'){
if(this.$route.query.custNo!=null){
this.queryParams.custNo=this.$route.query.custNo;
this.queryParams.paymentType='2,4,5';
}
2025-03-19 05:16:54 +00:00
if(this.$route.query.payee!=null){
this.queryParams.payee=this.$route.query.payee;
2025-03-15 02:07:40 +00:00
this.queryParams.paymentType='1,3';
}
this.queryParams.carryType=this.$route.query.transType;
2025-04-30 02:40:14 +00:00
this.queryParams.params.queryQuotaType=this.$route.query.queryQuotaType;
2025-03-15 02:07:40 +00:00
this.queryParams.paymentStatus='0,2';
this.queryParams.params.problemQueryType=2;
this.queryParams.params.problemQueryIds="173,170,151";
let startTime=this.$route.query.startDate;
let endTime=this.$route.query.endDate;
this.dateRange=[timeFormat(startTime), timeFormat(endTime)]
this.queryOrderType="1";
this.queryOrderDateType="1";
this.getList();
2025-03-20 06:17:00 +00:00
}
2025-03-15 02:07:40 +00:00
},
mounted() {
},
methods: {
rowKey (row) {
return row.id;
},
handleCopy(row, event) {
clip(row.billCode, event)
},
calcDeliveryTime(endDate,startData){
let days= timeDiffTime(startData,endDate)
return days;
},
onSalemanChange(){
this.queryParams.sendSiteCode=null;
},
onCustNoChange(){
this.queryParams.sendSiteCode=null;
},
//标红table指定行
tableRowClassName({row, rowIndex}) {
if (this.selectionList.some((item) => item === row)) {
return "select-row";
}
if (row.blSign=='1') {
return 'success-row';
}
else if (row.blIsQuestion=='1') {
return 'warning-row';
}
return '';
},
handleShowTraceInfo(row){
this.currentTraceBillCode=row.billCode;
this.currentTraceBillItem=row;
this.openTraceInfo=true;
},
handleView(row){
this.currentTraceBillCode=row.billCode;
this.openView=true;
},
initQueryParams(){
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
let qParam=null;
if(this.queryParams.billCode){
qParam={
pageNum:this.queryParams.pageNum,
pageSize:this.queryParams.pageSize,
billCode:this.queryParams.billCode,
}
}else{
qParam=this.queryParams
}
return qParam;
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
let qParam=this.initQueryParams();
listEmisWaybill(qParam).then(response => {
this.emisWaybillList = response.rows;
this.total = response.total;
this.loading = false;
// 触发获取最后轨迹更新
this.showLastTraceInfo();
});
// 查询统计
getQueryStatInfoMap(qParam).then(response => {
this.queryStatInfoMap = response.data;
});
},
showLastTraceInfo(){
if(this.emisWaybillList&&this.emisWaybillList.length>0){
this.emisWaybillList.forEach(item=>{
queryLastRecord(item.billCode).then(response => {
let data=response.data;
item.lastTraceInfo=data.lastTraceInfo;
item.lastScanDate=data.scanDate;
});
});
}
},
onDateSelect(value){
// this.dateTimeRange=value;
// scanDate
},
/** 搜索按钮操作 */
handleQuery() {
// 清除已选择
if(this.ids&&this.ids.length>0){
// this.$refs.refTable.clearSelection();
}
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
// if(selection!=null){
// this.billCode=selection[0].billCode;
// }
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();
},
handleFormChanged(){
this.openForm = false;
this.getList();
},
cancelForm(){
this.openForm = false;
},
/** 导出按钮操作 */
handleExport() {
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
// 增加导出记录
let postExportRecord={
menuName: '寄件运单查询',
dateRange: qParam.params.beginSendDate+"~"+qParam.params.endSendDate,
}
this.addExportAuditRecord(postExportRecord);
if(this.selectionList&&this.selectionList.length>0){
this.exportData(this.selectionList,loadingInstance);
}
else{
let qExportParam=this.initQueryParams();
qExportParam.pageNum=1;
qExportParam.pageSize=20000;
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 === '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 === 'blUploadPic') {
if(v['goodsPics']!=null && v['goodsPics']!=''){
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
},
}
};
</script>
<style lang="scss" scoped>
:deep .el-form-item__label-wrap {
margin-left: 0 !important;
}
.el-divider{
margin-top: 0px;
background: 0 0;
border-top: 1px solid #E6EBF5;
}
.el-divider__text {
color: #0955ee;
cursor: pointer;
}
.query-label {
.el-radio{
display: block;
line-height: 23px;
white-space: normal;
margin-right: 0;
}
}
.queryForm .el-form-item {
margin-bottom: 0px !important;
}
// :deep .el-table .select-row {
// // background-color: rgb(255, 244, 232);
// }
:deep .el-table .success-row {
color: rgb(21, 174, 31) !important;
}
:deep .el-table .warning-row {
color: #f51f1f !important;
}
:deep .el-form-item__label {
text-align: left;
}
.statInfoValue{
color: red;
font-size: 13px;
font-weight: 500;
}
.el-table {
display: flex;
flex-direction: column;
// .el-table__body-wrapper {
// flex: 1;
// @extend .common-scrollbar;
// }
&.el-table--scrollable-y .el-table__fixed-right {
right: 6px!important;
}
&.el-table--scrollable-x {
.el-table__fixed-body-wrapper {
max-height: 100%!important;
}
.el-table__fixed-right {
bottom: 6px!important;
}
}
.el-table__fixed-right-patch {
width: 6px!important;
}
}
</style>