更新
This commit is contained in:
parent
5c9eaf6730
commit
3ff0c88484
@ -11,27 +11,27 @@
|
||||
<div class="card-content">
|
||||
<common-time-select v-model="ranges" @change="slectRangeInspectionCount"></common-time-select>
|
||||
<div class="stats-grid">
|
||||
<div class="stat-item" @click="showOrderCountDialog(1, '1')">
|
||||
<div class="stat-item" @click="openWorkOrderList({ chooseStatus: '1' })">
|
||||
<div class="text_">订单数量</div>
|
||||
<div class="value">{{ data2.allNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="stat-item" @click="showOrderCountDialog(1, '3')">
|
||||
<div class="stat-item" @click="openWorkOrderList({ chooseStatus: '3' })">
|
||||
<div class="text_">完成数量</div>
|
||||
<div class="value">{{ data2.ywcNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="stat-item" @click="showOrderCountDialog(1, '2')">
|
||||
<div class="stat-item" @click="openWorkOrderList({ status: '2' })">
|
||||
<div class="text_">检测中数量</div>
|
||||
<div class="value">{{ data2.jxzNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="stat-item" @click="showOrderCountDialog(1, '5')">
|
||||
<div class="stat-item" @click="openWorkOrderList({ chooseStatus: '5' })">
|
||||
<div class="text_">重检数量</div>
|
||||
<div class="value">{{ data2.reinspectNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="stat-item" @click="showOrderCountDialog(1, '6')">
|
||||
<div class="stat-item" @click="openWorkOrderList({ chooseStatus: '6' })">
|
||||
<div class="text_">复检数量</div>
|
||||
<div class="value">{{ data2.recheckNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="stat-item" @click="showOrderCountDialog(1, '4')">
|
||||
<div class="stat-item" @click="openWorkOrderList({ chooseStatus: '4' })">
|
||||
<div class="text_">退办理数量</div>
|
||||
<div class="value">{{ data2.tblNum || 0 }}</div>
|
||||
</div>
|
||||
@ -181,6 +181,26 @@
|
||||
:type="detailDialog.type"
|
||||
:range="detailDialog.range"
|
||||
/>
|
||||
|
||||
<!-- WorkOrderList 弹窗 -->
|
||||
<el-dialog
|
||||
title="工单详情"
|
||||
:visible.sync="workOrderListVisible"
|
||||
width="80%"
|
||||
top="5vh"
|
||||
append-to-body
|
||||
v-if="workOrderListVisible"
|
||||
>
|
||||
<WorkOrderList
|
||||
:show-search="true"
|
||||
:show-summary="true"
|
||||
:external-query-params="workOrderListQueryParams"
|
||||
ref="workOrderList"
|
||||
/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="workOrderListVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -189,12 +209,14 @@
|
||||
import * as statisticsApi from './api/statistics'
|
||||
import CommonTimeSelect from '@/components/CommonTimeSelect'
|
||||
import StatisticsDialog from './StatisticsDialog'
|
||||
|
||||
import WorkOrderList from '@/views/partner/components/WorkOrderList.vue'
|
||||
|
||||
export default {
|
||||
name: 'BusinessStatistics',
|
||||
components: {
|
||||
CommonTimeSelect,
|
||||
StatisticsDialog
|
||||
StatisticsDialog,
|
||||
WorkOrderList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -226,7 +248,10 @@
|
||||
orderStatisticDialog: {
|
||||
visible: false,
|
||||
status: null
|
||||
}
|
||||
},
|
||||
// WorkOrderList 弹窗控制
|
||||
workOrderListVisible: false,
|
||||
workOrderListQueryParams: {}
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -245,7 +270,7 @@
|
||||
this[range] = [currentTime, currentTime]
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 加载所有数据
|
||||
async loadAllData() {
|
||||
try {
|
||||
@ -261,7 +286,20 @@
|
||||
console.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 打开 WorkOrderList 弹窗
|
||||
openWorkOrderList(filters = {}) {
|
||||
return;
|
||||
// 设置查询参数,包括时间范围和筛选条件
|
||||
this.workOrderListQueryParams = {
|
||||
datetimeRange: this.ranges,
|
||||
...filters
|
||||
};
|
||||
|
||||
// 显示弹窗
|
||||
this.workOrderListVisible = true;
|
||||
},
|
||||
|
||||
// 显示详情弹窗
|
||||
showDetailDialog(id, dataId = null) {
|
||||
this.detailDialog = {
|
||||
@ -271,7 +309,7 @@
|
||||
range: this.getRangeByType(id)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
showDetailDialog2(id, type) {
|
||||
this.detailDialog = {
|
||||
visible: true,
|
||||
@ -280,7 +318,7 @@
|
||||
range: this.getRangeByType(id)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 显示订单统计弹窗
|
||||
showOrderStatisticDialog(status) {
|
||||
// this.orderStatisticDialog = {
|
||||
@ -288,12 +326,12 @@
|
||||
// status
|
||||
// }
|
||||
},
|
||||
|
||||
|
||||
showOrderCountDialog(type, data) {
|
||||
// 根据业务逻辑处理
|
||||
this.showDetailDialog(type, data)
|
||||
},
|
||||
|
||||
|
||||
// 根据类型获取时间范围
|
||||
getRangeByType(id) {
|
||||
const rangeMap = {
|
||||
@ -307,43 +345,43 @@
|
||||
}
|
||||
return rangeMap[id] || this.ranges
|
||||
},
|
||||
|
||||
|
||||
// 各种数据获取方法
|
||||
async slectRangeInspectionCount(e) {
|
||||
this.ranges = e
|
||||
await this.getServerData2()
|
||||
},
|
||||
|
||||
|
||||
async slectRangeYYECount(e) {
|
||||
this.rangeYYE = e
|
||||
await this.getServerData1()
|
||||
},
|
||||
|
||||
|
||||
async slectRangeBusinessCount(e) {
|
||||
this.rangeBusiness = e
|
||||
await this.getServerData3()
|
||||
},
|
||||
|
||||
|
||||
async slectRangeZLCount(e) {
|
||||
this.rangeZL = e
|
||||
await this.getFileStatistics()
|
||||
},
|
||||
|
||||
|
||||
async slectRangeGoodsCount(e) {
|
||||
this.rangeGoods = e
|
||||
await this.getStaticsTable4()
|
||||
},
|
||||
|
||||
|
||||
async slectRangeSkuCount(e) {
|
||||
this.rangeSku = e
|
||||
await this.getInspectionSku()
|
||||
},
|
||||
|
||||
|
||||
async slectRangeDskCount(e) {
|
||||
this.rangeDsk = e
|
||||
await this.getStaticsTable5()
|
||||
},
|
||||
|
||||
|
||||
// API调用方法
|
||||
async getServerData1() {
|
||||
const params = {
|
||||
@ -353,7 +391,7 @@
|
||||
const res = await statisticsApi.getStaticsTable1(params)
|
||||
this.data1 = res.data
|
||||
},
|
||||
|
||||
|
||||
async getServerData2() {
|
||||
const params = {
|
||||
startTime: this.ranges[0],
|
||||
@ -362,7 +400,7 @@
|
||||
const res = await statisticsApi.getStaticsTable2(params)
|
||||
this.data2 = res.data
|
||||
},
|
||||
|
||||
|
||||
async getServerData3() {
|
||||
const params = {
|
||||
startTime: this.rangeBusiness[0],
|
||||
@ -371,7 +409,7 @@
|
||||
const res = await statisticsApi.getStaticsTable3(params)
|
||||
this.data3 = res.data
|
||||
},
|
||||
|
||||
|
||||
async getStaticsTable4() {
|
||||
const params = {
|
||||
startTime: this.rangeGoods[0],
|
||||
@ -380,7 +418,7 @@
|
||||
const res = await statisticsApi.getStaticsTable4(params)
|
||||
this.data4 = res.data
|
||||
},
|
||||
|
||||
|
||||
async getStaticsTable5() {
|
||||
const params = {
|
||||
startTime: this.rangeDsk[0],
|
||||
@ -389,7 +427,7 @@
|
||||
const res = await statisticsApi.getStaticsTable5(params)
|
||||
this.data5 = res.data
|
||||
},
|
||||
|
||||
|
||||
async getFileStatistics() {
|
||||
const params = {
|
||||
servicePackageId: 'jiance',
|
||||
@ -399,7 +437,7 @@
|
||||
const res = await statisticsApi.getFileStatistics(params)
|
||||
this.fileRes = res.data
|
||||
},
|
||||
|
||||
|
||||
async getInspectionSku() {
|
||||
const params = {
|
||||
startTime: this.rangeSku[0],
|
||||
@ -408,7 +446,7 @@
|
||||
const res = await statisticsApi.queryInspectionSkuList(params)
|
||||
this.skuList = res.data
|
||||
},
|
||||
|
||||
|
||||
async getfive() {
|
||||
await Promise.all([
|
||||
this.getServerData1(),
|
||||
|
Loading…
Reference in New Issue
Block a user