月结客户出货统计明细
This commit is contained in:
parent
ca60a551f2
commit
641ccdf3a3
@ -102,4 +102,22 @@ export function listMonthUserAll(query) {
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//查询月结客户用户所有统计信息
|
||||
export function monthlyShipmentStat(query) {
|
||||
return request({
|
||||
url: '/emis/emisCustomerUser/monthlyShipmentStat',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//查询月结客户用户所有统计信息详情
|
||||
export function monthlyShipmentDetail(query) {
|
||||
return request({
|
||||
url: '/emis/emisCustomerUser/monthlyShipmentDetail',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
836
src/views/emis/emisCustomerUser/monthlyShipmentDetail.vue
Normal file
836
src/views/emis/emisCustomerUser/monthlyShipmentDetail.vue
Normal file
@ -0,0 +1,836 @@
|
||||
<template>
|
||||
<XdPageContainer class="app-container">
|
||||
<XdTable
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
v-loading="loading"
|
||||
border stripe
|
||||
size="mini"
|
||||
|
||||
ref="refTable"
|
||||
row-key="id"
|
||||
storageName="paybackrecord_query_main_25050208"
|
||||
:data="billList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
<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"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</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="enterpriseName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('企业税号')" align="center" prop="enterpriseTaxId" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ remarkFormat(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
<el-table-column :label="$t('提单号')" align="center" prop="ladingBillCode" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('起运港')" align="center" prop="departurePortName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('目的港')" align="center" prop="destinationPortName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('箱量')" align="center" prop="boxQuantity" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('贵司编号')" align="center" prop="companyCode" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('主单号')" align="center" prop="masterBillCode" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('主单对应的虚拟单')" align="center" prop="virtualRemark" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('始发网点')" align="center" prop="startSiteName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
|
||||
|
||||
</XdTable>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { monthlyShipmentDetail } from "@/api/emis/emisCustomerUser";
|
||||
import {timeDiffTime} from '@/utils/dateUtils'
|
||||
import { queryLastRecord } from "@/api/emis/emisTmsScanRecord";
|
||||
|
||||
|
||||
export default {
|
||||
name: "MonthlyShipmentDetail",
|
||||
props:{
|
||||
},
|
||||
components: { },
|
||||
dicts: ['emis_settlebill_pay_type','emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
||||
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
||||
'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status','emis_tab_dispatch_mode'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 结算总账单表格数据
|
||||
billList: [],
|
||||
selectList: [],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
subBillTotal: 0,
|
||||
// 结算子账单表格数据
|
||||
emisSettleSubBillList: [],
|
||||
|
||||
currentSettleBillNo:null,
|
||||
|
||||
queryOrderType:null,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
custNo: null,
|
||||
transType: null,
|
||||
sendCountry: null,
|
||||
receiveCountry: null,
|
||||
salesExecutive: null, // 销售支持
|
||||
salesmen: null, // 销售联系人
|
||||
salesSupport: null, // 销售支持
|
||||
params: {
|
||||
beginSendDate: null,
|
||||
endSendDate: null,
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route () {
|
||||
if(this.$route.query.query){
|
||||
this.queryParams =JSON.parse(this.$route.query.query);
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log("====>queryParams====>",this.$route.query.query);
|
||||
this.queryParams =JSON.parse(this.$route.query.query);
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询结算总账单列表 */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
this.billList=[];
|
||||
await monthlyShipmentDetail(this.queryParams).then(response => {
|
||||
this.billList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
// 触发获取最后轨迹更新
|
||||
this.showLastTraceInfo();
|
||||
},
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
// if (
|
||||
// column.property === 'settleSubBill.invoicedMoney'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['settleSubBill']['invoicedMoney']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留0位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'settleBillDetail.recMoney'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['settleBillDetail']['recMoney']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.parcelQty'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['parcelQty']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(0); //保留0位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.billWeight'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['billWeight']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.billWeight'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['billWeight']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.totalVolume'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['totalVolume']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.volumeWeight'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['volumeWeight']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.settlementWeight'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['settlementWeight']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
// else if (
|
||||
// column.property === 'waybillDetail.freight'
|
||||
// ) {
|
||||
// const values = data.map(item => Number(item['waybillDetail']['freight']));
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = Number(curr);
|
||||
// if (!isNaN(value)) {
|
||||
// return prev + curr;
|
||||
// } else {
|
||||
// return prev;
|
||||
// }
|
||||
// }, 0);
|
||||
// sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
// }
|
||||
if(
|
||||
column.property === 'payMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.payMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
|
||||
});
|
||||
console.log(sums);
|
||||
return sums
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
||||
this.selectList=selection;
|
||||
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
if(selection&&selection.length>0){
|
||||
this.currentSettleBillNo=selection[0].settleBillNo;
|
||||
}
|
||||
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
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: '正在导出...'
|
||||
})
|
||||
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
|
||||
let qExportParam={...this.queryParams};
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
queryPayBackRecordList(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 === 'waybillDetail.parcelQty') {
|
||||
return v['waybillDetail']['parcelQty'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.billWeight') {
|
||||
return v['waybillDetail']['billWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.totalVolume') {
|
||||
return v['waybillDetail']['totalVolume'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.volumeWeight') {
|
||||
return v['waybillDetail']['volumeWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.settlementWeight') {
|
||||
return v['waybillDetail']['settlementWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.freight') {
|
||||
return v['waybillDetail']['freight'];
|
||||
}
|
||||
|
||||
|
||||
if (j === 'waybillDetail.productTypeName') {
|
||||
return v['waybillDetail']['productTypeName']+'('+v['waybillDetail']['timeType']+')';
|
||||
}
|
||||
|
||||
|
||||
if (j === 'waybillDetail.transLineTypeName') {
|
||||
return v['waybillDetail']['transLineTypeName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.sendCompany') {
|
||||
return v['waybillDetail']['sendCompany'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.paymentType') {
|
||||
let paymentType=v['waybillDetail']['paymentType'];
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_type,paymentType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (j === 'settleBillDetail.payee') {
|
||||
return v['settleBillDetail']['payee'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.salesmen') {
|
||||
return v['settleBillDetail']['salesmen'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.recMoney') {
|
||||
return v['settleBillDetail']['recMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.recMoney') {
|
||||
return v['settleBillDetail']['recMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.refundMoney') {
|
||||
return v['settleBillDetail']['refundMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.satisfyMoney') {
|
||||
return v['settleBillDetail']['satisfyMoney'];
|
||||
}
|
||||
|
||||
|
||||
if (j === 'settleBillDetail.allowanceMoney') {
|
||||
return v['settleBillDetail']['allowanceMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.deductionMoney') {
|
||||
return v['settleBillDetail']['deductionMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.otherMoney') {
|
||||
return v['settleBillDetail']['otherMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.remark') {
|
||||
return v['settlePayRecordDetail']['remark'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.tradeDate') {
|
||||
return v['settlePayRecordDetail']['tradeDate'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.paymentDueDate') {
|
||||
return v['settleBillDetail']['paymentDueDate'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.payId') {
|
||||
return v['settlePayRecordDetail']['payId'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.recType') {
|
||||
let recType=v['settlePayRecordDetail']['recType'];
|
||||
if(recType == 1){
|
||||
return '收款';
|
||||
}
|
||||
else if(recType == 2){
|
||||
return '退款';
|
||||
}
|
||||
}
|
||||
if (j === 'settlePayRecordDetail.createByName') {
|
||||
return v['settlePayRecordDetail']['createByName'];
|
||||
}
|
||||
if (j === 'settlePayRecordDetail.createTime') {
|
||||
return v['settlePayRecordDetail']['createTime'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.settleBillName') {
|
||||
return v['settleBillDetail']['settleBillName'];
|
||||
}
|
||||
if (j === 'settleBillDetail.billMonth') {
|
||||
return v['settleBillDetail']['billMonth'];
|
||||
}
|
||||
if (j === 'settleBillDetail.creditPeriod') {
|
||||
return v['settleBillDetail']['creditPeriod'];
|
||||
}
|
||||
if (j === 'settleBillDetail.custName') {
|
||||
return v['settleBillDetail']['custName'];
|
||||
}
|
||||
if (j === 'settleBillDetail.custName') {
|
||||
let paymentType=v['waybillDetail']['paymentType'];
|
||||
if(paymentType==2 || paymentType==4 || paymentType==5 ){
|
||||
return v['settleBillDetail']['custName'];
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (j === 'settlePayRecordDetail.payType') {
|
||||
let payType=v['settlePayRecordDetail']['payType'];
|
||||
|
||||
}
|
||||
if (j === 'settleSubBill.openBillStatus') {
|
||||
let openBillStatus=v['settleSubBill']['openBillStatus'];
|
||||
if(openBillStatus== 0){
|
||||
return '未开票';
|
||||
}
|
||||
else if(openBillStatus == 1){
|
||||
return '已开票';
|
||||
}
|
||||
else if(openBillStatus == 2){
|
||||
return '部分开票';
|
||||
}
|
||||
else if(openBillStatus == 3){
|
||||
return '不开票';
|
||||
}
|
||||
else if(openBillStatus == 4){
|
||||
return '已完成';
|
||||
}
|
||||
else{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
if (j === 'settleSubBill.invoicedMoney') {
|
||||
return v['settleSubBill']['invoicedMoney'];
|
||||
}
|
||||
if (j === 'settleSubBill.paymentStatus') {
|
||||
let paymentStatus=v['settleSubBill']['paymentStatus'];
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,paymentStatus);
|
||||
}
|
||||
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
//格式化录单备注显示
|
||||
remarkFormat(row){
|
||||
let remark=row.remark;
|
||||
if(row.blVirtual==0 && row.virtualRemark!=='' && row.virtualRemark!== null&& row.transLineType ==='002'&& row.sendDate > '2025-06-23 20:00:00'){
|
||||
if(remark && remark.trim()!==''){
|
||||
remark=remark+','
|
||||
}
|
||||
remark=`${remark}该运单为主单,对应虚拟单为${this.conCatVirtualRemark(row.virtualRemark)}`;
|
||||
}
|
||||
return remark;
|
||||
},
|
||||
calcDeliveryTime(endDate, startData) {
|
||||
let days = timeDiffTime(startData, endDate)
|
||||
return days;
|
||||
},
|
||||
//拼接虚拟单后6位
|
||||
conCatVirtualRemark(virtualRemark) {
|
||||
if (virtualRemark != null) {
|
||||
return virtualRemark.split(',').map((item) => {
|
||||
return item.substring(item.length - 6);
|
||||
}).join(',');
|
||||
}
|
||||
},
|
||||
showLastTraceInfo(){
|
||||
console.log("===showLastTraceInfo===1111=>",this.billList)
|
||||
if(this.billList&&this.billList.length>0){
|
||||
this.billList.forEach(item=>{
|
||||
queryLastRecord(item.billCode).then(response => {
|
||||
let data=response.data;
|
||||
item.lastTraceInfo=data.lastTraceInfo;
|
||||
item.lastScanDate=data.scanDate;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
60
src/views/emis/emisCustomerUser/monthlyShipmentStat.vue
Normal file
60
src/views/emis/emisCustomerUser/monthlyShipmentStat.vue
Normal file
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="el-tabs-container">
|
||||
<el-tabs slot="pageTabs" v-model="activeTab" @tab-click="handleTabsClick">
|
||||
<el-tab-pane label="出货统计" name="payback" >
|
||||
<MonthlyShipmentStatQuery @onSelect="onSelect"> </MonthlyShipmentStatQuery>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="明细列表" v-if="showDtlList" name="dtlList" >
|
||||
<!-- <PayBackRecordList :queryType="queryType" :queryInfo="queryInfo"></PayBackRecordList> -->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import MonthlyShipmentStatQuery from '@/views/emis/emisCustomerUser/monthlyShipmentStatQuery.vue';
|
||||
|
||||
export default {
|
||||
name: "MonthlyShipmentStat",
|
||||
components: {
|
||||
MonthlyShipmentStatQuery,
|
||||
|
||||
},
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
activeTab:'payback',
|
||||
queryInfo:null,
|
||||
queryType:null,
|
||||
showDtlList:false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handleTabsClick(){
|
||||
|
||||
},
|
||||
onSelect(item) {
|
||||
console.log("===onSelect===1111=>",item)
|
||||
this.showDtlList=true;
|
||||
this.queryType=1;
|
||||
this.queryInfo=item;
|
||||
this.activeTab="dtlList";
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .el-tabs__nav{
|
||||
display: flex !important;
|
||||
flex-wrap: wrap !important;
|
||||
} */
|
||||
|
||||
</style>
|
||||
563
src/views/emis/emisCustomerUser/monthlyShipmentStatQuery.vue
Normal file
563
src/views/emis/emisCustomerUser/monthlyShipmentStatQuery.vue
Normal file
@ -0,0 +1,563 @@
|
||||
<template>
|
||||
<XdPageContainer id="BillPaybackSumQuery1" >
|
||||
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="20" label-width="90px" label-position="left" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<!-- 查询条件:客户名称、寄件公司、销售联系人、回款联系人、运单号、账单号、账期月、收款时间、收款登记人、 -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="寄件时间" prop="createTime" label-width="68px">
|
||||
<elDateAdvPicker v-model="dateTimeRange" style="z-index:9999;width:260px" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item label="客户名称" prop="custNo">
|
||||
<AllMonthpayAccountPicker v-model="queryParams.custNo" style="width:100%" ></AllMonthpayAccountPicker>
|
||||
</el-form-item>
|
||||
<el-form-item label="寄件国家" prop="sendCountry">
|
||||
<CountryPicker1 v-model="queryParams.sendCountry" :placeholder="$t('寄件国家')" ></CountryPicker1>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的国家" prop="receiveCountry">
|
||||
<CountryPicker2 v-model="queryParams.receiveCountry" :placeholder="$t('目的国家')" ></CountryPicker2>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="销售主管" prop="salesExecutive" >
|
||||
<EmpNamePicker1 :placeholder="$t('销售主管')" v-model="queryParams.salesExecutive" ></EmpNamePicker1>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售联系人" prop="salesmen" >
|
||||
<EmpNamePicker2 :placeholder="$t('销售联系人')" v-model="queryParams.salesmen" ></EmpNamePicker2>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售支持" prop="salesSupport" >
|
||||
<EmpNamePicker3 :placeholder="$t('销售支持')" v-model="queryParams.salesSupport" ></EmpNamePicker3>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</SearchForm>
|
||||
<div slot="pageContent">
|
||||
<xd-table
|
||||
height="calc(100vh - 20rem)"
|
||||
|
||||
ref="refTable"
|
||||
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
|
||||
storageName="PayBackStatList_main_2505_05"
|
||||
|
||||
:data="emisStatList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
|
||||
highlight-current-row
|
||||
>
|
||||
<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"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="$t('客户名称')" align="left" prop="customerName" width="200" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('总票数')" align="center" prop="totalTickets" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,null)">{{ scope.row.totalTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总重量')" align="center" prop="totalWeight" min-width="100" />
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" min-width="120" />
|
||||
<el-table-column :label="$t('快递')" align="center" prop="express" min-width="120" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="expressTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,1)">{{ scope.row.expressTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="expressWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('空运')" align="center" prop="air" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="airTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,2)">{{ scope.row.airTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="airWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('陆运')" align="center" prop="land" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="landTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,3)">{{ scope.row.landTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="landWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('进口')" align="center" prop="import" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="importTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,4)">{{ scope.row.importTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="importWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
</xd-table>
|
||||
</div>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { monthlyShipmentStat } from "@/api/emis/emisCustomerUser";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import AllMonthpayAccountPicker from '@/views/emis/EmisBaseTools/AllMonthpayAccountPicker.vue';
|
||||
import EmpNamePicker1 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import EmpNamePicker2 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import EmpNamePicker3 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
import CountryPicker2 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
export default {
|
||||
name: "MonthlyShipmentStatQuery",
|
||||
components: { EmpNamePicker1,EmpNamePicker2,EmpNamePicker3,elDateAdvPicker,AllMonthpayAccountPicker,CountryPicker1,CountryPicker2 },
|
||||
dicts: ['emis_payment_status'],
|
||||
data() {
|
||||
return {
|
||||
// 调整表格的高度,不允许滚动
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
recordTotal:0,
|
||||
|
||||
emisStatList: [],
|
||||
emisStatRecordList:[],
|
||||
selectionList:[],
|
||||
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
activeName: 'first',
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
queryOrderType:null,
|
||||
|
||||
queryStatInfoMap:null,
|
||||
|
||||
titleEmisElectronicPagApply: "",
|
||||
openEmisElectronicPagApply: false,
|
||||
|
||||
// 显示编辑框更多
|
||||
moreInputVisible: false,
|
||||
|
||||
dataMap:new Map(),
|
||||
|
||||
// 弹出展示层
|
||||
currentId:null,
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
custNo: null,
|
||||
sendCountry: null,
|
||||
receiveCountry: null,
|
||||
salesExecutive: null, // 销售支持
|
||||
salesmen: null, // 销售联系人
|
||||
salesSupport: null, // 销售支持
|
||||
params: {
|
||||
beginSendDate: null,
|
||||
endSendDate: null,
|
||||
}
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// let start = new Date()
|
||||
// start.setDate(1)
|
||||
// start.setHours(0, 0, 0, 0)
|
||||
// let end = new Date()
|
||||
// var currentMonth = end.getMonth()
|
||||
// var nextMonth = ++currentMonth
|
||||
// var nextMonthFirstDay = new Date(end.getFullYear(), nextMonth, 1)
|
||||
// var oneDay = 1000 * 60 * 60 * 24
|
||||
// end = new Date(nextMonthFirstDay - oneDay)
|
||||
// end.setHours(23, 59, 59, 0)
|
||||
// this.dateTimeRange = [timeFormat(start), timeFormat(end)]
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
initQueryParams(){
|
||||
let thisQueryParams = {...this.queryParams};
|
||||
thisQueryParams = this.addDateRange(thisQueryParams, this.dateTimeRange,"SendDate");
|
||||
return thisQueryParams;
|
||||
},
|
||||
|
||||
handleShowBillList(row, transType) {
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
transType: transType,
|
||||
custNo: row.custNo,
|
||||
};
|
||||
console.log("====>params====>", params);
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/monthlyShipmentDetail',
|
||||
query: {
|
||||
query: JSON.stringify(params)
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 查询统计信息 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let tempQueryParams = this.initQueryParams();
|
||||
|
||||
monthlyShipmentStat(tempQueryParams).then(response => {
|
||||
this.emisStatList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
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
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
getProperty(obj, str) {
|
||||
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
|
||||
let arr = str.split(".");
|
||||
for (let i in arr) {
|
||||
obj = obj[arr[i]] || "";
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
sortFun: function (attr, rev) {
|
||||
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
|
||||
if (rev == undefined||rev==null) {
|
||||
rev = 1;
|
||||
} else {
|
||||
rev = (rev) ? 1 : -1;
|
||||
}
|
||||
let that=this;
|
||||
return function (a, b) {
|
||||
a = that.getProperty(a,attr);
|
||||
b = that.getProperty(b,attr);
|
||||
if (a < b) {
|
||||
return rev * -1;
|
||||
}
|
||||
if (a > b) {
|
||||
return rev * 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
this.emisStatList = this.emisStatList.sort(
|
||||
this.sortFun(column.prop, column.order === 'ascending')
|
||||
);
|
||||
},
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (
|
||||
column.property === 'totalTickets'
|
||||
) {
|
||||
const values = data.map(item => Number(item.totalTickets));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'totalWeight'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.totalWeight));
|
||||
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}
|
||||
else if (
|
||||
column.property === 'expressTickets'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.expressTickets));
|
||||
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'expressWeight'
|
||||
) {
|
||||
const values = data.map(item => Number(item.expressWeight));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}
|
||||
else if(
|
||||
column.property === 'airWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.airWeight));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0);
|
||||
}else if(
|
||||
column.property === 'landTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.landTickets));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}else if(
|
||||
column.property === 'landWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.landWeight));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0);
|
||||
}else if(
|
||||
column.property === 'importTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.importTickets));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}else if(
|
||||
column.property === 'importWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.importWeight));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0);
|
||||
}
|
||||
});
|
||||
console.log(sums);
|
||||
return sums
|
||||
},
|
||||
handleExportDtl(){
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
|
||||
const $e = this.$refs['refTable'].$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if(!$table) {
|
||||
$table = $e
|
||||
}
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
excel.table_to_book($table,"月结客户出货统计.xlsx");
|
||||
loadingInstance.close()
|
||||
})
|
||||
|
||||
loadingInstance.close();
|
||||
// let qExportParam = this.initQueryParams();;
|
||||
// qExportParam.pageNum=1;
|
||||
// qExportParam.pageSize=20000;
|
||||
|
||||
// monthlyShipmentStat(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 === 'paymentStatus') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
|
||||
}
|
||||
if (j === 'openBillStatus') {
|
||||
if(v[j] == 0){
|
||||
return '未开票';
|
||||
}
|
||||
else if(v[j] == 1){
|
||||
return '已开票';
|
||||
}
|
||||
else if(v[j] == 2){
|
||||
return '部分开票';
|
||||
}
|
||||
else if(v[j] == 3){
|
||||
return '不开票';
|
||||
}
|
||||
else{
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
if (j === 'settleType') {
|
||||
if(v[j] == 1){
|
||||
return '现金';
|
||||
}
|
||||
else if(v[j] == 2){
|
||||
return '月结';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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>
|
||||
@ -549,7 +549,7 @@ export default {
|
||||
if(!$table) {
|
||||
$table = $e
|
||||
}
|
||||
|
||||
|
||||
// 导出
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
excel.table_to_book($table,"销售回款率统计.xlsx");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user