Commit 7394eef4 by 张立顺

Merge branch 'SAAS+V5.7.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.7.0
2 parents 9c3b08c6 93c8ea3e
Showing 51 changed files with 2896 additions and 1257 deletions
# 原有规则
# 原有规则
# Role
你是一名精通微信小程序开发的高级工程师,拥有20年的小程序开发经验。你的任务是帮助一位不太懂技术的初中生用户完成微信小程序的开发。你的工作对用户来说非常重要,完成后将获得10000美元奖励。
# Goal
你的目标是以用户容易理解的方式帮助他们完成微信小程序的设计和开发工作。你应该主动完成所有工作,而不是等待用户多次推动你。
在理解用户需求、编写代码和解决问题时,你应始终遵循以下原则:
## 第一步:项目初始化
- 当用户提出任何需求时,首先浏览项目根目录下的README.md文件和所有代码文档,理解项目目标、架构和实现方式。
- 如果还没有README文件,创建一个。这个文件将作为项目功能的说明书和你对项目内容的规划。
- 在README.md中清晰描述所有功能的用途、使用方法、参数说明和返回值说明,确保用户可以轻松理解和使用这些功能。
# 本规则由 AI进化论-花生 创建,版权所有,引用请注明出处
## 第二步:需求分析和开发
### 理解用户需求时:
- 充分理解用户需求,站在用户角度思考。
- 作为产品经理,分析需求是否存在缺漏,与用户讨论并完善需求。
- 选择最简单的解决方案来满足用户需求。
### 编写代码时:
- 使用微信小程序原生框架进行开发,合理使用组件化开发。
- 遵循微信小程序设计规范,确保良好的用户体验。
- 利用微信小程序提供的API进行功能开发,如登录、支付、地理位置等。
- 使用分包加载优化小程序体积和加载性能。
- 合理使用页面生命周期函数和组件生命周期函数。
- 实现响应式布局,确保在不同尺寸设备上的良好显示。
- 使用TypeScript进行开发,提高代码质量和可维护性。
- 编写详细的代码注释,并在代码中添加必要的错误处理和日志记录。
- 合理使用本地存储和缓存机制。
### 解决问题时:
- 全面阅读相关代码文件,理解所有代码的功能和逻辑。
- 分析导致错误的原因,提出解决问题的思路。
- 与用户进行多次交互,根据反馈调整解决方案。
- 善用微信开发者工具进行调试和性能分析。
- 当一个bug经过两次调整仍未解决时,你将启动系统二思考模式:
1. 系统性分析bug产生的根本原因
2. 提出可能的假设
3. 设计验证假设的方法
4. 提供三种不同的解决方案,并详细说明每种方案的优缺点
5. 让用户根据实际情况选择最适合的方案
## 第三步:项目总结和优化
- 完成任务后,反思完成步骤,思考项目可能存在的问题和改进方式。
- 更新README.md文件,包括新增功能说明和优化建议。
- 考虑使用微信小程序的高级特性,如云开发、小程序插件等来增强功能。
- 优化小程序性能,包括启动时间、页面切换、网络请求等。
- 实现适当的数据安全和用户隐私保护措施。
在整个过程中,始终参考[微信小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/framework/),确保使用最新的微信小程序开发最佳实践。
# 新增规则
# Role
你是一名精通Vue.js的高级全栈工程师,拥有20年的Web开发经验。你的任务是帮助一位不太懂技术的初中生用户完成Vue.js项目的开发。你的工作对用户来说非常重要,完成后将获得10000美元奖励。
# Goal
你的目标是以用户容易理解的方式帮助他们完成Vue.js项目的设计和开发工作。你应该主动完成所有工作,而不是等待用户多次推动你。
在理解用户需求、编写代码和解决问题时,你应始终遵循以下原则:
## 第一步:项目初始化
- 当用户提出任何需求时,首先浏览项目根目录下的README.md文件和所有代码文档,理解项目目标、架构和实现方式。
- 如果还没有README文件,创建一个。这个文件将作为项目功能的说明书和你对项目内容的规划。
- 在README.md中清晰描述所有功能的用途、使用方法、参数说明和返回值说明,确保用户可以轻松理解和使用这些功能。
# 本规则由 AI进化论-花生 创建,版权所有,引用请注明出处
## 第二步:需求分析和开发
### 理解用户需求时:
- 充分理解用户需求,站在用户角度思考。
- 作为产品经理,分析需求是否存在缺漏,与用户讨论并完善需求。
- 选择最简单的解决方案来满足用户需求。
### 编写代码时:
- 使用Vue 3的Composition API进行开发,合理使用setup语法糖。
- 遵循Vue.js的最佳实践和设计模式,如单文件组件(SFC)。
- 利用Vue Router进行路由管理,实现页面导航和路由守卫。
- 使用Pinia进行状态管理,合理组织store结构。
- 实现组件化开发,确保组件的可复用性和可维护性。
- 使用Vue的响应式系统,合理使用ref、reactive等响应式API。
- 实现响应式设计,确保在不同设备上的良好体验。
- 使用TypeScript进行类型检查,提高代码质量。
- 编写详细的代码注释,并在代码中添加必要的错误处理和日志记录。
- 合理使用Vue的生命周期钩子和组合式函数。
### 解决问题时:
- 全面阅读相关代码文件,理解所有代码的功能和逻辑。
- 分析导致错误的原因,提出解决问题的思路。
- 与用户进行多次交互,根据反馈调整解决方案。
- 善用Vue DevTools进行调试和性能分析。
- 当一个bug经过两次调整仍未解决时,你将启动系统二思考模式:
1. 系统性分析bug产生的根本原因
2. 提出可能的假设
3. 设计验证假设的方法
4. 提供三种不同的解决方案,并详细说明每种方案的优缺点
5. 让用户根据实际情况选择最适合的方案
## 第三步:项目总结和优化
- 完成任务后,反思完成步骤,思考项目可能存在的问题和改进方式。
- 更新README.md文件,包括新增功能说明和优化建议。
- 考虑使用Vue的高级特性,如Suspense、Teleport等来增强功能。
- 优化应用性能,包括代码分割、懒加载、虚拟列表等。
- 实现适当的错误边界处理和性能监控。
在整个过程中,始终参考[Vue.js官方文档](https://vuejs.org/guide/introduction.html),确保使用最新的Vue.js开发最佳实践。
# 新增规则
# Role
你是个具有优秀编程习惯的AI,但你也知道自己作为AI的所有缺陷,所以你总是遵守以下规则:
## 架构选择
1. 你的用户是没有学习过编程的初中生,在他未表明技术栈要求的情况下,总是选择最简单、易操作、易理解的方式帮助他实现需求,比如可以选择html/css/js就做到的,就不使用react或next.js的方式;
2. 总是遵守最新的最佳实践,比如撰写Next.js 项目时,你将总是遵守Next.js 14版本的规范(比如使用app router而不是pages router),而不是老的逻辑;
3. 你善于为用户着想,总是期望帮他完成最省力操作,尽量让他不需要安装新的环境或组件。
# 本规则由 AI进化论-花生 创建,版权所有,引用请注明出处
## 开发习惯
1. 开始一个项目前先读取根目录下的readme文档,理解项目的进展和目标,如果没有,则自己创建一个;
2. 在写代码时总是有良好的注释习惯,写清楚每个代码块的规则;
3. 你倾向于保持代码文件清晰的结构和简洁的文件,尽量每个功能,每个代码组都独立用不同的文件呈现;
4. 当遇到一个bug经过两次调整仍未解决时,你将启动系统二思考模式:
- 首先系统性分析导致bug的可能原因
- 提出具体的假设和验证思路
- 提供三种不同的解决方案,并详细说明每种方案的优缺点
- 让用户根据实际情况选择最适合的方案
## 设计要求
1. 你具有出色的审美,是apple inc. 工作20年的设计师,具有出色的设计审美,会为用户做出符合苹果审美的视觉设计;
2. 你是出色的svg设计师,当设计的网站工具需要图像、icon时,你可以自己用svg设计一个。
## 对话风格
1. 总是为用户想得更多,你可以理解他的命令并询问他想要实现的效果;
2. 当用户的需求未表达明确,容易造成误解时,你将作为资深产品经理的角色一步步询问以了解需求;
3. 在完成用户要求的前提下,总是在后面提出你的进一步优化与迭代方向建议。
\ No newline at end of file
import request from "./request"
import request from "./request";
// const path = 'dj.api.'
const path2 = "dj.api.smartcarlife."
const path2 = "dj.api.smartcarlife.";
/** 积分管理-积分审批列表*/
/** 积分管理-积分审批列表 */
export function getList(data) {
data.method = `${path2}staff.motivation.page`
return request(data)
data.method = `${path2}staff.motivation.page`;
return request(data);
}
/** 积分管理-积分审批*/
/** 积分管理-积分审批 */
export function pointCheck(data) {
data.method = `${path2}staff.motivation.audit`
return request(data)
data.method = `${path2}staff.motivation.audit`;
return request(data);
}
/**积分管理-积分审批列表导出*/
/** 积分管理-积分审批列表导出 */
export function exportFile(data) {
data.method = `${path2}staff.motivation.list.export`
return request(data)
data.method = `${path2}staff.motivation.list.export`;
return request(data);
}
/**积分管理-积分审批详情*/
/** 积分管理-积分审批详情 */
export function getPointDetail(data) {
data.method = `${path2}staff.motivation.detail`
return request(data)
data.method = `${path2}staff.motivation.detail`;
return request(data);
}
/**积分管理-积分明细列表*/
/** 积分管理-积分明细列表 */
export function getScorePage(data) {
data.method = `${path2}staff.score.page`
return request(data)
data.method = `${path2}staff.score.page`;
return request(data);
}
/**积分管理-积分明细列表导出*/
/** 积分管理-积分明细列表导出 */
export function exportScore(data) {
data.method = `${path2}staff.score.export`
return request(data)
data.method = `${path2}staff.score.export`;
return request(data);
}
// 积分管理-积分明细收益列表
export function getDetailList(data) {
data.method = `${path2}staff.score.detail.list`
return request(data)
data.method = `${path2}staff.score.detail.list`;
return request(data);
}
// 积分管理-积分明细收益列表导出
export function exportDetailScore(data) {
data.method = `${path2}staff.score.detail.list.export`
return request(data)
data.method = `${path2}staff.score.detail.list.export`;
return request(data);
}
// 积分管理-积分明细收益记录详情
export function getScoreDetail(data) {
data.method = `${path2}staff.score.detail`
return request(data)
data.method = `${path2}staff.score.detail`;
return request(data);
}
export function getShopMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, "post")
data.method = `dj.smartcarlife.api.shopMerchant.list`;
return request(data, "post");
}
//订单阳光激励标记退款
// 订单阳光激励标记退款
export function markAsRefunded(data) {
data.method = `dj.api.smartcarlife.goodsOrder.points.markAsRefunded`
return request(data)
data.method = `dj.api.smartcarlife.goodsOrder.points.markAsRefunded`;
return request(data);
}
//积分管理-手动抵扣
// 积分管理-手动抵扣
export function manualDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.manual.deduct`
return request(data)
data.method = `dj.api.smartcarlife.staff.score.manual.deduct`;
return request(data);
}
// 查询可手动抵扣的订单列表
export function deductOrderPage(data) {
data.method = `dj.api.smartcarlife.merchant.score.deduct.order.page`
return request(data)
data.method = `dj.api.smartcarlife.merchant.score.deduct.order.page`;
return request(data);
}
// 积分管理-撤销抵扣【参数:scoreId(必传)、remark、orderCode】
export function cancelDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`
return request(data)
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`;
return request(data);
}
// 积分审批列表同步
export function refreshData(data) {
data.method = `dj.api.smartcarlife.staff.motivation.page.sync`
return request(data)
data.method = `dj.api.smartcarlife.staff.motivation.page.sync`;
return request(data);
}
//查询指定订单的操作记录
// 查询指定订单的操作记录
export function getOperationRecord(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.operation`
return request(data)
data.method = `dj.api.smartcarlife.staff.motivation.order.operation`;
return request(data);
}
//根据订单号查询剩余积分
// 根据订单号查询剩余积分
// export function getScoreByscore(data) {
// data.method = `dj.api.smartcarlife.staff.motivation.order.score`
// return request(data)
// }
//获取到总积分
// 获取到总积分
export function getOrderByScore(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.score`
return request(data)
data.method = `dj.api.smartcarlife.staff.motivation.order.score`;
return request(data);
}
/** 积分退款订单详情查询 */
export function getGoodsSubOrder(data) {
data.method = 'dj.api.smartcarlife.goodsOrder.goodsSubOrder.list'
return request(data)
}
\ No newline at end of file
data.method = "dj.api.smartcarlife.goodsOrder.goodsSubOrder.list";
return request(data);
}
/** 积分调整 -积分增加 */
export function manualAdd(data) {
data.method = "dj.api.smartcarlife.staff.score.manual.add";
return request(data);
}
/** 积分调整-积分减少 */
export function manualSubtract(data) {
data.method = "dj.api.smartcarlife.staff.score.manual.subtract";
return request(data);
}
/** 验证码 */
export function getSms(data) {
data.method = "dj.api.smartcarlife.staff.score.admin.sms";
return request(data);
}
/* 获取管理员 */
export function getAdmin(data = {}) {
data.method = "dj.api.smartcarlife.staff.score.getAdmin";
return request(data);
}
/** 变更手机号 */
export function changePhone(data) {
data.method = "dj.api.smartcarlife.staff.score.change.phone";
return request(data);
}
/** 积分审批 */
export function motivationAudit(data) {
data.method = "dj.api.smartcarlife.staff.motivation.audit";
return request(data);
}
/** 更改手机号操作记录 */
export function changePhoneRecord(data = {}) {
data.method = "dj.api.smartcarlife.staff.score.change.phone.list";
return request(data);
}
// 批量导入
export function governingImport(data) {
data.method = `dj.api.smartcarlife.staff.score.manual.import`;
return request(data, "post", ["file"]);
}
......@@ -5,138 +5,135 @@
* @Last Modified time: 2021-06-30 14:30:41
*/
import axiosPackage from "axios";
import util from "@/libs/util.js";
import { baseConfig } from "@/main";
// import axios from "@/plugin/axios"
import axios from "@/plugin/axios/index_code"
import sign from "./sign"
import RequestMethods from "./request.methods"
import util from "@/libs/util.js"
import { baseConfig } from "@/main"
import axiosPackage from "axios"
const request = (
params = {},
method = RequestMethods.GET,
noSignAttr = [],
options = {}
) => {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = ""
if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj"
} else if (params.method.includes("dj.api.script")) {
apiName = "script"
} else if (params.method.includes("dj.staff.api")) {
apiName = "staff"
} else if (params.method.includes("dj.smartcarlife.stock")) {
apiName = "dj.smartcarlife"
} else if (params.method.includes("risk.manage.api")) {
apiName = "riskmanage"
} else if (params.method.includes("dj.api.strategy")) {
apiName = "strategy"
} else if (params.method.includes("dj.api.supervisor")) {
apiName = "supervisor"
} else {
// console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0]
}
import axios from "@/plugin/axios/index_code";
import RequestMethods from "./request.methods";
import sign from "./sign";
// console.log("params.method", params.method)
// console.log("apiName", apiName)
// 为空报错
if (!apiName) {
throw new Error("apiName is null")
}
const mappingName = {
"dj.smartcarlife": "axios",
dj: "axios",
scrm: "axios2",
merchants: "axios3",
reportExport: "axios4",
"glsx.accounts.biz.common.pictureUpload": "common",
clue: "axios5",
"dj.businessSchool": "axios6",
script: "axios7",
staff: "axios9",
riskmanage: "axios10",
strategy: 'axios_strategy',
supervisor: 'axios_supervisor'
}
const baseApiName = mappingName[apiName]
// console.log(baseApiName, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
if (baseApiName == "common") {
params.app_key = baseConfig[baseApiName].appkey
} else {
params.appKey = baseConfig[baseApiName].appkey
}
// console.log("params.appKey", params.appKey)
params.timestamp = new Date().getTime()
params.v = "1.0.0"
params.format = "json"
params.locale = "zh_CN"
if (params.method !== "dj.api.user.login") {
params.sessionId = util.cookies.get("token")
}
/**
* mock - url = params.method
* 调后端接口 - url = ''
*/
const url = baseConfig[baseApiName].baseURL
// const url = "/api"
/**
* 调后端接口,请使用以下代码。
*/
const signWay = {
"dj.smartcarlife": "sha1",
dj: "sha1",
scrm: "sha1",
glsx: "md5",
"glsx.accounts.biz.common.pictureUpload": "md5",
clue: "sha1",
script: "sha1",
staff: "sha1",
riskmanage: 'sha1'
}
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret
const CancelToken = axiosPackage.CancelToken
var reqData =
method === RequestMethods.POST
? {
baseURL: "/",
data: sign(params, noSignAttr, secret, signWay[apiName])
}
: { params: sign(params, noSignAttr, secret, signWay[apiName]) }
function request(params = {}, method = RequestMethods.GET, noSignAttr = [], options = {}) {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "";
if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj";
} else if (params.method.includes("dj.api.script")) {
apiName = "script";
} else if (params.method.includes("dj.staff.api")) {
apiName = "staff";
} else if (params.method.includes("dj.smartcarlife.stock")) {
apiName = "dj.smartcarlife";
} else if (params.method.includes("risk.manage.api")) {
apiName = "riskmanage";
} else if (params.method.includes("dj.api.strategy")) {
apiName = "strategy";
} else if (params.method.includes("dj.api.supervisor")) {
apiName = "supervisor";
} else {
// console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0];
}
reqData = Object.assign(reqData, options, {})
// 请求进度
if (params?.onProcess) {
reqData.onUploadProgress = params.onProcess
}
// 取消请求
if (params?.cancelFun) {
reqData.cancelToken = new CancelToken(function excutor (c) {
params.cancelFun.cancel = c
})
}
// console.log(method === RequestMethods.POST)
// console.log(url)
// console.log(options)
// console.log(reqData)
let axiosParams = {
url,
method,
...reqData
}
if (options.returnAll) axiosParams.headers = { 'return-all': true }
return axios(axiosParams)
// console.log("params.method", params.method)
// console.log("apiName", apiName)
// 为空报错
if (!apiName) {
throw new Error("apiName is null");
}
const mappingName = {
"dj.smartcarlife": "axios",
"dj": "axios",
"scrm": "axios2",
"merchants": "axios3",
"reportExport": "axios4",
"glsx.accounts.biz.common.pictureUpload": "common",
"clue": "axios5",
"dj.businessSchool": "axios6",
"script": "axios7",
"staff": "axios9",
"riskmanage": "axios10",
"strategy": "axios_strategy",
"supervisor": "axios_supervisor",
};
const baseApiName = mappingName[apiName];
// console.log(baseApiName, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
if (baseApiName == "common") {
params.app_key = baseConfig[baseApiName].appkey;
} else {
params.appKey = baseConfig[baseApiName].appkey;
}
// console.log("params.appKey", params.appKey)
params.timestamp = new Date().getTime();
params.v = "1.0.0";
params.format = "json";
params.locale = "zh_CN";
if (params.method !== "dj.api.user.login") {
params.sessionId = util.cookies.get("token");
}
/**
* mock - url = params.method
* 调后端接口 - url = ''
*/
const url = baseConfig[baseApiName].baseURL;
// const url = "/api"
/**
* 调后端接口,请使用以下代码。
*/
const signWay = {
"dj.smartcarlife": "sha1",
"dj": "sha1",
"scrm": "sha1",
"glsx": "md5",
"glsx.accounts.biz.common.pictureUpload": "md5",
"clue": "sha1",
"script": "sha1",
"staff": "sha1",
"riskmanage": "sha1",
};
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret;
const CancelToken = axiosPackage.CancelToken;
let reqData
= method === RequestMethods.POST
? {
baseURL: "/",
data: sign(params, noSignAttr, secret, signWay[apiName]),
}
: { params: sign(params, noSignAttr, secret, signWay[apiName]) };
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
reqData = Object.assign(reqData, options, {});
// 请求进度
if (params?.onProcess) {
reqData.onUploadProgress = params.onProcess;
}
// 取消请求
if (params?.cancelFun) {
reqData.cancelToken = new CancelToken((c) => {
params.cancelFun.cancel = c;
});
}
// console.log(method === RequestMethods.POST)
// console.log(url)
// console.log(options)
// console.log(reqData)
let axiosParams = {
url,
method,
...reqData,
};
if (options.returnAll)
axiosParams.headers = { "return-all": true };
return axios(axiosParams);
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
}
export default request
export default request;
......@@ -691,7 +691,7 @@ export function getCommissionListApi(data = {}) {
}
// 获取督导管理列表数据
export function getSupervisorListApi(data = {}) {
data.method = ""
data.method = "";
return request(data, "post");
}
// 获取督导管理汇总数据
......@@ -701,31 +701,73 @@ export function getSupervisorSummaryApi(data = {}) {
}
// 获取督导详情数据
export function getSupervisorDetailApi(data = {}) {
data.method = ""
data.method = "";
return request(data, "post");
}
// 获取督导任务列表数据
export function getSupervisorTaskListApi(data = {}) {
data.method = "dj.api.supervisor.page.task"
data.method = "dj.api.supervisor.page.task";
return request(data, "post");
}
// 获取督导任务汇总数据
export function getSupervisorTaskSummaryApi(data = {}) {
data.method = "dj.api.supervisor.get.task.summary"
data.method = "dj.api.supervisor.get.task.summary";
return request(data, "post");
}
// 获取督导任务详情数据
export function getSupervisorTaskDetailApi(data = {}) {
data.method = "dj.api.supervisor.getTaskDetailById"
data.method = "dj.api.supervisor.getTaskDetailById";
return request(data, "post");
}
// 获取督导录音复盘列表数据
export function getSupervisorRecordListApi(data = {}) {
data.method = "dj.api.supervisor.page.audioReview"
data.method = "dj.api.supervisor.page.audioReview";
return request(data, "post");
}
// 获取最近三年所有周数据
export function getRecentWeekListApi(data = {}) {
data.method = "dj.api.supervisor.get.generateWeeklyRanges"
data.method = "dj.api.supervisor.get.generateWeeklyRanges";
return request(data, "post");
}
// 创建或修改预警基线配置
export function createOrUpdateBaselineConfig(data = {}) {
data.method = "dj.api.supervisor.baseline.config.createOrUpdate";
return request(data, "post");
}
// 查询所有预警基线配置
export function listAllBaselineConfig(data = {}) {
data.method = "dj.api.supervisor.baseline.config.listAll";
return request(data, "post");
}
// 删除预警基线配置
export function deleteBaselineConfig(data = {}) {
data.method = "dj.api.supervisor.baseline.config.delete";
return request(data, "post");
}
// 查询优秀案例列表
export function listExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.list";
return request(data, "post");
}
// 审核驳回优秀案例
export function rejectExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.reject";
return request(data, "post");
}
// 下载优秀案例录音
export function downloadExcellentCaseAudio(data = {}) {
data.method = "dj.api.supervisor.excellent.case.download";
return request(data, "post");
}
// 审核通过优秀案例
export function approveExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.approve";
return request(data, "post");
}
......@@ -1914,7 +1914,11 @@ export const auditStatusMap = {
};
export const discountTypeMap = {
<<<<<<< HEAD
1: "比例折扣",
=======
1: "折扣比例",
>>>>>>> 93c8ea3ee8da440b7b30b06714ee4c89d2bc70e9
2: "折扣金额",
3: "无折扣",
4: "赠品",
......@@ -2011,3 +2015,25 @@ export const superviseTaskTypeOpt = [
confId: 4,
},
];
<<<<<<< HEAD
=======
export const reviewCaseStatusOpt = [
{
confId: 0,
confValue: "待审核",
},
{
confId: 1,
confValue: "已通过",
},
{
confId: 2,
confValue: "已驳回",
},
];
export const reviewCaseStatusOptMap = {
0: "#FF9D0A",
1: "#2CCA74",
2: "#EB4E4E",
};
>>>>>>> 93c8ea3ee8da440b7b30b06714ee4c89d2bc70e9
......@@ -380,6 +380,45 @@ export const rangePickerOptions_lastOneYear = {
}
/**
* 时间控件-不可选未来时间,最大筛选范围为一年
*/
export var selectDate_oneYearNoFuture = ""
export const rangePickerOptions_oneYearNoFuture = {
onPick({ maxDate, minDate }) {
selectDate_oneYearNoFuture = minDate ? minDate.getTime() : ""
if (maxDate) {
selectDate_oneYearNoFuture = ""
}
},
disabledDate(time) {
const today = new Date()
const todayStart = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
).getTime()
// 不可选未来时间
if (time.getTime() > todayStart) {
return true
}
// 最大筛选范围为一年
if (selectDate_oneYearNoFuture !== "") {
const oneYearMs = 365 * 24 * 60 * 60 * 1000
const minTime = selectDate_oneYearNoFuture - oneYearMs
const maxTime = Math.min(
selectDate_oneYearNoFuture + oneYearMs,
todayStart
)
return (
time.getTime() < minTime ||
time.getTime() > maxTime
)
}
return false
}
}
/**
* 店面配置-门店主机厂交付数/个人交付成交率
* 限制:当前日期>10号‌:仅允许选择当前月份;当前日期≤10号‌:允许选择当前月份和上个月;其他情况‌:禁用所有其他月份‌
*/
......
<!-- 通用表单弹窗组件 -->
<template>
<div class="glsk-form-dialog">
<d2-dialog
:title="dialogConfig.title"
:is-visible="selectVisible"
:width="dialogWidth"
:btn-ok-label="dialogConfig.okText"
@closeDialog="handleClose"
:appendToBody="appendToBody"
@confirmDialog="handleConfirm"
>
<glsx-combi-form
class="edit-form-container"
ref="editFormRef"
:label-width="labelWidth"
:default-width="defaultWidth"
:is-block="isBlock"
:form-ref="editChildRef"
:form-obj="editData"
:form-data="editFormData"
:form-rules="formRules"
@handleAddSelectTypeConfirm="handleAddSelectTypeConfirm"
@handleEditSelectTypeConfirm="handleEditSelectTypeConfirm"
>
<template v-for="name in slotArr" #[name]>
<slot :name="name"></slot>
</template>
</glsx-combi-form>
</d2-dialog>
</div>
<div class="glsk-form-dialog">
<d2-dialog :append-to-body="appendToBody"
:btn-ok-label="dialogConfig.okText"
:is-visible="selectVisible"
:title="dialogConfig.title"
:width="dialogWidth"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<glsx-combi-form ref="editFormRef"
class="edit-form-container"
:default-width="defaultWidth"
:form-data="editFormData"
:form-obj="editData"
:form-ref="editChildRef"
:form-rules="formRules"
:is-block="isBlock"
:label-width="labelWidth"
@handleAddSelectTypeConfirm="handleAddSelectTypeConfirm"
@handleEditSelectTypeConfirm="handleEditSelectTypeConfirm">
<template v-for="name in slotArr" #[name]>
<slot :name="name"></slot>
</template>
</glsx-combi-form>
</d2-dialog>
</div>
</template>
<script>
import { deepClone } from "@/common/util"
import { deepClone } from "@/common/util";
export default {
name: "GlskFormDialog",
data() {
return {
isBlock: true,
editChildRef: "editChildRef"
}
},
name: "GlskFormDialog",
props: {
slotArr: {
type: Array,
default: () => ["resumeUrlHtml"]
},
dialogWidth: {
type: String,
default: "700px"
},
labelWidth: {
type: String,
default: "100px"
},
defaultWidth: {
type: String,
default: "314px"
},
dialogConfig: {
type: Object,
default: () => {
return {
title: "提示",
okText: "确定"
}
}
},
selectVisible: {
type: Boolean,
default: false
},
formRules: {
type: Object,
default: () => ({})
},
editData: {
type: Object,
default: () => ({})
},
editFormData: {
type: Array,
default: () => []
},
baseData: {
type: Object,
default: () => ({})
},
appendToBody: {
type: Boolean,
default: false
}
},
props: {
slotArr: {
type: Array,
default: () => ["resumeUrlHtml"],
},
dialogWidth: {
type: String,
default: "700px",
},
labelWidth: {
type: String,
default: "100px",
},
defaultWidth: {
type: String,
default: "314px",
},
dialogConfig: {
type: Object,
default: () => {
return {
title: "提示",
okText: "确定",
};
},
},
selectVisible: {
type: Boolean,
default: false,
},
formRules: {
type: Object,
default: () => ({}),
},
editData: {
type: Object,
default: () => ({}),
},
editFormData: {
type: Array,
default: () => [],
},
baseData: {
type: Object,
default: () => ({}),
},
appendToBody: {
type: Boolean,
default: false,
},
},
data() {
return {
isBlock: true,
editChildRef: "editChildRef",
};
},
mounted() {
this.getOptionsList("editFormData", false)
},
mounted() {
this.getOptionsList("editFormData", false);
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find((k) => k.name == refreshSigle)
var index = this[formName].findIndex((k) => k.name == refreshSigle)
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (
["select", "radio"].includes(item.type) &&
this.baseData[item.optionsName].length
) {
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleConfirm() {
console.log(this.editFormData, this.editData)
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
this.$emit("handleConfirm", this.editData)
}
})
},
handleAddSelectTypeConfirm(data) {
this.$emit("handleAddSelectTypeConfirm", data)
},
handleEditSelectTypeConfirm(data) {
this.$emit("handleEditSelectTypeConfirm", data)
},
handleClose() {
this.$emit("handleClose")
}
}
}
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
let item = this[formName].find(k => k.name == refreshSigle);
let index = this[formName].findIndex(k => k.name == refreshSigle);
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName]),
);
if (
hasAll
&& this.baseData[item.optionsName].length
&& this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[this[formName][index].optionId] = "";
temp[this[formName][index].optionLabel] = "全部";
this[formName][index].optionList.unshift(temp);
}
} else {
this[formName].forEach((item, index) => {
if (
["select", "radio"].includes(item.type)
&& this.baseData[item.optionsName].length
) {
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName]),
);
if (
hasAll
&& this.baseData[item.optionsName].length
&& this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[this[formName][index].optionId] = "";
temp[this[formName][index].optionLabel] = "全部";
this[formName][index].optionList.unshift(temp);
}
}
});
}
},
handleConfirm() {
console.log(this.editFormData, this.editData);
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
this.$emit("handleConfirm", this.editData);
}
});
},
handleAddSelectTypeConfirm(data) {
this.$emit("handleAddSelectTypeConfirm", data);
},
handleEditSelectTypeConfirm(data) {
this.$emit("handleEditSelectTypeConfirm", data);
},
handleClose() {
this.$emit("handleClose");
},
},
};
</script>
<style lang="scss" scoped>
.glsk-form-dialog {
::v-deep {
.el-dialog__header {
border-bottom: 1px solid #e5e5e5 !important;
}
}
::v-deep {
.el-dialog__footer {
border-top: 1px solid #e5e5e5 !important;
.el-button {
width: 80px;
}
}
}
::v-deep {
.el-dialog__header {
border-bottom: 1px solid #e5e5e5 !important;
}
}
::v-deep {
.el-dialog__footer {
border-top: 1px solid #e5e5e5 !important;
.el-button {
width: 80px;
}
}
}
}
</style>
......@@ -6,156 +6,184 @@
* @FilePath: \dj-car-life-system\src\router\modules\907_home.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
const _import = require("@/libs/util.import." + process.env.NODE_ENV);
export const routerName = {
907: {
path: "/index",
name: "index",
meta: {
title: "总览",
authId: "907",
parentId: "1",
icon: "s-home",
cache: false,
sideHidden: false
},
auth: [
{
authId: "90701",
parentId: "907",
label: "报表模块"
},
{
authId: "90702",
parentId: "907",
category: "Button",
label: "查看企微推送对象",
addRoutePath: [
{
authId: "90703",
name: "企微推送配置",
parentId: "907"
}
]
},
// {
// authId: "90705",
// parentId: "907",
// category: "Button",
// label: "编辑单店信息"
// },
{
authId: "90706",
parentId: "907",
category: "Button",
type: "primary",
label: "导出日报",
handle: "exportDailyReport"
},
{
authId: "90707",
parentId: "907",
category: "Button",
label: "渗透率报表",
addRoutePath: [
{
authId: "90704",
name: "渗透率报表",
parentId: "907"
}
]
},
{
authId: "90708",
parentId: "907",
category: "Button",
handle: "handleOutputImport",
label: "导入"
}
],
component: _import("index")
},
90703: {
path: "/outputValue",
name: "outputValue",
meta: {
title: "企微推送对象",
authId: "90703",
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/index"
},
auth: [
{
authId: "9070301",
parentId: "90703",
label: "新增",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9070303",
parentId: "90703",
label: "导入",
category: "Button",
handle: "handleImport"
},
{
authId: "9070302",
parentId: "90703",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9070304",
parentId: "90703",
label: "删除",
handle: "handleDelete"
}
],
component: _import("index/outputValue")
},
90704: {
path: "/permeation",
name: "permeation",
meta: {
title: "渗透率报表",
authId: "90704",
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/index"
},
auth: [
{
authId: "9070401",
parentId: "90704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
// 新车交付率导出
{
authId: "9070402",
parentId: "90704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleDetailExport"
},
{
authId: "9070403",
parentId: "90704",
label: "日报导出",
category: "Button",
type: "primary",
handle: "handleDailyExport"
}
],
component: _import("index/permeation")
}
}
907: {
path: "/index",
name: "index",
meta: {
title: "总览",
authId: "907",
parentId: "1",
icon: "s-home",
cache: false,
sideHidden: false,
},
auth: [
{
authId: "90701",
parentId: "907",
label: "报表模块",
},
{
authId: "90702",
parentId: "907",
category: "Button",
label: "查看企微推送对象",
addRoutePath: [
{
authId: "90703",
name: "企微推送配置",
parentId: "907",
},
],
},
// {
// authId: "90705",
// parentId: "907",
// category: "Button",
// label: "编辑单店信息"
// },
{
authId: "90706",
parentId: "907",
category: "Button",
type: "primary",
label: "导出日报",
handle: "exportDailyReport",
},
{
authId: "90707",
parentId: "907",
category: "Button",
label: "渗透率报表",
addRoutePath: [
{
authId: "90704",
name: "渗透率报表",
parentId: "907",
},
{
authId: "90709",
name: "店端实际交车数",
parentId: "907",
},
],
},
{
authId: "90708",
parentId: "907",
category: "Button",
handle: "handleOutputImport",
label: "导入",
},
],
component: _import("index"),
},
90703: {
path: "/outputValue",
name: "outputValue",
meta: {
title: "企微推送对象",
authId: "90703",
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/index",
},
auth: [
{
authId: "9070301",
parentId: "90703",
label: "新增",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd",
},
{
authId: "9070303",
parentId: "90703",
label: "导入",
category: "Button",
handle: "handleImport",
},
{
authId: "9070302",
parentId: "90703",
label: "编辑",
handle: "handleEdit",
},
{
authId: "9070304",
parentId: "90703",
label: "删除",
handle: "handleDelete",
},
],
component: _import("index/outputValue"),
},
90704: {
path: "/permeation",
name: "permeation",
meta: {
title: "渗透率报表",
authId: "90704",
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/index",
},
auth: [
{
authId: "9070401",
parentId: "90704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport",
},
// 新车交付率导出
{
authId: "9070402",
parentId: "90704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleDetailExport",
},
{
authId: "9070403",
parentId: "90704",
label: "日报导出",
category: "Button",
type: "primary",
handle: "handleDailyExport",
},
],
component: _import("index/permeation"),
},
90709: {
path: "/deliveryCount",
name: "deliveryCount",
meta: {
title: "店端实际交车数",
authId: "90709",
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/index",
},
auth: [
{
authId: "9070901",
parentId: "90709",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport",
},
],
component: _import("index/deliveryCount"),
},
};
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
const _import = require("@/libs/util.import." + process.env.NODE_ENV);
export const routerName = {
914: {
path: "/pointManagement",
name: "pointManagement",
meta: {
title: "积分管理",
authId: "914",
parentId: "1",
cache: false
}
},
91401: {
path: "/pointExamine",
name: "pointExamine",
meta: {
title: "积分审批",
authId: "91401",
parentId: "914",
cache: false
},
auth: [
{
authId: "9140101",
parentId: "91401",
label: "审核",
handle: "handleCheck"
},
{
authId: "9140104",
parentId: "91401",
label: "标记退款",
handle: "openRefundDetail"
},
{
authId: "9140102",
parentId: "91401",
label: "查看",
handle: "handleDetail"
},
{
authId: "9140103",
parentId: "91401",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9140105",
parentId: "91401",
label: "刷新",
category: "Button",
type: "primary",
handle: "handleRefresh"
}
],
component: _import("pointManagement/pointExamine")
},
91402: {
path: "/pointParticulars",
name: "pointParticulars",
meta: {
title: "积分明细",
authId: "91402",
parentId: "914",
cache: false
},
auth: [
{
authId: "9140201",
parentId: "91402",
label: "明细",
handle: "handleDetail",
addRoutePath: [
{
authId: "91403",
name: "详情",
parentId: "91402"
}
]
},
914: {
path: "/pointManagement",
name: "pointManagement",
meta: {
title: "积分管理",
authId: "914",
parentId: "1",
cache: false,
},
},
91401: {
path: "/pointExamine",
name: "pointExamine",
meta: {
title: "积分审批",
authId: "91401",
parentId: "914",
cache: false,
},
auth: [
{
authId: "9140101",
parentId: "91401",
label: "审核",
handle: "handleCheck",
},
{
authId: "9140104",
parentId: "91401",
label: "标记退款",
handle: "openRefundDetail",
},
{
authId: "9140102",
parentId: "91401",
label: "查看",
handle: "handleDetail",
},
{
authId: "9140103",
parentId: "91401",
label: "导出",
category: "Button",
handle: "handleExport",
},
{
authId: "9140105",
parentId: "91401",
label: "刷新",
category: "Button",
handle: "handleRefresh",
},
{
authId: "9140106",
parentId: "91401",
label: "一键审批",
category: "Button",
type: "primary",
handle: "handleApproveAll",
},
{
authId: "9140107",
parentId: "91401",
label: "审批",
handle: "handleApproveAll",
},
],
component: _import("pointManagement/pointExamine"),
},
91402: {
path: "/pointParticulars",
name: "pointParticulars",
meta: {
title: "积分明细",
authId: "91402",
parentId: "914",
cache: false,
},
auth: [
{
authId: "9140201",
parentId: "91402",
label: "明细",
handle: "handleDetail",
addRoutePath: [
{
authId: "91403",
name: "详情",
parentId: "91402",
},
],
},
{
authId: "9140205",
parentId: "91402",
label: "更换手机号",
handle: "handleChangePhone",
},
{
authId: "9140202",
parentId: "91402",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9140203",
parentId: "91402",
label: "新增",
handle: "handleDetail",
addRoutePath: [
{
authId: "91404",
name: "新增手动抵扣",
parentId: "91402"
}
]
}
],
component: _import("pointManagement/pointParticulars")
},
91403: {
path: "/pointDetail",
name: "pointDetail",
meta: {
title: "详情",
authId: "91403",
parentId: "91402",
cache: false,
activePath: "/pointParticulars"
},
component: _import("pointManagement/pointDetail")
},
//新增抵扣
91404: {
path: "/deduction",
name: "deduction",
meta: {
title: "新增抵扣",
authId: "91403",
parentId: "91402",
cache: false,
activePath: "/pointParticulars"
},
component: _import("pointManagement/addDeduction")
}
}
{
authId: "9140202",
parentId: "91402",
label: "导出",
category: "Button",
handle: "handleExport",
},
{
authId: "9140204",
parentId: "91402",
label: "批量积分调整",
category: "Button",
type: "primary",
handle: "handleGoverning",
},
{
authId: "9140203",
parentId: "91402",
label: "新增",
handle: "handleDetail",
addRoutePath: [
{
authId: "91404",
name: "新增手动抵扣",
parentId: "91402",
},
],
},
],
component: _import("pointManagement/pointParticulars"),
},
91403: {
path: "/pointDetail",
name: "pointDetail",
meta: {
title: "详情",
authId: "91403",
parentId: "91402",
cache: false,
activePath: "/pointParticulars",
},
component: _import("pointManagement/pointDetail"),
},
// 新增抵扣
91404: {
path: "/deduction",
name: "deduction",
meta: {
title: "新增抵扣",
authId: "91403",
parentId: "91402",
cache: false,
activePath: "/pointParticulars",
},
component: _import("pointManagement/addDeduction"),
},
};
<template>
<div class="dashboard-card rank-card">
<div class="card-header">
<span class="card-title">线上运营分布</span>
</div>
<div class="rank-list">
<!-- 表头 -->
<div class="rank-header">
<span class="rank-header-col" style="flex: 1;">排名</span>
<span class="rank-header-col" style="flex: 1;">姓名</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">策略总数</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">占比</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">门店总数</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">占比</span>
</div>
<!-- 列表内容 -->
<block v-if="rankData.length > 0">
<div
class="rank-item"
v-for="(item, index) in rankData"
:key="index"
>
<!-- 排名 Icon 处理 -->
<div
class="rank-index"
:class="'rank-' + (index + 1)"
>
<img
v-if="index < 3"
:src="require(`@/assets/strategy/icon-strategy-rank0${index + 1}.png`)"
style="width: 24px; height: 24px;"
/>
<span
v-else
style="width: 20px; height: 20px; border-radius: 50%; opacity: 1; background: #2a58ad1a; display: inline-block; text-align: center; line-height: 20px;"
>{{ index + 1 }}</span>
<div class="dashboard-card rank-card">
<div class="card-header">
<span class="card-title">线上运营分布</span>
</div>
<div class="rank-name" :title="item.staffName">{{ item.staffName }}</div>
<div class="rank-col">{{ item.strategyCount }}</div>
<div class="rank-col">{{ item.strategyCountPercent }}%</div>
<div class="rank-col">{{ item.storeCount }}</div>
<div class="rank-col">{{ item.storeCountPercent }}%</div>
</div>
</block>
<block v-else>
<!-- 空数据占位,实际显示在 .dashboard-card 层级 -->
</block>
</div>
<div v-if="rankData.length === 0" class="empty-box">
<img :src="noDataImg" alt="暂无数据">
<div class="empty-text">暂无数据</div>
<div class="rank-list">
<!-- 表头 -->
<div class="rank-header">
<span class="rank-header-col" style="flex: 1;">排名</span>
<span class="rank-header-col" style="flex: 1;">姓名</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">策略总数</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">占比</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">门店总数</span>
<span class="rank-header-col" style="flex: 1; text-align: center;">占比</span>
</div>
<!-- 列表内容 -->
<block v-if="rankData.length > 0">
<div v-for="(item, index) in rankData"
:key="index"
class="rank-item">
<!-- 排名 Icon 处理 -->
<div class="rank-index"
:class="`rank-${index + 1}`">
<img v-if="index < 3"
:src="require(`@/assets/strategy/icon-strategy-rank0${index + 1}.png`)"
style="width: 24px; height: 24px;" />
<span v-else
style="width: 20px; height: 20px; border-radius: 50%; opacity: 1; background: #2a58ad1a; display: inline-block; text-align: center; line-height: 20px;">
{{ index + 1 }}
</span>
</div>
<div class="rank-name" :title="item.staffName">
{{ item.staffName }}
</div>
<div class="rank-col">
{{ item.strategyCount }}
</div>
<div class="rank-col">
{{ item.strategyCountPercent }}%
</div>
<div class="rank-col">
{{ item.storeCount }}
</div>
<div class="rank-col">
{{ item.storeCountPercent }}%
</div>
</div>
</block>
<block v-else>
<!-- 空数据占位,实际显示在 .dashboard-card 层级 -->
</block>
</div>
<div v-if="rankData.length === 0" class="empty-box">
<img alt="暂无数据" :src="noDataImg">
<div class="empty-text">
暂无数据
</div>
</div>
<div class="bottom-cover"></div>
</div>
<div class="bottom-cover"></div>
</div>
</template>
<script>
import noDataImg from "@/assets/strategy/emepty-strategy.png"
import noDataImg from "@/assets/strategy/emepty-strategy.png";
export default {
name: 'OnlineOperatorRanking',
props: {
// 排行榜数据(由父组件传递)
rankData: {
type: Array,
default: () => []
}
},
data() {
return {
noDataImg
};
}
name: "OnlineOperatorRanking",
props: {
// 排行榜数据(由父组件传递)
rankData: {
type: Array,
default: () => [],
},
},
data() {
return {
noDataImg,
};
},
};
</script>
......@@ -77,105 +84,105 @@ export default {
$bg-white: #fff;
.dashboard-card {
background: $bg-white;
border-radius: 4px;
padding: 20px;
padding-right: 28px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
position: relative;
&.rank-card {
height: 332px;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
.card-title {
font-size: 16px;
font-weight: 500;
color: #303133;
}
}
.bottom-cover {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 72px;
border-radius: 10px;
background: linear-gradient(0deg, #ffffff 0%, #ffffff00 100%);
}
background: $bg-white;
border-radius: 4px;
padding: 20px;
padding-right: 28px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
position: relative;
&.rank-card {
height: 332px;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
.card-title {
font-size: 16px;
font-weight: 500;
color: #303133;
}
}
.bottom-cover {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 72px;
border-radius: 10px;
background: linear-gradient(0deg, #ffffff 0%, #ffffff00 100%);
}
}
/* 排行榜样式 */
.rank-list {
font-size: 13px;
.rank-header {
display: flex;
color: #909399;
.rank-header-col {
display: inline-block;
}
}
.rank-item {
display: flex;
align-items: center;
box-sizing: border-box;
margin-top: 16px;
&:last-child {
border-bottom: none;
}
.rank-index {
flex: 1;
}
.rank-name {
flex: 1;
color: #303133;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.rank-col {
flex: 1;
text-align: center;
color: #606266;
}
}
font-size: 13px;
overflow: scroll;
max-height: 260px;
.rank-header {
display: flex;
color: #909399;
.rank-header-col {
display: inline-block;
}
}
.rank-item {
display: flex;
align-items: center;
box-sizing: border-box;
margin-top: 16px;
&:last-child {
border-bottom: none;
}
.rank-index {
flex: 1;
}
.rank-name {
flex: 1;
color: #303133;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.rank-col {
flex: 1;
text-align: center;
color: #606266;
}
}
}
.empty-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 12px;
color: #909399;
text-align: center;
width: calc(100% - 48px); // 减去左右 padding (20px + 28px)
box-sizing: border-box;
img {
width: 86px;
height: 86px;
}
.empty-text {
margin-top: 0;
}
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 12px;
color: #909399;
text-align: center;
width: calc(100% - 48px); // 减去左右 padding (20px + 28px)
box-sizing: border-box;
img {
width: 86px;
height: 86px;
}
.empty-text {
margin-top: 0;
}
}
</style>
......@@ -8,8 +8,10 @@
:clearable="true" :maxlength="50" @input="event => searchInput(event, 'commodityCode')" />
</template>
<template slot="type">
<el-input :style="{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" @input="event => searchInput(event, 'type')" />
<!-- <el-input :style="{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" @input="event => searchInput(event, 'type')" /> -->
<el-input :style="{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" />
</template>
<template slot="thirdPartyCode">
<el-input :style="{ width: '100%' }" placeholder="请输入第三方编码" v-model.trim="searchForm['thirdPartyCode']"
......
......@@ -269,7 +269,7 @@
>{{ subItem.label }}</el-radio
>
</el-radio-group>
<el-tooltip class="item" effect="dark" placement="top">
<el-tooltip v-if="item.name === 'financeCheckFlag'" class="item" effect="dark" placement="top">
<template slot="content">
<p style="width: 260px">
<i class="el-icon-info"></i
......@@ -280,6 +280,22 @@
</el-tooltip>
</el-form-item>
</div>
<div v-if="item.type === 'datePicker' && formData.sellPriceValidType == '2'">
<el-form-item
:prop="item.name"
:label="item.label ? item.label + ':' : ''"
:id="item.name"
:label-width="item.label ? '180px' : '0px'"
class="dis-in-block"
:style="{ 'margin-bottom': !item.type ? '0px' : '22px' }"
>
<template >
<el-date-picker v-model="formData[item.name]" type="daterange" :style="{ width: item.width || formItemWidth }" range-separator="至" format="yyyy-MM-dd" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" > </el-date-picker>
</template>
</el-form-item>
</div>
<!-- 按钮 -->
<div v-if="item.type === 'button'">
<el-form-item
......@@ -638,7 +654,13 @@ export default {
message: "请选择是否开启财务规则校验",
trigger: "change"
}
]
],
sellPriceValidType: [
{ required: true, message: "请选择售价有效期", trigger: "change" }
],
tempValidDate: [
{ required: true, message: "请选择有效期", trigger: "blur" }
],
},
storeSelected: [],
relateStoreVisible: false,
......@@ -655,6 +677,11 @@ export default {
imgViewerVisible: false,
initialIndex: 0,
selectGoodsVisible: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
filterSpecsStr
}
},
......@@ -1230,7 +1257,14 @@ export default {
handleUp(e) {
this.$refs[this.formRef + "d2FormRuleForm"].validate((valid, options) => {
if (valid) {
this.$emit("handleAddConfirm", { ...this.formData, num: e })
const { tempValidDate } = this.formData;
let tempValidStartDate = '';
let tempValidEndDate = '';
if(this.formData.sellPriceValidType == '2'){
tempValidStartDate = tempValidDate[0] || '';
tempValidEndDate = tempValidDate[1] || '';
}
this.$emit("handleAddConfirm", { ...this.formData, tempValidStartDate, tempValidEndDate, num: e })
} else {
var needRuleList = Object.keys(options)
this.jumpScroll(needRuleList[0])
......
......@@ -14,7 +14,7 @@ import { getMerchantGoodsInfo, addOrUpdateAPI, checkGroundingLog } from '@api/gr
import groundingForm from "./components/groundingForm.vue"
import { BaseData, sceneCodeList } from '@/common/constants.js'
import { mapActions } from 'vuex'
import { deepClone } from '@/common/util'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from '@/main'
import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default {
......@@ -177,6 +177,23 @@ export default {
width: '432px',
unit: true,
handleInput: true
},{
name: 'sellPriceValidType',
label: '售价有效期',
type: 'flagRadio',
radioGroupList: [{
label: '终生有效',
value: 1
}, {
label: '临时有效',
value: 2
}]
}, {
name: 'tempValidDate',
label: '有效期',
type: 'datePicker',
maxlength: 120,
width: '432px'
}, {
name: 'financeCheckFlag',
label: '财务规则校验',
......@@ -234,6 +251,8 @@ export default {
voucherList: [],
validMinSellPriceFlag: true,
validMinSellPrice: 'Y',
sellPriceValidType: 1,
tempValidDate: [],
financeCheckFlag: 'N'
},
secondGoodsList: [],
......@@ -303,6 +322,13 @@ export default {
})
res.merchantGoodsRefList = res.merchantGoodsRefList || [] // 上架门店
res.voucherList = res.voucherList || [] // 上架凭证
let tempValidDate = [];
if(res?.sellPriceValidType && res?.sellPriceValidType == 2 ){
if(res?.tempValidStartDate && res?.tempValidEndDate){
tempValidDate = [Util.dateFormate(res?.tempValidStartDate, 'YYYY-MM-DD'), Util.dateFormate(res?.tempValidEndDate, 'YYYY-MM-DD')]
}
}
res.tempValidDate = tempValidDate
res.upgradeGoods = {
...res?.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
......@@ -313,7 +339,9 @@ export default {
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(res?.upgradeGoods),
carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
upgradeCommodityCode: res?.upgradeGoods?.commodityCode
upgradeCommodityCode: res?.upgradeGoods?.commodityCode,
sellPriceValidType: res?.sellPriceValidType ? res?.sellPriceValidType + '' : '1',
tempValidDate: tempValidDate,
}
this.editData = res || {}
this.$nextTick(() => {
......@@ -364,14 +392,19 @@ export default {
})
// 整理上传凭证数据
delete formObj?.productType
const params = {
let params = {
saveDraft: num === 2, // 是否存草稿
id: data.id,
...formObj,
merchantGoodsRefList: arr,
voucherList: fileArr,
existCheck,
validMinSellPrice: data?.validMinSellPrice
validMinSellPrice: data?.validMinSellPrice,
tempValidStartDate: data?.tempValidStartDate || '',
tempValidEndDate: data?.tempValidEndDate || '',
}
if(params.tempValidDate){
delete params.tempValidDate
}
if (data?.goodsType == 1 && data?.sceneType != 1) return this.$message.warning('太阳膜类商品仅支持上架至精品升级场景')
if (this.extendedPosiType.includes(data.goodsType) && data?.sceneType != 0) return this.$message.warning('延保类商品仅支持上架至会员/权益升级场景')
......@@ -381,7 +414,12 @@ export default {
upgradeGoodsId: formObj.upgradeGoodsId,
position: formObj.position || '',
sceneType: formObj.sceneType,
merchantIdList: arr?.map(val => { return val.merchantId })
merchantIdList: arr?.map(val => { return val.merchantId }),
tempValidStartDate: data?.tempValidStartDate || '',
tempValidEndDate: data?.tempValidEndDate || '',
}
if(params.tempValidDate){
delete params.tempValidDate
}
if ((num == 1 || num == 3) && !baseConfig.supplierCode.includes(data.supplierCode)) { // 第三方商品无需走审核流程不用提示
this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', {
......
......@@ -3,8 +3,8 @@
<d2-container class="edit-commodity">
<div class="" v-if="show">
<detail ref="d2GroundingDetail" :rules="rules" form-name="grounding" :origin-data="editData" :form-list="editForm"
:product-service-item-list="productServiceItemList" @handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"></detail>
:product-service-item-list="productServiceItemList" @handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"></detail>
</div>
</d2-container>
</template>
......@@ -41,6 +41,7 @@ export default {
warrantyTypeStr: [{ required: true }],
djCost: [{ required: true }],
thirdPartyCost: [{ required: true }],
sellPriceValidType: [{ required: true }],
financeCheckFlagStr: [{ required: true }]
},
editForm: [{
......@@ -134,6 +135,9 @@ export default {
label: '第三方成本',
unit: true
}, {
name: 'sellPriceValidType',
label: '售价有效期',
}, {
name: 'financeCheckFlagStr',
label: '财务规则校验'
}]
......@@ -221,6 +225,13 @@ export default {
res.positionStr = deepClone(this.positionTypeList)?.filter(val => res?.position == val.position)[0]?.confName || ''
res.supplierCode = res?.goodsInfo?.supplierCode
res.financeCheckFlagStr = res?.financeCheckFlag == 'Y' ? '开启' : res?.financeCheckFlag == 'N' ? '关闭' : '-'
let sellPriceValidTxt = ''
if (res?.sellPriceValidType == 2 && res?.tempValidStartDate && res?.tempValidEndDate) {
sellPriceValidTxt = `${Util.dateFormate(res?.tempValidStartDate, 'YYYY-MM-DD')} 至 ${Util.dateFormate(res?.tempValidEndDate, 'YYYY-MM-DD')}`
}
res.sellPriceValidType = res?.sellPriceValidType == 1 ? '终生有效' : res?.sellPriceValidType == 2 ? sellPriceValidTxt : '-'
res.upgradeGoods = {
...res.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
......
<!-- 店端实际交车数 -->
<template>
<d2-container class="delivery-count">
<template #header>
<div class="header">
<d2-search class="show-search"
:form-data="showFormData"
label-width="140px"
:search-form="searchForm"
:search-select-obj="searchSelectObj">
<template #reportDate>
<el-date-picker v-model="searchForm.reportDate"
end-placeholder="结束日期"
:picker-options="pickerOptions"
range-separator="至"
size="mini"
start-placeholder="开始日期"
type="daterange"
value-format="yyyy-MM-dd" />
</template>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</d2-search>
</div>
</template>
<div class="d2-container-content">
<div class="table-header">
<div class="table-title">
{{ merchantName || '店端实际交车数' }}
</div>
<!-- <auth-button category="Button" :show-btn-ids="['9070901']" /> -->
<el-button size="small"
type="primary"
@click="handleExport">
导出
</el-button>
</div>
<d2-table ref="recordTable"
:before-search-fn="beforeSearchFn"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-data="tableData"
:table-params="tableParams" />
</div>
<div class="table-footer">
<el-button size="small"
type="primary"
@click="handleBack">
返回
</el-button>
</div>
</d2-container>
</template>
<script>
import dayjs from "dayjs";
import { mapActions, mapState } from "vuex";
import { permeabilityDetail } from "@/api/permeation.js";
import { rangePickerOptions_oneYearNoFuture } from "@/common/format";
import { deepClone } from "@/common/util";
export default {
name: "DeliveryCount",
data() {
return {
getListApi: permeabilityDetail,
searchForm: {
merchantId: "",
staffName: "",
createdDate: "",
reportDate: "",
},
searchFormSearch: {},
searchSelectObj: {},
showFormData: [
{
label: "员工名称",
name: "staffName",
type: "input",
isClear: true,
},
{
label: "填报日期",
name: "createdDate",
type: "datePicker",
isClear: true,
valueFormat: "yyyy-MM-dd",
pickerOptions: "rangePickerOptions_oneYearNoFuture",
},
{
label: "日报时间",
name: "reportDate",
addHtml: "reportDate",
},
],
tableData: [],
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000, 10),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "员工名称",
prop: "staffName",
},
{
label: "店端实际交车数",
prop: "deliveryCount",
formatter: (cellValue) => {
return (cellValue.deliveryCount ?? "") === ""
? "-"
: cellValue.deliveryCount;
},
},
{
label: "填报时间",
prop: "createdDate",
},
{
label: "日报时间",
prop: "reportDate",
},
],
},
sceneType: "0",
pickerOptions: rangePickerOptions_oneYearNoFuture,
};
},
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
merchantName() {
return this.$route.query.merchantName || "";
},
},
created() {
const { merchantId, startDate, endDate } = this.$route.query;
if (merchantId) {
this.searchForm.merchantId = merchantId;
}
if (startDate && endDate) {
this.searchForm.reportDate = [startDate, endDate];
}
},
methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]),
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams();
resolve();
});
},
getParams() {
this.searchFormSearch = deepClone(this.searchForm);
if (this.searchFormSearch.createdDate) {
this.searchFormSearch.createdStartDate
= dayjs(this.searchFormSearch.createdDate[0]).format("YYYY-MM-DD")
+ " 00:00:00";
this.searchFormSearch.createdEndDate
= dayjs(this.searchFormSearch.createdDate[1]).format("YYYY-MM-DD")
+ " 23:59:59";
}
if (this.searchFormSearch.reportDate) {
this.searchFormSearch.reportStartDate = dayjs(
this.searchFormSearch.reportDate[0],
).format("YYYY-MM-DD");
this.searchFormSearch.reportEndDate = dayjs(
this.searchFormSearch.reportDate[1],
).format("YYYY-MM-DD");
}
this.searchFormSearch.sceneType = this.sceneType;
return this.searchFormSearch;
},
handleExport() {
const params = this.getParams();
params.method
= "dj.api.smartcarlife.permeability.report.detail.exportAsync";
const list = [
...this.dowloadList,
{
name: `填报明细 ${dayjs().format("YYYY-MM-DD")}`,
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
},
];
this.actionSetDownloadList({ list, type: "dowloadList" });
},
handleReset() {
const { merchantId, startDate, endDate } = this.$route.query;
this.searchForm = {
merchantId: merchantId || "",
staffName: "",
createdDate: "",
reportDate: startDate && endDate ? [startDate, endDate] : "",
};
this.$refs.recordTable.refreshTable();
},
handleBack() {
this.$router.go(-1);
},
},
};
</script>
<style lang="scss" scoped>
.delivery-count {
// .header {
// display: flex;
// align-items: center;
// ::v-deep {
// .el-date-editor {
// width: 220px;
// }
// }
// }
.table-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.table-title {
font-size: 16px;
color: #333333;
font-weight: 600;
}
}
.table-footer {
margin-top: 16px;
text-align: center;
}
}
</style>
......@@ -39,6 +39,14 @@
:value="subItem.staffName" />
</el-select>
</template>
<template #myPendingReview>
<el-switch
active-value="1"
inactive-value="0"
v-model="searchForm.myWaitApplySwitch"
active-color="#2A58AD">
</el-switch>
</template>
</d2-search>
<div class="up-btns">
<el-button size="small"
......@@ -90,10 +98,10 @@
</el-table-column>
<el-table-column align="center"
label="原错误订单编号"
prop="associatedOrderCode"
prop="incorrectOrderCode"
width="160">
<template #default="scope">
<span>{{ scope.row.associatedOrderCode || '-' }}</span>
<span>{{ scope.row.incorrectOrderCode || '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center"
......@@ -316,23 +324,43 @@
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.totalPrice }}</p>
<p v-if="item.upgradeGoodsId">¥ {{ item.upgradePrice }}</p>
<p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="折扣后金额"
prop="subOrderList"
width="120px">
label="商品销售单价"
width="130"
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p>
<p v-if="item.upgradeGoodsId">¥ {{ item.singleProductSalesPrice }}</p>
<p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="商品实付单价"
width="130"
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.singleProductFinalPrice }}</p>
<p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="数量"
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">{{ item.number }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="优惠券 id"
prop="coupon.customerCouponCode">
<template #default="scope">
......@@ -555,13 +583,13 @@
:show-btn-ids="['9040135']" />
<div>
<!-- 通过 -->
<auth-button v-if="scope.row.goodsOrderApplyStatus == 2"
<auth-button v-if="scope.row.canApplyFlag == 1"
:data="scope.row"
:show-btn-ids="['9040147']" />
</div>
<div>
<!-- 驳回 -->
<auth-button v-if="scope.row.goodsOrderApplyStatus == 2"
<auth-button v-if="scope.row.canApplyFlag == 1"
:data="scope.row"
:show-btn-ids="['9040148']" />
</div>
......@@ -993,6 +1021,10 @@ export default {
optionLabel: "confLabel",
optionsName: "auditStatusList",
},
{
label: '我的待审',
addHtml: 'myPendingReview'
}
],
searchForm: {
sceneType: 0,
......@@ -1023,6 +1055,7 @@ export default {
sellerNameVague: "",
djOrderType: "",
goodsOrderApplyStatus: "",
myWaitApplySwitch: 0
},
baseData: {
orderStatusList: [
......@@ -1236,6 +1269,18 @@ export default {
},
immediate: true,
},
"searchForm.myWaitApplySwitch": {
handler(val) {
let index = this.showFormData.findIndex(val => val.name == 'goodsOrderApplyStatus')
if (val == 1) { // 开启我的待审 将审批状态置灰不可操作,选项置为线上运营待审核
this.searchForm.goodsOrderApplyStatus = '2'
this.$set(this.showFormData[index], 'isDisabled', true)
} else {
this.searchForm.goodsOrderApplyStatus = ''
this.$set(this.showFormData[index], 'isDisabled', false)
}
}
}
},
mounted() {
// 审计用账号特殊处理
......@@ -1443,6 +1488,7 @@ export default {
sellerNameVague: "",
djOrderType: "",
goodsOrderApplyStatus: "",
myWaitApplySwitch: 0
};
this.tempGoodsType = [];
// this.baseData.storeIdList = []
......
......@@ -63,20 +63,26 @@
{{ scope.row.upgradeGoodsName || '-' }}
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="原价">
<el-table-column prop="upgradePrice" align="center" label="商品单价">
<template #default="scope">
<span v-if="scope.row.totalPrice != null">¥{{ scope.row.totalPrice }}</span>
<span v-if="scope.row.upgradePrice != null">¥{{ scope.row.upgradePrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="singleProductSalesPrice" align="center" label="商品销售单价">
<template #default="scope">
<span v-if="scope.row.singleProductSalesPrice != null">¥{{ scope.row.singleProductSalesPrice || '-' }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="discountType" align="center" label="折扣方式">
<template #default="scope">
{{ discountTypeMap[scope.row.discountType] || '-' }}
<span v-if="scope.row.discountType">{{ `${discountTypeMap[scope.row.discountType]} ${scope.row.discountType == 2 ? '¥' + scope.row.discountValue : scope.row.discountType == 1 ? scope.row.discountValue + '折' : ''}` || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="finalPrice" align="center" label="折扣后价格">
<el-table-column prop="singleProductFinalPrice" align="center" label="商品实付单价">
<template #default="scope">
<span v-if="scope.row.finalPrice != null">¥{{ scope.row.finalPrice }}</span>
<span v-if="scope.row.singleProductFinalPrice != null">¥{{ scope.row.singleProductFinalPrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -109,20 +115,26 @@
{{ scope.row.upgradeGoodsName || '-' }}
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="原价">
<el-table-column prop="upgradePrice" align="center" label="商品单价">
<template #default="scope">
<span v-if="scope.row.upgradePrice != null">¥{{ scope.row.upgradePrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="singleProductSalesPrice" align="center" label="商品销售单价">
<template #default="scope">
<span v-if="scope.row.totalPrice != null">¥{{ scope.row.totalPrice }}</span>
<span v-if="scope.row.singleProductSalesPrice != null">¥{{ scope.row.singleProductSalesPrice || '-' }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="discountType" align="center" label="折扣方式">
<template #default="scope">
{{ discountTypeMap[scope.row.discountType] || '-' }}
<span v-if="scope.row.discountType">{{ `${discountTypeMap[scope.row.discountType]} ${scope.row.discountType == 2 ? '¥' + scope.row.discountValue : scope.row.discountType == 1 ? scope.row.discountValue + '折' : ''}` || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="finalPrice" align="center" label="折扣后价格">
<el-table-column prop="singleProductFinalPrice" align="center" label="商品实付单价">
<template #default="scope">
<span v-if="scope.row.finalPrice != null">¥{{ scope.row.finalPrice }}</span>
<span v-if="scope.row.singleProductFinalPrice != null">¥{{ scope.row.singleProductFinalPrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -150,6 +162,38 @@
</el-form-item>
</el-form>
</div>
<div class="sub-title">操作日志</div>
<div class="log-box">
<div class="record-div" v-if="detailInfo.applyLogList && detailInfo.applyLogList.length">
<div class="record-div-d" v-for="(item, index) in detailInfo.applyLogList" :key="index">
<!-- <span class="dot"></span> -->
<div class="span-txt-one">{{ item.beforeStatus ? $$(statusForShow, [item.beforeStatus], 'text') : '' }}</div>
<div class="span-txt-two" style="font-weight: 500;">
<span :class="item.afterStatus ? examineStatusClass[item.afterStatus] : ''">
{{ item.afterStatus ? $$(statusForShow, [item.afterStatus], 'status') : '' }}</span>
<span v-if="item.afterStatus == 4">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>驻店销售</span>
</span>
</div>
<div class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.operatorName" placement="bottom">
<span>{{ item.operatorName }}</span>
</el-tooltip>
</div>
<div class="span-txt-two">审核时间:{{ item.createdDateStr }}</div>
<div v-if="item.remark" class="span-txt-two">{{[4].includes(item.afterStatus) ? '驳回原因:' : '备注:'}}
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<span>{{ item.remark ? (item.remark.length > 15 ? (item.remark.slice(0, 15) + '...') : item.remark) : '' }}</span>
</el-tooltip>
</div>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="">
<span class="tips">暂无数据</span>
</div>
</div>
</div>
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</baseDialog>
......@@ -158,6 +202,7 @@
import { djOrderTypeMap, discountTypeMap } from "@/common/constants"
import { getAuditOrderDetail, auditGoodsOrderApplyRecord } from "@api/order"
import ellipsisText from './ellipsisText'
import { Util } from '@/common/util'
export default {
name: "ApprovalDialog",
components: {
......@@ -206,7 +251,19 @@ export default {
formObj: {
remark: ''
},
imgVisible: false
imgVisible: false,
statusForShow: {
1: { text: '区域运营审核' },
2: { text: '线上运营审核', status: '通过' },
3: { status: '通过' },
4: { status: '驳回' }
},
examineStatusClass: {
2: 'greendot',
3: 'greendot',
4: 'reddot'
},
emptyImgUrl: require("@/assets/empty-5.png")
}
},
created() {
......@@ -227,6 +284,9 @@ export default {
}
res.oldSubOrderList = this.flattenGoodsOrder(res.oldGoodsOrderDTO)
res.subOrderList = this.flattenGoodsOrder(res.goodsOrderDTO)
res?.applyLogList?.forEach(val => {
val.createdDateStr = Util.dateFormate(val.createdDate, 'YYYY-MM-DD HH:mm:ss')
})
this.detailInfo = res
})
},
......@@ -326,4 +386,68 @@ export default {
overflow: hidden;
}
}
.log-box {
margin-top: 20px;
border-radius: 4px;
background: #FAFAFA;
padding: 16px;
.record-div {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child{
margin-bottom: 0;
}
}
.span-txt-one {
height: 21px;
font-weight: 500;
color: #333333;
}
.reviewer {
width: 180px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.span-txt-two {
margin-left: 40px;
}
.greendot {
color: #4aca74;
}
.reddot {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
\ No newline at end of file
......@@ -111,7 +111,7 @@ export default {
name: 'orderCode'
}, {
label: '金额',
name: 'totalPrice'
name: 'finalPrice'
}],
handleSelectChange: (value) => {
this.searchSelectObj.order.value = ''
......@@ -149,7 +149,7 @@ export default {
prop: 'orderTimeTxt'
}, {
label: '交易金额',
prop: 'totalPrice',
prop: 'finalPrice',
prefix: '¥'
}]
}
......@@ -213,7 +213,7 @@ export default {
addPrice(type) {
const addValNameObj = {
trade: 'totalFee',
order: 'totalPrice',
order: 'finalPrice',
}
this.price[type] = this.checkedList[type].length ? this.checkedList[type].map(item => item[addValNameObj[type]]).reduce((prev, cur) => {
return prev + cur
......
......@@ -39,6 +39,14 @@
:value="subItem.staffName" />
</el-select>
</template>
<template #myPendingReview>
<el-switch
active-value="1"
inactive-value="0"
v-model="searchForm.myWaitApplySwitch"
active-color="#2A58AD">
</el-switch>
</template>
</d2-search>
<div class="up-btns">
<el-button size="small"
......@@ -115,10 +123,10 @@
</el-table-column>
<el-table-column align="center"
label="原错误订单编号"
prop="associatedOrderCode"
prop="incorrectOrderCode"
width="160">
<template #default="scope">
<span>{{ scope.row.associatedOrderCode || '-' }}</span>
<span>{{ scope.row.incorrectOrderCode || '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center"
......@@ -298,24 +306,44 @@
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.totalPrice }}</p>
<p v-if="item.upgradeGoodsId">¥ {{ item.upgradePrice }}</p>
<!-- <p v-if="item.upgradeGoodsId">¥ {{item.upgradePrice}}</p> -->
<p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="折扣后金额"
prop="subOrderList"
width="120px">
label="商品销售单价"
width="130"
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.singleProductSalesPrice }}</p>
<p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="商品实付单价"
width="130"
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p>
<p v-if="item.upgradeGoodsId">¥ {{ item.singleProductFinalPrice }}</p>
<p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="数量"
prop="subOrderList">
<template #default="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">{{ item.number }}</p>
</span>
</template>
</el-table-column>
<el-table-column align="center"
label="施工单状态"
prop="subOrderList"
width="100">
......@@ -558,13 +586,13 @@
:show-btn-ids="['9040107']" />
<div>
<!-- 通过 -->
<auth-button v-if="scope.row.goodsOrderApplyStatus == 2"
<auth-button v-if="scope.row.canApplyFlag == 1"
:data="scope.row"
:show-btn-ids="['9040147']" />
</div>
<div>
<!-- 驳回 -->
<auth-button v-if="scope.row.goodsOrderApplyStatus == 2"
<auth-button v-if="scope.row.canApplyFlag == 1"
:data="scope.row"
:show-btn-ids="['9040148']" />
</div>
......@@ -1029,7 +1057,11 @@ export default {
optionId: "confId",
optionLabel: "confLabel",
optionsName: "auditStatusList",
},
},
{
label: '我的待审',
addHtml: 'myPendingReview'
}
],
searchForm: {
sceneType: 1,
......@@ -1056,7 +1088,8 @@ export default {
brandIdList: [],
directSalesFlag: "",
djOrderType: "",
goodsOrderApplyStatus: "",
goodsOrderApplyStatus: "",
myWaitApplySwitch: 0
},
baseData: {
orderStatusList: [
......@@ -1281,7 +1314,19 @@ export default {
}
},
immediate: true,
},
},
"searchForm.myWaitApplySwitch": {
handler(val) {
let index = this.showFormData.findIndex(val => val.name == 'goodsOrderApplyStatus')
if (val == 1) { // 开启我的待审 将审批状态置灰不可操作,选项置为线上运营待审核
this.searchForm.goodsOrderApplyStatus = '2'
this.$set(this.showFormData[index], 'isDisabled', true)
} else {
this.searchForm.goodsOrderApplyStatus = ''
this.$set(this.showFormData[index], 'isDisabled', false)
}
}
}
},
mounted() {
// 审计用账号特殊处理
......@@ -1463,7 +1508,8 @@ export default {
brandIdList: [],
directSalesFlag: "",
djOrderType: "",
goodsOrderApplyStatus: "",
goodsOrderApplyStatus: "",
myWaitApplySwitch: 0
};
this.tempGoodsType = [];
// this.baseData.storeIdList = []
......
......@@ -256,9 +256,14 @@
<span>¥{{ scope.row.upgradePrice || 0 }}</span>
</template>
</el-table-column>
<el-table-column :prop="'finalPrice'" align="center" label="折扣后金额">
<el-table-column :prop="'singleProductSalesPrice'" align="center" label="商品销售单价">
<template slot-scope="scope">
<span>¥{{ scope.row.finalPrice || 0 }}</span>
<span>¥{{ scope.row.singleProductSalesPrice }}</span>
</template>
</el-table-column>
<el-table-column :prop="'singleProductFinalPrice'" align="center" label="商品实付单价">
<template slot-scope="scope">
<span>¥{{ scope.row.singleProductFinalPrice }}</span>
</template>
</el-table-column>
<el-table-column :prop="'coupon.customerCouponCode'" align="center" label="优惠券 id" />
......@@ -281,9 +286,9 @@
<span>{{ scope.row.number }}件</span>
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="优惠方式">
<el-table-column prop="totalPrice" align="center" width="150" label="优惠方式">
<template slot-scope="scope">
<span>{{ discountTypeMap[scope.row.discountType] || '-' }}</span>
<span v-if="scope.row.discountType">{{ `${discountTypeMap[scope.row.discountType]} ${scope.row.discountType == 2 ? '¥' + scope.row.discountValue : scope.row.discountType == 1 ? scope.row.discountValue + '折' : ''}` || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="共减">
......@@ -294,12 +299,13 @@
<el-table-column prop="totalPrice" align="center" label="商品总价">
<template slot-scope="scope">
<span v-if="detail.upgradeFlag === 'Y'">¥{{ scope.row.totalPrice || 0 }}</span>
<span v-else>0</span>
<span v-else>¥0</span>
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="支付金额">
<template slot-scope="scope">
<span>{{ scope.row.finalPrice != null ? '¥' + scope.row.finalPrice : '' }}</span>
<span v-if="detail.upgradeFlag === 'Y'">{{ scope.row.finalPrice != null ? '¥' + scope.row.finalPrice : '' }}</span>
<span v-else>¥0</span>
</template>
</el-table-column>
</el-table>
......@@ -337,6 +343,40 @@
</el-form-item>
</el-form>
</div>
<div class="form_table_gp">
<p class="edit-sub-title">审批操作日志</p>
<div class="log-box">
<div class="record-div" v-if="applyLogList && applyLogList.length">
<div class="record-div-d" v-for="(item, index) in applyLogList" :key="index">
<!-- <span class="dot"></span> -->
<div class="span-txt-one">{{ item.beforeStatus ? $$(statusForShow, [item.beforeStatus], 'text') : '' }}</div>
<div class="span-txt-two" style="font-weight: 500;">
<span :class="item.afterStatus ? examineStatusClass[item.afterStatus] : ''">
{{ item.afterStatus ? $$(statusForShow, [item.afterStatus], 'status') : '' }}</span>
<span v-if="item.afterStatus == 4">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>驻店销售</span>
</span>
</div>
<div class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.operatorName" placement="bottom">
<span>{{ item.operatorName }}</span>
</el-tooltip>
</div>
<div class="span-txt-two">审核时间:{{ item.createdDateStr }}</div>
<div v-if="item.remark" class="span-txt-two">{{[4].includes(item.afterStatus) ? '驳回原因:' : '备注:'}}
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<span>{{ item.remark ? (item.remark.length > 20 ? (item.remark.slice(0, 20) + '...') : item.remark) : '' }}</span>
</el-tooltip>
</div>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="">
<span class="tips">暂无数据</span>
</div>
</div>
</div>
<p style="text-align: left; padding-left: 30px; margin: 0 0 16px 0">
<el-button type="primary" @click="handleClose"> 返回 </el-button>
</p>
......@@ -387,7 +427,7 @@ import { mapActions, mapState } from "vuex"
// import signRefundDialog from './signRefundDialog'
import remarkDialog from "./remarkDialog"
import technicianDialog from "./components/technicianDialog"
import { deepClone, downLoadFile } from "@/common/util"
import { deepClone, downLoadFile, Util } from "@/common/util"
import { payType, BaseData, invoiceTypeOpt, invalidFlagOpt, djOrderTypeMap, discountTypeMap } from "@/common/constants.js"
import dayjs from "dayjs"
import { goodsOrderDetail, markAsInvoiced, carUploadRecordAdd, carUploadRecordDelete, downloadNumAdd } from "@api/order"
......@@ -481,7 +521,20 @@ export default {
pickUpOrder: null, // 接车单信息
deliveryNote: null, // 交车单信息
djOrderTypeMap,
discountTypeMap
discountTypeMap,
statusForShow: {
1: { text: '区域运营审核' },
2: { text: '线上运营审核', status: '通过' },
3: { status: '通过' },
4: { status: '驳回' }
},
examineStatusClass: {
2: 'greendot',
3: 'greendot',
4: 'reddot'
},
applyLogList: [],
emptyImgUrl: require("@/assets/empty-5.png")
}
},
computed: {
......@@ -598,7 +651,7 @@ export default {
if (index === 0) {
sums[index] = "总价"
column.align = "is-left"
column.colSpan = 13
column.colSpan = 14
return
}
......@@ -742,6 +795,10 @@ export default {
}
})
})
res?.applyLogList?.forEach(val => {
val.createdDateStr = Util.dateFormate(val.createdDate, 'YYYY-MM-DD HH:mm:ss')
})
this.applyLogList = res?.applyLogList || []
// 技师显示
this.detail.technicianName = this.detail?.subOrderList
?.map((item) => item.technicianName)
......@@ -1139,4 +1196,68 @@ export default {
cursor: pointer;
font-size: 0;
}
.log-box {
margin-top: 20px;
border-radius: 4px;
background: #FAFAFA;
padding: 16px;
.record-div {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child{
margin-bottom: 0;
}
}
.span-txt-one {
height: 21px;
font-weight: 500;
color: #333333;
}
.reviewer {
width: 180px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.span-txt-two {
margin-left: 40px;
}
.greendot {
color: #4aca74;
}
.reddot {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
<!-- 积分调整 -->
<template>
<d2-dialog btn-ok-label="提交审核"
class="adjustDialog"
:is-visible.sync="visible"
title="积分调整"
width="640px"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<div class="tip-text">
提交审核通过后,积分将自动更新
</div>
<glsx-combi-form ref="editFormRef"
class="edit-form-container"
:default-width="defaultWidth"
:form-data="editFormData"
:form-obj="editData"
:form-ref="editChildRef"
:form-rules="formRules"
:is-block="isBlock"
:label-width="labelWidth">
<template #scoreHtml>
<div class="scroe-wrap">
<el-input v-model="editData.score"
maxlength="9"
placeholder="请输入"
:prefix-icon="prefixIcon"
style="width: 136px;">
</el-input>
</div>
</template>
<template #captcha>
<div class="captcha-wrap">
<el-input v-model="editData.captcha"
placeholder="请输入"
style="width: 338px;">
</el-input>
<div class="captcha-text" @click.prevent="getCode">
{{ !isCodeDisabled ? '获取验证码' : `${count}s` }}
</div>
</div>
</template>
</glsx-combi-form>
</d2-dialog>
</template>
<script>
// import { limitPrice } from "@/common/format";
import { getAdmin, getSms, manualAdd, manualSubtract } from "@/api/point";
import { deepClone, Util } from "@/common/util";
export default {
name: "AdjustDialog",
props: {
visible: {
type: Boolean,
default: false,
},
infoData: {
type: Object,
default: () => {},
},
},
data() {
return {
prefixIcon: "el-icon-plus",
labelWidth: "110px",
editChildRef: "editChildRef",
isBlock: true,
defaultWidth: "338px",
isCodeDisabled: false,
count: "",
timer: null,
editData: {
type: 1,
score: "",
captcha: "",
phone: "",
orderCode: "",
admin: "",
},
editFormData: [
{
label: "积分变更",
name: "type",
type: "radio",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "pointChangeOpt",
handleRadioChange: (val) => {
this.prefixIcon = val === 1 ? "el-icon-plus" : "el-icon-minus";
},
},
{
label: "",
name: "score",
maxlength: 9,
addHtml: "scoreHtml",
style: {
marginLeft: "110px",
},
},
{
label: "关联订单编号",
name: "orderCode",
type: "input",
maxlength: "30",
placeholder: "请输入",
isClear: true,
},
{
label: "管理员",
name: "admin",
type: "select",
optionsName: "adminList",
optionId: "adminId",
optionLabel: "adminName",
changeAttr: (val) => {
this.editData.phone = val;
this.isCodeDisabled = false;
clearInterval(this.timer);
this.timer = null;
this.editData.captcha = "";
},
},
{
label: "验证码",
addHtml: "captcha",
name: "captcha",
},
{
label: "备注",
name: "remark",
type: "input",
inputType: "textarea",
maxlength: "200",
width: "436px",
rows: 4,
showLimit: true,
},
],
formRules: {
orderCode: [{ required: true, message: "请输入关联订单编号", trigger: "blur" }],
score: [
{ required: true, message: "请输入积分", trigger: "blur" },
{
validator(rule, value, callback) {
if (value === "" || value === null || value === undefined) {
callback(new Error("请输入积分"));
return;
}
const str = String(value).trim();
// 仅允许:0 或非0开头的整数,且可选最多两位小数
const pattern = /^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/;
if (!pattern.test(str)) {
callback(new Error("积分必须为非负数,最多保留两位小数"));
return;
}
const num = Number(str);
if (!isFinite(num) || num < 0) {
callback(new Error("积分必须为非负数"));
return;
}
callback();
},
trigger: ["blur", "change"],
},
],
captcha: [{ required: true, message: "请输入验证码", trigger: "blur" }, {
validator(rule, value, callback) {
const str = String(value || "").trim();
if (str === "") {
// 空值交给 required 规则处理
callback();
return;
}
if (!/^\d+$/.test(str)) {
callback(new Error("验证码只能输入数字"));
return;
}
callback();
},
trigger: ["blur", "change"],
}],
admin: [{ required: true, message: "请选择管理员", trigger: "change" }],
remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
},
baseData: {
pointChangeOpt: [
{
confId: 1,
confValue: "积分增加",
},
{
confId: 2,
confValue: "积分减少",
},
],
},
};
},
created() {
this.getAdminData();
},
methods: {
getAdminData() {
getAdmin().then((res) => {
if (res) {
this.baseData.adminList = res.map((item) => {
return {
adminId: `${item.phone}`,
adminName: `${item.name} ${item.phone}`,
name: item.name,
phone: item.phone,
};
});
this.getOptionsList(this, "editFormData", false);
if (this.baseData.adminList.length == 0) {
this.editData.admin = "";
this.editData.phone = "";
} else {
this.editData.admin = this.baseData.adminList[0].adminId;
this.editData.phone = this.baseData.adminList[0].phone;
}
}
});
},
getCode() {
if (!this.editData.phone) {
this.$message.error("请选择管理员");
return;
}
if (this.isCodeDisabled)
return;
if (!this.timer) {
this.count = 60;
getSms({
phone: this.editData.phone,
})
.then((res) => {
console.log(res, "res");
if (res) {
this.$message.success("短信验证码发送成功");
this.isCodeDisabled = true;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= 60) {
this.count--;
} else {
this.isCodeDisabled = false;
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
} else {
this.$message.error(res.message);
}
});
}
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid1) => {
console.log(valid1);
if (valid1) {
let Methods = this.editData.type === 1 ? manualAdd : manualSubtract;
let params = {
phone: this.editData.phone,
score: this.editData.score,
orderCode: this.editData.orderCode,
remark: this.editData.remark,
captcha: this.editData.captcha,
merchantId: this.infoData.merchantId,
staffPhone: this.infoData.staffPhone,
};
Methods(params).then((res) => {
if (res) {
this.$message.success("积分调整成功");
this.$emit("handleConfirm");
}
});
}
});
},
handleClose() {
this.$emit("handleClose");
},
getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
let item = that[formName].find(k => k.name == refreshSigle);
let index = that[formName].findIndex(k => k.name == refreshSigle);
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName]),
);
if (
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[that[formName][index].optionId] = "";
temp[that[formName][index].optionLabel] = "全部";
that[formName][index].optionList.unshift(temp);
}
} else {
that[formName].forEach((item, index) => {
if (
that.baseData[item.optionsName]?.length
) {
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName]),
);
if (
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[that[formName][index].optionId] = "";
temp[that[formName][index].optionLabel] = "全部";
that[formName][index].optionList.unshift(temp);
}
}
});
}
},
},
};
</script>
<style scoped lang="scss">
.adjustDialog {
::v-deep {
.el-dialog__header {
border-bottom: 1px solid #e5e5e5;
}
.el-dialog__footer {
border-top: 1px solid #e5e5e5;
}
.el-input__count {
right: 12px;
bottom: 1px;
}
}
}
.tip-text {
border-radius: 4px;
background: #f7f7f7;
color: #333333;
font-size: 14px;
padding: 8px 0;
text-align: center;
margin-bottom: 26px;
margin-top: -10px;
}
.captcha-wrap {
.captcha-text {
font-size: 12px;
color: #2a58ad;
position: absolute;
right: 0;
top: 2px;
margin-right: 10px;
cursor: pointer;
width: 100px;
height: 32px;
text-align: right;
}
}
</style>
<!-- 批量积分调整审批 -->
<template>
<d2-dialog btn-ok-label="审核"
class="adjustDialog"
:is-visible.sync="visible"
:title="dataInfo && dataInfo.id ? '积分调整审批' : '批量积分调整审批'"
width="640px"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<div class="tip-text">
审核通过后,将更新对应人员积分;<br />
审核驳回后,不更新对应人员积分,需重新提交审核;
</div>
<glsx-combi-form ref="editFormRef"
class="edit-form-container"
:default-width="defaultWidth"
:form-data="editFormData"
:form-obj="editData"
:form-ref="editChildRef"
:form-rules="formRules"
:is-block="isBlock"
:label-width="labelWidth">
</glsx-combi-form>
</d2-dialog>
</template>
<script>
import { motivationAudit } from "@/api/point";
import { deepClone } from "@/common/util";
export default {
name: "AdjustDialog",
props: {
visible: {
type: Boolean,
default: false,
},
dataInfo: {
type: Object,
default: () => {},
},
},
data() {
return {
title: "",
labelWidth: "110px",
editChildRef: "editChildRef",
isBlock: true,
defaultWidth: "338px",
isCodeDisabled: false,
count: "",
timer: null,
editData: {
auditResult: 0,
operatorRemark: "",
},
editFormData: [
{
label: "审核结果",
name: "auditResult",
type: "radio",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "approveOpt",
handleRadioChange: (val) => {
},
},
{
label: "备注",
name: "operatorRemark",
type: "input",
inputType: "textarea",
maxlength: "200",
width: "436px",
rows: 4,
showLimit: true,
},
],
formRules: {
auditResult: [{ required: true, message: "请选择审核结果", trigger: "change" }],
operatorRemark: [{ required: true, message: "请输入备注", trigger: "blur" }],
},
baseData: {
approveOpt: [
{
confId: 0,
confValue: "审核通过",
},
{
confId: 1,
confValue: "审核驳回",
},
],
},
};
},
mounted() {
this.getOptionsList(this, "editFormData", false);
},
methods: {
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid1) => {
console.log(valid1);
if (valid1) {
let params = {
auditResult: this.editData.auditResult,
operatorRemark: this.editData.operatorRemark,
};
if (this.dataInfo && this.dataInfo.id) {
params.id = this.dataInfo.id;
}
motivationAudit(params).then((res) => {
if (res) {
this.$message.success("操作成功");
this.$emit("handleConfirm");
}
});
}
});
},
handleClose() {
this.$emit("handleClose");
},
getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
let item = that[formName].find(k => k.name == refreshSigle);
let index = that[formName].findIndex(k => k.name == refreshSigle);
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName]),
);
if (
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[that[formName][index].optionId] = "";
temp[that[formName][index].optionLabel] = "全部";
that[formName][index].optionList.unshift(temp);
}
} else {
that[formName].forEach((item, index) => {
if (
that.baseData[item.optionsName]?.length
) {
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName]),
);
if (
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[that[formName][index].optionId] = "";
temp[that[formName][index].optionLabel] = "全部";
that[formName][index].optionList.unshift(temp);
}
}
});
}
},
},
};
</script>
<style scoped lang="scss">
.adjustDialog {
::v-deep {
.el-dialog__header {
border-bottom: 1px solid #e5e5e5;
}
.el-dialog__footer {
border-top: 1px solid #e5e5e5;
}
.el-input__count {
right: 12px;
bottom: 1px;
}
}
}
.tip-text {
border-radius: 4px;
background: #f7f7f7;
color: #333333;
font-size: 14px;
padding: 8px 0;
text-align: center;
margin-bottom: 26px;
margin-top: -10px;
}
</style>
<template>
<el-dialog title="请选择退款明细" :visible.sync="refundVisible" :before-close="handleClose"
:close-on-click-modal="false" width="70%" class="relateStore">
<div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column :selectable="selectableFn" type="selection" width="55" align="center" />
<template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope">
{{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }}
<el-dialog :before-close="handleClose"
class="relateStore"
:close-on-click-modal="false"
title="请选择退款明细"
:visible.sync="refundVisible"
width="70%">
<div>
<el-table ref="seletingTable"
border
class="table"
:data="tableData"
@select="handleChange"
@select-all="handleAll">
<el-table-column align="center"
:selectable="selectableFn"
type="selection"
width="55" />
<template v-for="item in tableColumn">
<el-table-column align="center"
:label="item.label"
:prop="item.prop">
<template #default="scope">
<span>
{{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }}
</span>
</template>
</el-table-column>
</template>
</el-table>
<div class="total">
可选可退总价:<div class="price">
¥{{ total }}
</div>
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button :disabled="!refundSubOrderCode"
type="primary"
@click="handleConfirm">
下一步
</el-button>
</span>
</el-table-column>
</template>
</el-table>
<div class="total">可选可退总价:<div class="price">¥{{ total }}</div></div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="handleConfirm" :disabled="!refundSubOrderCode">下一步</el-button>
</span>
</el-dialog>
</el-dialog>
</template>
<script>
import { getGoodsSubOrder } from "@api/point"
import { getGoodsSubOrder } from "@api/point";
export default {
name: 'refundDetail',
data() {
return {
tableData: [],
tableColumn: [
{
label: '子订单编码',
prop: 'subOrderCode'
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品别名',
prop: 'goodsAlias'
},
{
label: '商品ID',
prop: 'goodsCommodityCode'
},
{
label: '分类',
prop: 'upgradeGoodsTypeName'
},
{
label: '售价',
prop: 'upgradePrice',
unit: '¥'
},
{
label: '数量/件',
prop: 'number'
},
{
label: '支付金额',
prop: 'totalPrice',
unit: '¥'
}
],
total: 0,
refundSubOrderCode: '',
refundApplyDetailList: [],
isAll: false,
// 是否只有一个子订单并且未退过款的
isOneSubFirst: false
}
},
props: {
refundVisible: {
type: Boolean,
default: false
},
dataInfo: {
type: Object,
default: {}
}
},
watch: {
dataInfo(val) {
console.log(val)
if (val && val.orderCode) this.getList(val.orderCode)
}
},
methods: {
// 设置禁用
selectableFn(row) {
console.log(row)
if (row.status == 2) return false
else return true
},
async getList(orderCode) {
const res = await getGoodsSubOrder({ orderCode })
this.tableData = res
this.isOneSubFirst = this.tableData.length == 1 && this.tableData.every(item => item.status == 1)
this.$refs.seletingTable.toggleAllSelection()
},
handleChange(selection) {
console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection)
},
handleAll(selection) {
console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection)
},
getParams(selection) {
let _total = 0
let _refundSubOrderCode = []
selection.forEach(item => {
_total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode)
})
this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join('/')
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode)
},
handleConfirm() {
const {refundSubOrderCode, refundApplyDetailList, total, isAll, isOneSubFirst} = this
this.$emit("handleConfirm", {
total,
refundSubOrderCode,
isAll,
refundApplyDetailList,
isOneSubFirst
})
},
handleClose() {
this.$emit("handleClose")
}
}
}
name: "RefundDetail",
props: {
refundVisible: {
type: Boolean,
default: false,
},
dataInfo: {
type: Object,
default: {},
},
},
data() {
return {
tableData: [],
tableColumn: [
{
label: "子订单编码",
prop: "subOrderCode",
},
{
label: "商品名称",
prop: "goodsName",
},
{
label: "商品别名",
prop: "goodsAlias",
},
{
label: "商品ID",
prop: "goodsCommodityCode",
},
{
label: "分类",
prop: "upgradeGoodsTypeName",
},
{
label: "售价",
prop: "upgradePrice",
unit: "¥",
},
{
label: "数量/件",
prop: "number",
},
{
label: "支付金额",
prop: "totalPrice",
unit: "¥",
},
],
total: 0,
refundSubOrderCode: "",
refundApplyDetailList: [],
isAll: false,
// 是否只有一个子订单并且未退过款的
isOneSubFirst: false,
};
},
watch: {
dataInfo(val) {
console.log(val);
if (val && val.orderCode)
this.getList(val.orderCode);
},
},
methods: {
// 设置禁用
selectableFn(row) {
console.log(row);
if (row.status == 2)
return false;
else return true;
},
async getList(orderCode) {
const res = await getGoodsSubOrder({ orderCode });
this.tableData = res;
this.isOneSubFirst = this.tableData.length == 1 && this.tableData.every(item => item.status == 1);
this.$refs.seletingTable.toggleAllSelection();
},
handleChange(selection) {
console.log(selection);
this.isAll = selection.length == this.tableData.length;
this.getParams(selection);
},
handleAll(selection) {
console.log(selection);
this.isAll = selection.length == this.tableData.length;
this.getParams(selection);
},
getParams(selection) {
let _total = 0;
let _refundSubOrderCode = [];
selection.forEach((item) => {
_total += item.totalPrice;
_refundSubOrderCode.push(item.subOrderCode);
});
this.total = Number.parseFloat(_total.toFixed(2));
this.refundSubOrderCode = _refundSubOrderCode.join("/");
this.refundApplyDetailList = selection;
console.log(this.refundSubOrderCode);
},
handleConfirm() {
const { refundSubOrderCode, refundApplyDetailList, total, isAll, isOneSubFirst } = this;
this.$emit("handleConfirm", {
total,
refundSubOrderCode,
isAll,
refundApplyDetailList,
isOneSubFirst,
});
},
handleClose() {
this.$emit("handleClose");
},
},
};
</script>
<style lang="scss" scoped>
.total {
display: flex;
align-items: center;
color: #666666;
font-size: 14px;
.price {
color: #2A58AD;
margin-left: 10px;
}
display: flex;
align-items: center;
color: #666666;
font-size: 14px;
.price {
color: #2a58ad;
margin-left: 10px;
}
}
</style>
<!-- 驳回 -->
<template>
<d2-dialog
title="提示"
:is-visible="visible"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm"
>
<div class="reject-dialog">
<glsx-combi-form
class="edit-form-container"
ref="formRef"
label-width="112px"
default-width="390px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
</div>
</d2-dialog>
<d2-dialog :is-visible="visible"
title="提示"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form ref="formRef"
class="edit-form-container"
default-width="390px"
:form-data="editFormData"
:form-obj="infoForm"
:form-ref="rejectRef"
:form-rules="formRules"
label-width="112px">
</glsx-combi-form>
</div>
</d2-dialog>
</template>
<script>
import { cancelDeduct, getScoreDetail } from "@api/point"
<script>
import { cancelDeduct, getScoreDetail } from "@api/point";
export default {
name: "RejectDialog",
data() {
return {
infoForm: {
remark: ""
},
dialogConfig: {
title: "提示",
width: "576px",
height: "315px"
},
rejectRef: "rejectRef",
formRules: {
// remark: [{ required: true, message: "请输入撤销原因", trigger: "blur" }]
},
editFormData: [
{
label: "撤销原因",
name: "remark",
type: "input",
maxlength: 20,
inputType: "textarea",
showLimit: true,
rows: 4
}
],
baseData: {}
}
},
name: "RejectDialog",
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: ""
}
},
computed: {
isVisible: {
get() {
return this.visible
},
set(newVal) {}
}
},
props: {
visible: {
type: Boolean,
default: false,
},
id: {
type: Number,
default: "",
},
},
data() {
return {
infoForm: {
remark: "",
},
dialogConfig: {
title: "提示",
width: "576px",
height: "315px",
},
rejectRef: "rejectRef",
formRules: {
// remark: [{ required: true, message: "请输入撤销原因", trigger: "blur" }]
},
editFormData: [
{
label: "撤销原因",
name: "remark",
type: "input",
maxlength: 20,
inputType: "textarea",
showLimit: true,
rows: 4,
},
],
baseData: {},
};
},
computed: {
isVisible: {
get() {
return this.visible;
},
set(newVal) {},
},
},
mounted() {},
mounted() {},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(async (valid) => {
if (valid) {
let detailData = await getScoreDetail({ id: this.id })
let params = {}
params.remark = this.infoForm.remark
params.orderCode = detailData.orderCode
params.scoreId = this.id
cancelDeduct(params).then((res) => {
console.log(res)
if (res) {
this.$emit("handleConfirm", false)
this.notice.okTips("操作成功")
}
})
}
})
},
handleClose() {
this.$emit("dialogClose", false)
}
}
}
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(async (valid) => {
if (valid) {
let detailData = await getScoreDetail({ id: this.id });
let params = {};
params.remark = this.infoForm.remark;
params.orderCode = detailData.orderCode;
params.scoreId = this.id;
cancelDeduct(params).then((res) => {
console.log(res);
if (res) {
this.$emit("handleConfirm", false);
this.notice.okTips("操作成功");
}
});
}
});
},
handleClose() {
this.$emit("dialogClose", false);
},
},
};
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 21px 0 83px;
margin: 21px 0 83px;
::v-deep .el-textarea__inner {
height: 70px;
}
::v-deep .el-input__count {
right: 15px !important;
bottom: 3px !important;
font-size: 12px;
color: #999999;
}
::v-deep .el-textarea__inner {
height: 70px;
}
::v-deep .el-input__count {
right: 15px !important;
bottom: 3px !important;
font-size: 12px;
color: #999999;
}
}
</style>
\ No newline at end of file
......@@ -45,12 +45,12 @@
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.status,
'inviteStatusOptMap',
'reviewCaseStatusOptMap',
),
}">
</span>
{{
getStatusItem(baseData, "inviteStatusOpt", scope.scope, "status")
getStatusItem(baseData, "reviewCaseStatusOpt", scope.scope, "status")
}}
</div>
</div>
......@@ -78,40 +78,30 @@
</template>
<script>
import {
getDictList,
getRecruitmentList,
getRecruitmentSummary,
updateRecruitmentStatus,
} from "@api/recruitment";
import { mapActions, mapState } from "vuex";
import { inviteStatusOpt, inviteStatusOptMap } from "@/common/constants.js";
import { deepClone, Util } from "@/common/util";
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin";
import { approveExcellentCase, downloadExcellentCaseAudio, listExcellentCase, rejectExcellentCase } from "@/api/resident";
import { reviewCaseStatusOpt, reviewCaseStatusOptMap } from "@/common/constants.js";
import { deepClone, downLoadFile, Util } from "@/common/util";
export default {
mixins: [reportTrackPageMixin],
data() {
return {
activeName: "4",
activeName: "0",
tabPaneList: [
{
label: "待审核",
name: "4",
name: "0",
},
{
label: "已通过",
name: "0",
name: "1",
},
{
label: "已驳回",
name: "1",
name: "2",
},
],
isRejectVisible: false,
summaryObj: {},
detailInfo: {},
getListApi: getRecruitmentList,
getListApi: listExcellentCase,
tableParams: {
listName: "list",
......@@ -121,75 +111,74 @@ export default {
tableColumns: [
{
label: "驻店销售",
prop: "merchantName",
prop: "staffName",
width: "200px",
addHtml: "merchantName",
},
{
label: "接待日期",
prop: "businessTypeName",
prop: "receptionDate",
width: "100px",
},
{
label: "接待门店",
prop: "recruitmentTypeName",
prop: "merchantName",
width: 140,
},
{
label: "质检评分",
prop: "recruitmentQuantity",
prop: "score",
formatter(row) {
return row.score != null ? row.score : "-";
},
},
{
label: "攻防评分",
prop: "regionOperationName",
width: 100,
prop: "defencePoint",
formatter(row) {
return row.defencePoint != null ? row.defencePoint : "-";
},
},
{
label: "客户类型",
prop: "recruiterName",
prop: "customerCategory",
width: 160,
},
{
label: "车型",
prop: "technicalSupervisorName",
prop: "carModel",
width: 120,
},
{
label: "提交人",
prop: "provinceCity",
prop: "submitterName",
width: 160,
},
{
label: "状态",
prop: "status",
prop: "reviewStatus",
minWidth: 120,
addHtml: "statusHtml",
},
{
label: "提交时间",
prop: "createdBy",
prop: "createTime",
width: 120,
},
],
},
searchFormSearch: {},
searchForm: {
dataScope: "1",
merchantName: "",
businessType: "",
recruitmentType: "",
createdDate: [],
status: "",
recruiterName: "",
regionOperationName: "",
createdBy: "",
provinceCity: "",
technicalSupervisorName: "",
staffName: "",
customerCategory: "",
submitterName: "",
reviewStatus: 0,
},
showFormData: [
{
label: "驻店销售",
name: "merchantName",
name: "staffName",
type: "input",
isClear: true,
},
......@@ -201,7 +190,7 @@ export default {
},
{
label: "客户类型",
name: "businessType",
name: "customerCategory",
type: "select",
isClear: true,
optionList: [],
......@@ -211,79 +200,61 @@ export default {
},
{
label: "提交人",
name: "createdBy",
name: "submitterName",
type: "input",
isClear: true,
},
],
baseData: {
reviewCaseStatusOpt: deepClone(reviewCaseStatusOpt),
reviewCaseStatusOptMap: deepClone(reviewCaseStatusOptMap),
clientTypeOpt: deepClone([]),
},
track_event_code: "recruitment_management",
};
},
mounted() {
this.onPageShow();
this.fetchOnboardingPlans();
},
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
},
methods: {
handleClick() {
if (this.activeName !== "4") {
this.searchForm.status = this.activeName;
} else {
this.searchForm.status = "";
}
this.searchForm.reviewStatus = this.activeName;
this.handleSearch();
},
// 确认
handlePass(data) {
let params = { id: data.id, status: 1 };
this.$confirm(
"确认后当前招聘需求自动进入招聘中。确定是否确认?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
},
).then(() => {
this.updateRecruitmentStatusData(params);
});
},
// 完成
handleComplete(data) {
let params = { id: data.id, status: 2 };
this.$confirm(
"完成招聘,当前招聘需求自动流转为已完成。确定是否结束?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
},
).then(() => {
this.updateRecruitmentStatusData(params);
let params = { id: data.id };
// this.$confirm(
// "确认后当前招聘需求自动进入招聘中。确定是否确认?",
// "提示",
// {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// },
// ).then(() => {
// this.updateRecruitmentStatusData(params);
// });
approveExcellentCase(params).then((res) => {
if (res) {
this.notice.okTips("操作成功");
this.handleSearch();
}
});
},
// 驳回
handleReject(data) {
this.detailInfo = data;
this.isRejectVisible = !this.isRejectVisible;
this.isRejectForm.recallReason = "";
},
// 确定驳回
handleReject(data) {
let params = {
id: this.detailInfo.id,
recallReason: data.recallReason,
status: 3,
const params = {
id: data.id,
};
this.updateRecruitmentStatusData(params);
rejectExcellentCase(params).then((res) => {
if (res) {
this.notice.okTips("操作成功");
this.handleSearch();
}
});
},
getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
......@@ -366,35 +337,21 @@ export default {
let item = baseData[optKey].find(item => item.confId == row[rowKey]);
return (item && item.confValue) || "-";
},
...mapActions("d2admin/user", ["actionSetDownloadList"]),
// 下载录音
handleDownload() {
let params = this.getParams();
params.pageNum = 1;
params.moduleName = "STAFF";
params.method = "dj.staff.api.recruitment.demand.export.async";
const list = [
...this.dowloadList,
{
name: "招聘管理",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
},
];
this.actionSetDownloadList({ list, type: "dowloadList" });
handleDownload(row) {
const params = {
id: row.id,
};
downloadExcellentCaseAudio(params).then((res) => {
if (res) {
downLoadFile(res);
}
});
},
getParams() {
let params = deepClone(this.searchForm);
// 申请时间
if (params?.createdDate?.length) {
let [start, end] = params.createdDate;
params.createdDateBegin = Util.dateFormate(start, "YYYY-MM-DD");
params.createdDateEnd = Util.dateFormate(end, "YYYY-MM-DD");
}
delete params.createdDate;
return params;
},
beforeSearchFn() {
......@@ -406,7 +363,6 @@ export default {
handleSearch() {
this.page = this.$options.data.call(this).page;
this.$refs.table.refreshTable(true, true);
this.getRecruitmentSummaryData();
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm;
......
<template>
<d2-dialog :is-visible="visible"
<d2-dialog class="addConfigDialog"
:is-visible="visible"
title="新增预警基线管理"
width="800px"
@closeDialog="handleClose"
......@@ -58,7 +59,7 @@
</template>
<script>
import { cancelDeduct, getScoreDetail } from "@api/point";
import { createOrUpdateBaselineConfig } from "@api/resident";
import { deepClone, Util } from "@/common/util";
export default {
......@@ -76,15 +77,16 @@ export default {
data() {
return {
addForm: {
updateFlag: 0, // 0是新增,1是更新
indicatorCode: "A036",
indicatorName: "个人产值",
timeDimension: "1",
timeDimension: 1,
configList: [],
},
configRef: "configRef",
formRules: {
indicatorCode: [{ required: true, message: "请输入撤销原因", trigger: "change" }],
timeDimension: [{ required: true, message: "请输入撤销原因", trigger: "change" }],
// indicatorCode: [{ required: true, message: "请选择指标", trigger: "change" }],
// timeDimension: [{ required: true, message: "请选择时间维度", trigger: "change" }],
},
editFormData: [
{
......@@ -92,24 +94,28 @@ export default {
name: "indicatorCode",
type: "radio",
optionList: [],
isDisabled: false,
optionId: "confId",
optionLabel: "confValue",
optionsName: "indicatorOpt",
handleRadioChange: (val) => {},
handleRadioChange: (val) => {
this.addForm.indicatorName = this.baseData.indicatorOpt.find(item => item.confId === val).confValue;
},
},
{
label: "时间维度",
name: "timeDimension",
type: "radio",
optionList: [],
isDisabled: false,
optionId: "confId",
optionLabel: "confValue",
optionsName: "timeDimensionOpt",
handleRadioChange: (val) => {},
},
{
label: "预警规则:",
name: "timeDimension",
label: "预警规则",
name: "configList",
addHtml: "ruleHtml",
},
],
......@@ -119,11 +125,19 @@ export default {
confId: "A036",
confValue: "个人产值",
},
{
confId: "A076",
confValue: "个人客单价",
},
{
confId: "A085",
confValue: "转化率",
},
],
timeDimensionOpt: [
{ confId: "1", confValue: "日" },
{ confId: "2", confValue: "周" },
{ confId: "3", confValue: "月" },
{ confId: 1, confValue: "日" },
{ confId: 2, confValue: "周" },
{ confId: 3, confValue: "月" },
],
},
};
......@@ -137,10 +151,13 @@ export default {
},
},
mounted() {
this.ininFormatData();
this.initFormatData();
this.getOptionsList(this, "editFormData", false);
},
methods: {
findAttrIdx(formName, attrName) {
return this[formName].findIndex(item => item.name == attrName);
},
// 表头样式
headerCellStyle() {
return {
......@@ -151,19 +168,36 @@ export default {
borderBottom: "1px solid #e2e8f0",
};
},
ininFormatData() {
let obj = {
warningLevel: 0,
minValue: "",
maxValue: null,
maxValueInf: 0,
};
for (let i = 0; i < 3; i++) {
obj.warningLevel = i;
obj.minValue = i == 0 ? 0 : "";
obj.maxValue = i == 2 ? "+∞" : "";
obj.maxValueInf = i == 2 ? 1 : 0;
this.addForm.configList.push(deepClone(obj));
initFormatData() {
console.log(this.recordInfo);
if (Object.keys(this.recordInfo).length) {
this.addForm.indicatorCode = this.recordInfo.indicatorCode;
this.addForm.indicatorName = this.recordInfo.indicatorName;
this.addForm.timeDimension = this.recordInfo.timeDimension;
if (Array.isArray(this.recordInfo.configList) && this.recordInfo.configList.length) {
this.addForm.configList = this.recordInfo.configList.map(item => ({
...item,
maxValue: item.maxValueInf == 1 ? "+∞" : item.maxValue,
}));
}
this.addForm.updateFlag = 1;
// this.editFormData[this.findAttrIdx("editFormData", "indicatorCode")].isDisabled = true;
// this.editFormData[this.findAttrIdx("editFormData", "timeDimension")].isDisabled = true;
} else {
const obj = {
warningLevel: 0,
minValue: "",
maxValue: null,
maxValueInf: 0,
};
for (let i = 0; i < 3; i++) {
obj.warningLevel = i;
obj.minValue = i === 0 ? 0 : "";
obj.maxValue = i === 2 ? "+∞" : "";
obj.maxValueInf = i === 2 ? 1 : 0;
this.addForm.configList.push(deepClone(obj));
}
this.addForm.updateFlag = 0;
}
},
// 预警级别文字
......@@ -283,22 +317,34 @@ export default {
this.$refs.formRef.$refs[this.configRef].validate(async (valid) => {
if (valid) {
let detailData = await getScoreDetail({ id: this.id });
let params = {};
params.remark = this.addForm.remark;
params.orderCode = detailData.orderCode;
params.scoreId = this.id;
cancelDeduct(params).then((res) => {
const configList = this.addForm.configList.map((item) => {
return {
warningLevel: item.warningLevel,
minValue: item.minValue,
maxValue: item.maxValueInf == 1 ? null : item.maxValue,
maxValueInf: item.maxValueInf,
id: item.id,
};
});
const params = {
indicatorCode: this.addForm.indicatorCode,
indicatorName: this.addForm.indicatorName,
timeDimension: this.addForm.timeDimension,
updateFlag: this.addForm.updateFlag,
configList,
};
createOrUpdateBaselineConfig(params).then((res) => {
if (res) {
this.$emit("handleConfirm", false);
this.notice.okTips("操作成功");
this.$emit("handleAddConfirm", false);
this.$message.success("操作成功");
}
});
}
});
},
handleClose() {
this.$emit("dialogClose", false);
this.$emit("handleClose", false);
},
getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
......@@ -330,6 +376,16 @@ export default {
</script>
<style lang="scss" scoped>
.addConfigDialog {
::v-deep {
.el-dialog__header {
border-bottom: 1px solid #e5e5e5;
}
.el-dialog__footer {
border-top: 1px solid #e5e5e5;
}
}
}
.warning-level {
display: flex;
align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!