Compare commits

...

9 Commits

Author SHA1 Message Date
xuyuncong
d9dae754c8 Merge branch 'master' of http://114.55.243.137:6688/dianliang/lanan-system-vue 2025-11-24 17:26:15 +08:00
xuyuncong
9874d7b76e Merge branch 'repair' 2025-11-24 17:26:10 +08:00
sunhaoyuan
3d1266e7a1 Merge branch 'rescue' 2025-11-24 17:01:37 +08:00
xuyuncong
6b57fc967c 更新 2025-11-21 10:52:35 +08:00
xuyuncong
71c9f7976b Merge branch 'repair' 2025-11-20 11:45:33 +08:00
5d7fda78c1 11.13 2025-11-13 16:34:14 +08:00
490086b12c Merge remote-tracking branch 'origin/rescue' into rescue 2025-11-05 09:33:40 +08:00
9f4b587196 Merge branch 'rescue' 2025-11-05 09:27:27 +08:00
5cbbfc5492 11.04已开票图片回显问题修复 2025-11-05 09:26:09 +08:00
4 changed files with 884 additions and 239 deletions

View File

@ -126,6 +126,12 @@
<el-tag v-if="scope.row.ifEnd == 0" type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="是否毕业" align="center" prop="ifEnd">
<template slot-scope="scope">
<el-tag v-if="scope.row.gradTime" type="success"></el-tag>
<el-tag v-if="!scope.row.gradTime" type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="信息" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="viewStudentInfo(scope.row)">学员信息</el-button>

View File

