From 4d1957b36cded753f1b88d1fbb664ca7cb8d2183 Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Thu, 9 Oct 2025 09:54:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/utils.js | 598 ++++++++++++++++++++++++++ src/views/repair/statistics/index.vue | 287 ++++++++++++ 2 files changed, 885 insertions(+) create mode 100644 src/utils/utils.js create mode 100644 src/views/repair/statistics/index.vue diff --git a/src/utils/utils.js b/src/utils/utils.js new file mode 100644 index 0000000..537a108 --- /dev/null +++ b/src/utils/utils.js @@ -0,0 +1,598 @@ +import request from '@/utils/request'; +import { + setStorageWithExpiry, + getStorageWithExpiry +} from '@/utils/auth' + +export function getWXStatusHeight() { + // #ifdef MP-WEIXIN + // 获取距上 + const barTop = wx.getSystemInfoSync().statusBarHeight + // 获取胶囊按钮位置信息 + const menuButtonInfo = wx.getMenuButtonBoundingClientRect() + // 获取导航栏高度 + const barHeight = menuButtonInfo.height + (menuButtonInfo.top - barTop) * 2 + let barWidth = menuButtonInfo.width + console.log('menuButtonInfo', menuButtonInfo) + let barLeftPosition = 375 - menuButtonInfo.right + menuButtonInfo.width + let menuButtonLeft = menuButtonInfo.left + let menuButtonRight = menuButtonInfo.right + return { + barHeight, + barTop, + barWidth, + barLeftPosition, + menuButtonLeft, + menuButtonRight + } + // #endif +} + +/** + * 根据订单的状态获取订单的文字展示状态(这个状态范围少,是按李总意思整理出来的状态) + * @param ticketsStatus 订单状态 + * @param isHandover 是否交车 + */ +export function getOrderStatusText(ticketsStatus, isHandover) { + let str = "已进厂"; + if ("04" == ticketsStatus) { + //待派工 + str = "待维修" + } else if ("05" == ticketsStatus) { + //维修中 + str = "维修中" + } else if ("01" == ticketsStatus) { + //待取车结算 + if ("1" == isHandover) { + //已交车 + str = "已交车未结算" + } else { + //未交车 + str = "未交车未结算" + } + } else if ("06" == ticketsStatus) { + //挂单/记账 + if ("1" == isHandover) { + //已交车 + str = "已交车已结算" + } else { + //未交车 + str = "已结算未交车" + } + } else if ("07" == ticketsStatus) { + //待通知客户取车 + str = "已竣工" + } else if ("02" == ticketsStatus) { + //已结账 + if ("1" == isHandover) { + //已交车 + str = "已交车已结算" + } else { + //未交车 + str = "已结算未交车" + } + } else if ("03" == ticketsStatus) { + //已作废 + str = "已作废" + } else if ("08" == ticketsStatus) { + //已作废 + str = "已完成" + } + return str; +} + +/** + * 根据订单的状态获取订单的文字展示状态(这个状态多,就是系统初始状态) + * @param ticketsStatus 订单状态 + * @param isHandover 是否交车 + */ +export function getOrderStatusTextAll(ticketsStatus, isHandover) { + let str = "已进厂"; + if ("04" == ticketsStatus) { + //待派工 + str = "待派工" + } else if ("05" == ticketsStatus) { + //维修中 + str = "维修中" + } else if ("01" == ticketsStatus) { + //待取车结算 + if ("1" == isHandover) { + //已交车 + str = "已交车未结算" + } else { + //未交车 + str = "未交车未结算" + } + } else if ("06" == ticketsStatus) { + //挂单/记账 + str = "已挂单/记账待交车" + if ("1" == isHandover) { + //已交车 + str = "已交车已结算" + } else { + //未交车 + str = "已结算未交车" + } + } else if ("07" == ticketsStatus) { + //待通知客户取车 + str = "待通知客户取车" + } else if ("02" == ticketsStatus) { + //已结账 + if ("1" == isHandover) { + //已交车 + str = "已交车已结算" + } else { + //未交车 + str = "已结算未交车" + } + } else if ("03" == ticketsStatus) { + //已作废 + str = "已作废" + } else if ("08" == ticketsStatus) { + //已作废 + str = "已完成" + } + return str; +} + + +/** + * 查询字典可选值 + * @param dictCode + */ +export function getDictByCode(dictCode) { + let dictArray = getStorageWithExpiry(dictCode); + if (null == dictArray || undefined == dictArray) { + request({ + url: '/admin-api/system/dict-data/type', + method: 'get', + params: { + type: dictCode + } + }).then((res) => { + console.log(res) + if (res.code == 200) { + setStorageWithExpiry(dictCode, res.data, 3600) + return res.data + } + }) + } else { + return dictArray + } +} +/** + * 工单记录操作日志 + * @param id 工单主表id + * @param ticketsWorkStatus 工单主表状态 + * @param itemId 工单子表id + * @param itemStatus 工单子表状态 + * @param recordType 操作类型 对应后端枚举:RecordTypeEnum + * @param remark 备注 + * @param image 图片相对路径,多个英文逗号隔开 + * @param finishType 完成类型 01:完成并移交下一班组、02:完成并移交总检、03:完成工单 + * @param nextName 下一班组名称 + */ +export function saveTicketsRecords(id, ticketsWorkStatus, itemId, itemStatus, recordType, remark, image, finishType, + nextName) { + return new Promise((resolve, reject) => { + let dataObj = { + id: id, + ticketsWorkStatus: ticketsWorkStatus, + item: { + id: itemId, + itemStatus: itemStatus + }, + recordType: recordType, + remark: remark, + finishType: finishType, + nextName: nextName, + image: image + } + request({ + url: '/admin-api/repair/tickets/updateStatus', + method: 'POST', + data: dataObj + }).then((res) => { + console.log(res) + if (res.code == 200) { + uni.showToast({ + title: '操作成功', + icon: 'none' + }) + resolve(1); + } else { + uni.showToast({ + title: '操作失败,请联系管理员', + icon: 'none' + }) + reject(0); + } + }) + }); +} + +/** + * 翻译字典 + * @param dictCode + */ +export async function getDictTextByCodeAndValue(dictCode, value) { + let dictArray = getStorageWithExpiry(dictCode); + if (null == dictArray || undefined == dictArray) { + let res = await request({ + url: '/admin-api/system/dict-data/type', + method: 'get', + params: { + type: dictCode + } + }) + if (res.code == 200) { + setStorageWithExpiry(dictCode, res.data, 3600) + dictArray = res.data + let dictObj = dictArray.find(item => item.value == value) + if (dictObj) { + return dictObj.label + } else { + return "未知数据" + } + } + } else { + let dictObj = dictArray.find(item => item.value == value) + if (dictObj) { + return dictObj.label + } else { + return "未知数据" + } + } +} + +export function formatTimestamp(timestamp) { + // 将时间戳转换为Date对象 + const date = new Date(timestamp); + // 获取年月日时分秒 + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + const seconds = date.getSeconds().toString().padStart(2, '0'); + // 组合成日期时间字符串 + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; +} + +/** + * 将时间戳转换为指定格式的日期字符串 + * @param {number} timestamp - 时间戳(毫秒) + * @param {string} [format='YYYY-MM-DD'] - 日期格式,默认为 'YYYY-MM-DD' + * @returns {string} - 格式化的日期字符串 + */ +export function formatTimestampCustom(timestamp, format = 'YYYY-MM-DD') { + const date = new Date(timestamp); + + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + const hour = date.getHours().toString().padStart(2, '0'); + const minute = date.getMinutes().toString().padStart(2, '0'); + const second = date.getSeconds().toString().padStart(2, '0'); + + const replaceMap = { + 'YYYY': year, + 'MM': month, + 'DD': day, + 'HH': hour, + 'mm': minute, + 'ss': second + }; + + return format.replace(/YYYY|MM|DD|HH|mm|ss/g, match => replaceMap[match]); +} + +/** + * 格式化金额 + * @param {string|number} amount - 金额 + * @returns {string} - 格式化后的金额 + */ +export function formatCurrency(amount) { + if (amount === undefined || amount === null || amount === '') { + return '0.00'; + } + // 处理可能的字符串类型金额 + const num = typeof amount === 'string' ? parseFloat(amount) : amount; + // 检查是否是有效数字 + if (isNaN(num)) { + return '0.00'; + } + // 格式化金额,保留两位小数 + return num.toLocaleString('zh-CN', { + minimumFractionDigits: 2, + numberOfDigits: 2 + }); +} + +/** + * 组装订单对象 + * @param order + */ +export function builderOrder(order) { + return { + id: order.id, + orderNo: order.ticketNo, + flag: 1, + ticketsStatus: order.ticketsStatus, + ticketsWorkStatus: order.ticketsWorkStatus, + flagStr: getOrderStatusTextAll(order.ticketsStatus, order.isHandover), + carNum: order.carNo, + nowRepairId: order.nowRepairId, + carModel: order.carBrandName, + userName: order.userName, + userPhone: order.userMobile, + counselorName: order.adviserName, + canOperate: order.canOperate, + ...order, + } +} + +export function formatDate(timestamp) { + // 将时间戳转换为Date对象 + const date = new Date(timestamp); + // 获取年月日时分秒 + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + // 组合成日期时间字符串 + return `${year}-${month}-${day}`; +} + +//转换为double +// utils.js +export function convertToDouble(value, decimalPlaces = 1) { + if (value !== undefined && value !== null) { + const parsedValue = parseFloat(value); + if (!isNaN(parsedValue)) { + return parsedValue.toFixed(decimalPlaces); + } else { + console.error('转换失败,值不是有效的数字'); + return '0.0'; // 可以设置一个默认值 + } + } else { + console.error('值不存在'); + return '0.0'; // 可以设置一个默认值 + } +} + + +/** + * 生成一个16位的纯数字的唯一ID + * 生成策略 head + 当前时间戳 + 随机数 + * @param head 前缀 + */ +export function createUniqueCodeByHead(head = '') { + const min = 100; // 最小值 + const max = 999; // 最大值 + return head.toString() + Date.now().toString() + Math.floor(Math.random() * (max - min + 1)) + min; +} + +/** + * 构造树 + * @param items 原对象数组 + * @param idKey 主标识 + * @param parentKey 父标识 + * @param mapping 映射Map + */ +export function buildTree(items, idKey, parentKey, mapping = null) { + const result = []; // 存储最终的树形结构 + const itemMap = {}; // 用于快速查找对象 + + // 首先将所有项放入map中,便于后续快速查找 + for (const item of items) { + itemMap[item[idKey]] = { + ...item, + children: [] + }; + } + + // 遍历每个项,构建树形结构 + for (const item of items) { + const id = item[idKey]; + const parentId = item[parentKey]; + + const node = itemMap[id]; + if (parentId !== null && itemMap[parentId]) { + // 如果有父ID,并且父节点存在,则将当前节点加入到其父节点的children数组中 + itemMap[parentId].children.push(node); + } else { + // 如果没有父ID,或者找不到对应的父节点,则认为这是根节点 + result.push(node); + } + } + + if (mapping) { + return mapTree(result, mapping) + } + + return result; +} + +// 映射函数 +function mapTree(tree, mapping) { + if (!tree || !Array.isArray(tree)) { + return tree; + } + + const mappedTree = tree.map(item => { + const mappedItem = {}; + for (const key in item) { + if (key === 'children') { + // 递归处理 children 数组 + if (mapping.children) { + mappedItem[mapping.children] = mapTree(item[key], mapping); + } else { + mappedItem[key] = mapTree(item[key], mapping); + } + } else if (key in mapping) { + // 根据映射规则转换属性 + const targetKey = mapping[key]; + mappedItem[targetKey] = item[key]; + } + } + return mappedItem; + }); + + return mappedTree; +} + +export function formatDateChinese(timestamp) { + // 将时间戳转换为Date对象 + const date = new Date(timestamp); + // 获取年月日时分秒 + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + // 组合成日期时间字符串 + return `${year}年${month}月${day}日`; +} + +export function formatDateTimeToMinute(timestamp) { + // 将时间戳转换为 Date 对象 + const date = new Date(timestamp); + // 获取年月日时分 + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + // 组合成日期时间字符串(格式:yyyy-MM-dd hh:mm) + return `${year}-${month}-${day} ${hours}:${minutes}`; +} + +export function getDateRange(type) { + const now = new Date() + let start, end + + if (type === 'week') { + // 获取本周的开始(周一)和结束(周日) + const day = now.getDay() || 7 // Sunday 为 0,设为 7 + start = new Date(now) + start.setDate(now.getDate() - day + 1) + + end = new Date(start) + end.setDate(start.getDate() + 6) + } else if (type === 'month') { + // 获取本月的开始和结束 + start = new Date(now.getFullYear(), now.getMonth(), 1) + end = new Date(now.getFullYear(), now.getMonth() + 1, 0) // 本月最后一天 + } else if (type === 'day') { + // 获取当天的开始和结束(00:00:00 到 23:59:59) + start = new Date(now) + start.setHours(0, 0, 0, 0) + + end = new Date(now) + end.setHours(23, 59, 59, 999) + } else { + return [] + } + + return [ + formatDateCus(start), + formatDateCus(end) + ] +} + +export function formatDateCus(date) { + const y = date.getFullYear() + const m = (date.getMonth() + 1).toString().padStart(2, '0') + const d = date.getDate().toString().padStart(2, '0') + return `${y}-${m}-${d}` +} + +/** + * 将扁平数组转换为树形结构,并支持按 sort 字段排序 + * @param {Array} data 源数据 + * @param {String} id 节点ID字段名,默认为 'id' + * @param {String} parentId 父节点ID字段名,默认为 'parentId' + * @param {String} children 子节点字段名,默认为 'children' + * @param {Number|String} rootId 根节点ID值,默认为最小的parentId或0 + * @param {String} sortKey 排序字段名,默认为 'sort' + * @returns {Array} 树形结构数据 + */ +export function handleTree(data, id, parentId, children, rootId, sortKey) { + // 参数默认值处理 + id = id || 'id'; + parentId = parentId || 'parentId'; + children = children || 'children'; + sortKey = sortKey || 'sort'; + + // 自动计算根节点ID(取最小的parentId,若无则用0) + rootId = rootId || Math.min(...data.map(item => item[parentId])) || 0; + + // 深拷贝源数据以避免污染原数组 + const cloneData = JSON.parse(JSON.stringify(data)); + + // 先对所有数据进行排序(确保父节点在前) + cloneData.sort((a, b) => { + const aSort = a[sortKey] ?? 0; // 使用空值合并运算符处理undefined + const bSort = b[sortKey] ?? 0; + return aSort - bSort; // 升序排序 + }); + + // 构建哈希表加速查找 + const nodeMap = {}; + cloneData.forEach(item => { + nodeMap[item[id]] = item; + item[children] = []; // 初始化children数组 + }); + + // 构建树形结构 + const tree = []; + cloneData.forEach(item => { + if (item[parentId] === rootId) { + // 根节点直接加入结果 + tree.push(item); + } else { + // 非根节点找到父节点并插入 + const parent = nodeMap[item[parentId]]; + parent?.[children]?.push(item); + } + }); + + // 递归排序所有子节点 + const sortChildren = (nodes) => { + nodes.forEach(node => { + if (node[children]?.length) { + node[children].sort((a, b) => { + const aSort = a[sortKey] ?? 0; + const bSort = b[sortKey] ?? 0; + return aSort - bSort; + }); + sortChildren(node[children]); + } + }); + }; + sortChildren(tree); + + return tree.length ? tree : data; // 空树时返回原数据 +} + +/** + * 将树形结构数据转成 uniapp multiSelector picker 可用的二维数组 + * @param {Array} tree 树形结构数据 + * @param {String} labelKey 节点显示字段,默认为 'name' + * @param {String} childrenKey 子节点字段,默认为 'children' + * @returns {Array} picker二维数组,例如 [[一级], [二级], [三级]...] + */ +export function toPickerData(tree, labelKey = 'name', childrenKey = 'children') { + const result = [] + + function buildColumns(nodes, level = 0) { + if (!nodes || !nodes.length) return + // 当前层级的所有 name + result[level] = nodes.map(n => n[labelKey]) + // 默认取第一个子节点继续递归 + if (nodes[0][childrenKey] && nodes[0][childrenKey].length) { + buildColumns(nodes[0][childrenKey], level + 1) + } + } + + buildColumns(tree, 0) + return result +} \ No newline at end of file diff --git a/src/views/repair/statistics/index.vue b/src/views/repair/statistics/index.vue new file mode 100644 index 0000000..f32d987 --- /dev/null +++ b/src/views/repair/statistics/index.vue @@ -0,0 +1,287 @@ + + + + + From 5c9eaf6730d8d52d0ee66013f96f3235f001b42c Mon Sep 17 00:00:00 2001 From: xuyuncong <3422692813@qq.com> Date: Sat, 11 Oct 2025 13:56:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CommonTimeSelect/index.vue | 44 ++ .../drivingSchoolInsurance/index123.vue | 346 +++++++++++ .../businessStatistics/StatisticsDialog.vue | 315 ++++++++++ .../businessStatistics/api/statistics.js | 119 ++++ .../inspection/businessStatistics/index.vue | 582 ++++++++++++++++++ .../statistics/StaffStatisticsDialog.vue | 82 +++ .../partner/components/WorkOrderList.vue | 526 ++++++++++++++++ 7 files changed, 2014 insertions(+) create mode 100644 src/components/CommonTimeSelect/index.vue create mode 100644 src/views/drivingSchool/drivingSchoolInsurance/index123.vue create mode 100644 src/views/inspection/businessStatistics/StatisticsDialog.vue create mode 100644 src/views/inspection/businessStatistics/api/statistics.js create mode 100644 src/views/inspection/businessStatistics/index.vue create mode 100644 src/views/partner/components/WorkOrderList.vue diff --git a/src/components/CommonTimeSelect/index.vue b/src/components/CommonTimeSelect/index.vue new file mode 100644 index 0000000..39ad932 --- /dev/null +++ b/src/components/CommonTimeSelect/index.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/src/views/drivingSchool/drivingSchoolInsurance/index123.vue b/src/views/drivingSchool/drivingSchoolInsurance/index123.vue new file mode 100644 index 0000000..58f8435 --- /dev/null +++ b/src/views/drivingSchool/drivingSchoolInsurance/index123.vue @@ -0,0 +1,346 @@ + + + diff --git a/src/views/inspection/businessStatistics/StatisticsDialog.vue b/src/views/inspection/businessStatistics/StatisticsDialog.vue new file mode 100644 index 0000000..a5d4bb0 --- /dev/null +++ b/src/views/inspection/businessStatistics/StatisticsDialog.vue @@ -0,0 +1,315 @@ + + + + + \ No newline at end of file diff --git a/src/views/inspection/businessStatistics/api/statistics.js b/src/views/inspection/businessStatistics/api/statistics.js new file mode 100644 index 0000000..994ece4 --- /dev/null +++ b/src/views/inspection/businessStatistics/api/statistics.js @@ -0,0 +1,119 @@ +import request from '@/utils/request' + +// 检测数量统计 +export function getStaticsTable2(params) { + return request({ + url: '/partnerOwn/partner/staticsTable2', + method: 'get', + params + }) +} + +// 营业额统计 +export function getStaticsTable1(params) { + return request({ + url: '/partnerOwn/partner/staticsTable1', + method: 'get', + params + }) +} + +// 业务渠道统计 +export function getStaticsTable3(params) { + return request({ + url: '/partnerOwn/partner/staticsTable3', + method: 'get', + params + }) +} + +// 检测车型统计 +export function getStaticsTable4(params) { + return request({ + url: '/partnerOwn/partner/staticsTable4', + method: 'get', + params + }) +} + +// 待收款统计 +export function getStaticsTable5(params) { + return request({ + url: '/partnerOwn/partner/staticsTable5', + method: 'get', + params + }) +} + +// 资料统计 +export function getFileStatistics(params) { + return request({ + url: '/partnerOwn/partner/fileStatistics', + method: 'get', + params + }) +} + +// 检测类型统计 +export function queryInspectionSkuList(params) { + return request({ + url: '/partnerOwn/partner/queryInspectionSkuList', + method: 'get', + params + }) +} + +// 成交金额图表 +export function chartLineInspectionAmount(params) { + return request({ + url: '/partnerOwn/partner/chartLineInspectionAmount', + method: 'get', + params + }) +} + +// 检测数量图表 +export function chartLineInspectionNum(params) { + return request({ + url: '/partnerOwn/partner/chartLineInspectionNum', + method: 'get', + params + }) +} + +// 客户来源统计详情 +export function getStaticsTable3Detail(params) { + return request({ + url: '/partnerOwn/partner/staticsTable3Detail', + method: 'get', + params + }) +} + +// 根据类型获取文件 +export function getFileByType(params) { + return request({ + url: '/partnerOwn/partner/getFileByType', + method: 'get', + params + }) +} + +// 渠道金额统计 +export function channelMoneyStaticsByBusi(params) { + return request({ + url: '/partnerOwn/partner/channelMoneyStaticsByBusi', + method: 'get', + params + }) +} + + +// 渠道金额统计 +export function customerSourceCount(params) { + return request({ + url: '/partnerOwn/partner/customerSourceCount', + method: 'get', + params + }) + } \ No newline at end of file diff --git a/src/views/inspection/businessStatistics/index.vue b/src/views/inspection/businessStatistics/index.vue new file mode 100644 index 0000000..a47d65d --- /dev/null +++ b/src/views/inspection/businessStatistics/index.vue @@ -0,0 +1,582 @@ + + + + + \ No newline at end of file diff --git a/src/views/inspection/statistics/StaffStatisticsDialog.vue b/src/views/inspection/statistics/StaffStatisticsDialog.vue index 57a0bc9..dc4ee1b 100644 --- a/src/views/inspection/statistics/StaffStatisticsDialog.vue +++ b/src/views/inspection/statistics/StaffStatisticsDialog.vue @@ -120,6 +120,45 @@ + + + @@ -204,6 +243,48 @@ + + +
+
+
+ +
初检公示产值
+
+
+ {{ (baseDataInfo.outputMoneyStatistics && baseDataInfo.outputMoneyStatistics.initialInspectionOutputValue) || 0 }} +
+
+
+
+ +
复检公示产值
+
+
+ {{ (baseDataInfo.outputMoneyStatistics && baseDataInfo.outputMoneyStatistics.recheckInspectionOutputValue) || 0 }} +
+
+
+
+
+
+ +
初检合格产值
+
+
+ {{ (baseDataInfo.outputMoneyStatistics && baseDataInfo.outputMoneyStatistics.initialInspectionPassOutputValue) || 0 }} +
+
+
+
+ +
复检合格产值
+
+
+ {{ (baseDataInfo.outputMoneyStatistics && baseDataInfo.outputMoneyStatistics.recheckInspectionPassOutputValue) || 0 }} +
+
+
@@ -241,6 +322,7 @@ export default { staffInfo: {}, goodsStatistics: [], inspectionStatistics: {}, + outputMoneyStatistics: {}, // 添加新字段 }, projectCount: { children: [], diff --git a/src/views/partner/components/WorkOrderList.vue b/src/views/partner/components/WorkOrderList.vue new file mode 100644 index 0000000..7cb4d00 --- /dev/null +++ b/src/views/partner/components/WorkOrderList.vue @@ -0,0 +1,526 @@ + + + + + \ No newline at end of file From 3ff0c884840e0863f594e79a09117adb089fb5bb Mon Sep 17 00:00:00 2001 From: xuyuncong <3422692813@qq.com> Date: Sat, 11 Oct 2025 14:07:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/businessStatistics/index.vue | 98 +++++++++++++------ 1 file changed, 68 insertions(+), 30 deletions(-) diff --git a/src/views/inspection/businessStatistics/index.vue b/src/views/inspection/businessStatistics/index.vue index a47d65d..ff6cd01 100644 --- a/src/views/inspection/businessStatistics/index.vue +++ b/src/views/inspection/businessStatistics/index.vue @@ -11,27 +11,27 @@
-
+
订单数量
{{ data2.allNum || 0 }}
-
+
完成数量
{{ data2.ywcNum || 0 }}
-
+
检测中数量
{{ data2.jxzNum || 0 }}
-
+
重检数量
{{ data2.reinspectNum || 0 }}
-
+
复检数量
{{ data2.recheckNum || 0 }}
-
+
退办理数量
{{ data2.tblNum || 0 }}
@@ -181,6 +181,26 @@ :type="detailDialog.type" :range="detailDialog.range" /> + + + + + + 关闭 + +
@@ -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(), From ffbfa499ddf650294fd6c7c093a62cf98ca48eca Mon Sep 17 00:00:00 2001 From: xuyuncong <3422692813@qq.com> Date: Tue, 14 Oct 2025 15:31:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?PC=E5=90=8C=E6=AD=A5=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=91=E5=AE=9A=E5=A4=9A=E4=B8=AA=E8=BD=A6?= =?UTF-8?q?=E8=BE=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/repair/Components/AddCarForm.vue | 190 ++++++++++++++++++ src/views/repair/Components/CarChoose.vue | 30 ++- src/views/repair/Components/WorkerChoose.vue | 4 +- .../repair/tickets/Components/TicketItem.vue | 18 +- .../repair/tickets/Components/UserInfo.vue | 3 +- 5 files changed, 235 insertions(+), 10 deletions(-) create mode 100644 src/views/repair/Components/AddCarForm.vue diff --git a/src/views/repair/Components/AddCarForm.vue b/src/views/repair/Components/AddCarForm.vue new file mode 100644 index 0000000..a4ca18a --- /dev/null +++ b/src/views/repair/Components/AddCarForm.vue @@ -0,0 +1,190 @@ + + + + + \ No newline at end of file diff --git a/src/views/repair/Components/CarChoose.vue b/src/views/repair/Components/CarChoose.vue index 8be7afd..6d32e2e 100644 --- a/src/views/repair/Components/CarChoose.vue +++ b/src/views/repair/Components/CarChoose.vue @@ -1,17 +1,27 @@