Commit 28dc7497 by 前端

Merge branch 'SAAS+V4.55.1' of http://192.168.3.233:8090/saas_plus/dj-car-life-s…

…ystem into SAAS+V4.55.1
2 parents bf738dca 11b0e6d3
Showing 106 changed files with 3333 additions and 497 deletions
...@@ -3524,6 +3524,27 @@ ...@@ -3524,6 +3524,27 @@
"whatwg-fetch": "^3.6.2" "whatwg-fetch": "^3.6.2"
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": { "acorn-walk": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz", "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
...@@ -3913,27 +3934,6 @@ ...@@ -3913,27 +3934,6 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
......
...@@ -30,3 +30,30 @@ export function rebuild(data) { ...@@ -30,3 +30,30 @@ export function rebuild(data) {
params: data params: data
}) })
} }
// 生成
export function remake(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/remake",
method: RequestMethods.GET,
params: data
})
}
// 刷新
export function refresh(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/refresh",
method: RequestMethods.GET,
params: data
})
}
// 判断周期范围内有没有日报数据
export function isexistdata(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/isexistdata",
method: RequestMethods.GET,
params: data
})
}
...@@ -62,3 +62,15 @@ export function mergePdf(data) { ...@@ -62,3 +62,15 @@ export function mergePdf(data) {
data.method = path2 + `mergePdf` data.method = path2 + `mergePdf`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 发票冲红
export function invoiceRed(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red'
return request(data, RequestMethods.POST)
}
// 冲红管理列表
export function getInvoiceRedList(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red.page'
return request(data)
}
...@@ -382,10 +382,16 @@ export function get4sAndServiceMerchantListApi(data) { ...@@ -382,10 +382,16 @@ export function get4sAndServiceMerchantListApi(data) {
} }
/** /**
*
* 获取车品牌列表 * 获取车品牌列表
*/ */
export function getCarBrandList (data = {}) { export function getCarBrandList(data = {}) {
data.method = 'dj.api.smartcarlife.common.car.brand.list' data.method = "dj.api.smartcarlife.common.car.brand.list"
return request(data, RequestMethods.POST)
}
/**
* 获取支付渠道列表
*/
export function paymentChannelList(data = {}) {
data.method = "dj.api.smartcarlife.paymentChannel.list"
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
import request from "./request"
const path = "dj.api.smartcarlife."
const djPath = "dj.api."
// 分页查询银企账号记录
export function getListApi(data) {
data.method = `${path}merchantBankEnterpriseAccount.listWithPage`
return request(data, "post")
}
// 渠道级联dj.api.smartcarlife.get.merchant.level
export function getMerchantLevelApi(data) {
data.method = `${djPath}smartcarlife.get.merchant.level`
return request(data, "post")
}
// 银企账号 - 添加或修改记录
export function updateBankAccount(data) {
data.method = `${path}merchantBankEnterpriseAccount.insertOrUpdate`
return request(data, "post")
}
// 银企账号 - 根据商户号查询银企账号详细信息
export function getBankById(data) {
data.method = `${path}merchantBankEnterpriseAccount.getByMerchantId`
return request(data, "post")
}
// 银企账号 - 删除
export function deleteBankAccount(data) {
data.method = `${path}merchantBankEnterpriseAccount.deleteByMerchantId`
return request(data, "post")
}
...@@ -15,6 +15,12 @@ export function addRefundApplyRecord(data) { ...@@ -15,6 +15,12 @@ export function addRefundApplyRecord(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 企微OA退款审批
export function addOaRefund(data) {
data.method = 'dj.api.smartcarlife.refundApplyRecord.operator.supplement'
return request(data, RequestMethods.POST)
}
// 分页查询退款申请记录 // 分页查询退款申请记录
export function refundApplyRecordPage(data) { export function refundApplyRecordPage(data) {
data.method = `${path}refundApplyRecord.page` data.method = `${path}refundApplyRecord.page`
......
...@@ -20,7 +20,7 @@ const request = ( ...@@ -20,7 +20,7 @@ const request = (
) => { ) => {
// 兼容线上dj和scrm appkey和secret不一样的情况 // 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "" let apiName = ""
console.log("params.method", params)
if (params.method.includes("dj.api.smartcarlife")) { if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj" apiName = "dj"
} else if (params.method.includes("dj.api.script")) { } else if (params.method.includes("dj.api.script")) {
......
...@@ -571,3 +571,14 @@ export function checkProductDefineAPI(data) { ...@@ -571,3 +571,14 @@ export function checkProductDefineAPI(data) {
data.method = `${path2}merchantPerformanceProductDefine.deleteValid` data.method = `${path2}merchantPerformanceProductDefine.deleteValid`
return request(data, "post") return request(data, "post")
} }
// 查询录音标签列表
export function receptionTagPage(data) {
data.method = `dj.api.smartcarlife.reception.receptionTagPage`
return request(data, "post")
}
// 导出录音标签列表
export function receptionTagPageExport(data) {
data.method = `dj.api.smartcarlife.reception.receptionTagPageExport`
return request(data, "post")
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 长课程配置-已配置课程列表(上周复盘列表)
export function taskStaffStudyPage(data) {
data.method = `${path}servicecenter.contentmanager.task.staff.study.page`
return request(data, RequestMethods.POST)
}
// 长课程配置-处罚启停
export function studyPunishUpdate(data) {
data.method = `${path}study.punish.update`
return request(data, RequestMethods.POST)
}
// 长课程配置-查询员工已配置课程
export function staffCourse(data) {
data.method = `${path}servicecenter.contentmanager.staff.course`
return request(data, RequestMethods.POST)
}
// 课程配置-指定手机号查询员工信息
export function staffInfo(data) {
data.method = `${path}servicecenter.staff.info`
return request(data, RequestMethods.POST)
}
// 长课程配置-查询员工已配置课程
export function staffCouse(data) {
data.method = `${path}servicecenter.contentmanager.staff.course`
return request(data, RequestMethods.POST)
}
// 长课程-自定义指标逻辑
export function customizeList(data) {
data.method = `${path}longcoursesceneconfig.customizeList`
return request(data, RequestMethods.POST)
}
// 查询所有配置
export function findAllConfig(data = {}) {
data.method = `${path}longcoursesceneconfig.findAllConfig`
return request(data, RequestMethods.POST)
}
// 查询指标详情
export function findAllItem(data) {
data.method = `${path}longcoursesceneconfig.findAllItem`
return request(data, RequestMethods.POST)
}
// 查询指标满足条件的商户
export function findAllItemByConfigId(data) {
data.method = `${path}longcoursesceneconfig.findAllItemByConfigId`
return request(data, RequestMethods.POST)
}
// 按照门店号查询驻店员工集合
export function findStaffByMerchantNo(data) {
data.method = `${path}longcoursesceneconfig.findStaffByMerchantNo`
return request(data, RequestMethods.POST)
}
// 查询门店信息
export function findStoreInfoByMerchantNo(data) {
data.method = `${path}longcoursesceneconfig.findStoreInfoByMerchantNo`
return request(data, RequestMethods.POST)
}
// 员工手机号查询员工信息
export function findStoreEmployeePerformance(data) {
data.method = `${path}longcoursesceneconfig.findStoreEmployeePerformance`
return request(data, RequestMethods.POST)
}
// 短课程配置-查询配置
export function getSopConfig(data) {
data.method = `${path}servicecenter.sop.config.get`
return request(data, RequestMethods.POST)
}
// 短课程配置-更新配置
export function updateSopConfig(data) {
data.method = `${path}servicecenter.sop.config.update`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录详情-标签列表
export function getSopDetailTagList(data) {
data.method = `${path}servicecenter.sop.detail.tag.list`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录列表
export function getSopDetailPage(data) {
data.method = `${path}servicecenter.sop.detail.page`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录编辑启用
export function updateSopDetail(data) {
data.method = `${path}servicecenter.sop.detail.update`
return request(data, RequestMethods.POST)
}
// 课程配置-指定手机号查询员工信息
export function getStaffInfo(data) {
data.method = `${path}servicecenter.staff.info`
return request(data, RequestMethods.POST)
}
// 长课程配置-查询课程列表
export function getStaffTagCourseList(data = {}) {
data.method = `${path}servicecenter.contentmanager.staff.tag.course`
return request(data, RequestMethods.POST)
}
//提交配置
export function insertOrUpdate(data) {
data.method = `${path}contentManagerTask.insertOrUpdate`
return request(data, RequestMethods.POST)
}
// 根据ID查询详细信息
export function getByTaskId(data) {
data.method = `${path}contentManagerTask.getById`
return request(data, RequestMethods.POST)
}
...@@ -283,24 +283,31 @@ export function personalConfigImport(data) { ...@@ -283,24 +283,31 @@ export function personalConfigImport(data) {
// 批量设置运营人员 // 批量设置运营人员
export function shopBatchSet(data) { export function shopBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.shopOperation.setting.batch' data.method =
"dj.api.smartcarlife.serviceMerchant.shopOperation.setting.batch"
return request(data, "post") return request(data, "post")
} }
// 批量设置展业场景 // 批量设置展业场景
export function busiBatchSet(data) { export function busiBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch' data.method = "dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch"
return request(data, "post") return request(data, "post")
} }
// 查询地图行政区域省市区三级结构 // 查询地图行政区域省市区三级结构
export function getDistrictDetail(data) { export function getDistrictDetail(data) {
data.method = 'dj.api.smartcarlife.map.districts.details' data.method = "dj.api.smartcarlife.map.districts.details"
return request(data) return request(data)
} }
// 获取嘀加设置的服务商 // 获取嘀加设置的服务商
export function getMerService(data) { export function getMerService(data) {
data.method = 'dj.smartcarlife.api.merchant.dj.serviceList' data.method = "dj.smartcarlife.api.merchant.dj.serviceList"
return request(data)
}
//日报填写标识修改
export function updateDailyReportFlag(data) {
data.method = "dj.api.smartcarlife.serviceMerchant.dailyReportFillFlag.update"
return request(data) return request(data)
} }
...@@ -317,7 +317,14 @@ $prefix: d2; ...@@ -317,7 +317,14 @@ $prefix: d2;
max-height: 200px !important; max-height: 200px !important;
overflow-y: scroll; overflow-y: scroll;
} }
.serverHeight {
height: 200px !important;
overflow-y: scroll;
}
.el-tooltip__popper.tools-gltip {
width: 238px !important;
height: 95px !important;
}
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
width: 177px; width: 177px;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08) !important; box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08) !important;
...@@ -353,7 +360,3 @@ $prefix: d2; ...@@ -353,7 +360,3 @@ $prefix: d2;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.el-popover {
height: 200px;
overflow: scroll;
}
...@@ -710,7 +710,8 @@ export const businessNatureShow = { ...@@ -710,7 +710,8 @@ export const businessNatureShow = {
export const storeType = [ export const storeType = [
{ confId: 1, confName: "嘀加" }, { confId: 1, confName: "嘀加" },
{ confId: 2, confName: "广汇" }, { confId: 2, confName: "广汇" },
{ confId: 3, confName: "直营" } { confId: 3, confName: "直营" },
{ confId: 9, confName: "冀联" }
] ]
// 店面配置 部署场景 // 店面配置 部署场景
export const sceneForShop = [ export const sceneForShop = [
...@@ -799,6 +800,20 @@ export const rangeType = [ ...@@ -799,6 +800,20 @@ export const rangeType = [
{ confId: 2, confValue: "按订单" } { confId: 2, confValue: "按订单" }
] ]
// 转账管理 - 审批方式
export const approveTypeList = [
{ confId: 1, confValue: "嘀加审批" },
{ confId: 2, confValue: "企微OA审批" }
]
// 转账管理 - 审批状态
export const oaApproveStatusList = [
{ confId: 1, confValue: "审批中" },
{ confId: 2, confValue: "已通过" },
{ confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "已撤销" }
]
// 规则审核-类型 // 规则审核-类型
export const ruleReview_type = [ export const ruleReview_type = [
{ confId: 1, confValue: "清分" }, { confId: 1, confValue: "清分" },
...@@ -846,7 +861,11 @@ export const downloadReportManage_reportType = [ ...@@ -846,7 +861,11 @@ export const downloadReportManage_reportType = [
{ confId: "businessDataSummary", confValue: "业务数据汇总" }, { confId: "businessDataSummary", confValue: "业务数据汇总" },
{ confId: "yanbaoMerAndPerRanking", confValue: "门店产值及个人成交排名" }, { confId: "yanbaoMerAndPerRanking", confValue: "门店产值及个人成交排名" },
{ confId: "abnormalClockWeeklySummary", confValue: "打卡异常周汇总表" }, { confId: "abnormalClockWeeklySummary", confValue: "打卡异常周汇总表" },
{ confId: "ClockMonthlySummary", confValue: "打卡月汇总表" } { confId: "ClockMonthlySummary", confValue: "打卡月汇总表" },
{
confId: "technicianConstructionOrder",
confValue: "轻改技师施工单月度汇总表"
}
] ]
// 下载报表 业务类型 // 下载报表 业务类型
...@@ -884,7 +903,9 @@ export const refundExamine_status = [ ...@@ -884,7 +903,9 @@ export const refundExamine_status = [
{ confId: 2, confValue: "财务复核" }, { confId: 2, confValue: "财务复核" },
{ confId: 3, confValue: "财务结算" }, { confId: 3, confValue: "财务结算" },
{ confId: 4, confValue: "已完成" }, { confId: 4, confValue: "已完成" },
{ confId: 5, confValue: "驳回" } { confId: 5, confValue: "驳回" },
{ confId: 7, confValue: "区域运营审核" },
{ confId: 8, confValue: "运营补充" }
] ]
// 订单管理-退款审核-审批类型 // 订单管理-退款审核-审批类型
...@@ -900,6 +921,13 @@ export const oaApproveStatusOpt = [ ...@@ -900,6 +921,13 @@ export const oaApproveStatusOpt = [
{ confId: 3, confValue: "已驳回" }, { confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "已撤销" } { confId: 4, confValue: "已撤销" }
] ]
// 订单管理 - 退款单来源
export const refundOrderSourceOpt = [
{ confId: 0, confValue: "嘀加系统" },
{ confId: 1, confValue: "小程序" }
]
// 虚拟对公账户银盛到账模式 // 虚拟对公账户银盛到账模式
export const receiptModeList = [ export const receiptModeList = [
{ confId: 1, confValue: "T+1" }, { confId: 1, confValue: "T+1" },
...@@ -1236,7 +1264,8 @@ export const channelTypeList = [ ...@@ -1236,7 +1264,8 @@ export const channelTypeList = [
// 预警管理 所属业务 // 预警管理 所属业务
export const businessSceneOpt = [ export const businessSceneOpt = [
{ confId: 0, confValue: "延保/权益" }, { confId: 0, confValue: "延保" },
{ confId: 2, confValue: "权益" },
{ confId: 1, confValue: "精品" } { confId: 1, confValue: "精品" }
] ]
export const checkStautsOpt = [ export const checkStautsOpt = [
...@@ -1299,6 +1328,23 @@ export const InvoicingOpt = [ ...@@ -1299,6 +1328,23 @@ export const InvoicingOpt = [
{ confId: "2", confValue: "红票" } { confId: "2", confValue: "红票" }
] ]
// 发票管理 冲红原因
export const redReasonOpt = [
{ confId: "01", confValue: "开票有误" },
{ confId: "02", confValue: "销货退回" },
{ confId: "04", confValue: "销售折让" }
]
// 发票冲红管理 红票状态
export const redCodeOpt = [
{ confId: "0000", confValue: "开票成功" },
{ confId: "6666", confValue: "未开票" },
{ confId: "7777", confValue: "开票中" },
{ confId: "4999", confValue: "申请中" },
{ confId: "5999", confValue: "审核中" },
{ confId: "9999", confValue: "开票失败" }
]
// 待付清单 数据来源 // 待付清单 数据来源
export const transferSourceOpt = [ export const transferSourceOpt = [
{ confId: 1, confValue: "嘀加退款" }, { confId: 1, confValue: "嘀加退款" },
...@@ -1346,3 +1392,57 @@ export const legalCertTypeOpt = [ ...@@ -1346,3 +1392,57 @@ export const legalCertTypeOpt = [
{ confId: "24", confValue: "外国人居留证" }, { confId: "24", confValue: "外国人居留证" },
{ confId: "99", confValue: "其他证件" } { confId: "99", confValue: "其他证件" }
] ]
export const label_businessOpt = [
{ confId: 2, confValue: "轻改" },
{ confId: 3, confValue: "权益" },
{ confId: 1, confValue: "延保" }
]
// 服务中心-长课程配置 是否启用处罚
export const punishFlagOpt = [
{ confId: "0", confValue: "否" },
{ confId: "1", confValue: "是" }
]
// 服务中心-长课程配置 处罚状态
export const punishStatusOpt = [
{ confId: 1, confValue: "未触发" },
{ confId: 2, confValue: "处罚中" },
{ confId: 3, confValue: "已结束" }
]
// 服务中心-长课程配置 归属业务
export const course_businessOpt = [
{ confId: "轻改", confValue: "轻改" },
{ confId: "权益", confValue: "权益" },
{ confId: "延保", confValue: "延保" }
]
export const taskStatusOpt = [
{ confId: "1", confValue: "进行中" },
{ confId: "2", confValue: "已结束" }
]
export const effectiveTypeOpt = [
{ confId: 0, confValue: "立即生效" },
{ confId: 1, confValue: "隔日生效" }
]
// 服务中心-长课程配置 处罚方式
export const punishTypeOpt = [
{ confId: 0, confValue: "不处罚" },
{ confId: 1, confValue: "限制录单" }
]
// 服务中心-长课程配置 任务状态
export const course_taskStatusOpt = [
{ confId: 1, confValue: "进行中" },
{ confId: 2, confValue: "已结束" }
]
// 服务中心-长课程配置 任务详情课程列表学习进度
export const learningProgressOpt = [
{ confId: 1, confValue: "未学习" },
{ confId: 2, confValue: "未完成" },
{ confId: 3, confValue: "待考核" },
{ confId: 4, confValue: "未通过" },
{ confId: 5, confValue: "已完成" }
]
export const long_businessOpt = [
{ confId: "1", confValue: "延保" },
{ confId: "3", confValue: "权益" },
{ confId: "2", confValue: "轻改" }
]
...@@ -24,7 +24,8 @@ export function limitPrice( ...@@ -24,7 +24,8 @@ export function limitPrice(
var reg = { var reg = {
priceReg: /^\d[\d\.]*$/, // eslint-disable-line priceReg: /^\d[\d\.]*$/, // eslint-disable-line
numReg: /^[1-9]\d*$/, numReg: /^[1-9]\d*$/,
priceReg_negative: /^-?\d[\d\.]*$/ // 允许负数的正则表达式 priceReg_negative: /^-?\d[\d\.]*$/, // 允许负数的正则表达式,
priceReg_negative_input: /^-?(\d+\.?\d*|\.\d+)?$/ // input时,允许负数的正则表达式
} }
regRule = regRule || "priceReg" regRule = regRule || "priceReg"
if ( if (
......
import { baseConfig } from "@/main"
const OSS = require("ali-oss") const OSS = require("ali-oss")
export default { class GlOssApi {
constructor(params = {}) {
this.baseConfig = params.baseConfig
}
/** /**
* 阿里云oss sdk文件上传 dir 上传到的文件位置 * 分片上传大文件到阿里云OSS(带断点续传和重试机制)
* @param {*} file 文件流 * @param {*} file 文件流(大文件)
* @param {*} successCallback 成功回调 * @param {*} successCallback 成功回调
* @param {*} errCallBack 失败回调 * @param {*} errCallBack 失败回调
* @param {*} bucketName 阿里云桶名(可以指定多个桶名) * @param {*} bucketName 桶名(可选)
* @param {*} dir 上传文件夹路径 譬如images * @param {*} dir 上传目录(可选)
* @param {*} partSize 分片大小(单位 KB,默认500KB)
* @param {*} maxRetries 最大重试次数(默认3次)
*/ */
multipartUpload(
bucketUpload(
file, file,
successCallback = new Function(), successCallback = new Function(),
errCallBack = new Function(), errCallBack = new Function(),
bucketName = "zzl-filerepostorypublic", bucketName = "zzl-filerepostorypublic",
dir = "image" dir = "image",
partSize = 500, // 默认分片大小为500KB
maxRetries = 3 // 最大重试次数
) { ) {
const fileName = file.name // 先获取上传要的资料签名 const { baseConfig } = this
// 实例化一个上传客户端 if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置"))
const fileName = file.name
const client = new OSS({ const client = new OSS({
// yourRegion填写Bucket所在地域。Region填写为oss-cn-hangzhou。 accessKeyId: baseConfig.alyOss2.accessKeyId,
// region: "oss-cn-beijing", //我的存储是北京,可根据具体配置自行修改 accessKeySecret: baseConfig.alyOss2.accessKeySecret,
// region: "oss-cn-shanghai", bucket: baseConfig.alyOss2.bucket,
// 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。)(后台接口返回) endpoint: baseConfig.alyOss2.endpoint
accessKeyId: baseConfig.alyOss.accessKeyId,
accessKeySecret: baseConfig.alyOss.accessKeySecret,
// 从STS服务获取的安全令牌(SecurityToken)。
// stsToken: obj.securityToken,
// 填写Bucket名称。
bucket: baseConfig.alyOss.bucket,
endpoint: baseConfig.alyOss.endpoint
}) })
if (partSize < 100) {
console.error("分片大小不能小于100KB")
errCallBack(new Error("分片大小不能小于100KB"))
return
}
try { // 确保目录以斜杠结尾
// 为保证唯一性,可以通过uuid将文件名替换 if (!dir.endsWith("/")) {
// let uuid = uuidv4() + fileName.substring(fileName.lastIndexOf('.'))if (dir.substring(dir.length - 1, 1) !== '/') {
dir += "/" dir += "/"
const result = client.put(dir + fileName, file) }
result const uniqueDir =
.then((res) => { dir + Date.now() + "_" + Math.floor(Math.random() * 10000) + "/"
console.log(res, "返回文件名和文件地址") const key = uniqueDir + fileName
let retryCount = 0
let currentCheckpoint = null
const uploadWithRetry = () => {
client
.multipartUpload(key, file, {
partSize: partSize * 1024, // 转换为字节
checkpoint: currentCheckpoint, // 使用上次的断点信息
progress: function (p, checkpoint) {
currentCheckpoint = checkpoint
console.log(`上传进度: ${p * 100}%`)
}
})
.then((result) => {
const size = const size =
file.size > 1000000 file.size > 1000000
? parseFloat(file.size / 1000000).toFixed(2) + "M" ? parseFloat(file.size / 1000000).toFixed(2) + "M"
: parseFloat(file.size / 1000).toFixed(2) + "KB" : parseFloat(file.size / 1000).toFixed(2) + "KB"
console.log(result.res)
let [aliyunAddress] = result.res.requestUrls
console.log(aliyunAddress, "aliyunAddress")
let url = aliyunAddress.split("?")[0].split("https:")[1]
console.log(url, "url")
successCallback({ successCallback({
attachment: fileName, attachment: fileName,
aliyunAddress: res.url, aliyunAddress:
"https:" + encodeOSSFilename(decodeURIComponent(url)),
size: size size: size
}) })
}) })
.catch((err) => { .catch((err) => {
console.error("分片上传失败", err)
if (retryCount < maxRetries) {
retryCount++
console.log(`第${retryCount}次重试上传...`)
setTimeout(() => {
uploadWithRetry()
}, 3000) // 3秒后重试
} else {
errCallBack(err) errCallBack(err)
}
})
}
const encodeOSSFilename = (filename) => {
// 定义需要转码的特殊字符(包括空格)
const specialChars = '? \\ * | " < > [ ] { } % # & + = ^ ` ~ ; '
// 创建正则表达式匹配所有特殊字符
const escapeRegex = new RegExp(
`[${specialChars.replace(/ /g, "").replace(/(.)/g, "\\$1")}]`,
"g"
)
// 转码函数:将字符转为百分号编码
return filename.replace(escapeRegex, (char) => {
// 获取字符的UTF-8编码
const code = char.charCodeAt(0)
// 空格特殊处理为%20,其他转为大写十六进制
return code === 32 ? "%20" : `%${code.toString(16).toUpperCase()}`
}) })
} catch (e) {
console.log(e)
} }
uploadWithRetry() // 启动上传流程
} }
} }
export default GlOssApi
...@@ -20,16 +20,16 @@ ...@@ -20,16 +20,16 @@
<script> <script>
export default { export default {
name: 'D2TebleHeader', name: "D2TebleHeader",
props: { props: {
title: { title: {
type: String, type: String,
required: false, required: false,
default: '' default: ""
}, },
titleClassName:{ titleClassName: {
type: String, type: String,
default: '' default: ""
}, },
leftSpan: { leftSpan: {
type: Number, type: Number,
...@@ -44,6 +44,10 @@ export default { ...@@ -44,6 +44,10 @@ export default {
.table-header { .table-header {
font-size: 14px; font-size: 14px;
} }
.table-header-title {
color: #111111;
font-size: 16px;
}
.table-header .el-col-12 { .table-header .el-col-12 {
/* min-width: 50%; */ /* min-width: 50%; */
......
...@@ -691,6 +691,12 @@ export const routerName = { ...@@ -691,6 +691,12 @@ export const routerName = {
handle: "handleDetail" handle: "handleDetail"
}, },
{ {
authId: "9040810",
parentId: "90408",
label: "补充",
handle: "handleSupple"
},
{
authId: "9040805", authId: "9040805",
parentId: "90408", parentId: "90408",
label: "审核", label: "审核",
......
...@@ -1333,8 +1333,61 @@ export const routerName = { ...@@ -1333,8 +1333,61 @@ export const routerName = {
parentId: "90630", parentId: "90630",
label: "重新生成", label: "重新生成",
handle: "handleGenerate" handle: "handleGenerate"
},
{
authId: "9063003",
parentId: "90630",
label: "自定义周期",
handle: "handleCustomize"
} }
], ],
component: _import("systemConfig/downloadReportManage/index") component: _import("systemConfig/downloadReportManage/index")
},
90631: {
path: "/merchantBankAccount",
name: "merchantBankAccount",
meta: {
title: "银企账号",
authId: "90631",
parentId: "906",
cache: false
},
auth: [
{
authId: "9063101",
parentId: "90631",
label: "新增银企账号",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9063102",
parentId: "90631",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9063103",
parentId: "90631",
label: "详情",
handle: "handleDetail"
},
{
authId: "9063104",
parentId: "90631",
label: "修改",
handle: "handleEdit"
},
{
authId: "9063105",
parentId: "90631",
label: "删除",
handle: "handleDelete"
}
],
component: _import("systemConfig/merchantBankAccount/index")
} }
} }
/* /*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-06-19 16:57:57
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-07-01 16:36:04
* @FilePath: \dj-car-life-system\src\router\modules\912_residentManage.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/*
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-01 15:03:31 * @Date: 2024-04-01 15:03:31
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-06-11 11:33:58 * @LastEditTime: 2025-07-01 16:34:27
*/ */
const _import = require("@/libs/util.import." + process.env.NODE_ENV) const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = { export const routerName = {
...@@ -1072,5 +1080,16 @@ export const routerName = { ...@@ -1072,5 +1080,16 @@ export const routerName = {
} }
], ],
component: _import("residentManage/getOutverbalTrickManagement/index") component: _import("residentManage/getOutverbalTrickManagement/index")
},
91222: {
path: "/recordLabelManagement",
name: "recordLabelManagement",
meta: {
title: "录音标签管理",
authId: "91222",
parentId: "912",
cache: false
},
component: _import("residentManage/recordLabelManagement/index")
} }
} }
const _import = require("@/libs/util.import." + process.env.NODE_ENV) const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = { export const routerName = {
914: { 914: {
...@@ -80,7 +79,6 @@ export const routerName = { ...@@ -80,7 +79,6 @@ export const routerName = {
parentId: "91402" parentId: "91402"
} }
] ]
}, },
{ {
...@@ -103,8 +101,7 @@ export const routerName = { ...@@ -103,8 +101,7 @@ export const routerName = {
parentId: "91402" parentId: "91402"
} }
] ]
}
},
], ],
component: _import("pointManagement/pointParticulars") component: _import("pointManagement/pointParticulars")
}, },
...@@ -132,5 +129,5 @@ export const routerName = { ...@@ -132,5 +129,5 @@ export const routerName = {
activePath: "/pointParticulars" activePath: "/pointParticulars"
}, },
component: _import("pointManagement/addDeduction") component: _import("pointManagement/addDeduction")
}, }
} }
...@@ -43,39 +43,6 @@ export const routerName = { ...@@ -43,39 +43,6 @@ export const routerName = {
], ],
component: _import("earlyWarningManager/staff/indexControl") component: _import("earlyWarningManager/staff/indexControl")
}, },
// 91502: {
// path: "/storeWarn",
// name: "storeWarn",
// meta: {
// title: "门店预警管理",
// authId: "91502",
// parentId: "915",
// cache: false
// },
// auth: [
// {
// authId: "9150201",
// parentId: "91502",
// label: "导出",
// category: "Button",
// type: "primary",
// handle: "handleExport"
// },
// {
// authId: "9150202",
// parentId: "91502",
// label: "查看",
// handle: "handleDetail"
// },
// {
// authId: "9150203",
// parentId: "91502",
// label: "处理",
// handle: "handleDeal"
// }
// ],
// component: _import("earlyWarningManager/store/indexControl")
// },
91503: { 91503: {
path: "/shopGuard", path: "/shopGuard",
name: "shopGuard", name: "shopGuard",
...@@ -108,5 +75,5 @@ export const routerName = { ...@@ -108,5 +75,5 @@ export const routerName = {
} }
], ],
component: _import("earlyWarningManager/shopGuard/indexControl") component: _import("earlyWarningManager/shopGuard/indexControl")
}, }
} }
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-04-24 15:36:37
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-24 16:31:47
* @FilePath: \dj-car-life-system\src\router\modules\916_largeModel.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 = { export const routerName = {
916: { 916: {
......
...@@ -96,8 +96,53 @@ export const routerName = { ...@@ -96,8 +96,53 @@ export const routerName = {
parentId: "91702", parentId: "91702",
label: "查看发票", label: "查看发票",
handle: "handleLookInvoice" handle: "handleLookInvoice"
},
{
authId: "9170206",
parentId: "91702",
label: "冲红",
handle: "handleRed"
} }
], ],
component: _import("invoiceManage/invoiceQueryList") component: _import("invoiceManage/invoiceQueryList")
},
91703: {
path: "/invoiceRedManage",
name: "invoiceRedManage",
meta: {
title: "发票冲红管理",
authId: "91703",
parentId: "917",
cache: false
},
auth: [
{
authId: "9170301",
parentId: "91703",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9170302",
parentId: "91703",
label: "查看蓝票",
handle: "handleDetailBlue"
},
{
authId: "9170303",
parentId: "91703",
label: "查看红票",
handle: "handleDetailRed"
},
{
authId: "9170304",
parentId: "91703",
label: "重新冲红",
handle: "handleRed"
}
],
component: _import("invoiceManage/invoiceRedManage")
} }
} }
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
919: {
path: "/serviceCentre",
name: "serviceCentre",
meta: {
title: "服务中心",
authId: "919",
parentId: "1",
cache: false
}
},
91901: {
path: "/longCourse",
name: "longCourse",
meta: {
title: "长课程配置",
authId: "91901",
parentId: "919",
cache: false
},
auth: [
{
authId: "9190101",
parentId: "91901",
label: "配置课程",
handle: "handleConfigureCourse",
addRoutePath: [
{
authId: "91903",
name: "配置课程",
parentId: "91901"
}
]
},
{
authId: "9190102",
parentId: "91901",
label: "查看",
handle: "handleDetail"
}
],
component: _import("serviceCentre/longCourse/longCourseCenter")
},
91902: {
path: "/shortCourse",
name: "shortCourse",
meta: {
title: "短课程配置",
authId: "91902",
parentId: "919",
cache: false
},
auth: [
{
authId: "9190201",
parentId: "91902",
label: "查看",
handle: "handleDetail"
}
],
component: _import("serviceCentre/shortCourse/index")
},
91903: {
path: "/configureCourse",
name: "configureCourse",
meta: {
title: "配置课程",
authId: "91903",
parentId: "91901",
cache: false,
activePath: "/longCourse"
},
component: _import("serviceCentre/longCourse/components/configureCourse")
}
}
...@@ -13,7 +13,14 @@ ...@@ -13,7 +13,14 @@
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
v-if="picOptions.type == 'video'" v-if="picOptions.type == 'video'"
> >
<video id="video" width="100%" height="100%" preload="none" loop muted> <video
id="video"
width="100%"
height="100%"
preload="none"
loop
muted
>
<source :src="item" type="video/mp4" /> <source :src="item" type="video/mp4" />
</video> </video>
<img <img
...@@ -173,6 +180,7 @@ import draggable from "vuedraggable" ...@@ -173,6 +180,7 @@ import draggable from "vuedraggable"
import ImageViewer from "./Image.vue" import ImageViewer from "./Image.vue"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
// import GlOssApi from "@/common/oss"
export default { export default {
components: { components: {
draggable, draggable,
...@@ -207,13 +215,13 @@ export default { ...@@ -207,13 +215,13 @@ export default {
dialogVisibleImg(val) { dialogVisibleImg(val) {
if (!val) { if (!val) {
// 关闭所有视频播放 // 关闭所有视频播放
const videos = document.querySelectorAll('.preVideo'); const videos = document.querySelectorAll(".preVideo")
videos.forEach(video => { videos.forEach((video) => {
if (video && !video.paused) { if (video && !video.paused) {
video.pause(); video.pause()
video.currentTime = 0; video.currentTime = 0
} }
}); })
} }
} }
}, },
......
...@@ -5,8 +5,13 @@ ...@@ -5,8 +5,13 @@
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" <d2-search
:form-data="showFormData" /> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -20,20 +25,33 @@ ...@@ -20,20 +25,33 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" <d2-table
:table-params="tableParams" :before-search-fn="beforeSearchFn"> ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span> </span>
<span style="margin-right: 10px" <span
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2 || scope.scope.contentType == 5"> style="margin-right: 10px"
v-if="
(scope.scope.sendStatus == 1 && scope.scope.contentType == 5) ||
(scope.scope.sendStatus == 2 && scope.scope.contentType == 5)
"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130503']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3"> <span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"> <span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130505']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span> </span>
</div> </div>
...@@ -311,7 +329,8 @@ export default { ...@@ -311,7 +329,8 @@ export default {
goStatisticsPage(row) { goStatisticsPage(row) {
this.$router.push({ this.$router.push({
name: row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage", name:
row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
query: { query: {
id: row.id, id: row.id,
title: row.title title: row.title
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</template> </template>
<script> <script>
import { sceneCodeList, transferTypeList, rangeType } from '@/common/constants.js' import { sceneCodeList, transferTypeList, rangeType, approveTypeList } from '@/common/constants.js'
import { getAmount, transferAccountsRecordAdd, getPreviousRecord } from '@api/transferAccountsManage' import { getAmount, transferAccountsRecordAdd, getPreviousRecord } from '@api/transferAccountsManage'
import { getList } from '@api/serviceManage' import { getList } from '@api/serviceManage'
import { getListApi } from '@api/publicAccount' import { getListApi } from '@api/publicAccount'
...@@ -237,7 +237,8 @@ export default { ...@@ -237,7 +237,8 @@ export default {
remark: '', remark: '',
voucherList: [], voucherList: [],
rangeType: 1, // 对账方式 默认是按周期 rangeType: 1, // 对账方式 默认是按周期
orderCodeScope: [] // 订单范围 orderCodeScope: [], // 订单范围
approveType: ''
}, },
oldVal: { oldVal: {
transferTotalAmount: "" transferTotalAmount: ""
...@@ -314,9 +315,11 @@ export default { ...@@ -314,9 +315,11 @@ export default {
// 服务商款项时 对账方式不显示 订单范围不显示 对账周期显示 // 服务商款项时 对账方式不显示 订单范围不显示 对账周期显示
this.showOrHideAttr('editFormData', '对账方式', true) this.showOrHideAttr('editFormData', '对账方式', true)
this.showOrHideAttr('editFormData', '订单范围', true) this.showOrHideAttr('editFormData', '订单范围', true)
this.showOrHideAttr('editFormData', '审批方式', true)
this.showOrHideAttr('editFormData', '对账周期', false) this.showOrHideAttr('editFormData', '对账周期', false)
// 清空已选订单范围 // 清空已选订单范围
this.infoForm.orderCodeScope = [] this.infoForm.orderCodeScope = []
this.infoForm.approveType = ''
this.infoForm.rangeType = 1 this.infoForm.rangeType = 1
} else { } else {
this.showOrHideAttr_transferType('editFormData', 'expenseTypeHtml', true) this.showOrHideAttr_transferType('editFormData', 'expenseTypeHtml', true)
...@@ -392,6 +395,7 @@ export default { ...@@ -392,6 +395,7 @@ export default {
this.getPreviousRecord_Validate() this.getPreviousRecord_Validate()
// 切换流量方将已选的订单清空 // 切换流量方将已选的订单清空
this.infoForm.orderCodeScope = [] this.infoForm.orderCodeScope = []
this.infoForm.approveType = ''
} }
}, { }, {
label: '所属平台方', label: '所属平台方',
...@@ -409,6 +413,16 @@ export default { ...@@ -409,6 +413,16 @@ export default {
addHtml: 'rangeTypeHtml', addHtml: 'rangeTypeHtml',
rules: [{ required: true, message: '请选择对账方式', trigger: 'change' }] rules: [{ required: true, message: '请选择对账方式', trigger: 'change' }]
}, { }, {
label: '审批方式',
name: 'approveType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'approveTypeList',
isHide: true,
rules: [{ required: true, message: '请选择审批方式', trigger: 'change' }]
}, {
label: '对账周期', label: '对账周期',
name: 'reconciliationDate', name: 'reconciliationDate',
type: 'datePicker', type: 'datePicker',
...@@ -501,7 +515,8 @@ export default { ...@@ -501,7 +515,8 @@ export default {
{ confId: 3, confValue: "流量费" } { confId: 3, confValue: "流量费" }
], ],
PlatformMerchantList: [], PlatformMerchantList: [],
rangeTypeList: deepClone(rangeType) rangeTypeList: deepClone(rangeType),
approveTypeList: deepClone(approveTypeList)
}, },
uploadFileList: [], uploadFileList: [],
chooseVisible: false chooseVisible: false
...@@ -550,6 +565,7 @@ export default { ...@@ -550,6 +565,7 @@ export default {
this.infoForm.transferTotalAmount = '' this.infoForm.transferTotalAmount = ''
this.infoForm.reconciliationDate = '' this.infoForm.reconciliationDate = ''
this.infoForm.orderCodeScope = [] this.infoForm.orderCodeScope = []
this.infoForm.approveType = ''
} }
} }
}, },
...@@ -653,6 +669,7 @@ export default { ...@@ -653,6 +669,7 @@ export default {
handleMethodChange(e) { handleMethodChange(e) {
this.showOrHideAttr('editFormData', '对账周期', e != 1) this.showOrHideAttr('editFormData', '对账周期', e != 1)
this.showOrHideAttr('editFormData', '订单范围', e != 2) this.showOrHideAttr('editFormData', '订单范围', e != 2)
this.showOrHideAttr('editFormData', '审批方式', e != 2)
}, },
formatSelected(data, all) { formatSelected(data, all) {
...@@ -1139,6 +1156,7 @@ export default { ...@@ -1139,6 +1156,7 @@ export default {
// 处理按订单对账参数 // 处理按订单对账参数
params.rangeType = infoForm?.rangeType params.rangeType = infoForm?.rangeType
if (infoForm?.rangeType == 2) { if (infoForm?.rangeType == 2) {
params.approveType = infoForm?.approveType
params.orderRefList = infoForm?.orderCodeScope?.map(val => { params.orderRefList = infoForm?.orderCodeScope?.map(val => {
return { return {
orderCode: val.orderCode, orderCode: val.orderCode,
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { transferAccountsStatusList, transferTypeList, sceneCodeList, warningStatus, rangeType } from '@/common/constants.js' import { transferAccountsStatusList, transferTypeList, sceneCodeList, warningStatus, rangeType, approveTypeList, oaApproveStatusList } from '@/common/constants.js'
import { transferAccountsRecordPage, transferAccountsRecordUpdateStatus, reTransfer } from '@api/transferAccountsManage' import { transferAccountsRecordPage, transferAccountsRecordUpdateStatus, reTransfer } from '@api/transferAccountsManage'
import { rewithdraw } from '@api/withdrawalManage' import { rewithdraw } from '@api/withdrawalManage'
import examineDialog from './components/examineDialog' import examineDialog from './components/examineDialog'
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px', labelWidth: '120px',
searchForm: { searchForm: {
orderCode: '', orderCode: '',
merchantName: '', merchantName: '',
...@@ -178,7 +178,10 @@ export default { ...@@ -178,7 +178,10 @@ export default {
createdBy: '', createdBy: '',
createdDate: '', createdDate: '',
rangeType: '', rangeType: '',
refOrderCode: '' refOrderCode: '',
approveType: '',
oaApproveStatus: '',
oaSpNo: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -288,6 +291,30 @@ export default { ...@@ -288,6 +291,30 @@ export default {
name: '', name: '',
type: 'slot', type: 'slot',
addHtml: 'orderCodeScope' addHtml: 'orderCodeScope'
}, {
label: '审批方式',
name: 'approveType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'approveTypeList'
}, {
label: '审批状态',
name: 'oaApproveStatus',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'oaApproveStatusList'
}, {
label: '企微审批编号',
name: 'oaSpNo',
type: 'input',
maxlength: '50',
isClear: true
}], }],
getListApi: transferAccountsRecordPage, getListApi: transferAccountsRecordPage,
tableParams: { tableParams: {
...@@ -490,7 +517,36 @@ export default { ...@@ -490,7 +517,36 @@ export default {
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.withdrawTradeNo ? cellValue.withdrawTradeNo : '--' return cellValue.withdrawTradeNo ? cellValue.withdrawTradeNo : '--'
} }
},
{
label: '审批方式',
prop: 'approveType',
width: '120px',
formatter: (cellValue) => {
return this.baseData.approveTypeList.find(item => item.confId === cellValue.approveType)?.confValue
} }
},
{
label: '审批状态',
prop: 'oaApproveStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.oaApproveStatusList.find(item => item.confId === cellValue.oaApproveStatus)?.confValue || '--'
},
className: (cellValue) => {
return {
1: 'blueSpot',
2: 'greenSpot',
3: 'redSpot',
4: 'ashSpot'
}[cellValue.oaApproveStatus]
}
},
{
label: '企微审批编号',
prop: 'oaSpNo',
width: '140px',
},
] ]
}, },
baseData: { baseData: {
...@@ -499,7 +555,9 @@ export default { ...@@ -499,7 +555,9 @@ export default {
transferTypeList: deepClone(transferTypeList), transferTypeList: deepClone(transferTypeList),
warningStatusList: deepClone(warningStatus), warningStatusList: deepClone(warningStatus),
PlatformMerchantList: [], PlatformMerchantList: [],
rangeTypeList: deepClone(rangeType) rangeTypeList: deepClone(rangeType),
approveTypeList: deepClone(approveTypeList),
oaApproveStatusList: deepClone(oaApproveStatusList),
}, },
examineVisible: false, examineVisible: false,
...@@ -602,7 +660,10 @@ export default { ...@@ -602,7 +660,10 @@ export default {
createdBy: '', createdBy: '',
createdDate: '', createdDate: '',
rangeType: '', rangeType: '',
refOrderCode: '' refOrderCode: '',
approveType: '',
oaApproveStatus: '',
oaSpNo: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
......
...@@ -622,6 +622,7 @@ import { applicableModelTypeList, BaseData } from "@/common/constants.js" ...@@ -622,6 +622,7 @@ import { applicableModelTypeList, BaseData } from "@/common/constants.js"
import { mapActions, mapMutations } from "vuex" import { mapActions, mapMutations } from "vuex"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
// import GlOssApi from "@/common/oss.js"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info` const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default { export default {
name: "ProductForm", name: "ProductForm",
......
...@@ -2,21 +2,31 @@ ...@@ -2,21 +2,31 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44 * @Date: 2025-02-24 21:48:44
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-02-27 17:02:40 * @LastEditTime: 2025-07-10 18:45:37
* @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue * @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<!-- 编辑 - 运营确认 --> <!-- 编辑 - 运营确认 -->
<template> <template>
<d2-container class="edit-contract" v-loading="isLoadingGoodsCategoryConfiguration || isLoad"> <d2-container
class="edit-contract"
v-loading="isLoadingGoodsCategoryConfiguration || isLoad"
>
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info> <base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<multilateralShopMerchant ref="multilateralShopMerchant" :merchants-list="merchantEditData" <multilateralShopMerchant
@addMerchant="handleAddMerchant"></multilateralShopMerchant> ref="multilateralShopMerchant"
:merchants-list="merchantEditData"
@addMerchant="handleAddMerchant"
></multilateralShopMerchant>
<!-- 流量方信息 - 新增 - 新增商户 --> <!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant v-if="addMerVisible" :add-mer-visible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant> <add-merchant
v-if="addMerVisible"
:add-mer-visible="addMerVisible"
@handleClose="handleAddMerchant"
></add-merchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
<goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info> <goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -86,7 +96,6 @@ export default { ...@@ -86,7 +96,6 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters("goodsInfoData", { ...mapGetters("goodsInfoData", {
isLoadingGoodsCategoryConfiguration: "isLoadingGoodsCategoryConfiguration" isLoadingGoodsCategoryConfiguration: "isLoadingGoodsCategoryConfiguration"
...@@ -139,7 +148,7 @@ export default { ...@@ -139,7 +148,7 @@ export default {
// this.merchantEditData.push(res.createBusinessApproveMerchant) // this.merchantEditData.push(res.createBusinessApproveMerchant)
// } // }
this.merchantEditData = res.createBusinessApproveMerchantList || [] this.merchantEditData = res.createBusinessApproveMerchantList || []
console.log(this.merchantEditData, ' this.merchantEditData') console.log(this.merchantEditData, " this.merchantEditData")
this.SET_DATA({ this.SET_DATA({
name: "shelfUpdateMerchant", name: "shelfUpdateMerchant",
data: { data: {
...@@ -156,7 +165,8 @@ export default { ...@@ -156,7 +165,8 @@ export default {
// 返回测算数据 // 返回测算数据
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit() const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit() const merchantSubmitResult =
await this.$refs.multilateralShopMerchant.submit()
if ( if (
!merchantSubmitResult || !merchantSubmitResult ||
!divisionSubmitResult || !divisionSubmitResult ||
...@@ -181,10 +191,11 @@ export default { ...@@ -181,10 +191,11 @@ export default {
if (confirmType == "save") { if (confirmType == "save") {
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit() const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit() const merchantSubmitResult =
await this.$refs.multilateralShopMerchant.submit()
const goodsInfoSubmitResult = await this.$refs.goodsInfo.submit() const goodsInfoSubmitResult = await this.$refs.goodsInfo.submit()
// return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult) // return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult)
console.log(merchantSubmitResult, 'merchantSubmitResult') console.log(merchantSubmitResult, "merchantSubmitResult")
if ( if (
!merchantSubmitResult || !merchantSubmitResult ||
!divisionSubmitResult || !divisionSubmitResult ||
......
<template>
<d2-dialog :title="title" :is-visible="redVisible" class="redDialog" width="680px" @closeDialog="handleRedClose" @confirmDialog="handleRedConfirm">
<div class="red-box">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="180px" default-width="400px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="formRules"></glsx-combi-form>
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
import { redReasonOpt } from "@/common/constants.js"
import { invoiceRed } from "@api/invoiceManage"
export default {
name: 'RedDialog',
props: {
redVisible: {
type: Boolean,
default: false
},
redInfo: {
type: Object,
default: () => { }
}
},
data() {
//这里存放数据
return {
title: '冲红',
isBlock: true,
editChildRef: 'editChildRef',
editForm: {
reason: ''
},
formRules: {
reason: [{ required: true, message: '请选择冲红原因', trigger: 'change' }]
},
editFormData: [{
label: "数电票号码",
name: "electronicInvoiceNo",
type: 'showTxt'
}, {
label: "原发票价税合计金额",
name: "amountWithTax",
type: 'showTxt'
}, {
label: "原发票金额(不含税)",
name: "noTaxAmount",
type: 'showTxt'
}, {
label: "原发票税额",
name: "taxAmount",
type: 'showTxt'
}, {
label: "剩余可冲红金额",
name: "noTaxAmount",
type: 'showTxt'
}, {
label: "剩余可冲红税额",
name: "taxAmount",
type: 'showTxt'
}, {
label: "冲红原因",
name: "reason",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "redReasonOpt"
}],
baseData: {
redReasonOpt: deepClone(redReasonOpt)
}
}
},
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 (
item.type === "select" &&
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)
}
}
})
}
},
handleRedClose() {
this.$emit('handleRedClose')
},
handleRedConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
this.$confirm('请确认是否要执行当前操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true
const params = {
electronicInvoiceNo: this.redInfo.electronicInvoiceNo,
reason: this.editForm.reason
}
invoiceRed(params).then(res => {
this.notice.okTips('冲红成功')
this.$emit('handleRedClose', true)
})
}).catch(err => {
console.log(err)
}).finally(() => {
this.loading = false
})
}
})
}
},
mounted() {
this.editForm = deepClone(this.redInfo)
this.getOptionsList('editFormData', false)
}
};
</script>
<style lang='scss' scoped>
</style>
...@@ -67,7 +67,11 @@ export default { ...@@ -67,7 +67,11 @@ export default {
placeholder: String, placeholder: String,
startPlaceholder: String, startPlaceholder: String,
endPlaceholder: String, endPlaceholder: String,
infinity: Boolean infinity: Boolean,
regRuleStr: {
type: String,
default: 'priceReg'
}
}, },
watch: { watch: {
displayValue(val) { displayValue(val) {
...@@ -81,12 +85,12 @@ export default { ...@@ -81,12 +85,12 @@ export default {
}, },
methods: { methods: {
handleStartInput(event) { handleStartInput(event) {
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2) this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2, '', '', this.regRuleStr)
this.oldVal.startInput = this.userInput[0] this.oldVal.startInput = this.userInput[0]
}, },
handleEndInput(event) { handleEndInput(event) {
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2) this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2, '', '', this.regRuleStr)
this.oldVal.endInput = this.userInput[1] this.oldVal.endInput = this.userInput[1]
}, },
handleClickIcon(event) { handleClickIcon(event) {
...@@ -128,6 +132,12 @@ export default { ...@@ -128,6 +132,12 @@ export default {
contrastValue() { contrastValue() {
const val = this.userInput const val = this.userInput
if (Array.isArray(val)) { if (Array.isArray(val)) {
if(val[0] == '-') {
val[0] = null
}
if(val[1] == '-') {
val[1] = null
}
if (+val[0] > +val[1]) { if (+val[0] > +val[1]) {
val[1] = null val[1] = null
this.tipsShow = true this.tipsShow = true
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<div slot="invoiceAmountHtml"> <div slot="invoiceAmountHtml">
<input-range start-placeholder="最小金额" <input-range start-placeholder="最小金额"
end-placeholder="最大金额" end-placeholder="最大金额"
regRuleStr="priceReg_negative_input"
:display-value="searchForm.invoiceAmount"></input-range> :display-value="searchForm.invoiceAmount"></input-range>
</div> </div>
</d2-search> </d2-search>
...@@ -38,9 +39,17 @@ ...@@ -38,9 +39,17 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" <div slot="auth-button" slot-scope="scope">
slot-scope="scope" <span style="margin-right: 10px">
:data="scope.scope" /> <auth-button :data="scope.scope" :show-btn-ids="['9170204']" />
</span>
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170205']" />
</span>
<span style="margin-right: 10px" v-if="['NOT_RED','RED_FAIL'].includes(scope.scope.redFlag) && scope.scope.invoiceType == '1'">
<auth-button :data="scope.scope" :show-btn-ids="['9170206']" />
</span>
</div>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -49,6 +58,8 @@ ...@@ -49,6 +58,8 @@
v-if="detailVisible" v-if="detailVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeDetailDialog" /> @dialogClose="closeDetailDialog" />
<!-- 冲红 -->
<RedDialog :redVisible="redVisible" v-if="redVisible" :redInfo="redInfo" @handleRedClose="handleRedClose"></RedDialog>
</div> </div>
</template> </template>
...@@ -64,11 +75,13 @@ import { ...@@ -64,11 +75,13 @@ import {
import inputRange from './components/inputRange' import inputRange from './components/inputRange'
// import refetchDialog from './components/refetchDialog' // import refetchDialog from './components/refetchDialog'
import invoiceQueryDetailDialog from './components/invoiceQueryDetailDialog' import invoiceQueryDetailDialog from './components/invoiceQueryDetailDialog'
import RedDialog from './components/RedDialog'
export default { export default {
name: 'InvoiceQueryList', name: 'InvoiceQueryList',
components: { components: {
inputRange, inputRange,
invoiceQueryDetailDialog invoiceQueryDetailDialog,
RedDialog
}, },
data() { data() {
return { return {
...@@ -86,7 +99,8 @@ export default { ...@@ -86,7 +99,8 @@ export default {
bizOrderCode: '', bizOrderCode: '',
bizTradeNo: '', bizTradeNo: '',
buyerTaxpayerNum: '', buyerTaxpayerNum: '',
invoiceAmount: [] invoiceAmount: [],
invoiceType: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -173,6 +187,15 @@ export default { ...@@ -173,6 +187,15 @@ export default {
label: '价税合计金额', label: '价税合计金额',
name: 'invoiceAmount', name: 'invoiceAmount',
addHtml: "invoiceAmountHtml" addHtml: "invoiceAmountHtml"
}, {
label: "开票类型",
name: "invoiceType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "InvoicingOpt"
}], }],
getListApi: invoiceInfoPage, getListApi: invoiceInfoPage,
tableParams: { tableParams: {
...@@ -247,10 +270,6 @@ export default { ...@@ -247,10 +270,6 @@ export default {
return this.baseData.invalidFlagOpt.find(item => item.confId === cellValue.invalidFlag)?.confValue return this.baseData.invalidFlagOpt.find(item => item.confId === cellValue.invalidFlag)?.confValue
} }
}, { }, {
label: "开票人",
prop: "drawerName",
width: "120"
}, {
label: '开票类型', label: '开票类型',
prop: 'invoiceType', prop: 'invoiceType',
width: '100px', width: '100px',
...@@ -258,6 +277,10 @@ export default { ...@@ -258,6 +277,10 @@ export default {
return this.baseData.InvoicingOpt.find(item => item.confId === cellValue.invoiceType)?.confValue return this.baseData.InvoicingOpt.find(item => item.confId === cellValue.invoiceType)?.confValue
} }
}, { }, {
label: "开票人",
prop: "drawerName",
width: "120"
}, {
label: '二维码来源', label: '二维码来源',
prop: 'createdSource', prop: 'createdSource',
width: '100px', width: '100px',
...@@ -289,7 +312,9 @@ export default { ...@@ -289,7 +312,9 @@ export default {
InvoicingOpt: deepClone(InvoicingOpt) InvoicingOpt: deepClone(InvoicingOpt)
}, },
recordInfo: null, recordInfo: null,
detailVisible: false detailVisible: false,
redVisible: false,
redInfo: {}
} }
}, },
computed: { computed: {
...@@ -375,7 +400,8 @@ export default { ...@@ -375,7 +400,8 @@ export default {
bizOrderCode: '', bizOrderCode: '',
bizTradeNo: '', bizTradeNo: '',
buyerTaxpayerNum: '', buyerTaxpayerNum: '',
invoiceAmount: [] invoiceAmount: [],
invoiceType: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -472,6 +498,17 @@ export default { ...@@ -472,6 +498,17 @@ export default {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
handleRedClose(isRefresh = false) {
this.redVisible = !this.redVisible
isRefresh && this.handleReset()
},
// 冲红
handleRed(row) {
this.redInfo = row
this.handleRedClose()
},
closeDetailDialog() { closeDetailDialog() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
......
<!-- 发票查询 - 列表 -->
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 20px 20px;">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" :form-data="showFormData"></d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="redTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px" v-if="scope.scope.blueInvoiceDownloadUrl">
<auth-button :data="scope.scope" :show-btn-ids="['9170302']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.redInvoiceDownloadUrl">
<auth-button :data="scope.scope" :show-btn-ids="['9170303']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.code == '9999'">
<auth-button :data="scope.scope" :show-btn-ids="['9170304']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
<!-- 冲红 -->
<RedDialog :redVisible="redVisible" v-if="redVisible" :redInfo="redInfo" @handleRedClose="handleRedClose"></RedDialog>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { redCodeOpt } from "@/common/constants.js"
import {
getInvoiceRedList,
downloadZip,
mergePdf
} from "@api/invoiceManage"
import RedDialog from './components/RedDialog'
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default {
name: 'invoiceRedManage',
mixins: [reportTrackFunMixin], // 导入混入
components: {
RedDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '120px',
searchForm: {
electronicInvoiceNo: '',
pushData: [],
code: '',
tradeNo: '',
buyerName: ''
},
searchFormSearch: {},
showFormData: [{
label: '数电票号码',
name: 'electronicInvoiceNo',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '填开日期',
name: 'pushData',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: "状态",
name: "code",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "redCodeOpt"
}, {
label: '主订单号',
name: 'tradeNo',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '购买方名称',
name: 'buyerName',
type: 'input',
maxlength: '50',
isClear: true
}],
getListApi: getInvoiceRedList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
mutiSelectUniqueKey: 'id',
mutiSelectName: 'transferAccounts',
tableOption: { width: '200px' },
tableColumns: [{
label: '状态',
prop: 'code',
width: '120px',
formatter: (cellValue) => {
return this.baseData.redCodeOpt.find(item => item.confId === cellValue.code)?.confValue
},
className: (cellValue) => {
return {
'9999': 'redSpot',
'0000': 'greenSpot',
'7777': "yellowSpot",
'4999': "ashSpot",
'5999': "deepBlueSpot"
}[cellValue.code]
}
}, {
label: '数电票号码',
prop: 'electronicInvoiceNo',
width: '200px'
}, {
label: '填开日期',
prop: 'pushDate',
width: '180px'
}, {
label: '购买方名称',
prop: 'buyerName'
},
{
label: "主订单号",
prop: "tradeNo",
width: "200"
}, {
label: "失败原因",
prop: "failReason"
}]
},
baseData: {
redCodeOpt: deepClone(redCodeOpt),
},
recordInfo: null,
redVisible: false,
redInfo: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
this.onPageShow()
},
beforeDestroy() {
this.onPageHide()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
getParams() {
var params = deepClone(this.searchForm)
const dateFormatList = [{
attr: 'pushData',
startAttr: 'pushDateStart',
endAttr: 'pushDateEnd',
}]
dateFormatList.forEach(item => {
if (params[item.attr] && params[item.attr].length) {
params[item.startAttr] = Util.dateFormate(params[item.attr][0], 'YYYY-MM-DD 00:00:00')
params[item.endAttr] = Util.dateFormate(params[item.attr][1], 'YYYY-MM-DD 23:59:59')
delete params[item.attr]
}
})
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = this.getParams()
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部'
) {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
'optionList',
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.redTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
electronicInvoiceNo: '',
pushData: [],
code: '',
tradeNo: '',
buyerName: ''
}
this.$refs.redTable.refreshTable(false, true)
},
handleExport() {
var params = this.getParams()
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red.export.async'
const list = [
...this.dowloadList,
{
name: '发票冲红查询导出',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
handleRedClose() {
this.redVisible = !this.redVisible
},
// 冲红
handleRed(row) {
console.log(row)
this.redInfo = row
this.handleRedClose()
},
// 查看蓝票
handleDetailBlue(row) {
if (row.blueInvoiceDownloadUrl) {
window.open(row.blueInvoiceDownloadUrl)
}
},
// 查看红票
handleDetailRed(row) {
if (row.redInvoiceDownloadUrl) {
window.open(row.redInvoiceDownloadUrl)
}
}
}
}
</script>
<style lang="scss" scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.tableHeaderBtn {
margin-left: 10px;
}
.importResult-1 {
width: 100%;
height: 40px;
background: #fff3e8;
color: #ff8d1a;
font-size: 14px;
display: flex;
align-items: center; /* 垂直居中 */
.importResult-1-font {
margin-left: 20px;
}
}
.importResult-2 {
width: 100%;
height: 40px;
background: #d4deef;
color: #2a58ad;
font-size: 14px;
display: flex;
align-items: center; /* 垂直居中 */
.importResult-2-font {
margin-left: 20px;
}
}
</style>
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
<el-form-item label="订单单号:"> <el-form-item label="订单单号:">
{{ detail.orderCode }} {{ detail.orderCode }}
</el-form-item> </el-form-item>
<el-form-item label="第三方订单号:">
{{ detail.thirdOrderCode }}
</el-form-item>
<el-form-item label="订单状态:"> <el-form-item label="订单状态:">
{{ statusOpts[detail.status] }} {{ statusOpts[detail.status] }}
</el-form-item> </el-form-item>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<el-form class="edit-sub-block" <el-form class="edit-sub-block"
label-width="150px" label-width="200px"
:inline="true"> :inline="true">
<el-form-item label="审批编号:"> <el-form-item label="审批编号:">
{{ detailInfo.applyCode ? detailInfo.applyCode : "-" }} {{ detailInfo.applyCode ? detailInfo.applyCode : "-" }}
...@@ -167,12 +167,14 @@ ...@@ -167,12 +167,14 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="examine-record" <div v-if="detailInfo.refundApplyDetailList">
v-if="detailInfo.approveType == 1"> <d2-table :table-params="orderTableParams" :tableData="detailInfo.refundApplyDetailList" :hasPage="false"></d2-table>
</div>
<div class="examine-record">
<div class="title"> <div class="title">
操作记录<el-button type="text" 操作记录<el-button type="text"
class="edit-btn" class="edit-btn"
@click="handleRecordUpdate">编辑</el-button> @click="handleRecordUpdate" v-if="detailInfo.approveType == 1">编辑</el-button>
</div> </div>
<div class="record-div"> <div class="record-div">
<div class="record-div-d" <div class="record-div-d"
...@@ -393,7 +395,57 @@ export default { ...@@ -393,7 +395,57 @@ export default {
} }
] ]
}, },
approveTypeOpt: deepClone(refundExamine_approveTypeOpt) approveTypeOpt: deepClone(refundExamine_approveTypeOpt),
orderTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '子订单编码',
prop: 'subOrderCode'
},
{
label: "商品名称",
prop: "goodsName"
},
{
label: "商品别名",
prop: "goodsAlias"
},
{
label: "商品ID",
prop: "goodsCommodityCode"
},
{
label: "分类",
prop: "upgradeGoodsTypeName"
},
{
label: "售价",
prop: "upgradePrice",
formatter: cellValue => {
return "¥" + cellValue.upgradePrice
}
},
{
label: "数量/件",
prop: "number"
},
{
label: "支付金额",
prop: "totalPrice",
formatter: cellValue => {
return "¥" + cellValue.totalPrice
}
},
{
label: "业务退款金额",
prop: "refundAmount",
formatter: cellValue => {
return "¥" + cellValue.refundAmount
}
}]
},
} }
}, },
methods: { methods: {
...@@ -427,6 +479,9 @@ export default { ...@@ -427,6 +479,9 @@ export default {
item.optPerShow = "发起人" item.optPerShow = "发起人"
item.optTimeShow = "发起时间" item.optTimeShow = "发起时间"
item.optRemarkShow = "备注" item.optRemarkShow = "备注"
if(item.afterStatus == 6) {
item.optShow = "驻店发起"
}
} else if (item.beforeStatus == 0) { } else if (item.beforeStatus == 0) {
item.optShow = "运营审核" item.optShow = "运营审核"
item.optPerShow = "审核人" item.optPerShow = "审核人"
...@@ -516,6 +571,26 @@ export default { ...@@ -516,6 +571,26 @@ export default {
item.optStautsShow = "驳回" item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因" item.optRemarkShow = "驳回原因"
} }
} else if (item.beforeStatus == 7) {
item.optShow = "区域运营审核"
item.optStautsShow = "通过"
item.optPerShow = "审核人"
item.optTimeShow = "审核时间"
item.optRemarkShow = "备注"
if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else if (item.beforeStatus == 8) {
item.optShow = "运营补充"
item.optStautsShow = "通过"
item.optPerShow = "操作人"
item.optTimeShow = "操作时间"
item.optRemarkShow = "备注"
if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else { } else {
item.isShow = item.beforeStatus == item.afterStatus item.isShow = item.beforeStatus == item.afterStatus
if (item.beforeStatus == item.afterStatus) { if (item.beforeStatus == item.afterStatus) {
...@@ -728,7 +803,7 @@ export default { ...@@ -728,7 +803,7 @@ export default {
.el-form-item__content { .el-form-item__content {
display: inline-block; display: inline-block;
width: calc(100% - 150px); width: calc(100% - 200px);
line-height: 24px; line-height: 24px;
} }
......
<template> <template>
<el-dialog title="请选择退款明细" :visible.sync="refundVisible" :before-close="handleClose" <el-dialog
:close-on-click-modal="false" width="70%" class="relateStore"> title="请选择退款明细"
:visible.sync="refundVisible"
:before-close="handleClose"
:close-on-click-modal="false"
width="70%"
class="relateStore"
>
<div> <div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange" <el-table
@select-all="handleAll"> ref="seletingTable"
<el-table-column :selectable="selectableFn" type="selection" width="55" align="center" /> :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"> <template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center"> <el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope"> <span slot-scope="scope">
{{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }} {{
scope.row[item.prop]
? item.unit
? item.unit + scope.row[item.prop]
: scope.row[item.prop]
: "-"
}}
</span> </span>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
<div class="total">可选可退总价:<div class="price">¥{{ total }}</div></div> <div class="total">
可选可退总价:
<div class="price">¥{{ total }}</div>
</div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button> <el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="handleConfirm" :disabled="!refundSubOrderCode">下一步</el-button> <el-button
type="primary"
@click="handleConfirm"
:disabled="!refundSubOrderCode"
>下一步</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -25,49 +56,52 @@ ...@@ -25,49 +56,52 @@
<script> <script>
import { goodsSubOrder } from "@api/order" import { goodsSubOrder } from "@api/order"
export default { export default {
name: 'refundDetail', name: "refundDetail",
data() { data() {
return { return {
tableData: [], tableData: [],
tableColumn: [ tableColumn: [
{ {
label: '子订单编码', label: "子订单编码",
prop: 'subOrderCode' prop: "subOrderCode"
}, },
{ {
label: '商品名称', label: "商品名称",
prop: 'goodsName' prop: "goodsName"
}, },
{ {
label: '商品别名', label: "商品别名",
prop: 'goodsAlias' prop: "goodsAlias"
}, },
{ {
label: '商品ID', label: "商品ID",
prop: 'goodsCommodityCode' prop: "goodsCommodityCode"
}, },
{ {
label: '分类', label: "分类",
prop: 'upgradeGoodsTypeName' prop: "upgradeGoodsTypeName"
}, },
{ {
label: '售价', label: "售价",
prop: 'upgradePrice', prop: "upgradePrice",
unit: '¥' unit: "¥"
}, },
{ {
label: '数量/件', label: "数量/件",
prop: 'number' prop: "number"
}, },
{ {
label: '支付金额', label: "支付金额",
prop: 'totalPrice', prop: "totalPrice",
unit: '¥' unit: "¥"
} }
], ],
total: 0, total: 0,
refundSubOrderCode: '', refundSubOrderCode: "",
isAll: false refundApplyDetailList: [],
isAll: false,
// 是否只有一个子订单并且未退过款的
isOneSubFirst: false
} }
}, },
props: { props: {
...@@ -96,35 +130,40 @@ export default { ...@@ -96,35 +130,40 @@ export default {
async getList(orderCode) { async getList(orderCode) {
const res = await goodsSubOrder({ orderCode }) const res = await goodsSubOrder({ orderCode })
this.tableData = res this.tableData = res
this.isOneSubFirst = this.tableData.length == 1 && this.tableData.every(item => item.status == 1)
this.$refs.seletingTable.toggleAllSelection() this.$refs.seletingTable.toggleAllSelection()
}, },
handleChange(selection) { handleChange(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length this.isAll = selection.length == this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
handleAll(selection) { handleAll(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length this.isAll = selection.length == this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
getParams(selection) { getParams(selection) {
let _total = 0 let _total = 0
let _refundSubOrderCode = [] let _refundSubOrderCode = []
selection.forEach(item => { selection.forEach((item, idx) => {
_total += item.totalPrice _total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode) _refundSubOrderCode.push(item.subOrderCode)
this.$set(selection[idx], 'refundAmount', item.totalPrice)
}) })
this.total = _total this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join('/') this.refundSubOrderCode = _refundSubOrderCode.join("/")
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const {refundSubOrderCode, total, isAll} = this const { refundSubOrderCode, refundApplyDetailList, total, isAll, isOneSubFirst } = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode, refundSubOrderCode,
isAll isAll,
refundApplyDetailList,
isOneSubFirst
}) })
}, },
handleClose() { handleClose() {
...@@ -141,7 +180,7 @@ export default { ...@@ -141,7 +180,7 @@ export default {
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
.price { .price {
color: #2A58AD; color: #2a58ad;
margin-left: 10px; margin-left: 10px;
} }
} }
......
<!-- 修改备注 -->
<template>
<d2-dialog title="查看技师施工图" :is-visible="remarkVisible" class="accountDailog" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm" :noCancel="true" btnOkLabel="返回">
<el-form ref="refundForm" :model="infoForm" :rules="formRules" label-width="150px">
<el-form-item label="技师姓名:">
{{ infoForm.technicianName }}
</el-form-item>
<el-form-item label="子商品名称:">
{{ infoForm.upgradeGoodsName }}
</el-form-item>
<el-form-item label="审核状态:">
<span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' :
'未通过' }}</span>
</el-form-item>
<el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" @click="
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto', index)
" :key="index" :src="item" alt="">
</el-form-item>
</el-form>
<el-image-viewer v-if="imgVisible" :mask-closable="true" zIndex="3000" :on-close="closeImgViewer"
:url-list="imgList" :initial-index="initialIndex" />
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'technicianDialog',
components: {
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
// remark: ''
},
imgVisible: false,
index: 0,
initialIndex: 0,
imgList: [],
imgUrlName: "",
formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
}
}
},
props: {
remarkVisible: {
type: Boolean,
default: false
},
detail: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
mounted() {
this.infoForm = deepClone(this.detail)
},
methods: {
closeImgViewer() {
this.imgVisible = false
},
handleEnlargeImg(url, name, index) {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.initialIndex = index
this.imgList = url
this.imgUrlName = name
},
handleAddConfirm() {
this.handleClose(true)
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style scoped lang="scss">
.accountDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
::v-deep .el-textarea .el-input__count {
right: 10px;
bottom: -7px;
font-size: 12px;
color: #999999;
background-color: transparent;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
.imgItem {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
padding: 0 10px;
::v-deep .el-form-item__content {
margin-left: 0 !important;
}
}
.img {
width: 120px;
height: 120px;
margin-left: 10px;
}
// .img {}
.status {
color: #2A58AD;
}
</style>
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9040804']" /> :show-btn-ids="['9040804']" />
</span> </span>
<!-- 补充 -->
<span style="margin-right: 10px;" v-if="scope.scope.status == 8 && !scope.scope.oaApproveStatus">
<auth-button :data="scope.scope"
:show-btn-ids="['9040810']" />
</span>
<!-- 审核 --> <!-- 审核 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="(scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2) && scope.scope.approveType == 1"> v-if="(scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2) && scope.scope.approveType == 1">
...@@ -62,7 +67,7 @@ ...@@ -62,7 +67,7 @@
</span> </span>
<!-- 下载 --> <!-- 下载 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="scope.scope.approveType == 1"> v-if="scope.scope.approveType == 1 && ![7, 8].includes(scope.scope.status)">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9040808']" /> :show-btn-ids="['9040808']" />
<span v-if="scope.scope.downCount != 0" <span v-if="scope.scope.downCount != 0"
...@@ -93,25 +98,36 @@ ...@@ -93,25 +98,36 @@
v-if="settlementVisible" v-if="settlementVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="settlementDialogClose" /> @dialogClose="settlementDialogClose" />
<!-- 补充 - 退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
title="运营补充"
:detail="refundDetail"
:order-type="1"
:scene="refundScene"
v-if="signRefundVisible"
@dialogClose="refundDialogClose" />
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { refundExamine_status, refundExamine_approveTypeOpt, oaApproveStatusOpt } from '@/common/constants.js' import { refundExamine_status, refundExamine_approveTypeOpt, oaApproveStatusOpt, refundOrderSourceOpt } from '@/common/constants.js'
import examineDialog from './components/examineDialog' import examineDialog from './components/examineDialog'
import rejectDialog from './components/rejectDialog' import rejectDialog from './components/rejectDialog'
import detailDialog from './components/detailDialog' import detailDialog from './components/detailDialog'
import settlementDialog from './components/settlementDialog' import settlementDialog from './components/settlementDialog'
import { getPlatformMerchant, refundApplyRecordPage, downloadPdf } from '@api/refundExamine' import newSignRefundDialog from "./components/newSignRefundDialog"
import { getPlatformMerchant, refundApplyRecordPage, downloadPdf, getOrderDefaultInfo } from '@api/refundExamine'
export default { export default {
name: 'RefundExamine', name: 'RefundExamine',
components: { components: {
examineDialog, examineDialog,
rejectDialog, rejectDialog,
detailDialog, detailDialog,
settlementDialog settlementDialog,
newSignRefundDialog
}, },
data() { data() {
return { return {
...@@ -127,7 +143,8 @@ export default { ...@@ -127,7 +143,8 @@ export default {
payee: '', payee: '',
applyTime: '', applyTime: '',
approveType: '', approveType: '',
oaApproveStatus: '' oaApproveStatus: '',
refundOrderSource: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -213,6 +230,14 @@ export default { ...@@ -213,6 +230,14 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'approveTypeOpt' optionsName: 'approveTypeOpt'
}, {
label: '退款单来源',
name: 'refundOrderSource',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'refundOrderSourceOpt'
}], }],
getListApi: refundApplyRecordPage, getListApi: refundApplyRecordPage,
tableParams: { tableParams: {
...@@ -230,6 +255,13 @@ export default { ...@@ -230,6 +255,13 @@ export default {
prop: 'oaSpNo', prop: 'oaSpNo',
width: '150px' width: '150px'
}, { }, {
label: '退款单来源',
prop: 'refundOrderSource',
width: '100px',
formatter: (cellValue) => {
return this.baseData.refundOrderSourceOpt.find(item => item.confId === cellValue.refundOrderSource)?.confValue
}
}, {
label: '标题', label: '标题',
prop: 'title', prop: 'title',
width: '200px' width: '200px'
...@@ -299,7 +331,7 @@ export default { ...@@ -299,7 +331,7 @@ export default {
}, { }, {
label: '嘀加审批状态', label: '嘀加审批状态',
prop: 'status', prop: 'status',
width: '110px', width: '120px',
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue
}, },
...@@ -310,7 +342,10 @@ export default { ...@@ -310,7 +342,10 @@ export default {
2: 'blueSpot', 2: 'blueSpot',
3: 'blueSpot', 3: 'blueSpot',
4: 'greenSpot', 4: 'greenSpot',
5: 'redSpot' 5: 'redSpot',
6: 'blueSpot',
7: 'blueSpot',
8: 'blueSpot',
}[cellValue.status] }[cellValue.status]
} }
}, { }, {
...@@ -342,7 +377,8 @@ export default { ...@@ -342,7 +377,8 @@ export default {
statusList: deepClone(refundExamine_status), statusList: deepClone(refundExamine_status),
approveTypeOpt: deepClone(refundExamine_approveTypeOpt), approveTypeOpt: deepClone(refundExamine_approveTypeOpt),
oaApproveStatusOpt: deepClone(oaApproveStatusOpt), oaApproveStatusOpt: deepClone(oaApproveStatusOpt),
platformMerchantIdList: [] platformMerchantIdList: [],
refundOrderSourceOpt: deepClone(refundOrderSourceOpt)
}, },
infos: [], infos: [],
...@@ -352,7 +388,10 @@ export default { ...@@ -352,7 +388,10 @@ export default {
rejectType: '', rejectType: '',
detailVisible: false, detailVisible: false,
recordInfo: {}, recordInfo: {},
settlementVisible: false settlementVisible: false,
signRefundVisible: false,
refundScene: '',
refundDetail: {}
} }
}, },
computed: { computed: {
...@@ -435,7 +474,8 @@ export default { ...@@ -435,7 +474,8 @@ export default {
status: '', status: '',
matchBizOrderCode: '', matchBizOrderCode: '',
approveType: '', approveType: '',
oaApproveStatus: '' oaApproveStatus: '',
refundOrderSource: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -579,6 +619,48 @@ export default { ...@@ -579,6 +619,48 @@ export default {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
// 补充
handleSupple(row) {
if(!row.refundApplyOrderRefList) {
this.$message.error('没有子订单信息')
return true
}
var params = {
orderCode: row.refundApplyOrderRefList[0].bizOrderCode,
applyCode: row.applyCode
}
getOrderDefaultInfo(params).then((res) => {
console.log(res, '000')
this.refundDetail = deepClone(res)
let info = res.refundApplyRecordInfo
let total = 0
info.refundApplyDetailList.forEach((item) => {
total += item.totalPrice
})
this.refundScene = row.refundApplyOrderRefList[0].sceneType + ''
this.refundDetail.totalPrice = info.refundableTotalPrice
this.refundDetail.applyCode = row.applyCode
this.refundDetail.total = total
this.refundDetail.id = info.id
this.refundDetail.refundSubOrderCode = info.refundSubOrderCode
this.refundDetail.refundApplyDetailList = deepClone(info.refundApplyDetailList)
this.refundDetail.isAll = res?.refundApplyRecordInfo.refundType == 1
this.refundDetail.isOneSubFirst = false
this.refundDetail.orderCode = row.refundApplyOrderRefList[0].bizOrderCode
console.log(this.refundDetail, this.refundScene, 'refundDetail---')
this.refund()
})
},
refund() {
this.signRefundVisible = !this.signRefundVisible
},
refundDialogClose(flag) {
this.signRefundVisible = !this.signRefundVisible
if (flag) {
this.$refs.recordTable.refreshTable()
}
},
// 财务结算 // 财务结算
handleSettlement(row) { handleSettlement(row) {
this.recordInfo = row this.recordInfo = row
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
> >
<div class="detail-content"> <div class="detail-content">
<div class="form_div"> <div class="form_div">
<el-form class="edit-sub-block" label-width="140px" :inline="true"> <el-form class="edit-sub-block" label-width="100px" :inline="true">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="客户:"> <el-form-item label="客户:">
......
...@@ -67,7 +67,10 @@ export default { ...@@ -67,7 +67,10 @@ export default {
], ],
total: 0, total: 0,
refundSubOrderCode: '', refundSubOrderCode: '',
isAll: false refundApplyDetailList: [],
isAll: false,
// 是否只有一个子订单并且未退过款的
isOneSubFirst: false
} }
}, },
props: { props: {
...@@ -96,6 +99,7 @@ export default { ...@@ -96,6 +99,7 @@ export default {
async getList(orderCode) { async getList(orderCode) {
const res = await getGoodsSubOrder({ orderCode }) const res = await getGoodsSubOrder({ orderCode })
this.tableData = res this.tableData = res
this.isOneSubFirst = this.tableData.length == 1 && this.tableData.every(item => item.status == 1)
this.$refs.seletingTable.toggleAllSelection() this.$refs.seletingTable.toggleAllSelection()
}, },
handleChange(selection) { handleChange(selection) {
...@@ -115,16 +119,19 @@ export default { ...@@ -115,16 +119,19 @@ export default {
_total += item.totalPrice _total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode) _refundSubOrderCode.push(item.subOrderCode)
}) })
this.total = _total this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join('/') this.refundSubOrderCode = _refundSubOrderCode.join('/')
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const {refundSubOrderCode, total, isAll} = this const {refundSubOrderCode, refundApplyDetailList, total, isAll, isOneSubFirst} = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode, refundSubOrderCode,
isAll isAll,
refundApplyDetailList,
isOneSubFirst
}) })
}, },
handleClose() { handleClose() {
......
...@@ -108,6 +108,16 @@ ...@@ -108,6 +108,16 @@
<div class="max-value">可退金额:{{refundInfo.total}}</div> <div class="max-value">可退金额:{{refundInfo.total}}</div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<el-form :model="refundInfo" :rules="tableRules" ref="refundTableForm" class="refund-table">
<d2-table ref="recordTable" :table-params="orderTableParams" :tableData="refundInfo.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount">
<el-input v-model="refundInfo.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" @input="handleInput(scope.index, 'refundAmount')">
</el-input>
</el-form-item>
</div>
</d2-table>
</el-form>
</d2-dialog> </d2-dialog>
<refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail> <refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail>
</div> </div>
...@@ -117,6 +127,7 @@ ...@@ -117,6 +127,7 @@
<script> <script>
import refundDetail from './components/refundDetail' import refundDetail from './components/refundDetail'
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { limitPrice } from "@/common/format"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import detailDialog from "./components/detailDialog" import detailDialog from "./components/detailDialog"
import { MessageBox } from "element-ui" import { MessageBox } from "element-ui"
...@@ -405,7 +416,38 @@ export default { ...@@ -405,7 +416,38 @@ export default {
], ],
refundDetailVisible: false, refundDetailVisible: false,
dataInfo: {}, dataInfo: {},
refundInfo: {} refundInfo: {},
refundOldData: [],
tableRules: {
refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' },
]
},
orderTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '子订单编码',
prop: 'subOrderCode'
},
{
label: "商品别名",
prop: "goodsAlias"
},
{
label: "支付金额",
prop: "totalPrice",
formatter: cellValue => {
return "¥" + cellValue.totalPrice
}
},
{
label: "业务退款金额",
prop: "refundAmount",
addHtml: 'tableRefundAmount'
}]
},
} }
}, },
computed: { computed: {
...@@ -679,11 +721,24 @@ export default { ...@@ -679,11 +721,24 @@ export default {
handleRefundDetailClose() { handleRefundDetailClose() {
this.refundDetailVisible = false this.refundDetailVisible = false
}, },
handleInput(rowIdx, attr) {
const targerItem = this.refundInfo.refundApplyDetailList[rowIdx]
const val = targerItem[attr]
const oldVal = this.refundOldData[rowIdx][attr]
this.refundInfo.refundApplyDetailList[rowIdx][attr] = limitPrice(val, oldVal, 9, 2, '', targerItem.totalPrice)
this.refundOldData[rowIdx][attr] = this.refundInfo.refundApplyDetailList[rowIdx][attr]
},
handleConfirm(val) { handleConfirm(val) {
console.log(val, '=====') console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total this.refundInfo.total = val.total.toFixed(2)
this.refundInfo.isAll = val.isAll this.refundInfo.isAll = val.isAll
this.refundInfo.isOneSubFirst = val.isOneSubFirst
this.refundInfo.refundApplyDetailList = val.refundApplyDetailList
this.refundInfo.refundApplyDetailList.forEach((k, idx) => {
this.$set(this.refundInfo.refundApplyDetailList[idx], 'refundAmount', k.totalPrice)
})
this.refundOldData = deepClone(this.refundInfo.refundApplyDetailList)
this.refundForm.refundType = val.isAll ? 1 : 2 this.refundForm.refundType = val.isAll ? 1 : 2
this.refundFormData[0].isDisabled = true this.refundFormData[0].isDisabled = true
this.handleRefund(this.refundInfo) // 原来的逻辑 this.handleRefund(this.refundInfo) // 原来的逻辑
...@@ -729,6 +784,8 @@ export default { ...@@ -729,6 +784,8 @@ export default {
this.findAttrIdx("refundType") this.findAttrIdx("refundType")
].optionList[0].isDisabled = true ].optionList[0].isDisabled = true
} }
console.log(this.refundInfo, 'this.refundInfo---')
this.refundFormData[this.findAttrIdx("refundType")].isDisabled = !this.refundInfo.isOneSubFirst
this.updateDisable() this.updateDisable()
}) })
}, },
...@@ -755,8 +812,20 @@ export default { ...@@ -755,8 +812,20 @@ export default {
handleRefundConfirm() { handleRefundConfirm() {
if (this.isRefund) { if (this.isRefund) {
this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => { this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => {
if (valid) { this.$refs.refundTableForm.validate((tableValid) => {
if (valid && tableValid) {
this.isRefund = false this.isRefund = false
let refundApplyDetailList = []
if (this.refundInfo?.refundApplyDetailList) {
this.refundInfo.refundApplyDetailList.forEach(item => {
refundApplyDetailList.push({
orderCode: item.orderCode,
subOrderCode: item.subOrderCode,
totalPrice: item.totalPrice,
refundAmount: item.refundAmount
})
})
}
markAsRefunded({ markAsRefunded({
orderCode: this.refundForm.orderCode, orderCode: this.refundForm.orderCode,
refundType: this.refundForm.refundType, refundType: this.refundForm.refundType,
...@@ -765,7 +834,8 @@ export default { ...@@ -765,7 +834,8 @@ export default {
employeeUserId: this.refundForm.employeeUserId, employeeUserId: this.refundForm.employeeUserId,
employeeName: this.refundForm.employeeName, employeeName: this.refundForm.employeeName,
refundSubOrderCode: this.refundForm.refundSubOrderCode, refundSubOrderCode: this.refundForm.refundSubOrderCode,
refundableTotalPrice: this.refundForm.refundableTotalPrice refundableTotalPrice: this.refundForm.refundableTotalPrice,
refundApplyDetailList: refundApplyDetailList
}) })
.then((res) => { .then((res) => {
if (res) { if (res) {
...@@ -780,6 +850,7 @@ export default { ...@@ -780,6 +850,7 @@ export default {
}) })
} }
}) })
})
} }
}, },
//刷新 //刷新
...@@ -887,6 +958,13 @@ export default { ...@@ -887,6 +958,13 @@ export default {
::v-deep .el-dialog__footer { ::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
} }
.max-value { .max-value {
margin-left: 220px; margin-left: 220px;
......
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
/> />
</div> </div>
</div> </div>
<el-link class="copy-btn" icon="el-icon-download" :underline="false" :href="detailObj.fileUrl" target="_blank">打开链接</el-link>
<div <div
v-if="detailObj.bussinessType!=2"
class="copy-btn" class="copy-btn"
@click="copyText" @click="copyText"
:data-track="JSON.stringify(copyTrack)" :data-track="JSON.stringify(copyTrack)"
...@@ -79,7 +81,7 @@ ...@@ -79,7 +81,7 @@
class="icon" class="icon"
src="@/assets/copy.png" src="@/assets/copy.png"
/> />
音频链接 分享链接
</div> </div>
</div> </div>
<div <div
...@@ -194,6 +196,7 @@ export default { ...@@ -194,6 +196,7 @@ export default {
} }
}, },
mounted () { mounted () {
console.log(this.detailObj, '=============')
this.conversationDetailPage() this.conversationDetailPage()
this.myAud = document.getElementById("audio1") this.myAud = document.getElementById("audio1")
...@@ -363,6 +366,7 @@ export default { ...@@ -363,6 +366,7 @@ export default {
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
font-weight: 400;
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
......
...@@ -67,10 +67,11 @@ ...@@ -67,10 +67,11 @@
<img src="@/assets/pause.png" /> <img src="@/assets/pause.png" />
</div> </div>
<div>{{ currentTime }}</div> <div>{{ currentTime }}</div>
<div class="copy-btn" @click="copyText" :data-track="JSON.stringify(copyTrack)" <el-link class="copy-btn" icon="el-icon-download" :underline="false" :href="qualityDetailList[currentNum].fileUrl" target="_blank">打开链接</el-link>
<div v-if="qualityDetailList[currentNum].bussinessType!=2" class="copy-btn" @click="copyText" :data-track="JSON.stringify(copyTrack)"
data-event-code="audio_link"> data-event-code="audio_link">
<img class="icon" src="@/assets/copy.png" /> <img class="icon" src="@/assets/copy.png" />
音频链接 分享链接
</div> </div>
</div> </div>
</div> </div>
...@@ -514,6 +515,7 @@ export default { ...@@ -514,6 +515,7 @@ export default {
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
font-weight: 400;
.icon { .icon {
width: 16px; width: 16px;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
label-width="110px" label-width="130px"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :form-data="showFormData"
> >
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
:display-value="searchForm.AbnormalProportion" :display-value="searchForm.AbnormalProportion"
></el-input-range> ></el-input-range>
</div> </div>
<div slot="orderTransactionAmount">
<el-input
type="text"
v-model="searchForm.orderTransactionAmount"
@blur="
validateNumber(searchForm, 'orderTransactionAmount', 99999)
"
placeholder="请输入"
class="input-width"
></el-input>
</div>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button <el-button
...@@ -212,6 +223,7 @@ import { ...@@ -212,6 +223,7 @@ import {
exportReclistList, exportReclistList,
receptionStaffStatic receptionStaffStatic
} from "@api/resident" } from "@api/resident"
import { getBrandList } from "@/api/scene.js"
import VoiceDialog from "./VoiceDialog" import VoiceDialog from "./VoiceDialog"
import dayjs from "dayjs" import dayjs from "dayjs"
import reportTrackFunMixin from "@/mixins/reportTrackFunMixin" import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
...@@ -332,7 +344,59 @@ export default { ...@@ -332,7 +344,59 @@ export default {
optionId: "id", optionId: "id",
optionLabel: "name", optionLabel: "name",
optionsName: "sceneTypeList" optionsName: "sceneTypeList"
},
{
label: "品牌",
name: "carBrandIds",
type: "select",
multiple: true,
isClear: true,
collapseTags: true,
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "brandList"
},
{
label: "是否成交",
name: "orderTransactionFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "orderTransactionList"
},
{
label: "客户类型",
name: "enterpriseCustomerFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "enterpriseCustomerList"
},
{
label: "客户姓名",
name: "customerName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "是否成交(安心包)",
name: "orderAxbTransactionFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "orderAxTransactionList"
},
{
label: "成交金额大于",
name: "orderTransactionAmount",
addHtml: "orderTransactionAmount"
} }
// { // {
// label: "当日到店量", // label: "当日到店量",
// name: "toStoreCount", // name: "toStoreCount",
...@@ -352,7 +416,13 @@ export default { ...@@ -352,7 +416,13 @@ export default {
phoneNumber: "", phoneNumber: "",
// toStoreCount: [], // toStoreCount: [],
qualityTestScore: [], qualityTestScore: [],
AbnormalProportion: [] AbnormalProportion: [],
enterpriseCustomerFlag: "",
orderAxbTransactionFlag: "",
orderTransactionAmount: "",
orderTransactionFlag: "",
customerName: "",
carBrandIds: []
}, },
searchFormSearch: {}, searchFormSearch: {},
tableList: [], tableList: [],
...@@ -646,7 +716,38 @@ export default { ...@@ -646,7 +716,38 @@ export default {
id: 2, id: 2,
name: "轻改" name: "轻改"
} }
] ],
enterpriseCustomerList: [
{
id: 1,
name: "企业客户"
},
{
id: 2,
name: "非企业客户"
}
],
orderAxTransactionList: [
{
id: 1,
name: "是"
},
{
id: 0,
name: "否"
}
],
orderTransactionList: [
{
id: 1,
name: "是"
},
{
id: 0,
name: "否"
}
],
brandList: []
}, },
staffStatic: {}, staffStatic: {},
voiceVisible: false, voiceVisible: false,
...@@ -682,11 +783,51 @@ export default { ...@@ -682,11 +783,51 @@ export default {
}, },
mounted() { mounted() {
this.getOptionsList() this.getOptionsList()
this.getOptionsList(true, "orderAxTransactionList")
this.getOptionsList(true, "enterpriseCustomerList")
this.getOptionsList(true, "orderTransactionList")
this.getServiceStore() this.getServiceStore()
this.getSaasList() this.getSaasList()
this.getBrandList()
this.receptionStaffStatic() this.receptionStaffStatic()
}, },
methods: { methods: {
// validateNumber(item, field, maxLimit) {
// let value = item[field]
// value = parseInt(value)
// if (isNaN(value)) value = ""
// if (parseInt(value) > maxLimit) {
// value = maxLimit
// }
// if (parseInt(value) < 0) {
// value = 0
// }
// console.log(value)
// console.log(item[value])
// this.$set(item, field, value)
// },
validateNumber(item, field, maxLimit = 99999) {
let value = item[field]
if (!/^(\d+)(\.\d+)?$/.test(value)) {
value = String(value).slice(0, -1) // 移除最后一个非法字符
}
// 转换为浮点数进行校验
const numValue = parseFloat(value)
if (isNaN(numValue)) {
value = ""
} else if (numValue < 0) {
value = "0"
} else if (numValue > maxLimit) {
value = maxLimit.toString()
} else {
value = numValue.toString()
}
this.$set(item, field, value)
},
getSaasList() { getSaasList() {
getList({ getList({
pageSize: 10000, pageSize: 10000,
...@@ -696,6 +837,22 @@ export default { ...@@ -696,6 +837,22 @@ export default {
this.getOptionsList(true, "parkServiceList") this.getOptionsList(true, "parkServiceList")
}) })
}, },
getBrandList() {
const brandList = []
getBrandList({ containsChildren: true }).then((res) => {
res.map((e) => {
if (e && e.children && e.children.length) {
e.children.map((i) => {
i.brandId = e.id
brandList.push(i)
})
}
})
this.baseData.brandList = brandList
this.getOptionsList(false, "brandList")
})
},
getServiceStore(merchantId) { getServiceStore(merchantId) {
listShop4sByRef({ listShop4sByRef({
yqMerchantId: merchantId yqMerchantId: merchantId
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>{{ queryData.employeeName || "-" }} <span
{{ queryData.phoneNumber || "" }}</span> >{{ queryData.employeeName || "-" }}
{{ queryData.phoneNumber || "" }}</span
>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
...@@ -79,7 +81,9 @@ ...@@ -79,7 +81,9 @@
@click="handleReset" @click="handleReset"
:data-track="JSON.stringify(searchForm)" :data-track="JSON.stringify(searchForm)"
data-event-code="reception_list_search" data-event-code="reception_list_search"
> 重置 </el-button> >
重置
</el-button>
</div> </div>
<div class="content-table"> <div class="content-table">
<d2-table <d2-table
...@@ -92,19 +96,13 @@ ...@@ -92,19 +96,13 @@
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@pageChange="pageChange" @pageChange="pageChange"
> >
<div <div slot="durationHtml" slot-scope="scope">
slot="durationHtml"
slot-scope="scope"
>
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div <div slot="scoreHtml" slot-scope="scope">
slot="scoreHtml"
slot-scope="scope"
>
<!-- <template v-if="scope.scope.bussinessType != 2"> --> <!-- <template v-if="scope.scope.bussinessType != 2"> -->
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
...@@ -113,58 +111,56 @@ ...@@ -113,58 +111,56 @@
<!-- </template> <!-- </template>
<template v-else>-</template> --> <template v-else>-</template> -->
</div> </div>
<div <div slot="estimatedResult" slot-scope="scope">
slot="estimatedResult"
slot-scope="scope"
>
<!-- v-if="scope.scope.bussinessType != 2" --> <!-- v-if="scope.scope.bussinessType != 2" -->
<div :class="['tag', setTagColor(scope.scope.estimatedResult)]"> <div :class="['tag', setTagColor(scope.scope.estimatedResult)]">
{{ scope.scope.estimatedResult }} {{ scope.scope.estimatedResult }}
</div> </div>
<!-- <div v-else></div> --> <!-- <div v-else></div> -->
</div> </div>
<div <div slot="defencePoint" slot-scope="scope">
slot="defencePoint"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint ? scope.scope.defencePoint : "-" scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template> }}</template>
<template v-else-if=" <template
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
">分析中</template> "
<template v-else-if="scope.scope.defence === 3">未发现攻防</template> >分析中</template
>
<template v-else-if="scope.scope.defence === 3"
>未发现攻防</template
>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<div <div slot="customerTypeName" slot-scope="scope">
slot="customerTypeName"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName scope.scope.customerTypeName
? scope.scope.customerTypeName ? scope.scope.customerTypeName
: "-" : "-"
}}</template> }}</template>
<template v-else-if=" <template
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
">分析中</template> "
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template> <template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<template <template slot="auth-button" slot-scope="scope">
slot="auth-button"
slot-scope="scope"
>
<el-button <el-button
type="text" type="text"
@click="qualitDetail(scope.scope)" @click="qualitDetail(scope.scope)"
:data-track="JSON.stringify({ :data-track="
batchId:scope.scope.id JSON.stringify({
})" batchId: scope.scope.id
})
"
data-event-code="reception_detail" data-event-code="reception_detail"
> >
接待详情 接待详情
...@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range" ...@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range"
import QualityDetail from "./qualityDetail.vue" import QualityDetail from "./qualityDetail.vue"
import NewQualityDetail from "./newQualityDetail.vue" import NewQualityDetail from "./newQualityDetail.vue"
import { conversationPage } from "@api/resident" import { conversationPage } from "@api/resident"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin' import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
export default { export default {
mixins: [reportTrackFunMixin], mixins: [reportTrackFunMixin],
props: { props: {
queryData: Object, queryData: Object,
show: Boolean show: Boolean
}, },
data () { data() {
return { return {
isQualityVisible: false, isQualityVisible: false,
isNewQualityVisible: false, isNewQualityVisible: false,
...@@ -259,14 +255,14 @@ export default { ...@@ -259,14 +255,14 @@ export default {
{ {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter (row) { formatter(row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter (row) { formatter(row) {
let result = { let result = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
...@@ -303,7 +299,7 @@ export default { ...@@ -303,7 +299,7 @@ export default {
label: "安心包是否开口", label: "安心包是否开口",
prop: "axbOpenFlag", prop: "axbOpenFlag",
width: 130, width: 130,
formatter (row) { formatter(row) {
return row.axbOpenFlag ? "是" : "否" return row.axbOpenFlag ? "是" : "否"
} }
}, },
...@@ -311,7 +307,7 @@ export default { ...@@ -311,7 +307,7 @@ export default {
label: "安心包是否成交", label: "安心包是否成交",
prop: "isFinishFlag", prop: "isFinishFlag",
width: 130, width: 130,
formatter (row) { formatter(row) {
return row.finishFlag ? "是" : "否" return row.finishFlag ? "是" : "否"
} }
}, },
...@@ -344,8 +340,8 @@ export default { ...@@ -344,8 +340,8 @@ export default {
qualityDetailList: [], qualityDetailList: [],
currentNum: 0, currentNum: 0,
batchNum: null, batchNum: null,
track_event_code: 'reception_detail_list', track_event_code: "reception_detail_list",
track_businessParam_key: 'searchForm' track_businessParam_key: "searchForm"
} }
}, },
components: { components: {
...@@ -355,14 +351,14 @@ export default { ...@@ -355,14 +351,14 @@ export default {
}, },
watch: { watch: {
show: { show: {
handler (val) { handler(val) {
if (val) this.onPageShow() if (val) this.onPageShow()
else this.onPageHide() else this.onPageHide()
}, },
immediate: true immediate: true
} }
}, },
mounted () { mounted() {
this.getOptionsList() this.getOptionsList()
let timer = setInterval(() => { let timer = setInterval(() => {
if (timer && this.batchNum != null) { if (timer && this.batchNum != null) {
...@@ -374,7 +370,7 @@ export default { ...@@ -374,7 +370,7 @@ export default {
}, 1e3) }, 1e3)
}, },
methods: { methods: {
toMinutesAndSeconds (seconds) { toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = "" let formattedTime = ""
if (seconds < 60) { if (seconds < 60) {
...@@ -395,10 +391,10 @@ export default { ...@@ -395,10 +391,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch () { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -406,9 +402,9 @@ export default { ...@@ -406,9 +402,9 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
closeDialog () { closeDialog() {
if(this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide() if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if(this.$refs.newQualityDetail) { if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause() this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide() this.$refs.newQualityDetail.onPageHide()
} }
...@@ -416,7 +412,7 @@ export default { ...@@ -416,7 +412,7 @@ export default {
this.isNewQualityVisible = false this.isNewQualityVisible = false
this.onPageShow() this.onPageShow()
}, },
qualitDetail (row) { qualitDetail(row) {
const list = this.$refs.recepDetail.data, const list = this.$refs.recepDetail.data,
currentNum = list.findIndex((e) => e.id == row.id) currentNum = list.findIndex((e) => e.id == row.id)
this.currentNum = currentNum this.currentNum = currentNum
...@@ -428,7 +424,7 @@ export default { ...@@ -428,7 +424,7 @@ export default {
} }
this.onPageHide() this.onPageHide()
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
const { queryData } = this const { queryData } = this
if (!this.searchForm.recepTime.length) if (!this.searchForm.recepTime.length)
...@@ -471,13 +467,13 @@ export default { ...@@ -471,13 +467,13 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun (data) { setTableFinishFun(data) {
let { page } = this.$refs.recepDetail let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1) data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
} }
}, },
getOptionsList () { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -499,7 +495,7 @@ export default { ...@@ -499,7 +495,7 @@ export default {
} }
}) })
}, },
setTagColor (estimatedResult) { setTagColor(estimatedResult) {
switch (estimatedResult) { switch (estimatedResult) {
case "成交": case "成交":
return "greenBg" return "greenBg"
...@@ -509,9 +505,9 @@ export default { ...@@ -509,9 +505,9 @@ export default {
return "grayBg" return "grayBg"
} }
}, },
pageChange (page) { pageChange(page) {
let { searchForm } = this let { searchForm } = this
this.setReportTrackData(0, 'reception_list_page', { this.setReportTrackData(0, "reception_list_page", {
...searchForm, ...searchForm,
...page ...page
}) })
......
<template> <template>
<div> <div>
<!-- class="order-detail" -->
<d2-container> <d2-container>
<div class="header" slot="header" style="padding: 10px 20px;"> <!-- <div class="offline-account"> -->
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" <div class="header" slot="header" style="padding: 10px 20px">
:form-data="showFormData" /> <d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> <el-button size="small" @click="handleReset"> 重置 </el-button>
重置
</el-button>
</div> </div>
</div> </div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="reportTable" <d2-table
ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams"> :table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -28,190 +38,70 @@ ...@@ -28,190 +38,70 @@
</template> </template>
<script> <script>
import { Util, deepClone } from "@/common/util"
import { loginRecordPage } from "@api/resident" import { loginRecordPage } from "@api/resident"
export default { export default {
name: "TransferAccountsList",
components: {}, components: {},
data() { data() {
return { return {
searchForm: {}, labelWidth: "100px",
labelWidth: '100px', searchForm: {
showFormData: [ time: "",
{ merchantName: ""
label: '日报模板',
name: 'templateName',
type: 'select',
optionList: [
{
label: '模板1',
value: 1
},
{
label: '模板2',
value: 2
}
]
}, },
searchFormSearch: {},
showFormData: [
{ {
label: '日报日期', label: "日期",
name: 'time', name: "time",
type: 'datePicker', type: "datePicker",
isClear: true, isClear: true,
pickerOptions: 'rangePickerOptions' pickerOptions: "rangePickerOptions"
}, },
{ {
label: '督导', label: "登录商户",
name: 'dudao', name: "merchantName",
type: 'select', type: "input",
maxlength: "20",
isClear: true
} }
], ],
searchFormSearch: { getListApi: loginRecordPage,
businessScene: ["1"]
},
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableOptions: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '督导', label: "商户名称",
prop: 'positionName' prop: "merchantName"
}, },
{ {
label: '管理门店数', label: "商户号",
prop: 'positionValue' prop: "merchantId"
}, },
{ {
label: '门店平均渗透率(权益升级)', label: "员工姓名",
prop: 'positionValue', prop: "staffName",
// sortable: "custom" sortable: "custom"
}
],
getListApi: loginRecordPage
}
}
},
created() {//默认当前日期
this.searchForm.time = [new Date(), new Date()]
},
methods: {
handleReset() {
this.searchForm = {
time: '',
merchantName: '',
}
this.$refs.reportTable.refreshTable(false, true)
},
handleSearch() {
this.$refs.reportTable.refreshTable(false, true)
},
beforeSearchFn() {
}
}
}
</script><!-- 登录日志 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { loginRecordPage } from "@api/resident"
export default {
name: 'TransferAccountsList',
components: {
}, },
data() { {
return { label: "员工手机号",
labelWidth: '100px', prop: "staffPhone",
searchForm: { width: "120px"
time: '',
merchantName: '',
}, },
searchFormSearch: {}, {
showFormData: [{ label: "登录次数",
label: '日期', prop: "loginTimes"
name: 'time',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '登录商户',
name: 'merchantName',
type: 'input',
maxlength: '20',
isClear: true
}],
getListApi: loginRecordPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '商户名称',
prop: 'merchantName'
}, {
label: '商户号',
prop: 'merchantId'
}, {
label: '员工姓名',
prop: 'staffName',
sortable: "custom"
}, {
label: '员工手机号',
prop: 'staffPhone',
width: '120px'
}, {
label: '登录次数',
prop: 'loginTimes'
} }
] ]
}, },
baseData: { baseData: {}
},
} }
}, },
created() {//默认当前日期 created() {
//默认当前日期
this.searchForm.time = [new Date(), new Date()] this.searchForm.time = [new Date(), new Date()]
}, },
mounted() { mounted() {
...@@ -224,11 +114,17 @@ export default { ...@@ -224,11 +114,17 @@ export default {
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.time) { if (this.searchFormSearch.time) {
this.searchFormSearch.beginDate = Util.dateFormate(this.searchFormSearch.time[0], 'YYYY-MM-DD') this.searchFormSearch.beginDate = Util.dateFormate(
this.searchFormSearch.endDate = Util.dateFormate(this.searchFormSearch.time[1], 'YYYY-MM-DD') this.searchFormSearch.time[0],
"YYYY-MM-DD"
)
this.searchFormSearch.endDate = Util.dateFormate(
this.searchFormSearch.time[1],
"YYYY-MM-DD"
)
delete this.searchFormSearch.time delete this.searchFormSearch.time
} }
resolve() resolve()
...@@ -237,14 +133,23 @@ export default { ...@@ -237,14 +133,23 @@ export default {
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === "select") {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = '' temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = '全部' temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp) this.baseData[item.optionsName].unshift(temp)
} }
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName]) this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
} }
}) })
}, },
...@@ -254,8 +159,8 @@ export default { ...@@ -254,8 +159,8 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
time: '', time: "",
merchantName: '', merchantName: ""
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -264,25 +169,28 @@ export default { ...@@ -264,25 +169,28 @@ export default {
var params = this.searchFormSearch var params = this.searchFormSearch
// 去除为null的值 // 去除为null的值
for (const key in params) { for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) { if (
params[key] === null ||
params[key] === "" ||
params[key].length == 0
) {
delete params[key] delete params[key]
} }
} }
params.method = 'dj.api.smartcarlife.staff.login.record.export' params.method = "dj.api.smartcarlife.staff.login.record.export"
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
name: '登录日志', name: "登录日志",
exportParam: JSON.stringify(params), exportParam: JSON.stringify(params),
status: 'waiting', status: "waiting",
timeid: new Date().getTime() timeid: new Date().getTime()
} }
] ]
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: "dowloadList" })
}, }
} }
} }
</script> </script>
<style scoped> <style scoped>
.count-txt { .count-txt {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-17 17:50:41 * @Date: 2024-04-17 17:50:41
* @LastEditors: huyue * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2024-05-07 10:57:45 * @LastEditTime: 2025-07-02 10:43:18
--> -->
<template> <template>
<div> <div>
......
<template> <template>
<div class="layout"> <div class="layout">
<div <div class="tab" ref="tabbox">
class="tab"
ref="tabbox"
>
<div <div
:class="['tab-item', { 'item-active': windowId == -1 }]" :class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1" @click="windowId = -1"
...@@ -19,10 +16,7 @@ ...@@ -19,10 +16,7 @@
:ref="`tab-${index}`" :ref="`tab-${index}`"
> >
{{ i.text }} {{ i.text }}
<div <div class="close" @click.stop="close(index)">
class="close"
@click.stop="close(index)"
>
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
</div> </div>
...@@ -30,10 +24,7 @@ ...@@ -30,10 +24,7 @@
</template> </template>
<template v-if="dropdownList.length"> <template v-if="dropdownList.length">
<div class="arrow-box"> <div class="arrow-box">
<el-dropdown <el-dropdown trigger="click" @command="windowId = $event">
trigger="click"
@command="windowId = $event"
>
<div class="dropdown-link"> <div class="dropdown-link">
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</div> </div>
...@@ -46,10 +37,7 @@ ...@@ -46,10 +37,7 @@
> >
<div class="dropdown-item"> <div class="dropdown-item">
{{ i.text }} {{ i.text }}
<div <div class="close" @click.stop="closeDrop(index)">
class="close"
@click.stop="closeDrop(index)"
>
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
</div> </div>
...@@ -81,7 +69,7 @@ ...@@ -81,7 +69,7 @@
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import clockSalaryIndex from './components/clockSalaryIndex/index' import clockSalaryIndex from './components/clockSalaryIndex/index'
import InStoreManageIndex from "./index" import InStoreManageIndex from "./index"
import staffInfo from "./staffInfo" import staffInfo from "./staffInfo"
...@@ -180,7 +168,7 @@ export default { ...@@ -180,7 +168,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.layout { .layout {
height: 100%; height: 100%;
.tab { .tab {
......
<!-- 录音标签管理 -->
<template>
<d2-container class="customer-tags">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header title="录音标签管理列表">
<el-button size="small" type="primary" @click="exportTable">
导出
</el-button>
</d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template slot="recordingUrl" slot-scope="scope">
<div
class="audio"
@click="play(scope.scope.recordingUrl)"
v-if="scope.scope.recordingUrl"
>
{{ scope.scope.recordingUrl }}
</div>
</template>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { receptionTagPage, receptionTagPageExport } from "@/api/resident.js"
import { listShop4sByRef } from "@api/merchant"
import { getBrandList } from "@/api/scene.js"
import { label_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util"
export default {
data() {
return {
getListApi: receptionTagPage,
tableParams: {
listName: "list",
tableOption: false,
tableColumns: [
{
label: "驻店名称",
prop: "staffName"
},
{
label: "门店名称",
prop: "merchantName"
},
{
label: "品牌",
prop: "carBrand"
},
{
label: "录音链接",
addHtml: "recordingUrl",
width: "150px"
},
{
label: "质检日期",
prop: "checkDate"
},
{
label: "客户车型",
prop: "carModel"
},
{
label: "业务场景",
prop: "bussinessType",
formatter(row) {
let result = { 1: "延保", 2: "轻改", 3: "权益" }[
row.bussinessType
]
return result || "-"
}
},
{
label: "APP接待结果",
prop: "isOrderFinishFlagName"
},
{
label: "质检得分",
prop: "score"
},
{
label: "身份介绍",
prop: "sfjs"
},
{
label: "服务意识",
prop: "fwys"
},
{
label: "话题介入",
prop: "htjr"
},
{
label: "需求分析",
prop: "sqfx"
},
{
label: "专业知识",
prop: "zyzs"
},
{
label: "场景塑造",
prop: "cjsz"
},
{
label: "案例展示",
prop: "alzs"
},
{
label: "攻防能力",
prop: "gfnl"
},
{
label: "逼单能力",
prop: "bdnl"
}
]
},
searchFormSearch: {},
searchForm: {
orderFinishFlag: "",
staffName: "",
merchantId: "",
checkType: "",
checkStart: [new Date(), new Date()],
carBrandId: ""
},
showFormData: [
{
label: "驻店名称",
name: "staffName",
type: "input",
isClear: true
},
{
label: "业务场景",
name: "checkType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "businessTypeOpt"
},
{
label: "门店",
name: "merchantId",
type: "select",
optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "storeIdList"
},
{
label: "品牌",
name: "carBrandId",
type: "select",
isClear: true,
collapseTags: true,
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "brandList"
},
{
label: "质检时间",
name: "checkStart",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions_30day2"
},
{
label: "接待结果",
name: "orderFinishFlag",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "receptionStatusOpt"
}
],
baseData: {
businessTypeOpt: deepClone(label_businessOpt),
receptionStatusOpt: [
{
confId: 0,
confValue: "成交"
},
{
confId: 1,
confValue: "战败"
}
],
brandList: [],
storeIdList: []
}
}
},
mounted() {
this.initSelect()
},
methods: {
play(url) {
window.open(url)
},
handleDetail(data) {
console.log("row", data)
this.$router.push({
path: "/inSceneConfigView",
query: {
id: data.id
}
})
},
beforeSearchFn(type = 1) {
console.log(this.searchForm)
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.checkStart?.length) {
let [startDate, endDate] = this.searchForm.checkStart
this.searchFormSearch.checkStartTime = Util.dateFormate(
startDate,
"YYYY-MM-DD"
)
this.searchFormSearch.checkEndTime = Util.dateFormate(
endDate,
"YYYY-MM-DD"
)
}
delete this.searchFormSearch.checkStart
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
try {
await this.beforeSearchFn()
const res = await receptionTagPageExport({
...this.searchFormSearch
})
if (res) window.open(res)
} catch (error) {
if (error) this.$message.error(error)
}
},
initSelect() {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getBrandList(), this.getServiceStore()])
.then((results) => {
// 检查每个任务的结果
results.forEach((result, index) => {
if (result.status === "rejected") {
console.error(`Task ${index} failed:`, result.reason)
}
})
// 统一调用 getOptionsList
this.getOptionsList()
})
.catch((err) => {
console.error("Unexpected error in initSelect:", err)
this.getOptionsList() // 确保即使有意外错误也调用 getOptionsList
})
},
getServiceStore() {
return new Promise((resolve, reject) => {
listShop4sByRef({})
.then((res) => {
this.baseData.storeIdList = res || []
resolve(res) // 返回结果以便主流程感知
})
.catch((err) => {
console.error("Error in getBusinessTypeList:", err)
reject(err) // 捕获并传递错误
})
})
},
getBrandList() {
const brandList = []
return new Promise((resolve, reject) => {
getBrandList({ containsChildren: true })
.then((res) => {
res.map((e) => {
if (e && e.children && e.children.length) {
e.children.map((i) => {
i.brandId = e.id
brandList.push(i)
})
}
})
this.baseData.brandList = brandList
resolve(brandList) // 返回结果以便主流程感知
})
.catch((err) => {
console.error("Error in getBrandList:", err)
reject(err) // 捕获并传递错误
})
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
// if (item.optionsName != "brandList") {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
// }
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
}
}
}
</script>
<style scoped>
.audio {
width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #2a58ad;
font-size: 14px;
cursor: pointer;
}
</style>
<!-- 配置课程 -->
<template>
<div class="configureCourse-wrap">
<div class="configureCourse">
<div class="left-wrap">
<div class="header">
<img class="staff-icon" src="../../images/staff-icon.png" alt="" />
<div class="title">
员工列表
<div class="num">
共{{ statisticsObj.total }}人,已配置{{
statisticsObj.complete
}}人
</div>
</div>
</div>
<div class="staff-list">
<div
v-for="(item, index) in staffList"
:key="item.staffUUID"
:class="['staff-item', staffIndex == index ? 'active' : '']"
@click="handleClick(index)"
>
<div class="employeeName">{{ item.employeeName }}</div>
<div class="config" v-if="item.courseConfigFlag == 1">已配置</div>
</div>
</div>
</div>
<div class="right-wrap" v-loading="loading">
<div class="nav-tabs">
<div
:class="['nav-item', activeName == index ? 'active' : '']"
v-for="(item, index) in tabPaneList"
:key="index"
@click="handleTabClick(index)"
>
{{ item.label }}
</div>
</div>
<components
ref="components"
:is="tabName"
:aiJy="aiJy"
:staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse"
:staffList="staffList"
></components>
</div>
</div>
<div class="end-configuration" @click="handleEndConfigure">结束配置</div>
</div>
</template>
<script>
import staffDetail from "./staffDetail"
import couseAllocation from "./couseAllocation"
import {
customizeList,
findStaffByMerchantNo,
findStoreEmployeePerformance
} from "@/api/serviceCentre"
export default {
name: "configureCourse",
components: { staffDetail, couseAllocation },
data() {
return {
loading: false,
staffIndex: 0,
activeName: "0",
tabPaneList: [
{
label: "员工详情"
},
{
label: "课程配置"
}
],
tabName: "staffDetail",
aiJy: "",
staffItem: {},
staffList: [],
courseList: [],
staffDetailInfo: {},
statisticsObj: {
total: 0,
complete: 0
}
}
},
created() {
//课程搜索功能
// this.$EventBus.$on("fromAllocation", (courseForm) => {
// console.log("父组件接收到孙组件事件:", courseForm)
// this.getStaffTagCourseList(courseForm)
// })
},
async mounted() {
this.queryData = this.$route.query
//获取员工列表
this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex]
//查询员工详情
// this.findStoreEmployeePerformanceData()
},
methods: {
//提交本员工配置回调
async handleConfigureCourse() {
this.staffIndex = 0
//获取员工列表
this.staffList = await this.getStaffInfoData()
this.handleTabClick(1)
this.staffItem = this.staffList[0]
},
//查询员工详情
findStoreEmployeePerformanceData() {
this.loading = true
let { staffItem, queryData } = this
findStoreEmployeePerformance({
// phone: "18978849947",
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.loading = false
this.aiJy = res.aiJy
})
},
// getStaffTagCourseList(courseForm = {}) {
// console.log(this.staffItem, " this.staffItem")
// let params = {
// staffPhone: this.staffItem.phone,
// currentPage: 1,
// pageSize: 99999,
// queryAll: false,
// ...courseForm
// }
// getStaffTagCourseList(params).then((res) => {
// this.courseList = res ? res.list : []
// })
// },
handleStatistics(res) {
let total = 0,
complete = 0
res.forEach((item) => {
if (item.courseConfigFlag == 1) {
complete++
}
total++
})
this.statisticsObj = {
total,
complete
}
console.log(this.statisticsObj)
},
getStaffInfoData() {
return new Promise((resolve, reject) => {
let { unionOrAndType } = this.queryData
let methods = unionOrAndType ? customizeList : findStaffByMerchantNo
methods(this.queryData).then((res) => {
console.log(res)
if (res) {
resolve(res)
}
//员工统计
this.handleStatistics(res)
})
})
},
handleClick(index) {
this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex]
this.findStoreEmployeePerformanceData()
},
handleTabClick(index) {
this.activeName = index
const arr = {
0: "staffDetail",
1: "couseAllocation"
}
this.tabName = arr[+this.activeName]
this.$nextTick(() => {
console.log(this.$refs.components)
if (index == 0) {
//查询员工详情
this.$refs.components?.findStoreEmployeePerformanceData()
// this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
// this.getStaffTagCourseList()
this.$refs.components?.getStaffTagCourseList()
}
})
},
handleEndConfigure() {
if (this.statisticsObj.total != this.statisticsObj.complete) {
this.$confirm("还有员工未完成课程配置,是否确定结束配置?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$router.push({
name: "longCourse"
})
})
.catch(() => {})
} else {
this.$router.push({
name: "longCourse"
})
}
}
}
}
</script>
<style lang="scss" scoped>
.configureCourse {
height: calc(100vh - 190px);
display: flex;
margin: 0 20px;
margin-bottom: 16px;
.left-wrap {
min-width: 200px;
width: 200px;
height: 100%;
min-height: 100%;
background: #ffffff;
margin-right: 16px;
box-sizing: border-box;
.header {
display: flex;
align-items: flex-start;
margin: 12px 0 12px 13px;
.staff-icon {
width: 16px;
height: 16px;
margin-right: 8px;
margin-top: 3px;
}
.title {
color: #333333;
font-size: 16px;
font-weight: 400;
.num {
color: #999999;
font-size: 12px;
font-weight: 400;
margin-top: 2px;
}
}
}
.staff-list {
height: calc(100% - 62px);
overflow-y: auto;
.staff-item {
color: #666666;
font-size: 14px;
font-weight: 400;
padding: 10px 12px 10px 36px;
position: relative;
.employeeName {
width: 90px;
white-space: wrap;
}
.config {
position: absolute;
border-radius: 2px;
border: 1px solid #2cca74;
background: #e9eef7;
padding: 2px 6px;
color: #2cca74;
font-size: 11px;
font-weight: 500;
top: 10px;
right: 12px;
}
}
.active {
color: #2a58ad;
background: #e9eef7;
border-right: 3px solid #2a58ad;
}
}
}
.right-wrap {
min-height: 100%;
width: calc(100% - 216px);
min-width: 984px;
overflow-x: auto;
.nav-tabs {
display: flex;
align-items: center;
.nav-item {
width: 112px;
height: 44px;
border-radius: 4px 4px 0 0;
color: #666666;
font-size: 16px;
font-weight: 400;
line-height: 44px;
box-sizing: border-box;
text-align: center;
margin-right: 2px;
// border: 1px solid #e5e5e5;
background: #f8f8f8;
}
.active {
color: #2a58ad;
font-size: 16px;
font-weight: 500;
// border: 1px solid #e5e5e5;
background: #ffffff;
}
}
// background: #ffffff;
}
}
.end-configuration {
width: 120px;
height: 36px;
border-radius: 4px;
background: #2a58ad;
color: #ffffff;
font-size: 16px;
font-weight: 400;
text-align: center;
line-height: 36px;
margin: 0 auto;
}
</style>
<!-- 倒计时 -->
<template>
<div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
{{ countdown }}
</div>
</template>
<script>
export default {
data() {
return {
countdown: "",
isOvertime: false
}
},
mounted() {
this.startCountdown()
},
methods: {
startCountdown() {
const now = new Date()
const wednesday = new Date(now)
// 计算本周三的日期
const day = now.getDay()
const diff = (day - 3 + 7) % 7 // 3代表星期三
wednesday.setDate(wednesday.getDate() - diff)
wednesday.setHours(23, 59, 59, 0)
// 如果今天是周四或周五
if (day === 4 || day === 5) {
this.isOvertime = true
this.countdown = "已超出本周配课时间,学员需本周日前完成学习"
return
}
// 如果已过本周三,显示下周三
if (now > wednesday) {
wednesday.setDate(wednesday.getDate() + 7)
}
// 开始倒计时
this.updateCountdown(wednesday)
},
updateCountdown(endTime) {
const now = new Date()
if (now >= endTime) {
this.isOvertime = true
this.countdown = "已超出本周配课时间,学员需本周日前完成学习"
return
}
const diff = endTime - now
const days = Math.floor(diff / (1000 * 60 * 60 * 24))
const hours = Math.floor((diff / (1000 * 60 * 60)) % 24)
const minutes = Math.floor((diff / (1000 * 60)) % 60)
const seconds = Math.floor((diff / 1000) % 60)
this.countdown = `倒计时:完成本周课程配置还剩 ${days}天${hours}时${minutes}分${seconds}秒`
setTimeout(() => this.updateCountdown(endTime), 1000)
}
}
}
</script>
<style>
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
</style>
<!-- 课程任务配置 -->
<template>
<div class="couse-wrap">
<div class="header">
课程任务配置
<count-down></count-down>
<!-- <div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div> -->
</div>
<div class="condition">
<div class="couse-tabs" v-if="longForm.scene != 3">
<div
:class="['couse-tabs-item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in longAllData[longForm.scene]"
:key="index"
@click="handleClick(index)"
>
{{ item.brand }}
</div>
</div>
<el-button
size="small"
type="primary"
class="custom-btn"
@click="handleCustom"
v-if="longForm.isDisabled"
>自定义配课</el-button
>
</div>
<div class="couse-content">
<div
class="content-item"
v-for="(metric, mIndex) in metricRuleList"
:key="mIndex"
>
<div class="name">{{ metric.metricName }}</div>
<div class="value">{{ metric.itemBrand }}</div>
<div class="configuration">
<div class="item">
<div>可配置</div>
<div
class="number"
v-if="metric.merchantCount || metric.merchantCount === 0"
>
{{ metric.merchantCount }}家
</div>
<div v-else class="number">-</div>
</div>
<div class="item">
<div>
{{
metric.matchMerchantCourseCount == null ? "未配课" : "已配置"
}}
</div>
<div
class="number"
v-if="
metric.matchMerchantCourseCount ||
metric.matchMerchantCourseCount === 0
"
>
{{ metric.matchMerchantCourseCount }}家
</div>
<div v-else class="number">-</div>
</div>
</div>
<div class="btns">
<div
:class="[metric.merchantCount ? 'details' : 'disabled']"
@click="handleDetail(metric)"
>
详情
</div>
<div
:class="[metric.merchantCount ? 'configure-course' : 'disabled']"
@click="handleConfigureCourse(metric)"
v-if="longForm.isDisabled"
>
配置课程
</div>
</div>
</div>
</div>
<!-- 自定义 -->
<custom-couse
:longForm="longForm"
:longItemData="longAllData[longForm.scene][activeIndex]"
:customVisible="customVisible"
v-if="customVisible"
@dialogClose="handleCloseDialog"
></custom-couse>
</div>
</template>
<script>
import customCouse from "./customCouse.vue"
import countDown from "./countDown.vue"
import {
findAllItemByConfigId,
findStaffByMerchantNo
} from "@/api/serviceCentre"
export default {
components: { customCouse, countDown },
data() {
return {
activeIndex: 0,
customVisible: false
}
},
props: {
longAllData: {
type: Object,
default: () => {}
},
longForm: {
type: Object,
default: () => {}
}
},
watch: {
longForm: {
handler(val) {
this.activeIndex = 0
this.findAllItemByConfigIdData()
},
deep: true
}
},
computed: {
metricRuleList() {
if (this.longAllData[this.longForm.scene]) {
return this.longAllData[this.longForm.scene][this.activeIndex]
.metricRuleList
}
}
},
mounted() {
// this.findAllItemByConfigIdData()
},
methods: {
findAllItemByConfigIdData() {
setTimeout(() => {
let params = {
...this.longForm,
configId: this.longAllData[this.longForm.scene][this.activeIndex].id
}
findAllItemByConfigId(params).then((res) => {
if (
params.configId ==
this.longAllData[this.longForm.scene][this.activeIndex].id
) {
this.longAllData[this.longForm.scene][
this.activeIndex
].metricRuleList = res
}
})
console.log(params.configId, 99999)
this.$emit("changeBrand", params.configId)
}, 0)
},
async handleConfigureCourse(item) {
let brandId = this.longAllData[this.longForm.scene][this.activeIndex].id
if (item.merchantCount) {
let data = await this.getStaffInfoData(item.merchantNos)
if (data && data.length > 0) {
this.$router.push({
name: "configureCourse",
query: {
scene: this.longForm.scene,
merchantNos: item.merchantNos,
brandId: brandId
}
})
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
},
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => {
findStaffByMerchantNo({
merchantNos,
scene: this.longForm.scene
}).then((res) => {
console.log(res)
resolve(res)
})
})
},
handleDetail(row) {
if (row.merchantCount) {
row.isDisabled = this.longForm.isDisabled
row.activeName = "indicatorInfo"
row.scene = this.longForm.scene
row.pageId = row.id
this.$emit("openWindow", row)
}
},
handleClick(index) {
console.log(index)
this.activeIndex = index
this.findAllItemByConfigIdData()
},
handleCustom() {
this.customVisible = true
},
handleCloseDialog() {
this.customVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couse-wrap {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
}
.condition {
display: flex;
align-items: center;
margin: 16px 20px 8px 20px;
position: relative;
height: 32px;
.couse-tabs {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
padding: 6px 20px;
background: #f2f3f5;
border-radius: 2px;
line-height: 20px;
color: #333333;
font-size: 14px;
font-weight: 500;
margin: 0 8px 8px 0;
cursor: pointer;
}
.active {
color: #2a58ad;
background: #2a58ad26;
}
}
.custom-btn {
position: absolute;
right: 0;
top: -1px;
}
}
.couse-content {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 20px;
.content-item {
min-width: 278px;
width: calc((100% / 4) - (16px * 3 / 4));
padding: 20px;
border-radius: 4px;
background: #f8faff;
height: 204px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 16px;
.name {
color: #1d1d1d;
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.value {
color: #1d1d1d;
font-size: 14px;
font-weight: 400;
line-height: 20px;
margin: 4px 0 16px;
}
.configuration {
display: flex;
align-items: center;
margin-bottom: 16px;
justify-content: space-between;
.item {
width: 114px;
color: #888888;
font-size: 14px;
font-weight: 400;
.number {
color: #1d1d1d;
font-size: 16px;
font-weight: 400;
line-height: 24px;
margin-top: 4px;
}
}
}
}
.content-item:nth-child(4n) {
margin-right: 0;
}
.btns {
display: flex;
align-items: center;
justify-content: space-between;
color: #2a58ad;
font-size: 14px;
font-weight: 400;
.details {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
border: 1px solid #2a58ad80;
background: #ffffff;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.disabled {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
line-height: 32px;
text-align: center;
color: rgb(188, 190, 194);
background-color: rgb(244, 244, 245);
border-color: rgb(233, 233, 235);
}
.configure-course {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
background: #dfe6f3;
line-height: 32px;
text-align: center;
cursor: pointer;
}
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!