@ -1,117 +1,8 @@
<template>
<section class="statistics-pc">
<!-- 顶部返回 + 标题 -->
<el-page-header class="top-page-header" @back="goBack" content="业务管理统计" />
<!-- <el-page-header class="top-page-header" @back="goBack" content="业务管理统计" /> -->
<!-- ========= 工单统计 ========= -->
<el-card class="block-card" shadow="hover">
<div class="card-head">
工单统计
<el-tabs v-model="orderTab" @tab-click="onOrderTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<!-- 自定义日期选择 -->
<el-date-picker v-if="orderTab === 'more'" v-model="orderRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchOrderStats" class="full-width-picker" />
<el-row :gutter="20" class="summary-row">
<el-col :span="6" v-for="box in orderBoxes" :key="box.key">
<el-card class="summary-box">
<div class="box-title">
<span>{{ box.label }}</span>
</div>
<div class="box-value">{{ countNum[box.key] || 0 }}</div>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- ========= 业务渠道统计 ========= -->
<el-card class="block-card" shadow="hover">
<div class="card-head">
业务渠道统计
<el-tabs v-model="channelTab" @tab-click="onChannelTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<!-- 日期选择 -->
<el-date-picker v-if="channelTab === 'more'" v-model="customRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchChannelStats" class="full-width-picker" />
<!-- el-table row-key & type='expand' -->
<el-table v-loading="channelLoading" :data="channelStats" border stripe row-key="__rowKey" :height="360" class="tight-table">
<!-- 展开列 -->
<el-table-column type="expand">
<!-- slot-scope 拿到 row.sources再渲染内部小表格 -->
<template #default="props">
<el-table :data="props.row.sources" border size="mini" style="margin:6px 0 6px 40px">
<el-table-column prop="source" label="来源名称" />
<el-table-column prop="yjdNum" label="已接单" width="80" />
<el-table-column prop="jyzNum" label="救援中" width="80" />
<el-table-column prop="ywcNum" label="已完成" width="80" />
<el-table-column prop="dqcNum" label="待取车" width="80" />
<el-table-column prop="receivable" label="应收款(元)" width="110" />
<el-table-column prop="receivedMoney" label="已收款(元)" width="110" />
<el-table-column prop="dskNum" label="待收款(元)" width="110" />
<el-table-column label="操作" width="100">
<template #default="sc">
<el-button type="text" size="mini"
@click="viewOrderList({ channel: props.row.channel, source: sc.row.source }, channelTab, customRange)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<!-- 渠道汇总列 -->
<el-table-column prop="channel" label="渠道名称" fixed />
<el-table-column prop="yjdNum" label="已接单" width="90" />
<el-table-column prop="jyzNum" label="救援中" width="90" />
<el-table-column prop="ywcNum" label="已完成" width="90" />
<el-table-column prop="dqcNum" label="待取车" width="90" />
<el-table-column prop="receivable" label="应收款(元)" width="110" />
<el-table-column prop="receivedMoney" label="已收款(元)" width="110" />
<el-table-column prop="dskNum" label="待收款(元)" width="110" />
<el-table-column label="操作" width="120" fixed="right">
<template #default="scope">
<el-button type="primary" size="mini" @click="viewOrderList({ channel: scope.row.channel }, channelTab, customRange)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- ========= 业务管理统计 ========= -->
<el-card class="block-card" shadow="hover">
<div class="card-head">
业务管理统计
<el-tabs v-model="bmTab" @tab-click="onBmTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<el-date-picker v-if="bmTab === 'more'" v-model="bmRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchBmStats" class="full-width-picker" />
<el-collapse v-model="bmActiveKeys" accordion>
<el-collapse-item v-for="cat in bmCategories" :key="cat" :name="cat" :title="bmTitleMap[cat] || cat">
<el-row :gutter="10">
<el-col :span="12" v-for="item in bmStats[cat]" :key="item.name">
<div class="bm-item">
<span class="bm-key">{{ item.name }}</span>
<span class="bm-val">{{ item.count }}</span>
</div>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-card>
<!-- ========= 财务统计 ========= -->
<el-card class="block-card" shadow="hover">
@ -130,23 +21,227 @@
<div class="finance-title">{{ card.title }}</div>
<p class="finance-money">{{ (financeStats[card.key].money / 100).toFixed(2) }}</p>
<p class="finance-count">数量{{ financeStats[card.key].count }}</p>
<el-button type="text" size="mini" @click="viewOrderList(card.queryExtra, financeTab, financeRange)">查看明细</el-button>
<el-button type="text" size="mini"
@click="viewOrderList(card.queryExtra, financeTab, financeRange)">查看明细</el-button>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- ========= 司机收款统计 ========= -->
<el-card shadow="hover" class="block-card">
<!-- 标题 + 时间筛选 -->
<div class="card-head driver-card-head">
救援司机统计
<el-select v-model="driverType" placeholder="司机性质" clearable @change="fetchDriverStats"
class="driver-type-select">
<el-option v-for="d in getDictDatas(DICT_TYPE.RESCUE_DRIVER_TYPE)" :key="d.value" :label="d.label"
:value="d.value" />
</el-select>
<el-tabs v-model="driverTab" @tab-click="onDriverTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<!-- 改成单独一行写法与其他卡片保持一致 -->
<el-date-picker v-if="driverTab === 'more'" v-model="driverDateRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchDriverStats" class="full-width-picker" />
<!-- 司机汇总表 -->
<el-table :data="driverList" row-key="driverId" border stripe :header-cell-style="tableHeaderStyle"
:cell-style="cellCenter" :expand-row-keys="expandedRows" @expand-change="onExpandChange">
<!-- 司机展开行渠道明细 -->
<el-table-column type="expand">
<template #default="props">
<el-table class="child-table" :data="props.row.channels" border size="small"
:header-cell-style="tableHeaderStyle" :cell-style="cellCenter">
<el-table-column prop="channel" label="渠道名称" min-width="140" />
<el-table-column label="总产值">
<el-table-column prop="yingskNum" label="金额(元)" min-width="110" />
<el-table-column prop="yingskNumOrderCount" label="单数" min-width="80" />
</el-table-column>
<el-table-column label="已收款">
<el-table-column prop="yiskNum" label="金额(元)" min-width="110" />
<el-table-column prop="yiskNumOrderCount" label="单数" min-width="80" />
</el-table-column>
<el-table-column label="待收款">
<el-table-column prop="dskNum" label="金额(元)" min-width="110" />
<el-table-column prop="dskNumOrderCount" label="单数" min-width="80" />
</el-table-column>
<!-- 渠道级查看 -->
<el-table-column label="操作" width="80">
<template #default="sc">
<el-button type="text" size="mini" @click="handleChannelClick(props.row, sc.row)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<!-- ========= 司机主表列 ========= -->
<el-table-column prop="driverName" label="司机名称" min-width="140" />
<el-table-column label="总产值">
<el-table-column prop="yingskNum" label="金额(元)" min-width="110" />
<el-table-column prop="yingskNumOrderCount" label="单数" min-width="80" />
</el-table-column>
<el-table-column label="已收款">
<el-table-column prop="yiskNum" label="金额(元)" min-width="110" />
<el-table-column prop="yiskNumOrderCount" label="单数" min-width="80" />
</el-table-column>
<el-table-column label="待收款">
<el-table-column prop="dskNum" label="金额(元)" min-width="110" />
<el-table-column prop="dskNumOrderCount" label="单数" min-width="80" />
</el-table-column>
<!-- 司机级查看 -->
<el-table-column label="操作" width="90" fixed="right">
<template #default="scope">
<el-button type="primary" size="mini" @click="viewOrderList(
{ driverName: scope.row.driverName },
driverTab,
driverDateRange)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- ========= 工单统计 ========= -->
<!-- <el-card class="block-card" shadow="hover">
<div class="card-head">
工单统计
<el-tabs v-model="orderTab" @tab-click="onOrderTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<el-date-picker v-if="orderTab === 'more'" v-model="orderRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchOrderStats" class="full-width-picker" />
<el-row :gutter="20" class="summary-row">
<el-col :span="6" v-for="box in orderBoxes" :key="box.key">
<el-card class="summary-box">
<div class="box-title">
<span>{{ box.label }}</span>
</div>
<div class="box-value">{{ countNum[box.key] || 0 }}</div>
</el-card>
</el-col>
</el-row>
</el-card> -->
<!-- ========= 业务渠道统计 ========= -->
<el-card class="block-card" shadow="hover">
<div class="card-head">
业务渠道统计
<el-tabs v-model="channelTab" @tab-click="onChannelTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<!-- 日期选择 -->
<el-date-picker v-if="channelTab === 'more'" v-model="customRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchChannelStats" class="full-width-picker" />
<!-- el-table row-key & type='expand' -->
<el-table v-loading="channelLoading" :data="channelStats" border stripe row-key="__rowKey" class="tight-table">
<!-- 展开列 -->
<el-table-column type="expand">
<!-- slot-scope 拿到 row.sources再渲染内部小表格 -->
<template #default="props">
<el-table :data="props.row.sources" border size="mini" style="margin:6px 0 6px 40px">
<el-table-column prop="source" label="来源名称" min-width="140" />
<el-table-column prop="yjdNum" label="已接单" min-width="80" />
<el-table-column prop="jyzNum" label="救援中" min-width="80" />
<el-table-column prop="ywcNum" label="已完成" min-width="80" />
<el-table-column prop="dqcNum" label="待取车" min-width="80" />
<el-table-column prop="receivable" label="应收款(元)" min-width="110" />
<el-table-column prop="receivedMoney" label="已收款(元)" min-width="110" />
<el-table-column prop="dskNum" label="待收款(元)" min-width="110" />
<el-table-column label="操作" min-width="100">
<template #default="sc">
<el-button type="text" size="mini"
@click="viewOrderList({ channel: props.row.channel, source: sc.row.source }, channelTab, customRange)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<!-- 渠道汇总列 -->
<el-table-column prop="channel" label="渠道名称" fixed min-width="140" />
<el-table-column prop="yjdNum" label="已接单" min-width="90" />
<el-table-column prop="jyzNum" label="救援中" min-width="90" />
<el-table-column prop="ywcNum" label="已完成" min-width="90" />
<el-table-column prop="dqcNum" label="待取车" min-width="90" />
<el-table-column prop="receivable" label="应收款(元)" min-width="110" />
<el-table-column prop="receivedMoney" label="已收款(元)" min-width="110" />
<el-table-column prop="dskNum" label="待收款(元)" min-width="110" />
<el-table-column label="操作" min-width="120" fixed="right">
<template #default="scope">
<el-button type="primary" size="mini"
@click="viewOrderList({ channel: scope.row.channel }, channelTab, customRange)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- ========= 业务管理统计 ========= -->
<el-card class="block-card" shadow="hover">
<div class="card-head">
业务管理统计
<el-tabs v-model="bmTab" @tab-click="onBmTabClick" class="inline-tabs" size="small">
<el-tab-pane v-for="(t, i) in timeTabs" :key="i" :label="t" :name="tabMap[i]" />
</el-tabs>
</div>
<el-date-picker v-if="bmTab === 'more'" v-model="bmRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="fetchBmStats" class="full-width-picker" />
<el-collapse v-model="bmActiveKeys" accordion>
<el-collapse-item v-for="cat in bmCategories" :key="cat" :name="cat" :title="bmTitleMap[cat] || cat">
<el-row :gutter="10">
<el-col :span="12" v-for="item in bmStats[cat]" :key="item.name">
<div class="bm-item">
<span class="bm-key">{{ item.name }}</span>
<span class="bm-val">{{ item.count }}</span>
</div>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-card>
</section>
</template>
<script>
import request from '@/utils/request'
import dayjs from 'dayjs'
import { DICT_TYPE } from '@/utils/dict'
export default {
name: 'businissStatistics',
dicts: ['rescue_driver_type'],
data() {
return {
/* ========== 司机统计 ========== */
driverType: '', //
driverTab: 'day',
driverDateRange: [],
driverList: [],
expandedRows: [], // key 0 1
// tab
timeTabs: ['本日', '本月', '本年', '全部', '自定义'],
timeTabs: ['当日', '当月', '当年', '全部', '自定义'],
tabMap: ['day', 'month', 'year', 'all', 'more'],
/* ========== 工单统计 ========== */
@ -195,9 +290,9 @@ export default {
pending: { money: 0, count: 0 },
},
financeCards: [
{ key: 'receivable', title: '应收款统计', queryExtra: {} },
{ key: 'received', title: '已收款统计', queryExtra: { ifConfirmPay: 1 } },
{ key: 'pending', title: '待收款统计', queryExtra: { ifConfirmPay: 0 } },
{ key: 'receivable', title: '总产值', queryExtra: {} },
{ key: 'received', title: '已收款', queryExtra: { ifConfirmPay: 1 } },
{ key: 'pending', title: '待收款', queryExtra: { ifConfirmPay: 0 } },
],
};
},
@ -205,8 +300,92 @@ export default {
this.fetchAll();
this.fetchChannelOptions().then(() => this.fetchChannelStats())
this.fetchDriverStats(); //
},
methods: {
/** 手风琴式展开:只保留当前这一行,其他全部收起 */
onExpandChange(row) {
//
if (this.expandedRows[0] === row.driverId) {
this.expandedRows = []
} else {
//
this.expandedRows = [row.driverId]
}
},
handleChannelClick(driverRow, channelRow) {
//
const extra = { driverName: driverRow.driverName }
// /
if (channelRow.channel && channelRow.channel.trim() !== '未知渠道') {
extra.channel = channelRow.channel
} else {
extra.unknownChannel = '1'
}
//
this.viewOrderList(extra, this.driverTab, this.driverDateRange)
},
//
cellCenter() {
return { textAlign: "center", padding: "8px 0" };
},
tableHeaderStyle() {
return {
background: "#f8f9fa",
color: "#333",
fontWeight: "bold",
textAlign: "center"
};
},
/* ===== 司机 tab 点击 ===== */
onDriverTabClick() {
if (this.driverTab !== 'more') this.driverDateRange = [];
this.fetchDriverStats();
},
/* ===== 拉取司机统计 ===== */
async fetchDriverStats() {
//
const params = this.buildTimeParams(this.driverTab, this.driverDateRange);
//
if (this.driverType) params.driverType = this.driverType;
//
const { data } = await request.get('/app/rescueInfo/getRescueStatisticsInfoByDriver', { params });
/* ③③ 后端金额单位是“分” => 前端显示“元”,同时把字段名转成表格用的 */
this.driverList = (data || []).map(driver => ({
driverId: driver.driverId,
driverName: driver.driverName,
yingskNum: (driver.yingskNum / 100).toFixed(2),
yingskNumOrderCount: driver.yingskNumOrderCount,
yiskNum: (driver.yiskNum / 100).toFixed(2),
yiskNumOrderCount: driver.yiskNumOrderCount,
dskNum: (driver.dskNum / 100).toFixed(2),
dskNumOrderCount: driver.dskNumOrderCount,
//
channels: (driver.channels || []).map(c => ({
...c,
driverName: driver.driverName, //
yingskNum: (c.yingskNum / 100).toFixed(2),
yiskNum: (c.yiskNum / 100).toFixed(2),
dskNum: (c.dskNum / 100).toFixed(2)
}))
}));
},
/* ====== 通用 ====== */
goBack() {
this.$router.back();
@ -265,64 +444,64 @@ export default {
async fetchChannelStats() {
this.channelLoading = true;
try{
if (!this.channelOptions.length) await this.fetchChannelOptions()
try {
if (!this.channelOptions.length) await this.fetchChannelOptions()
const base = this.buildTimeParams(this.channelTab, this.customRange)
const base = this.buildTimeParams(this.channelTab, this.customRange)
//
const channelTasks = this.channelOptions.map(c =>
request.get('/app/rescueInfo/getRescueStatistics', {
params: { ...base, channel: c.name }
}).then(({ data }) => ({
channel: c.name,
channelId: c.id,
yjdNum: data.yjdNum,
jyzNum: data.jyzNum,
ywcNum: data.ywcNum,
dqcNum: data.dqcNum,
receivable: (data.yingskNum / 100).toFixed(1),
receivedMoney: (data.yiskNum / 100).toFixed(1),
dskNum: (data.dskNum / 100).toFixed(1)
}))
)
// +
const sourceTasks = this.channelOptions.map(c =>
request.get(`/rescue-channel-source/sources/${c.id}`)
.then(res => res.data || [])
.then(list => {
if (!list.length) return []
const detailCalls = list.map(s =>
request.get('/app/rescueInfo/getRescueStatistics', {
params: { ...base, channel: c.name, source: s.name }
}).then(({ data }) => ({
source: s.name,
yjdNum: data.yjdNum,
jyzNum: data.jyzNum,
ywcNum: data.ywcNum,
dqcNum: data.dqcNum,
receivable: (data.yingskNum / 100).toFixed(1),
receivedMoney: (data.yiskNum / 100).toFixed(1),
dskNum: (data.dskNum / 100).toFixed(1)
}))
)
return Promise.all(detailCalls)
})
)
//
const channels = await Promise.all(channelTasks)
const allSources = await Promise.all(sourceTasks)
this.channelStats = channels.map((c, idx) => ({
...c,
sources: allSources[idx], // sources
__rowKey: `c-${c.channelId}` // row-key
//
const channelTasks = this.channelOptions.map(c =>
request.get('/app/rescueInfo/getRescueStatistics', {
params: { ...base, channel: c.name }
}).then(({ data }) => ({
channel: c.name,
channelId: c.id,
yjdNum: data.yjdNum,
jyzNum: data.jyzNum,
ywcNum: data.ywcNum,
dqcNum: data.dqcNum,
receivable: (data.yingskNum / 100).toFixed(1),
receivedMoney: (data.yiskNum / 100).toFixed(1),
dskNum: (data.dskNum / 100).toFixed(1)
}))
)
}finally {
// +
const sourceTasks = this.channelOptions.map(c =>
request.get(`/rescue-channel-source/sources/${c.id}`)
.then(res => res.data || [])
.then(list => {
if (!list.length) return []
const detailCalls = list.map(s =>
request.get('/app/rescueInfo/getRescueStatistics', {
params: { ...base, channel: c.name, source: s.name }
}).then(({ data }) => ({
source: s.name,
yjdNum: data.yjdNum,
jyzNum: data.jyzNum,
ywcNum: data.ywcNum,
dqcNum: data.dqcNum,
receivable: (data.yingskNum / 100).toFixed(1),
receivedMoney: (data.yiskNum / 100).toFixed(1),
dskNum: (data.dskNum / 100).toFixed(1)
}))
)
return Promise.all(detailCalls)
})
)
//
const channels = await Promise.all(channelTasks)
const allSources = await Promise.all(sourceTasks)
this.channelStats = channels.map((c, idx) => ({
...c,
sources: allSources[idx], // sources
__rowKey: `c-${c.channelId}` // row-key
}))
} finally {
this.channelLoading = false; // loading
}
},
@ -385,6 +564,50 @@ $primary: #3a8dff;
$bg: #f5f6fa;
.statistics-pc {
.card-head {
display: flex;
align-items: center;
justify-content: space-between; //
font-weight: 600;
font-size: 16px;
margin-bottom: 12px;
.inline-tabs {
margin-left: 24px;
}
.driver-type-select {
width: 180px; //
}
}
/* ★ 仅救援司机统计卡片使用的排版 */
.driver-card-head {
/* 让内容从左到右自然排布,而不是 space-between */
justify-content: flex-start;
/* 司机性质下拉:固定宽度 + 与标题留点间距 */
.driver-type-select {
width: 170px;
margin-left: 12px;
}
/* Tabs 再往后放一些间距(与下拉区分)*/
.inline-tabs {
margin-left: 32px;
}
}
/* ① 子表向右缩 40px并留 3px 竖线 */
.child-table {
margin: 6px 0 6px 40px;
width: calc(100% - 40px); //
border-left: 3px solid #f0f2f5; //
}
padding: 16px 24px;
background: $bg;
@ -426,7 +649,7 @@ $bg: #f5f6fa;
.box-icon {
width: 24px;
height: 24px;
// height: 24px;
margin-right: 4px;
}

View File

@ -154,7 +154,7 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNo"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
@ -303,7 +303,7 @@
open: false,
//
queryParams: {
pageNo: 1,
pageNum: 1,
pageSize: 10,
rescueCarType: null,
rescueCarNum: null,
@ -369,7 +369,7 @@
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */

View File

@ -5,7 +5,7 @@
<el-input v-model="queryParams.connectionName" placeholder="请输入客户名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户手机号" prop="map.connectionPhone">
<el-form-item label="客户手机号" prop="connectionPhone">
<el-input v-model="queryParams.connectionPhone" placeholder="请输入客户手机号" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
@ -68,8 +68,8 @@
<!-- 调度 -->
<el-form-item label="调度">
<el-select v-model="queryParams.secondDispatchName" placeholder="请选择调度" filterable clearable
style="width:240px" @visible-change="loadAllDispatchers">
<el-select v-model="queryParams.secondDispatchName" placeholder="请选择调度" filterable clearable style="width:240px"
@visible-change="loadAllDispatchers">
<!-- @change="onDispatcherChange" -->
<el-option v-for="p in dispatcherList" :key="p.id" :label="p.nickname" :value="p.nickname" />
</el-select>
@ -92,6 +92,11 @@
导出
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" icon="el-icon-s-check" size="mini" @click="openBatchSettle">
批量结算
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -146,7 +151,7 @@
<dict-tag :type="DICT_TYPE.DLJY_TYPE" :value="scope.row.rescueType" />
</template>
</el-table-column>
<!-- <el-table-column label="路段" align="center" prop="sectionRoad"/> -->
<!-- <el-table-column label="路段" align="center" prop="sectionRoad"/> -->
<el-table-column label="渠道" align="center" prop="channel" />
<el-table-column label="来源" align="center" prop="source" />
<el-table-column label="车辆类型" align="center" prop="carType">
@ -230,12 +235,19 @@
<el-table-column label="开票人" align="center" width="100" prop="billedUsername" />
<el-table-column fixed="right" label="操作" align="center" width="150" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)">查看
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)">
查看
</el-button>
<el-button size="mini" type="text" icon="el-icon-circle-check" @click="showBilled(scope.row)"
style="color: #c0c4cc" v-if="scope.row.ifBilled === '1'">已开票
style="color: #c0c4cc" v-if="scope.row.ifBilled === '1'">
已开票
</el-button>
<el-button size="mini" type="text" icon="el-icon-circle-check" @click="unbilled(scope.row)" v-else>未开票
<el-button size="mini" type="text" icon="el-icon-circle-check" @click="unbilled(scope.row)" v-else>
未开票
</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.ifBilled === '1'"
@click="editBilled(scope.row)">
修改发票
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
@ -279,6 +291,92 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 批量结算对话框 -->
<el-dialog title="批量结算" :visible.sync="batchDialogVisible" width="900px" append-to-body>
<el-form :inline="true" :model="batchQuery" size="small" class="mb10">
<!-- 收款状态 -->
<el-form-item label="收款状态">
<el-select v-model="batchQuery.ifConfirmPay" placeholder="请选择" clearable>
<el-option label="待收款" :value="0" />
<el-option label="已收款" :value="1" />
</el-select>
</el-form-item>
<!-- 渠道 -->
<el-form-item label="渠道">
<el-select v-model="batchQuery.channel" placeholder="请选择渠道" clearable @change="handleBatchChannelChange"
style="width:160px">
<el-option v-for="c in channelList" :key="c.id" :label="c.name" :value="c.name" />
</el-select>
</el-form-item>
<!-- 司机姓名 -->
<el-form-item label="司机">
<el-input v-model="batchQuery.driverName" placeholder="请输入司机姓名" clearable style="width:160px" />
</el-form-item>
<el-form-item label="时间">
<el-date-picker v-model="batchQuery.time" type="daterange" value-format="yyyy-MM-dd" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="loadBatchList">筛选</el-button>
</el-form-item>
</el-form>
<!-- 列表区 -->
<el-table ref="batchTable" :data="batchList" height="400" @selection-change="handleBatchSelectionChange">
<el-table-column type="selection" width="50" />
<el-table-column prop="connectionName" label="客户姓名" />
<el-table-column prop="licenseNum" label="客户车牌号" />
<el-table-column label="渠道" align="center" prop="channel" />
<el-table-column label="调度" align="center" prop="secondDispatchName" />
<el-table-column label="救援司机" align="center" prop="driverName" />
<el-table-column prop="setMoney" label="应收金额(元)" width="100" align="center" header-align="center">
<template slot-scope="scope">{{ scope.row.setMoney / 100 }}</template>
</el-table-column>
<el-table-column prop="payMoney" label="实收金额(元)" width="100" align="center" header-align="center">
<template slot-scope="scope">{{ scope.row.payMoney / 100 }}</template>
</el-table-column>
<el-table-column prop="rescueTime" label="救援时间" width="150" header-align="center">
<template slot-scope="scope">{{ scope.row.rescueTime }}</template>
</el-table-column>
</el-table>
<!-- footer -->
<span slot="footer" class="dialog-footer">
<el-button @click="batchDialogVisible = false"> </el-button>
<el-button type="primary" :disabled="!batchSelection.length" :loading="batchSubmitting"
@click="openBatchConfirm">
</el-button>
</span>
</el-dialog>
<!-- 第二层批量确认收款 -->
<el-dialog title="确认收款" :visible.sync="batchConfirmVisible" width="500px" append-to-body>
<el-form :model="batchConfirmForm" :rules="batchConfirmRules" ref="batchConfirmForm" label-width="100px">
<el-form-item label="实收金额">
<!-- 只读统一单位 -->
<el-input-number v-model="batchConfirmForm.totalMoney" :precision="2" disabled style="width: 250px" />
</el-form-item>
<el-form-item label="收款账号" prop="accountNumber">
<el-select v-model="batchConfirmForm.accountNumber" placeholder="请选择收款账号" filterable>
<el-option v-for="acc in accountList" :key="acc.id" :label="acc.accountNumber" :value="acc.accountNumber" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="batchConfirmForm.remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
placeholder="请输入备注" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="batchConfirmVisible = false"> </el-button>
<el-button type="primary" :loading="batchSubmitting" @click="submitBatchConfirm">
</el-button>
</span>
</el-dialog>
<!-- 未开票对话框 -->
<el-dialog title="未开票" :visible.sync="unbilledOpen" width="600px" append-to-body>
<!-- 点击显示弹框 记录开票信息二维码和备注 -->
@ -307,7 +405,7 @@
<!-- 开票二维码展示 + 预览 -->
<el-form-item label="开票二维码">
<el-image v-if="billedForm.billedQrcode" :src="imageUrl + billedForm.billedQrcode"
:preview-src-list="[billedForm.billedQrcode]" fit="contain"
:preview-src-list="[imageUrl + billedForm.billedQrcode]" fit="contain"
style="width:160px;height:160px;border:1px solid #eee" />
<span v-else class="text-gray-400">暂无二维码</span>
</el-form-item>
@ -353,19 +451,23 @@
{{ infoList.driverName }}
</el-descriptions-item>
<el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label">司机手机号</template>
{{ infoList.driverPhoneNum }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label">司机车牌号</template>
{{ infoList.driverCarNum }}
</el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label">调度</template>
{{ infoList.secondDispatchName }}
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label">车辆种类</template>
<!-- {{ infoList.carType }} -->
{{ infoList.driverCarCategory }}
</el-descriptions-item>
@ -374,24 +476,46 @@
{{ infoList.rescueTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">救援开始时间</template>
<!-- {{ infoList.rescueStartTime }} -->
{{ parseTime(infoList.rescueStartTime, '{y}-{m}-{d} {h}:{m}') }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">救援结束时间</template>
<!-- {{ infoList.rescueEndTime }} -->
{{ parseTime(infoList.rescueEndTime, '{y}-{m}-{d} {h}:{m}') }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">救援类型</template>
<dict-tag :type="DICT_TYPE.DLJY_TYPE" :value="infoList.rescueType" />
<!-- {{ infoList.rescueType }} -->
</el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label">救援开始时间</template>
{{ parseTime(infoList.rescueStartTime, '{y}-{m}-{d} {h}:{m}') }}
</el-descriptions-item> -->
<!-- <el-descriptions-item>
<template slot="label">救援结束时间</template>
{{ parseTime(infoList.rescueEndTime, '{y}-{m}-{d} {h}:{m}') }}
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label">出发里程表</template>
{{ infoList.startScale }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">结束里程表</template>
{{ infoList.endScale }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">施救里程数</template>
<span v-if="Number.isFinite(infoList.startScale) &&
Number.isFinite(infoList.endScale) &&
infoList.endScale >= infoList.startScale">
{{ infoList.endScale - infoList.startScale }}
</span>
<span v-else>{{ infoList.endScale }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">过关费</template>
{{ infoList.checkpointMoney }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">车辆类型</template>
<!-- {{ infoList.carType }} -->
@ -409,10 +533,10 @@
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="infoList.feeType" />
</el-descriptions-item>
<el-descriptions-item :span="2">
<!-- <el-descriptions-item :span="2">
<template slot="label">目的地</template>
{{ infoList.destination }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label">救援状态</template>
@ -420,10 +544,10 @@
<dict-tag :type="DICT_TYPE.JY_STATUS" :value="infoList.rescueStatus" />
</el-descriptions-item>
<el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label">路段</template>
{{ infoList.sectionRoad }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label">订单状态</template>
@ -445,6 +569,31 @@
<template slot="label">收款时间</template>
{{ infoList.payTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">来源</template>
{{ infoList.source }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">是否确认收款</template>
<span>{{ infoList.ifConfirmPay === '1' ? '是' : infoList.ifConfirmPay === '0' ? '否' : infoList.ifConfirmPay
}}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">确认收款人</template>
{{ infoList.confirmPaymentPersonName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">收款账号</template>
{{ infoList.accountNumber }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">确认收款时间</template>
{{ infoList.confirmPaymentTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">确认收款备注</template>
{{ infoList.confirmPaymentPersonRemark }}
</el-descriptions-item>
</el-descriptions>
</div>
</el-card>
@ -470,25 +619,44 @@
<td>{{ infoList.driverName }}</td>
</tr>
<tr>
<td><strong>司机手机号</strong></td>
<td>{{ infoList.driverPhoneNum }}</td>
<!-- <td><strong>司机手机号</strong></td>
<td>{{ infoList.driverPhoneNum }}</td> -->
<td><strong>司机车牌号</strong></td>
<td>{{ infoList.driverCarNum }}</td>
</tr>
<tr>
<td><strong>车辆种类</strong></td>
<!-- <td>{{ infoList.carType }}</td> -->
<td>{{ infoList.driverCarCategory }}</td>
<td><strong>救援时间</strong></td>
<td>{{ infoList.rescueTime }}</td>
</tr>
<tr>
<!-- <tr>
<td><strong>调度</strong></td>
<td>{{ infoList.secondDispatchName }}</td>
<td><strong>车辆种类</strong></td>
<td>{{ infoList.carType }}</td>
<td>{{ infoList.driverCarCategory }}</td>
</tr> -->
<!-- <tr>
<td><strong>救援开始时间</strong></td>
<!-- <td>{{ infoList.rescueStartTime }}</td> -->
<td>{{ parseTime(infoList.rescueStartTime, '{y}-{m}-{d} {h}:{m}') }}</td>
<td><strong>救援结束时间</strong></td>
<!-- <td>{{ infoList.rescueEndTime }}</td> -->
<td>{{ parseTime(infoList.rescueEndTime, '{y}-{m}-{d} {h}:{m}') }}</td>
</tr> -->
<tr>
<td><strong>出发里程表</strong></td>
<td>{{ infoList.startScale }}</td>
<td><strong>结束里程表</strong></td>
<td>{{ infoList.endScale }}</td>
</tr>
<tr>
<td><strong>施救里程数</strong></td>
<td>
<span v-if="Number.isFinite(infoList.startScale) &&
Number.isFinite(infoList.endScale) &&
infoList.endScale >= infoList.startScale">
{{ infoList.endScale - infoList.startScale }}
</span>
<span v-else>{{ infoList.endScale }}</span>
</td>
<td><strong>过关费</strong></td>
<td>{{ infoList.checkpointMoney }}</td>
</tr>
<tr>
<td><strong>救援类型</strong></td>
@ -506,16 +674,16 @@
<td><strong>收费类型</strong></td>
<!-- <td>{{ infoList.feeType }}</td> -->
<td><dict-tag :type="DICT_TYPE.FEE_TYPE" :value="infoList.feeType" /></td>
<td><strong>目的地</strong></td>
<td>{{ infoList.destination }}</td>
</tr>
<tr>
<td><strong>救援状态</strong></td>
<!-- <td>{{ infoList.rescueStatus }}</td> -->
<td><dict-tag :type="DICT_TYPE.JY_STATUS" :value="infoList.rescueStatus" /></td>
</tr>
<!-- <tr>
<td><strong>目的地</strong></td>
<td>{{ infoList.destination }}</td>
<td><strong>路段</strong></td>
<td>{{ infoList.sectionRoad }}</td>
</tr>
</tr> -->
<tr>
<td><strong>订单状态</strong></td>
<!-- <td>{{ infoList.orderStatus }}</td> -->
@ -529,6 +697,26 @@
<td><strong>收款时间</strong></td>
<td>{{ infoList.payTime }}</td>
</tr>
<tr>
<td><strong>来源</strong></td>
<td>{{ infoList.source }}</td>
<td><strong>是否确认收款</strong></td>
<td>{{ infoList.ifConfirmPay === '1' ? '是' : infoList.ifConfirmPay === '0' ? '否' :
infoList.ifConfirmPay
}}</td>
</tr>
<tr>
<td><strong>确认收款人</strong></td>
<td>{{ infoList.confirmPaymentPersonName }}</td>
<td><strong>收款账号</strong></td>
<td>{{ infoList.accountNumber }}</td>
</tr>
<tr>
<td><strong>确认收款时间</strong></td>
<td>{{ infoList.confirmPaymentTime }}</td>
<td><strong>确认收款备注</strong></td>
<td>{{ infoList.confirmPaymentPersonRemark }}</td>
</tr>
</tbody>
</table>
</div>
@ -670,18 +858,14 @@
<el-dialog title="确认收款" :visible.sync="confirmPaymentOpen" width="600px" append-to-body>
<el-form ref="confirmPaymentForm" :model="confirmPaymentForm" :rules="rules" label-width="120px">
<el-form-item label="实收金额" prop="payMoney">
<el-input-number v-model="confirmPaymentForm.payMoney" placeholder="请输入实收金额" />
</el-form-item>
<el-form-item label="收款账号" prop="accountNumber">
<el-select v-model="confirmPaymentForm.accountNumber" placeholder="请选择收款账号">
<el-option
v-for="item in accountList"
:key="item.id"
:label="item.accountNumber"
:value="item.accountNumber"
/>
</el-select>
<el-form-item label="实收金额" prop="payMoney">
<el-input-number v-model="confirmPaymentForm.payMoney" placeholder="请输入实收金额" />
</el-form-item>
<el-form-item label="收款账号" prop="accountNumber">
<el-select v-model="confirmPaymentForm.accountNumber" placeholder="请选择收款账号">
<el-option v-for="item in accountList" :key="item.id" :label="item.accountNumber"
:value="item.accountNumber" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="confirmPaymentPersonRemark">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入备注"
@ -756,18 +940,47 @@ import { getTenantId } from '@/utils/auth'
import dayjs from 'dayjs'
import { getAccounts } from '@/views/company/account/api/accountApi'
// data
const hasNormalChannel = ch =>
ch && ch.trim() !== '' && ch.trim() !== '未知渠道'
export default {
name: 'Info',
dicts: ['dljy_type', 'fee_type', 'rescue_car_type', 'yes_no', 'jy_status', 'jy_order_status','car_type'],
dicts: ['dljy_type', 'fee_type', 'rescue_car_type', 'yes_no', 'jy_status', 'jy_order_status', 'car_type'],
data() {
return {
DEFAULT_BATCH_CHANNEL: '人保救援平台', //
batchDialogVisible: false, //
batchList: [], //
batchSelection: [], //
batchSubmitting: false, // loading
batchQuery: { //
ifConfirmPay: 0,
time: [],
channel: '',
driverName: ''
},
/** 第二层批量确认 */
batchConfirmVisible: false,
batchConfirmForm: {
totalMoney: 0, //
accountNumber: '',
remark: ''
},
batchConfirmRules: {
accountNumber: [{ required: true, message: '请选择收款账号', trigger: 'change' }]
},
onlyUnknown: false,
channelList: [], //
sourceOptionList: [], //
channelIdSelected: null, // ID
dispatcherList: [], //
dispatcherLoaded: false, //
accountList: [],
// imageUrl
imageUrl: process.env.VUE_APP_PREVIEW_URL,
// sourceList:[],
@ -860,7 +1073,7 @@ export default {
viewPaymentOpen: false,
viewPaymentForm: {
confirmPaymentPersonName: '',
accountNumber:'',
accountNumber: '',
confirmPaymentTime: '',
payMoney: 0,
confirmPaymentPersonRemark: ''
@ -909,15 +1122,158 @@ export default {
this.injectQueryParams(this.$route.query)
//
this.getList()
this.getLoginUserInfo()
},
methods: {
async loadAccountList() {
/* ----------批量确认收款对话框 ---------- */
openBatchConfirm() {
if (!this.batchSelection.length) {
return this.$message.warning('请至少勾选一条记录')
}
// 2
const cents = this.batchSelection.reduce((sum, row) => sum + (row.setMoney || 0), 0)
this.batchConfirmForm.totalMoney = (cents / 100).toFixed(2)
//
this.loadAccountList()
this.batchConfirmVisible = true
},
/* ---------- ② 真正批量确认收款 ---------- */
async submitBatchConfirm() {
this.$refs.batchConfirmForm.validate(async valid => {
if (!valid) return
try {
const res = await getAccounts({ pageNo: 1, pageSize: 100, systemCode: 'rescue'});
this.accountList = res.data?.records || [];
} catch (err) {
this.$message.error('收款账号加载失败');
this.batchSubmitting = true
const { accountNumber, remark } = this.batchConfirmForm
await Promise.all(
this.batchSelection.map(row =>
confirmReceipt({
id: row.rescueOrderId,
payMoney: row.setMoney, //
ifConfirmPay: '1',
accountNumber,
confirmPaymentPersonId: this.loginUserInfo.id,
confirmPaymentPersonName: this.loginUserInfo.nickname,
confirmPaymentPersonRemark: remark
})
)
)
this.$message.success('批量收款成功')
this.batchConfirmVisible = false
this.batchDialogVisible = false
this.getList()
} catch (e) {
console.error(e)
} finally {
this.batchSubmitting = false
}
})
},
/* —— 打开弹窗 —— */
openBatchSettle() {
this.batchQuery.driverName = '' //
// +
const today = dayjs()
this.batchQuery = {
ifConfirmPay: 0,
time: [
// today.subtract(7, 'day').format('YYYY-MM-DD'),
// today.format('YYYY-MM-DD')
],
channel: this.DEFAULT_BATCH_CHANNEL //
}
this.batchDialogVisible = true
this.loadBatchList()
},
/* —— 拉取列表 —— */
async loadBatchList() {
const [start, end] = this.batchQuery.time || []
const params = {
...this.queryParams, //
pageNo: 1,
pageSize: 500,
ifConfirmPay: this.batchQuery.ifConfirmPay,
rescueStart: start,
rescueEnd: end,
channel: this.batchQuery.channel, //
driverName: this.batchQuery.driverName //
}
const res = await listInfo(params)
this.batchList = res.data.records || []
},
/* —— 多选 —— */
handleBatchSelectionChange(val) {
this.batchSelection = val
},
/* —— 批量提交 —— */
async confirmBatchSettle() {
if (!this.batchSelection.length) {
return this.$message.warning('请至少勾选一条记录')
}
try {
this.batchSubmitting = true
// confirmReceipt
await Promise.all(
this.batchSelection.map(row =>
confirmReceipt({
id: row.rescueOrderId,
payMoney: row.setMoney, //
ifConfirmPay: '1',
accountNumber: '', //
confirmPaymentPersonId: this.loginUserInfo.id,
confirmPaymentPersonName: this.loginUserInfo.nickname
})
)
)
this.$message.success('批量结算成功')
this.batchDialogVisible = false
this.getList() //
} catch (e) {
/* 根据实际情况处理错误 */
console.error(e)
} finally {
this.batchSubmitting = false
}
},
async loadAccountList() {
try {
const res = await getAccounts({ pageNo: 1, pageSize: 100, systemCode: 'rescue' });
this.accountList = res.data?.records || [];
} catch (err) {
this.$message.error('收款账号加载失败');
}
},
/** 下拉第一次展开时,把两种角色合并拉取 */
@ -1005,9 +1361,11 @@ export default {
}
}
//
if (query.driverName) this.queryParams.driverName = decodeURIComponent(query.driverName)
if (query.channel) this.queryParams.channel = decodeURIComponent(query.channel)
if (query.source) this.queryParams.source = decodeURIComponent(query.source)
//
if (query.unknownChannel === '1') this.onlyUnknown = true
//
if (typeof query.ifConfirmPay !== 'undefined') {
const val = Number(query.ifConfirmPay)
this.queryParams.ifConfirmPay = Number.isNaN(val) ? null : val
@ -1046,6 +1404,27 @@ export default {
});
});
},
/* ============ 新增:编辑已开票 ============ */
editBilled(row) {
// billedUserid / billedUsername
this.getLoginUserInfo()
// unbilledForm
this.unbilledForm = {
id: row.rescueOrderId,
ifBilled: '1', //
billedUserid: this.loginUserInfo.id,
billedUsername: this.loginUserInfo.nickname,
billedQrcode: row.billedQrcode, //
billedRemark: row.billedRemark //
}
//
this.unbilledFormTitle = '修改发票'
//
this.unbilledOpen = true
},
unbilled(row) {
this.unbilledForm.id = row.rescueOrderId
this.unbilledForm.billedQrcode = row.billedQrcode
@ -1169,9 +1548,46 @@ export default {
/** 查询道路救援模块列表 */
getList() {
this.loading = true
listInfo(this.queryParams).then(response => {
this.infoList = response.data.records
this.total = response.data.total
// pageSize
const params = { ...this.queryParams }
if (this.onlyUnknown) {
params.pageNo = 1 //
params.pageSize = 9999 //
}
listInfo(params).then(response => {
//
let list = response.data.records || []
//
if (this.onlyUnknown) {
list = list.filter(r => !hasNormalChannel(r.channel))
}
// ========== ==========
if (this.onlyUnknown) {
//
this.total = list.length
//
const { pageNo, pageSize } = this.queryParams
const start = (pageNo - 1) * pageSize
const end = start + pageSize
this.infoList = list.slice(start, end) //
} else {
//
this.infoList = list
this.total = response.data.total
}
// ========== ==========
//
// this.infoList = list
// this.total = this.onlyUnknown
// ? list.length // total=
// : response.data.total // total
// this.infoList = response.data.records
// this.total = response.data.total
this.loading = false
this.getStatistic(this.queryParams)
})