Commit a45e6302 by 前端

Merge branch 'SAAS+V5.0.0' into 'develop'

上线合并

See merge request !499
2 parents 68dc7828 cc12c883
Showing 65 changed files with 3857 additions and 387 deletions
......@@ -35,6 +35,7 @@
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.6",
"glsk-toolkit": "^1.0.5",
"glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2",
......
module.exports = {
gscPost: (url, data, _config = {}) => {
return window.$gscApi.post(url, data, _config)
}
}
......@@ -86,12 +86,13 @@ export function merchantOutputValueTargetImport(data) {
// 单店信息督导和员工查询
export function findMerchantStaffList(data) {
data.method = `${path2}workbench.findMerchantStaffList`
// return request(data, "post")
// data.method = `${path2}workbench.findMerchantStaffList`
data.method = `${path2}workbench.findMerchantStaffFilterList`
return request(data)
}
export function merchantStaffByRoleList(data) {
data.method = `${path2}merchant.staff.by.role.list`
// data.method = `${path2}merchant.staff.by.role.list`
data.method = `${path2}merchant.staff.by.role.filterList`
return request(data)
}
......
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-09-01 15:41:23
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-09-23 11:21:39
* @FilePath: \dj-car-life-system\src\api\merchant.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "./request"
import RequestMethods from "./request.methods"
......
......@@ -122,3 +122,14 @@ export function getByTaskId(data) {
data.method = `${path}contentManagerTask.getById`
return request(data, RequestMethods.POST)
}
// 长课程配置-已配置课程列表导出
export function exportStydypage(data) {
data.method = `${path}servicecenter.contentmanager.task.staff.study.page.export`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录列表导出
export function exportSoppage(data){
data.method=`${path}servicecenter.sop.detail.page.export`
return request(data, RequestMethods.POST)
}
......@@ -64,7 +64,8 @@ export function updateStaffBatch(data) {
// 查询业务负责人
export function findSellerMerchantStaffList(data) {
data.method = `${path}workbench.findSellerMerchantStaffList`
// data.method = `${path}workbench.findSellerMerchantStaffList`
data.method = `${path}workbench.findSellerMerchantStaffFilterList`
return request(data)
}
......@@ -239,7 +240,7 @@ export function setShopMerchantPointConfig(data) {
data.method = `dj.api.smartcarlife.shopMerchantPointConfig.save`
return request(data)
}
//获取阳光激励积分类目配置
// 获取阳光激励积分类目配置
export function getSunshineIncentivePoint(data) {
data.method = `dj.api.smartcarlife.sunshineIncentivePoint.get`
return request(data)
......@@ -306,7 +307,7 @@ export function getMerService(data) {
return request(data)
}
//日报填写标识修改
// 日报填写标识修改
export function updateDailyReportFlag(data) {
data.method = "dj.api.smartcarlife.serviceMerchant.dailyReportFillFlag.update"
return request(data)
......
/**二手车 */
import { gscPost } from "./gscRequest"
// 数据看板指标统计
export function getdataBoard(data) {
return gscPost("/dataBoard/index", data)
}
// 数据看板评估量趋势
export function getEvaluationData(data) {
return gscPost("/dataBoard/evaluation", data)
}
// 数据看板成交量趋势
export function getDealData(data) {
return gscPost("/dataBoard/deal", data)
}
// 合同管理列表
export function getContractList(data) {
return gscPost("/evalElectronicContract/page", data)
}
// 合同管理详情
export function getContractDetail(data) {
return gscPost("/evalElectronicContract/detail", data)
}
//合同下载
export function getContractDownload(data) {
return gscPost("/evalElectronicContract/getContractFileUrl", data)
}
//编辑合同详情
export function getContractEdit(data) {
return gscPost("/evalElectronicContract/editDescription", data)
}
// 评估单列表
export function getEvalOrderList(data) {
return gscPost("/evalOrderManage/getEvalOrderList", data)
}
//评估单详情
export function getEvalOrderDetail(data) {
console.log(data)
return gscPost("/evalOrderManage/getEvalOrderDetail", data)
}
//评估单动态
export function getEvalOrderPriceHistory(data) {
return gscPost("/evalOrderManage/getEvalOrderPriceHistory", data)
}
//评估车辆
export function evaluateCar(data) {
return gscPost("/evalOrderManage/evaluate", data, { returnAll: true })
}
//车辆评估导出
export function exportEvaluate(data) {
return gscPost("/evalOrderManage/exportEvalOrderAsync", data)
}
//阳光激励配置分页
export function getSunlightPage(data) {
console.log(gscPost)
return gscPost("/sunlightInspiresConfig/page", data)
}
//修改阳光激励配置
export const updateSunlightConfig = (data) => {
return gscPost("/sunlightInspiresConfig/edit", data, { returnAll: true })
}
// 新增阳光激励配置
export const createSunlightConfig = (data) => {
return gscPost("/sunlightInspiresConfig/create", data, { returnAll: true })
}
//阳光激励详情
export const getSunlightConfig = (data) => {
return gscPost("/sunlightInspiresConfig/details", data)
}
//阳光激励操作日记
export const getSunlightLog = (data) => {
return gscPost("/sunlightInspiresConfig/log/page", data)
}
//阳光激励导出
export const exportSunlightPage = (data) => {
return gscPost("/sunlightInspiresConfig/export", data)
}
//删除阳光激励配置
export const deleteSunlightConfig = (data) => {
return gscPost("/sunlightInspiresConfig/delete", data)
}
/**
* 获取车辆管理列表
*/
export const getCarManagementPage = (data) => {
return gscPost("/carManagement/carManagementPage", data)
}
/**
* 导出车辆管理列表
*/
export const exportCarManagementPage = (data) => {
return gscPost("/carManagement/export", data)
}
/**
* 获取车辆管理详情
*/
export const getCarManagementDetail = (data) => {
return gscPost("/carManagement/details", data)
}
/**
* 车辆状态变更
*/
export const editCarStatus = (data) => {
return gscPost("/carManagement/edit", data)
}
/**
* 车辆管理操作日志
*/
export const getCarManagementLog = (data) => {
return gscPost("/carManagement/carManagementLog", data)
}
......@@ -473,13 +473,15 @@ export const sceneCodeList = [
{ confId: 0, confValue: "会员权益/升级" },
{ confId: 4, confValue: "积分商城" }
]
export const otherSceneList = [{ confId: 7, confValue: "二手车" }]
// 所属场景
export const sceneList = {
1: "精品升级",
2: "次新车转化",
3: "售后众筹",
0: "会员权益/升级",
4: "积分商城"
4: "积分商城",
7: "二手车"
}
// 导流方下拉选项对应
......@@ -865,6 +867,10 @@ export const downloadReportManage_reportType = [
{
confId: "technicianConstructionOrder",
confValue: "轻改技师施工单月度汇总表"
},
{
confId: "learningCourseReviewReport",
confValue: "课程学习复盘报表"
}
]
......@@ -928,6 +934,13 @@ export const refundOrderSourceOpt = [
{ confId: 1, confValue: "小程序" }
]
// 订单管理-退款审核-退款类型
export const refundPayTypeOpt = [
{ confId: 1, confValue: "已录订单退款" },
{ confId: 2, confValue: "门店退款标记" },
{ confId: 3, confValue: "未关联流水退款" }
]
// 虚拟对公账户银盛到账模式
export const receiptModeList = [
{ confId: 1, confValue: "T+1" },
......@@ -1480,3 +1493,93 @@ export const scheduling_inviteStatus = [
{ confId: 6, confValue: "已撤销" },
{ confId: 7, confValue: "已支付" }
]
// 时间tab
export const timeTabOpt = [
{ confId: 1, confValue: "今日" },
{ confId: 2, confValue: "昨日" },
{ confId: 3, confValue: "本月" },
{ confId: 4, confValue: "上月" }
]
//使用性质
export const usageTypeOpt = [
{ confId: "2", confValue: "营运" },
{ confId: "1", confValue: "非营运" },
{ confId: "3", confValue: "营转非" }
]
//所有人性质
export const ownerTypeOpt = [
{ confId: "1", confValue: "个人" },
{ confId: "2", confValue: "单位" }
]
//车辆类别
export const vehicleCategoryOpt = [
{ confId: 1, confValue: "置换车" },
{ confId: 2, confValue: "报废车" }
]
//是否新车下定
export const buyNewCarOpt = [
{ confId: "1", confValue: "是" },
{ confId: "0", confValue: "否" }
]
//是否事故
export const hasAccidentOpt = [
{ confId: "1", confValue: "是" },
{ confId: "0", confValue: "否" }
]
//评估单状态
export const evaluationStatusOpt = [
{ confId: "10", confValue: "评估中" },
{ confId: "20", confValue: "已报价" },
{ confId: "30", confValue: "已签约" },
{ confId: "40", confValue: "已支付-定金" },
{ confId: "50", confValue: "已支付-尾款" },
{ confId: "100", confValue: "已完成" },
{ confId: "-1", confValue: "已驳回" }
]
export const evaluationStatusOptMap = {
10: "#FDB757",
20: "#2CCA74",
30: "#2CCA74",
40: "#2CCA74",
50: "#2CCA74",
100: "#8C8C8C",
"-1": "#EB4E4E"
}
// 合同类型
export const electronicContractTypeOpt = [
{ confId: "1", confValue: "二手车转让协议" },
{ confId: "3", confValue: "二手车补充协议" },
{ confId: "2", confValue: "车辆代保管协议" },
{ confId: "4", confValue: "车辆交接确认单" }
]
//合同流转状态
export const electronicContractStatusOpt = [
{ confId: "1", confValue: "合同签署中" },
{ confId: "2", confValue: "合同签署完成" }
]
//付款状态
export const payStatusOpt = [
{ confId: "1", confValue: "定金" },
{ confId: "2", confValue: "尾款" },
{ confId: "3", confValue: "全款" }
]
// 拆分支付
export const splitPayOpt = [
{ confId: "1", confValue: "是" },
{ confId: "0", confValue: "否" }
]
//企微审批状态
export const oaFlowStatusOpt = [
{ confId: "1", confValue: "审批中", color: "#FDB757" },
{ confId: "2", confValue: "已通过", color: "#2CCA74" },
{ confId: "3", confValue: "已驳回", color: "#EB4E4E" },
{ confId: "4", confValue: "已撤销", color: "#8C8C8C" }
]
//支付状态
export const oaFlowPaymentStatusOpt = [
{ confId: "2", confValue: "支付成功", color: "#2CCA74" },
{ confId: "3", confValue: "支付失败", color: "#EB4E4E" },
{ confId: "1", confValue: "支付中", color: "#FDB757" },
{ confId: "4", confValue: "支付取消", color: "#8C8C8C" }
]
......@@ -250,6 +250,22 @@ export const rangePickerOptions_year = {
return false
}
}
export const todayEndPickerOptions = {
disabledDate(time) {
// 获取当天结束时间(23:59:59)
const today = new Date()
const todayEnd = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23,
59,
59
)
return time.getTime() > todayEnd.getTime()
}
}
/**
* 店面配置-门店产值
......
<template>
<el-dialog id="baseDialog"
top="15vh"
:close-on-click-modal="false"
:close-on-press-escape="true"
:title="dialogConfig.title"
:width="dialogConfig.width"
:visible.sync="visible"
:show-close="config.showClose"
class="noborder"
:append-to-body="config.appendToBody">
<el-dialog
id="baseDialog"
top="15vh"
:close-on-click-modal="false"
:close-on-press-escape="true"
:title="dialogConfig.title"
:width="dialogConfig.width"
:visible.sync="visible"
:show-close="config.showClose"
class="noborder"
:append-to-body="config.appendToBody"
>
<slot />
<div slot="footer"
v-if="config.isShowFooter">
<el-button type="primary"
@click="confirmBtn"
:loading="$store.state.d2admin.loading.value || btnLoding">
<div slot="footer" v-if="config.isShowFooter">
<el-button
type="primary"
@click="confirmBtn"
:loading="$store.state.d2admin.loading.value || btnLoding"
>
{{ config.confirm_name }}
</el-button>
<el-button v-preventReClick
@click="visible = false">
<el-button v-preventReClick @click="visible = false">
{{ config.cancel_name }}
</el-button>
</div>
......@@ -26,7 +28,7 @@
</template>
<script>
export default {
name: 'BaseDialog',
name: "BaseDialog",
directives: {
// 函数节流 监控输入框 提高性能
throttle: {
......@@ -34,7 +36,7 @@ export default {
inserted: function (el, obj) {
let timerId = null
let flag = true
el.addEventListener('click', function () {
el.addEventListener("click", function () {
if (!flag) return
flag = false
timerId && clearTimeout(timerId)
......@@ -53,8 +55,8 @@ export default {
type: Object,
default: function () {
return {
title: '提示',
width: '480px'
title: "提示",
width: "480px"
}
}
},
......@@ -66,8 +68,8 @@ export default {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: '取 消',
confirm_name: '确 定'
cancel_name: "取 消",
confirm_name: "确 定"
}
}
},
......@@ -120,7 +122,7 @@ export default {
return this.isShow
},
set(val) {
this.$emit('update:isShow', false)
this.$emit("update:isShow", false)
}
}
},
......@@ -128,13 +130,13 @@ export default {
methods: {
confirmBtn() {
// 触发保存
this.$emit('handleClick')
this.$emit("handleClick")
}
},
created() {
// console.log('baseDialog')
},
mounted() { }
mounted() {}
}
</script>
<style scoped lang="scss">
......@@ -179,4 +181,3 @@ export default {
}
}
</style>
......@@ -154,6 +154,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="item.defaultTime ? item.defaultTime : ''"
:picker-options="pickerOption[item.pickerOptions]"
/>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item" />
......@@ -169,7 +170,8 @@
import {
rangePickerOptions,
yesterdayPicker,
rangePickerOptions_30day2
rangePickerOptions_30day2,
todayEndPickerOptions
} from "@/common/format"
export default {
name: "D2Search",
......@@ -178,7 +180,8 @@ export default {
pickerOption: {
rangePickerOptions: rangePickerOptions,
yesterdayPicker: yesterdayPicker,
rangePickerOptions_30day2: rangePickerOptions_30day2
rangePickerOptions_30day2: rangePickerOptions_30day2,
todayEndPickerOptions: todayEndPickerOptions
}
}
},
......@@ -209,14 +212,13 @@ export default {
// type: Number,
// default: 12
// }
selectPopperAppendToBody:{
selectPopperAppendToBody: {
type: Boolean,
default: true
}
},
mounted() {
},
mounted() {},
methods: {
// 选择框-添加其他属性
......
......@@ -23,6 +23,9 @@ import { config } from "@/common/baseConfig"
import GLMapSdk from "@/common/glsk-mapapi-sdk"
// import { GLCombiForm } from "glsx-components" // 权限按钮 (根据权限动态创建)
import VueLazyload from "vue-lazyload"
import { Request } from "glsk-toolkit"
import util from "@/libs/util.js"
Vue.prototype.$mapapi = new GLMapSdk()
Vue.use(VueLazyload, {
// 懒加载默认加载图片
......@@ -48,7 +51,7 @@ process.env.NODE_ENV === "production" &&
tracesSampleRate: 1.0,
logErrors: true,
// 解决火狐浏览器 无法捕获错误的问题
beforeSend(event, hint) {
beforeSend (event, hint) {
const isNonErrorException =
event.exception.values[0].value.startsWith(
"Non-Error exception captured"
......@@ -109,6 +112,7 @@ Vue.directive("preventReClick", {
}
})
let baseConfig = config
// 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取
fetch(
"https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config"
......@@ -125,158 +129,44 @@ fetch(
)
.then((response) => {
const { code, data } = response
// console.log("response", response)
// response.axios.baseURL = 'https://dj.test.glsx.com.cn/rop-dj-smartcarlife/router'
// response.axios.baseURL = 'http://192.168.1.104:8392/rop-dj-smartcarlife/router'
console.log("response", code, response)
if (code == "200") {
console.log(data)
baseConfig = data
// console.log("baseConfig", baseConfig)
// window.$fetchConfig = data
} else {
// response = {
// // 系统名字
// sysName: "嘀加智享车生活",
// // 系统说明
// subName: "让你的生意慧简单",
// // 是否需要注册-true;false
// hasReg: false,
// // 是否需要配置账号权限;true-有权限,从后台获取权限信息;false-无需权限
// hasAuth: true,
// subShopMerchantName: true, // 是否显示财务列表二级流量方
// env: "backendSingle",
// alipayPath: "https://zlsdev.glsx.com.cn/#/alipay",
// css_url:
// "https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/index.css",
// axios: {
// // baseURL: "http://192.168.3.226:9203/rop-dj-smartcarlife/router",
// baseURL: "http://dj.dev.glsx.com.cn/rop-dj-smartcarlife/router",
// // "baseURL": "http://192.168.1.88:8392/rop-dj-smartcarlife/router", //周杭
// // baseURL: "http://192.168.1.227:8392/rop-dj-smartcarlife/router", //陈希
// // baseURL: "http://192.168.1.169:8392/rop-dj-smartcarlife/router", // 蔡远明
// // "baseURL": "http://192.168.1.105:8392/rop-dj-smartcarlife/router", //王润泽
// // "baseURL": "http://192.168.1.104:8392/rop-dj-smartcarlife/router", //叶立庆
// appkey: "48e5e13229b82c1b4e6e8c96151f0637",
// secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
// timeout: 50000,
// result: {
// data_key: "data",
// message_key: "message",
// code_key: "code",
// code_success_value: 0,
// code_message_map: {}
// }
// },
// axios2: {
// baseURL: "https://scrm.dev.glsx.com.cn/rop-scrm-shopmall/router",
// appkey: "48e5e13229b82c1b4e6e8c96151f0637",
// secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
// timeout: 50000,
// result: {
// data_key: "data",
// message_key: "message",
// code_key: "code",
// code_success_value: 0,
// code_message_map: {}
// }
// },
// common: {
// baseURL:
// "http://didicb.glsx.com.cn?method=glsx.accounts.biz.common.pictureUpload",
// appkey: "48e5e13229b82c1b4e6e8c96151f0637",
// secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
// timeout: 50000,
// result: {
// data_key: "data",
// message_key: "message",
// code_key: "code",
// code_success_value: 0,
// code_message_map: {}
// }
// },
// errCode: {
// 1: "系统开小差了,错误码1",
// 2: "开发者权限不足",
// 3: "用户权限不足",
// 4: "图片上传失败,错误码4",
// 5: "系统开小差了,错误码5",
// 6: "编码错误",
// 7: "请求被禁止",
// 8: "系统开小差了,错误码8",
// 9: "业务逻辑出错",
// 20: "系统开小差了,错误码20",
// 21: "系统开小差了,错误码21",
// 22: "系统开小差了,错误码22",
// 23: "系统开小差了,错误码23",
// 24: "系统开小差了,错误码24",
// 25: "系统开小差了,错误码25",
// 26: "系统开小差了,错误码26",
// 27: "系统开小差了,错误码27",
// 28: "系统开小差了,错误码28",
// 29: "系统开小差了,错误码29",
// 30: "系统开小差了,错误码30",
// 31: "系统开小差了,错误码31",
// 32: "系统开小差了,错误码32",
// 33: "非法的参数",
// 34: "用户调用服务的次数超限",
// 35: "会话调用服务的次数超限",
// 36: "应用调用服务的次数超限",
// 37: "应用调用服务的频率超限",
// "-4000": "系统开小差了,错误码-4000",
// "-1": "系统开小差了,错误码-1",
// "-2": "系统开小差了,错误码-2",
// "-3": "系统开小差了,错误码-3",
// "-4": "系统开小差了,错误码-4",
// "-5": "系统开小差了,错误码-5",
// "-6": "系统开小差了,错误码-6",
// "-5001": "请校验并输入必填选项,错误码-5001",
// "-5002": "系统开小差了,错误码-5002",
// "-5003": "请校验并输入必填选项,错误码-5003",
// "-5004": "必填项格式有误,请正确填写,错误码-5004",
// "-5005": "请校验并输入必填选项,错误码-5005",
// "-9000": "流量限制",
// 30210101: "该手机号已存在"
// },
// equitySceneType: [73, 102, 146, 158], // 开发环境 2.0场景 会员权益升级 类目
// solarFilmArr: [1, 111, 112], // 太阳膜类 1太阳膜 111太阳膜(众筹)售后众筹场景 112太阳膜(众筹)
// selfBuildGoodsType: "109,115,116,117,118", // 开发环境 自建商品类目值
// supplierCode: ["19"],
// extendedPosiType: [114, 120], // 延保类 类目值
// membraneTypeList: [1, 4, 6, 12, 14, 115, 116, 117], // 所有膜类类目值
// shelfManageDivisionConfig: [1, 2], // 嘀加上架分账类目 流量费,服务商分润
// shelfManageFinanceConfig: [706, 808, 809, 901, 807], // 嘀加上架对账类目 管理层市场费1,管理层市场费2,一线阳光激励费,一线阳光2激励费,人力成本
// brandId: 2978,
// childrenBrandId: 3454, // 问界二级品牌Id
// roleName: "服务商老板", // 账户中心创建在广联数科下的员工(角色类型=服务商老板,督导)
// yqMerchantObj: {
// hzgl: {
// yqMerchantId: "44217689",
// yqMerchantName: "惠州广联数科科技有限公司",
// yqMerchantIdName: "惠州广联数科科技有限公司44217689"
// },
// glsk: {
// yqMerchantId: "44209813",
// yqMerchantName: "广联数科(内部使用)",
// yqMerchantIdName: "广联数科(内部使用)44209813"
// }
// },
// alyOss: {
// accessKeyId: "LTAI5tRXYZswFNkkGAF2fk4e",
// accessKeySecret: "iYJdlgs6khO53YqoQYDOtHXCk83d5C",
// bucket: "jinrong-huidan-test",
// endpoint: "https://oss-cn-shenzhen.aliyuncs.com"
// }
// }
baseConfig = response
window.$fetchConfig = response
console.log(response)
window.$gscApi = new Request({
...response.gsc,
// baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade',
// baseURL: 'http://192.168.1.103:5006',
session: {
requiresSession: true,
sessionId: _ => util.cookies.get("token")
},
events: {
error: (error, config) => {
Vue.prototype.$message.error(error.msg)
},
logout: (response, config) => {
store.dispatch("d2admin/user/clear")
util.cookies.remove("token")
router.replace("/login")
Vue.prototype.$message.error('登录超时,请重新登录')
}
}
})
console.log(window.$gscApi, '========')
}
})
.finally(() => {
init()
})
function init() {
function init () {
new Vue({
router,
store,
......@@ -289,7 +179,7 @@ function init() {
Vue.prototype.baseConfig = baseConfig
return h(App)
},
created() {
created () {
// 系统配置
Vue.config.devtools = true
// 展示系统信息
......@@ -301,7 +191,7 @@ function init() {
// 初始化全屏监听
this.$store.dispatch("d2admin/fullscreen/listen")
},
mounted() {}
mounted () { }
}).$mount("#app")
}
export { baseConfig }
......@@ -5,7 +5,7 @@ import {
reportTrack
} from "@api/resident"
export default {
data() {
data () {
return {
prePagePath: "",
track_timerFlag: false,
......@@ -14,19 +14,26 @@ export default {
track_timer_out: null
}
},
beforeRouteEnter(to, from, next) {
beforeRouteEnter (to, from, next) {
next((vm) => {
vm.prePagePath = from.path
})
},
computed: {
loginAccount() {
loginAccount () {
return this.$store.state.d2admin.user.info.loginAccount
}
},
methods: {
setReportTrackData(
/**
*
* @param {动作类型} eventType
* @param {事件别名} eventCode
* @param {业务参数} businessParam
* @param {浏览批次id} batchId
*/
setReportTrackData (
eventType,
eventCode = "",
businessParam = "",
......@@ -62,15 +69,13 @@ export default {
recordList.push(item)
}
localStorage.setItem("recordList", JSON.stringify(recordList))
if (recordList.length > 9) {
reportTrack({
recordList
}).then((res) => {
if (res) localStorage.removeItem("recordList")
})
if (!window.TRACK_TIMER) {
console.log('---------------- 重新打开定时埋点 ----------------')
this.sendTrack() //开启定时埋点
}
if (recordList.length > 9) this.sendTrackData()
},
getRandomString(length = 30) {
getRandomString (length = 30) {
const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
let result = ""
......@@ -81,7 +86,7 @@ export default {
}
return result
},
onPageShow() {
onPageShow () {
if (this.track_page_view_flag) return
if (!this.track_batchId) {
this.track_batchId = `DJ_${this.getRandomString()}_${Date.now()}`
......@@ -96,16 +101,17 @@ export default {
this.setBrowseTrackData()
}, 300)
},
onPageHide() {
onPageHide () {
this.track_timerFlag = false
this.track_batchId = null
this.track_page_view_flag = false
clearTimeout(this.track_timer_out)
this.track_timer_out = null
},
setBrowseTrackData() {
setBrowseTrackData () {
try {
if (!this.track_timerFlag || (this.$route.path != "/qualityControlList" && this.$route.path != "/shopConfig")) {
// || (this.$route.path != "/qualityControlList" && this.$route.path != "/shopConfig")
if (!this.track_timerFlag && !this.track_event_code) { //无eventcode时不上报
return
} else {
this.track_timer_out = setTimeout(() => {
......@@ -122,7 +128,7 @@ export default {
console.log(error)
}
},
getPrePagePath(_this) {
getPrePagePath (_this) {
let current = _this
const visited = new Set()
......@@ -142,6 +148,27 @@ export default {
}
return ""
},
sendTrackData () {
let recordList = localStorage.getItem('recordList')
if (recordList && recordList.length) {
reportTrack({
recordList: JSON.parse(recordList)
}).then(res => {
if (res) localStorage.removeItem('recordList')
})
} else {
clearInterval(window.TRACK_TIMER)
window.TRACK_TIMER = null
console.log('---------------- 暂停定时埋点 ----------------')
}
},
/**定时发送埋点数据 */
sendTrack () {
window.TRACK_TIMER = setInterval(() => {
this.sendTrackData()
}, 30e3)
}
}
}
import { reportTrack } from "@api/resident"
import reportTrackFunMixin from './reportTrackFunMixin'
function getRandomString (length = 10) {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
......@@ -13,47 +12,29 @@ export default {
data () {
return {
timerFlag: false,
track_set_timer: null
}
},
beforeDestroy () {
this.onPageHide()
window.removeEventListener('click', this.getTrackData)
this.timerFlag = false
clearTimeout(this.track_set_timer)
this.track_set_timer = null
},
mounted () {
window.addEventListener('click', this.getTrackData)
this.timerFlag = true
this.intervalRepoet()
},
methods: {
getTrackData (e) {
setTimeout(() => {
if (e.id == 'app') return
let target = e.target || e
if (target.dataset && Object.keys(target.dataset).length && target.dataset.eventCode) this.setReportTrackData(0, target.dataset.eventCode, JSON.parse(target.dataset.track))
if (target.dataset && Object.keys(target.dataset).length && target.dataset.eventCode) {
this.setReportTrackData(0, target.dataset.eventCode, JSON.parse(target.dataset?.track || '{}'))
}
else this.getTrackData(target.parentElement)
}, 100)
},
intervalRepoet () {
if (!this.timerFlag) return
this.track_set_timer = setTimeout(() => {
this.sendData()
if (this.timerFlag) this.intervalRepoet()
}, 30 * 1e3)
}, 10)
},
getRandomString: getRandomString,
sendData () {
let recordList = localStorage.getItem('recordList')
if (recordList) {
reportTrack({
recordList: JSON.parse(recordList)
}).then(res => {
if (res) localStorage.removeItem('recordList')
})
}
}
}
}
\ No newline at end of file
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
920: {
path: "/usedCarManagement",
name: "usedCarManagement",
meta: {
title: "二手车管理",
authId: "920",
parentId: "1",
cache: false
}
},
92001: {
path: "/dataView",
name: "dataView",
meta: {
title: "数据看板",
authId: "92001",
parentId: "920",
cache: false
},
component: _import("usedCarManagement/dataView/index")
},
92002: {
path: "/evaluationManagement",
name: "evaluationManagement",
meta: {
title: "评估管理",
authId: "92002",
parentId: "920",
cache: false
},
auth: [
{
authId: "9200201",
parentId: "92002",
label: "详情",
handle: "handleDetail",
addRoutePath: [
{
authId: "9200204",
name: "详情",
parentId: "92002"
}
]
},
{
authId: "9200202",
parentId: "92002",
label: "车辆评估",
handle: "handleAssess",
addRoutePath: [
{
authId: "9200205",
name: "车辆评估",
parentId: "92002"
}
]
},
{
authId: "9200203",
parentId: "92002",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9200206",
parentId: "92002",
label: "图片下载",
handle: "handleDownLoad"
}
],
component: _import("usedCarManagement/evaluationManagement/index")
},
9200204: {
path: "/evalOrderDetail",
name: "evalOrderDetail",
meta: {
title: "评估单详情",
authId: "9200204",
parentId: "92002",
cache: false,
sideHidden: false,
activePath: "/evaluationManagement"
},
component: _import("usedCarManagement/evaluationManagement/evalOrderDetail")
},
9200205: {
path: "/evaluate",
name: "evaluate",
meta: {
title: "车辆评估",
authId: "9200205",
parentId: "92002",
cache: false,
sideHidden: false,
activePath: "/evaluationManagement"
},
component: _import("usedCarManagement/evaluationManagement/evaluate")
},
92003: {
path: "/operateManagement",
name: "operateManagement",
meta: {
title: "运营管理",
authId: "92003",
parentId: "920",
cache: false
},
auth: [
{
authId: "9200301",
parentId: "92003",
label: "详情",
handle: "handleDetail",
addRoutePath: [
{
authId: "9200306",
name: "详情",
parentId: "92003"
}
]
},
{
authId: "9200302",
parentId: "92003",
label: "合同下载",
handle: "handleDownload"
},
{
authId: "9200303",
parentId: "92003",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9200304",
parentId: "92003",
label: "新增激励",
category: "Button",
type: "primary",
handle: "handleAddStimulate"
},
{
authId: "9200305",
parentId: "92003",
label: "详情",
handle: "handleDetail"
},
{
authId: "9200307",
parentId: "92003",
label: "修改",
handle: "handleUpdate"
},
{
authId: "9200308",
parentId: "92003",
label: "删除",
handle: "handleDelete"
}
],
component: _import("usedCarManagement/operateManagement/index")
},
9200306: {
path: "/contractView",
name: "detail",
meta: {
title: "合同详情",
authId: "9200306",
parentId: "92003",
cache: false,
sideHidden: false,
activePath: "/operateManagement"
},
component: _import(
"usedCarManagement/operateManagement/components/contract/detail"
)
},
92004: {
path: "/vehicleManagement",
name: "vehicleManagement",
meta: {
title: "车辆管理",
authId: "92004",
parentId: "920",
cache: false
},
auth: [
{
authId: "9200401",
parentId: "92004",
label: "详情",
handle: "handleDetail",
addRoutePath: [
{
authId: "9200404",
name: "车辆详情",
parentId: "92004"
},
{
authId: "9200405",
name: "编辑车辆",
parentId: "92004"
},
]
},
{
authId: "9200402",
parentId: "92004",
label: "状态变更",
handle: "handleChangeStatus"
},
{
authId: "9200403",
parentId: "92004",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9200406",
parentId: "92004",
label: "图片下载",
handle: "handleDownLoad"
}
],
component: _import("usedCarManagement/vehicleManagement/index")
},
9200404: {
path: "/vehicleDetail",
name: "vehicleDetail",
meta: {
title: "车辆详情",
authId: "9200404",
parentId: "92004",
activePath: "/vehicleManagement",
cache: false
},
auth: [],
component: _import("usedCarManagement/vehicleManagement/detail")
},
9200405: {
path: "/editVehicle",
name: "editVehicle",
meta: {
title: "编辑车辆",
authId: "9200405",
parentId: "92004",
activePath: "/vehicleManagement",
cache: false
},
auth: [],
component: _import("usedCarManagement/vehicleManagement/detail")
}
}
<template>
<d2-dialog :appendToBody="true" :is-visible="dialogVisible" class="accountDailog" title="选择门店" width="720px"
<d2-dialog class="relateStore" :appendToBody="true" :is-visible="dialogVisible" title="选择门店" width="50%"
@confirmDialog="handleAddConfirm" @closeDialog="handleClose">
<div class="tableBox">
<div style="padding: 10px 50px">
<el-input v-model="realSearchForm.merchantName" placeholder="搜索门店名称" maxlength="20" clearable size="small"
style="width: 300px; margin-right: 12px" />
<el-button size="small" type="primary" @click="searchList">
查询
</el-button>
</div>
<d2-table ref="merchantTable" :search-form="realSearchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
</d2-table>
<!-- <div class="tableBox"> -->
<div>
<span>门店名称: </span>
<el-input v-model="realSearchForm.merchantName" placeholder="搜索门店名称" maxlength="20" clearable size="small"
style="width: 300px; margin-right: 12px" />
<el-button size="small" type="primary" @click="searchList">
查询
</el-button>
</div>
<!-- <d2-table ref="merchantTable" :search-form="realSearchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
</d2-table> -->
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable" :data="selectingData" height="365px" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column>
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<el-table class="tableBox table" :data="selectedData" border height="365px">
<el-table-column prop="merchantName" label="门店名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
<!-- </div> -->
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import {
getAllMerchantList,
getMerchantListByScene,
getBrandList
getMerchantListByScene
} from "@api/contentManager"
import { deepClone } from "@/common/util"
export default {
name: "SelectGoodsTypeDialog",
props: {
......@@ -46,6 +70,12 @@ export default {
data() {
return {
getListApi: getAllMerchantList,
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 10,
realSearchForm: {
merchantName: ""
},
......@@ -63,44 +93,113 @@ export default {
}
}
},
mounted() { },
mounted() {
this.selectedData = deepClone(this.selectedList)
this.getSelectingList()
},
methods: {
recoverySelection(list) {
var exitIds = this.selectedList.map((item) => +item.merchantId)
console.log(exitIds)
list.forEach((item) => {
console.log(item.merchantId, "item.merchantId")
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.merchantId)
this.selectingData.forEach((item) => {
exitIds.includes(item.merchantId) &&
this.$refs.merchantTable.$refs.merchantIndexMutiTable.toggleRowSelection(
item,
true
)
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
beforeSearchFn() {
return new Promise((resolve) => {
if (this.config.scene == 0 || this.config.scene == 4) {
this.getListApi = getAllMerchantList
} else {
this.getListApi = getMerchantListByScene
this.realSearchForm.scene = this.config.scene
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.merchantId === item.merchantId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
resolve()
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(
(item) => item.merchantId !== row.merchantId
)
const obj = this.selectingData.find((v) => v.merchantId == row.merchantId)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.merchantId === row.merchantId
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.merchantId !== row.merchantId
))
},
getSelectingList() {
getMerchantListByScene({
...this.realSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then((res) => {
// res?.list?.forEach((val) => {
// // 账户中心门店返回商户号字段是merchantNo
// if (val.merchantNo) val.merchantId = Number(val.merchantNo)
// val?.sceneList?.forEach((subVal) => {
// if (subVal.scene == this.selectedScene) {
// val.yqMerchantId = subVal?.yqMerchant?.merchantId || "-"
// val.yqMerchantName = subVal?.yqMerchant?.merchantName || "-"
// }
// })
// })
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
// recoverySelection(list) {
// var exitIds = this.selectedList.map((item) => +item.merchantId)
// console.log(exitIds)
// list.forEach((item) => {
// console.log(item.merchantId, "item.merchantId")
// exitIds.includes(item.merchantId) &&
// this.$refs.merchantTable.$refs.merchantIndexMutiTable.toggleRowSelection(
// item,
// true
// )
// })
// },
// beforeSearchFn() {
// return new Promise((resolve) => {
// if (this.config.scene == 0 || this.config.scene == 4) {
// this.getListApi = getAllMerchantList
// } else {
// this.getListApi = getMerchantListByScene
// this.realSearchForm.scene = this.config.scene
// }
// resolve()
// })
// },
setTableFinishFun(data) {
this.$nextTick(() => {
this.recoverySelection(data)
})
},
searchList() {
this.$refs?.merchantTable?.refreshTable(true, true)
// this.page = {
// pageSize: this.pageSize,
// currentPage: 1
// }
this.currentPage = 1
this.getSelectingList()
// this.$refs?.merchantTable?.refreshTable(true, true)
},
handleAddConfirm() {
const selectItemList =
this.$refs.merchantTable?.mutiSelectArr?.[
this.tableParams.mutiSelectName
] || []
const selectItemList = this.selectedData
if (selectItemList.length) {
this.$emit("confirmDialogFn", selectItemList)
} else {
......@@ -114,4 +213,47 @@ export default {
}
</script>
<style></style>
<style lang="scss" scoped>
.table {
margin: 0 auto 20px !important;
width: 98%;
}
.tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
......@@ -11,10 +11,10 @@
label-width="200px"
:inline="true">
<el-form-item label="审批编号:">
{{ detailInfo.applyCode ? detailInfo.applyCode : "-" }}
{{ detailInfo.applyCode ? detailInfo.applyCode : "--" }}
</el-form-item>
<el-form-item label="标题:">
{{ detailInfo.title ? detailInfo.title : "-" }}
{{ detailInfo.title ? detailInfo.title : "--" }}
</el-form-item>
<div class="itemDiv">
<el-form-item label="付款主体:"
......@@ -22,13 +22,13 @@
{{
detailInfo.platformMerchantShowName
? detailInfo.platformMerchantShowName
: "-"
: "--"
}}
</el-form-item>
<el-form-item label="本次付款金额:"
class="halfItem">
{{
detailInfo.payAmount ? detailInfo.payAmount.toFixed(2) : "-"
detailInfo.payAmount ? detailInfo.payAmount.toFixed(2) : "--"
}}
</el-form-item>
</div>
......@@ -39,7 +39,7 @@
{{
detailInfo.refundPoints || detailInfo.refundPoints === 0
? detailInfo.refundPoints
: "-"
: "--"
}}
</el-form-item>
<el-form-item :label="'退还积分(' + detailInfo.deliveryEmployeeName + '):'"
......@@ -47,22 +47,22 @@
{{
detailInfo.refundPoints2 || detailInfo.refundPoints2 === 0
? detailInfo.refundPoints2
: "-"
: "--"
}}
</el-form-item>
</div>
<el-form-item label="付款事由:">
{{ detailInfo.payReason ? detailInfo.payReason : "-" }}
{{ detailInfo.payReason ? detailInfo.payReason : "--" }}
</el-form-item>
<div class="itemDiv">
<el-form-item label="收款人:"
class="halfItem">
{{ detailInfo.payee ? detailInfo.payee : "-" }}
{{ detailInfo.payee ? detailInfo.payee : "--" }}
</el-form-item>
<el-form-item label="开户行:"
class="halfItem">
{{
detailInfo.openAccBankName ? detailInfo.openAccBankName : "-"
detailInfo.openAccBankName ? detailInfo.openAccBankName : "--"
}}
</el-form-item>
</div>
......@@ -72,7 +72,7 @@
? detailInfo.bankAccountNo
.replace(/\s/g, "")
.replace(/(.{4})/g, "$1 ")
: "-"
: "--"
}}
</el-form-item>
</el-form>
......@@ -109,7 +109,7 @@
<div class="info-item">
<span class="item-label">支付金额:</span>
<span>{{
item.orderAmount ? item.orderAmount.toFixed(2) : "-"
item.orderAmount ? item.orderAmount.toFixed(2) : "--"
}}</span>
</div>
</block>
......@@ -127,10 +127,10 @@
<span class="max-width">{{ detailInfo[item.name] }}</span>
</el-tooltip>
</template>
<template v-else><span>-</span></template>
<template v-else><span>--</span></template>
</template>
<template v-else>
<span>{{ detailInfo[item.name] || "-" }}</span>
<span>{{ detailInfo[item.name] || "--" }}</span>
</template>
</div>
<block v-for="(item, index) in busiInfoAttrObj.dynamic"
......@@ -174,7 +174,7 @@
<div class="title">
操作记录<el-button type="text"
class="edit-btn"
@click="handleRecordUpdate" v-if="detailInfo.approveType == 1">编辑</el-button>
@click="handleRecordUpdate" v-if="detailInfo.approveType == 1 && detailInfo.refundPayType != 2">编辑</el-button>
</div>
<div class="record-div">
<div class="record-div-d"
......
......@@ -18,7 +18,7 @@
-->
<el-button size="mini"
v-if="
signRefundFlag &&
signRefundFlag && ((detail.payOrder && detail.payOrder.payType != 2) || (detail.payType && detail.payType != 2)) &&
([4, 6].includes(detail.status) ||
([12].includes(detail.status) &&
[2].includes(detail.refundType)))
......
......@@ -43,31 +43,31 @@
:show-btn-ids="['9040804']" />
</span>
<!-- 补充 -->
<span style="margin-right: 10px;" v-if="scope.scope.status == 8 && !scope.scope.oaApproveStatus">
<span style="margin-right: 10px;" v-if="scope.scope.status == 8 && !scope.scope.oaApproveStatus && scope.scope.refundPayType != 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9040810']" />
</span>
<!-- 审核 -->
<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 && scope.scope.refundPayType != 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9040805']" />
</span>
<!-- 结算 -->
<span style="margin-right: 10px;"
v-if="scope.scope.status == 3 && scope.scope.approveType == 1">
v-if="scope.scope.status == 3 && scope.scope.approveType == 1 && scope.scope.refundPayType != 1 && scope.scope.refundPayType != 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9040806']" />
</span>
<!-- 驳回 -->
<span style="margin-right: 10px;"
v-if="(scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2 || scope.scope.status == 3) && scope.scope.approveType == 1">
v-if="(scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2 || scope.scope.status == 3) && scope.scope.approveType == 1 && scope.scope.refundPayType != 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9040807']" />
</span>
<!-- 下载 -->
<span style="margin-right: 10px;"
v-if="scope.scope.approveType == 1 && ![7, 8].includes(scope.scope.status)">
v-if="scope.scope.approveType == 1 && ![7, 8].includes(scope.scope.status) && scope.scope.refundPayType != 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9040808']" />
<span v-if="scope.scope.downCount != 0"
......@@ -113,7 +113,7 @@
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { refundExamine_status, refundExamine_approveTypeOpt, oaApproveStatusOpt, refundOrderSourceOpt } from '@/common/constants.js'
import { refundExamine_status, refundExamine_approveTypeOpt, oaApproveStatusOpt, refundOrderSourceOpt, refundPayTypeOpt } from '@/common/constants.js'
import examineDialog from './components/examineDialog'
import rejectDialog from './components/rejectDialog'
import detailDialog from './components/detailDialog'
......@@ -144,7 +144,8 @@ export default {
applyTime: '',
approveType: '',
oaApproveStatus: '',
refundOrderSource: ''
refundOrderSource: '',
refundPayType: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -238,6 +239,14 @@ export default {
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'refundOrderSourceOpt'
}, {
label: '退款类型',
name: 'refundPayType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'refundPayTypeOpt'
}],
getListApi: refundApplyRecordPage,
tableParams: {
......@@ -370,6 +379,13 @@ export default {
formatter: (cellValue) => {
return this.baseData.approveTypeOpt.find(item => item.confId === cellValue.approveType)?.confValue
}
}, {
label: '退款类型',
prop: 'refundPayType',
width: '100px',
formatter: (cellValue) => {
return this.baseData.refundPayTypeOpt.find(item => item.confId === cellValue.refundPayType)?.confValue
}
}
]
},
......@@ -378,7 +394,8 @@ export default {
approveTypeOpt: deepClone(refundExamine_approveTypeOpt),
oaApproveStatusOpt: deepClone(oaApproveStatusOpt),
platformMerchantIdList: [],
refundOrderSourceOpt: deepClone(refundOrderSourceOpt)
refundOrderSourceOpt: deepClone(refundOrderSourceOpt),
refundPayTypeOpt: deepClone(refundPayTypeOpt)
},
infos: [],
......@@ -475,7 +492,8 @@ export default {
matchBizOrderCode: '',
approveType: '',
oaApproveStatus: '',
refundOrderSource: ''
refundOrderSource: '',
refundPayType: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
......
......@@ -130,20 +130,24 @@ export default {
data.forEach((item) => {
// let timeStr = item.startTime + "-" + item.endTime
xData.push(item.endTime)
yOutputData.push(item.personalOutput)
yOutputData.push(item.personalOutput ? item.personalOutput : 0)
// yOutputDataRate
yConversionData.push(item.conversionRate)
yAverageOrderValueData.push(item.averageOrderValue)
yConversionData.push(item.conversionRate ? item.conversionRate : 0)
yAverageOrderValueData.push(
item.averageOrderValue ? item.averageOrderValue : 0
)
})
} else {
//近四月
data.forEach((item) => {
// let timeStr = item.startTime + "-" + item.endTime
xData.unshift(item.endTime.substring(0, 7))
yOutputData.unshift(item.personalOutput)
yOutputData.unshift(item.personalOutput ? item.personalOutput : 0)
// yOutputDataRate
yConversionData.unshift(item.conversionRate)
yAverageOrderValueData.unshift(item.averageOrderValue)
yConversionData.unshift(item.conversionRate ? item.conversionRate : 0)
yAverageOrderValueData.unshift(
item.averageOrderValue ? item.averageOrderValue : 0
)
})
}
......
......@@ -20,9 +20,16 @@
<!-- </div> -->
<div class="d2-container-content">
<d2-table-header title="驻店学习记录">
<el-button size="small" type="primary" @click="handleAllocation">
短课程配课
</el-button>
<div class="flex">
<el-button size="small" type="primary" @click="handleAllocation">
短课程配课
</el-button>
<span style="margin-left: 10px">
<el-button size="small" @click="handleExport" type="primary">
导出
</el-button></span
>
</div>
</d2-table-header>
<d2-table
ref="shortTable"
......@@ -198,6 +205,9 @@ import {
punishTypeOpt,
punishStatusOpt
} from "@/common/constants.js"
import dayjs from "dayjs"
const thirtyOneDaysAgo = new Date()
thirtyOneDaysAgo.setDate(thirtyOneDaysAgo.getDate() - 30)
export default {
name: "CourseList",
data() {
......@@ -212,7 +222,7 @@ export default {
mainBrand: "",
punishType: "",
taskStatus: "",
checkTime: [], //复盘时间
checkTime: [thirtyOneDaysAgo, new Date()], //复盘时间
finishTime: [] //完成时间
},
searchFormSearch: {},
......@@ -279,7 +289,7 @@ export default {
label: "复盘时间",
name: "checkTime",
type: "datePicker",
isClear: true,
isClear: false,
pickerOptions: "rangePickerOptions"
},
{
......@@ -469,17 +479,51 @@ export default {
this.handleSearch()
})
},
beforeSearchFn() {
return new Promise((resolve) => {
async handleExport() {
try {
var params = await this.beforeSearchFn(2)
params.currentPage = 1
params.method =
"dj.api.smartcarlife.servicecenter.sop.detail.page.export"
const list = [
...this.dowloadList,
{
name: "短课程配置",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
// uuid: JSON.parse(res).data,
// ifSuccess: false
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
} catch (err) {
console.log(err)
}
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.checkTime.length) {
this.searchFormSearch.checkStartTime = Util.dateFormate(
this.searchFormSearch.checkTime[0],
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.checkStartTime =
Util.dateFormate(this.searchFormSearch.checkTime[0], "YYYY-MM-DD") +
" 00:00:00"
this.searchFormSearch.checkEndTime =
Util.dateFormate(this.searchFormSearch.checkTime[1], "YYYY-MM-DD") +
" 23:59:59"
const date1 = dayjs(this.searchFormSearch.checkStartTime),
date2 = dayjs(this.searchFormSearch.checkEndTime),
day = date2.diff(date1, "day") + 1
if (day > 31) {
this.$message.error(
`${
type == 1 ? "查询" : "导出"
}的时间跨度最大为31天,请重新选择日期范围`
)
reject()
}
}
if (this.searchFormSearch.finishTime.length) {
this.searchFormSearch.finishStartTime = Util.dateFormate(
......@@ -494,7 +538,7 @@ export default {
}
delete this.searchFormSearch.finishTime
delete this.searchFormSearch.checkTime
resolve()
resolve(this.searchFormSearch)
})
},
handleReset() {
......@@ -505,7 +549,7 @@ export default {
mainBrand: "",
punishType: "",
taskStatus: "",
checkTime: [], //复盘时间
checkTime: [thirtyOneDaysAgo, new Date()], //复盘时间
finishTime: [],
businessSceneTypeName: ""
}
......@@ -605,31 +649,6 @@ export default {
closeQRDetailDialog() {
this.QRdetailVisible = !this.QRdetailVisible
this.$refs.shortTable.refreshTable(false, true)
},
handleExport() {
var params = this.searchFormSearch
// 去除为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.invoiceIssueQrcode.export.async"
const list = [
...this.dowloadList,
{
name: "开票二维码",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
}
}
}
......
......@@ -1037,48 +1037,52 @@ export default {
closeWarnDialog() {
this.warningVisible = false
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.orderTime) {
this.searchFormSearch.orderStartTime = Util.dateFormate(
this.searchFormSearch.orderTime[0],
"YYYY-MM-DD 00:00:00"
getParams() {
const params = deepClone(this.searchForm)
if (params.orderTime) {
params.orderStartTime = Util.dateFormate(
params.orderTime[0],
"YYYY-MM-DD 00:00:00"
)
params.orderEndTime = Util.dateFormate(
params.orderTime[1],
"YYYY-MM-DD 23:59:59"
)
delete params.orderTime
}
const dateFormatList = [
{
attr: "createdDate",
startAttr: "createStartTime",
endAttr: "createEndTime"
},
{
attr: "businessDevTime",
startAttr: "businessDevStartTime",
endAttr: "businessDevEndTime"
}
]
dateFormatList.forEach((item) => {
if (
params[item.attr] &&
params[item.attr].length
) {
params[item.startAttr] = Util.dateFormate(
params[item.attr][0],
"YYYY-MM-DD"
)
this.searchFormSearch.orderEndTime = Util.dateFormate(
this.searchFormSearch.orderTime[1],
"YYYY-MM-DD 23:59:59"
params[item.endAttr] = Util.dateFormate(
params[item.attr][1],
"YYYY-MM-DD"
)
delete this.searchFormSearch.orderTime
}
const dateFormatList = [
{
attr: "createdDate",
startAttr: "createStartTime",
endAttr: "createEndTime"
},
{
attr: "businessDevTime",
startAttr: "businessDevStartTime",
endAttr: "businessDevEndTime"
}
]
dateFormatList.forEach((item) => {
if (
this.searchFormSearch[item.attr] &&
this.searchFormSearch[item.attr].length
) {
this.searchFormSearch[item.startAttr] = Util.dateFormate(
this.searchFormSearch[item.attr][0],
"YYYY-MM-DD"
)
this.searchFormSearch[item.endAttr] = Util.dateFormate(
this.searchFormSearch[item.attr][1],
"YYYY-MM-DD"
)
delete this.searchFormSearch[item.attr]
}
})
delete params[item.attr]
})
return params
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
......@@ -1202,7 +1206,7 @@ export default {
},
handleExport() {
var params = deepClone(this.searchFormSearch)
var params = this.getParams()
// debugger
params.method =
"dj.api.smarcarlife.serviceMerchant.shopSettingList.export.async"
......
......@@ -221,9 +221,10 @@
<span class="flag-text">查看订单商品成本</span>
</el-form-item>
<el-form-item label="捆绑轻改门店:">
<el-select v-model="form.bindMerchantId" remote reserve-keyword class="el_select itd" placeholder="请选择"
@visible-change="visibleChange" :remote-method="remoteMethodBind" clearable
v-el-select-loadmore="interestsLoadmore" filterable @change="bindMerchantChange">
<!-- -->
<el-select v-el-select-loadmore="interestsLoadmore" v-model="form.bindMerchantId" remote reserve-keyword
class="el_select itd" placeholder="请选择" @visible-change="visibleChange" :remote-method="remoteMethodBind"
clearable filterable @change="bindMerchantChange">
<el-option v-for="item in upgradeMerchantList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantId" />
</el-select>
......@@ -346,7 +347,7 @@ export default {
6: [],
7: [],
8: [],
9: [],
9: []
},
outputValueListByYear: [],
year: "",
......@@ -443,6 +444,18 @@ export default {
const { merchantId } = info
// 通过下拉筛选项剔除之前选中但现在已经不是该角色的人员
const filterObj = [{
directorTypeList: [1],
listName: 'sellerMerchantStaffList'
}, {
directorTypeList: [2],
listName: 'serviceBossList'
}, {
directorTypeList: [3],
listName: 'sellerMerchantStaffList'
}, {
directorTypeList: [4],
listName: 'serviceBossList'
}, {
directorTypeList: [5],
listName: 'storePersonList'
}, {
......@@ -460,21 +473,13 @@ export default {
}]
return new Promise((resolve, reject) => {
getShopSetting({ merchantId }).then((res) => {
// this.setInfo = res
// const areaSupervisionList = []
// res.areaSupervisionList?.forEach((item) => {
// const target = this.supervisionOptionsList.find(
// (ele) => ele.userId == item.userId
// )
// if (target) areaSupervisionList.push(item.userId)
// })
// res.areaSupervisionList = areaSupervisionList
res.shopMerchantConfig?.directorList?.forEach((item) => {
let target = this[
item.directorType == 4 || item.directorType == 2
? "serviceBossList"
: "sellerMerchantStaffList"
]?.find((ele) => ele.userId == item.directorUserId)
let target = null
// let target = this[
// item.directorType == 4 || item.directorType == 2
// ? "serviceBossList"
// : "sellerMerchantStaffList"
// ]?.find((ele) => ele.userId == item.directorUserId)
filterObj.forEach(k => {
if (k.directorTypeList.includes(item.directorType)) {
target = this[k.listName]?.find(
......@@ -482,6 +487,7 @@ export default {
)
}
})
console.log('target', target)
if (target) {
this.directorList[item.directorType].push(item.directorUserId)
}
......@@ -554,6 +560,34 @@ export default {
// { item: 'boutiqueDirectorUserId', optionsList: 'sellerMerchantStaffList' },
// { item: 'quotationDirectorUserId', optionsList: 'sellerMerchantStaffList' }
]
const directorItemKey = [{
item: this.directorList[1],
optionsList: 'sellerMerchantStaffList'
}, {
item: this.directorList[2],
optionsList: 'serviceBossList'
}, {
item: this.directorList[3],
optionsList: 'sellerMerchantStaffList'
}, {
item: this.directorList[4],
optionsList: 'serviceBossList'
}, {
item: this.directorList[5],
optionsList: 'storePersonList'
}, {
item: this.directorList[6],
optionsList: 'flySuperList'
}, {
item: this.directorList[7],
optionsList: 'storePersonList'
}, {
item: this.directorList[8],
optionsList: 'supervisionOptionsList'
}, {
item: this.directorList[9],
optionsList: 'supervisionOptionsList'
}]
selectItemKey.map((val) => {
if (typeof _form[val.item] == "object") {
const index = this[val.optionsList]?.findIndex(
......@@ -567,6 +601,19 @@ export default {
if (index < 0) this.$set(this.form.shopMerchantConfig, val.item, "")
}
})
// 已删除的员工下拉框选项需清除
directorItemKey.map((obj) => {
const item = obj.item
item.filter(arrItem => {
const index = this[obj.optionsList]?.findIndex(
(optItem) => arrItem == optItem.userId
)
if (index > 0) {
return arrItem
}
})
console.log('obj', obj)
})
},
handleAddMerchant() {
......@@ -670,6 +717,11 @@ export default {
}
})
this.serviceBossList = arr
// this.serviceBossList = this.serviceBossList.filter(item => {
// if (item.userName != 'timing1' && item.userName != 'tianer') {
// return item
// }
// })
this.storePersonList = arr2
resolve()
})
......@@ -815,7 +867,7 @@ export default {
bindMerchantChange(e) {
console.log(e)
let name = this.upgradeMerchantList?.find(val => val.merchantId == e)?.merchantName
const name = this.upgradeMerchantList?.find(val => val.merchantId == e)?.merchantName
this.form = {
...this.form,
bindMerchantId: e,
......
......@@ -52,6 +52,11 @@ export default {
sceneDesc: '次新车用户领取套餐包转化',
sceneType: 2,
isOpen: 'N'
},{
sceneName: '二手车业务',
sceneDesc: '门店二手车置换或报废业务',
sceneType: 7,
isOpen: 'N'
}]
}
},
......
<template>
<transition name="viewer-fade">
<div
tabindex="-1"
ref="el-image-viewer__wrapper"
class="el-image-viewer__wrapper"
:style="{ 'z-index': zIndex }"
>
<div class="el-image-viewer__mask" @click="hide"></div>
<!-- CLOSE -->
<span class="el-image-viewer__btn el-image-viewer__close" @click="hide">
<i class="el-icon-circle-close"></i>
</span>
<!-- ARROW -->
<template v-if="!isSingle">
<span
class="el-image-viewer__btn el-image-viewer__prev"
:class="{ 'is-disabled': !infinite && isFirst }"
@click="prev"
>
<i class="el-icon-arrow-left" />
</span>
<span
class="el-image-viewer__btn el-image-viewer__next"
:class="{ 'is-disabled': !infinite && isLast }"
@click="next"
>
<i class="el-icon-arrow-right" />
</span>
</template>
<!-- ACTIONS -->
<div class="el-image-viewer__btn el-image-viewer__actions">
<div class="el-image-viewer__actions__inner">
<i class="el-icon-zoom-out" @click="handleActions('zoomOut')"></i>
<i class="el-icon-zoom-in" @click="handleActions('zoomIn')"></i>
<i class="el-image-viewer__actions__divider"></i>
<i :class="mode.icon" @click="toggleMode"></i>
<i class="el-image-viewer__actions__divider"></i>
<i
class="el-icon-refresh-left"
@click="handleActions('anticlocelise')"
></i>
<i
class="el-icon-refresh-right"
@click="handleActions('clocelise')"
></i>
</div>
</div>
<!-- CANVAS -->
<div class="el-image-viewer__canvas">
<img
v-for="(url, i) in urlList"
v-if="i === index"
ref="img"
class="el-image-viewer__img"
:key="url"
:src="currentImg"
:style="imgStyle"
@load="handleImgLoad"
@error="handleImgError"
@mousedown="handleMouseDown"
/>
</div>
</div>
</transition>
</template>
<script>
function rafThrottle(fn) {
let locked = false
return function (...args) {
if (locked) return
locked = true
window.requestAnimationFrame((_) => {
fn.apply(this, args)
locked = false
})
}
}
const on = (function () {
return function (element, event, handler) {
if (element && event && handler) {
element.addEventListener(event, handler, false)
}
}
})()
const off = (function () {
return function (element, event, handler) {
if (element && event) {
element.removeEventListener(event, handler, false)
}
}
})()
const isFirefox = function () {
return !!window.navigator.userAgent.match(/firefox/i)
}
const Mode = {
CONTAIN: {
name: "contain",
icon: "el-icon-full-screen"
},
ORIGINAL: {
name: "original",
icon: "el-icon-c-scale-to-original"
}
}
const mousewheelEventName = isFirefox() ? "DOMMouseScroll" : "mousewheel"
export default {
name: "elImageViewer",
props: {
urlList: {
type: Array,
default: () => []
},
zIndex: {
type: Number,
default: 2000
},
onSwitch: {
type: Function,
default: () => {}
},
onClose: {
type: Function,
default: () => {}
},
initialIndex: {
type: Number,
default: 0
}
},
data() {
return {
index: this.initialIndex,
isShow: false,
infinite: true,
loading: false,
mode: Mode.CONTAIN,
transform: {
scale: 1,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
}
}
},
computed: {
isSingle() {
return this.urlList.length <= 1
},
isFirst() {
return this.index === 0
},
isLast() {
return this.index === this.urlList.length - 1
},
currentImg() {
return this.urlList[this.index]
},
imgStyle() {
const { scale, deg, offsetX, offsetY, enableTransition } = this.transform
const style = {
transform: `scale(${scale}) rotate(${deg}deg)`,
transition: enableTransition ? "transform .3s" : "",
"margin-left": `${offsetX}px`,
"margin-top": `${offsetY}px`
}
if (this.mode === Mode.CONTAIN) {
style.maxWidth = style.maxHeight = "100%"
}
return style
}
},
watch: {
index: {
handler: function (val) {
this.reset()
this.onSwitch(val)
}
},
currentImg(val) {
this.$nextTick((_) => {
const $img = this.$refs.img[0]
if (!$img.complete) {
this.loading = true
}
})
}
},
methods: {
hide() {
console.log(888)
this.deviceSupportUninstall()
this.onClose()
},
deviceSupportInstall() {
this._keyDownHandler = rafThrottle((e) => {
const keyCode = e.keyCode
switch (keyCode) {
// ESC
case 27:
this.hide()
break
// SPACE
case 32:
this.toggleMode()
break
// LEFT_ARROW
case 37:
this.prev()
break
// UP_ARROW
case 38:
this.handleActions("zoomIn")
break
// RIGHT_ARROW
case 39:
this.next()
break
// DOWN_ARROW
case 40:
this.handleActions("zoomOut")
break
}
})
this._mouseWheelHandler = rafThrottle((e) => {
const delta = e.wheelDelta ? e.wheelDelta : -e.detail
if (delta > 0) {
this.handleActions("zoomIn", {
zoomRate: 0.015,
enableTransition: false
})
} else {
this.handleActions("zoomOut", {
zoomRate: 0.015,
enableTransition: false
})
}
})
on(document, "keydown", this._keyDownHandler)
on(document, mousewheelEventName, this._mouseWheelHandler)
},
deviceSupportUninstall() {
off(document, "keydown", this._keyDownHandler)
off(document, mousewheelEventName, this._mouseWheelHandler)
this._keyDownHandler = null
this._mouseWheelHandler = null
},
handleImgLoad(e) {
this.loading = false
},
handleImgError(e) {
this.loading = false
e.target.alt = "加载失败"
},
handleMouseDown(e) {
if (this.loading || e.button !== 0) return
const { offsetX, offsetY } = this.transform
const startX = e.pageX
const startY = e.pageY
this._dragHandler = rafThrottle((ev) => {
this.transform.offsetX = offsetX + ev.pageX - startX
this.transform.offsetY = offsetY + ev.pageY - startY
})
on(document, "mousemove", this._dragHandler)
on(document, "mouseup", (ev) => {
off(document, "mousemove", this._dragHandler)
})
e.preventDefault()
},
reset() {
this.transform = {
scale: 1,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
}
},
toggleMode() {
if (this.loading) return
const modeNames = Object.keys(Mode)
const modeValues = Object.values(Mode)
const index = modeValues.indexOf(this.mode)
const nextIndex = (index + 1) % modeNames.length
this.mode = Mode[modeNames[nextIndex]]
this.reset()
},
prev() {
if (this.isFirst && !this.infinite) return
const len = this.urlList.length
this.index = (this.index - 1 + len) % len
},
next() {
if (this.isLast && !this.infinite) return
const len = this.urlList.length
this.index = (this.index + 1) % len
},
handleActions(action, options = {}) {
if (this.loading) return
const { zoomRate, rotateDeg, enableTransition } = {
zoomRate: 0.2,
rotateDeg: 90,
enableTransition: true,
...options
}
const { transform } = this
switch (action) {
case "zoomOut":
if (transform.scale > 0.2) {
transform.scale = parseFloat(
(transform.scale - zoomRate).toFixed(3)
)
}
break
case "zoomIn":
transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3))
break
case "clocelise":
transform.deg += rotateDeg
break
case "anticlocelise":
transform.deg -= rotateDeg
break
}
transform.enableTransition = enableTransition
}
},
mounted() {
this.deviceSupportInstall()
// add tabindex then wrapper can be focusable via Javascript
// focus wrapper so arrow key can't cause inner scroll behavior underneath
this.$refs["el-image-viewer__wrapper"].focus()
}
}
</script>
<!--评估量趋势 -->
<template>
<div class="container">
<line-header @handleClick="handleClick" :title="title"></line-header>
<echart-line
class="echart"
:xData="xData"
:yData="yData"
id="assessRef"
:title="title"
></echart-line>
</div>
</template>
<script>
import lineHeader from "./lineHeader.vue"
import echartLine from "./echartLine.vue"
import { getEvaluationData } from "@/api/usedCarManagement.js"
export default {
components: {
lineHeader,
echartLine
},
data() {
return {
dateType: 1,
title: "评估量",
xData: [],
yData: []
}
},
created() {
this.getEvaluationData()
},
methods: {
getEvaluationData(activeIndex = 0, index = 0) {
let params = {
dateType: this.dateType,
merchantNos: ""
}
getEvaluationData(params)
.then((res) => {
if (activeIndex == index) {
this.handleData(res)
}
})
.catch((err) => {
new Error(err)
})
},
handleData(data) {
let xData = [],
yData = []
data.forEach((item) => {
xData.push(item.date)
yData.push(item.count)
})
this.xData = xData
this.yData = yData
},
handleClick(data, activeIndex, index) {
this.dateType = data.value
this.getEvaluationData(activeIndex, index)
}
}
}
</script>
<style scoped lang="scss">
.container {
height: 385px;
padding: 20px;
background: #ffffff;
margin-bottom: 16px;
.echart {
height: 319px;
}
}
</style>
<template>
<div :ref="id" class="canvas"></div>
</template>
<script>
// 按需引入 echarts
import * as echarts from "echarts"
export default {
data() {
return {
client: "",
chart: ""
}
},
props: {
colors: {
type: Array,
default: () => ["#FFC154", "#FF9671"]
},
xData: {
type: Array,
default: []
},
yData: {
type: Array,
default: []
},
id: {
type: String,
default: ""
},
title: {
type: String,
default: ""
}
},
watch: {
yData: {
handler() {
this.chart.setOption(this.getChartSetOption())
},
deep: true
}
},
mounted() {
this.client = this.$refs[this.id]
this.chart = echarts.init(this.client)
this.chart.setOption(this.getChartSetOption())
window.addEventListener("resize", this.resizeHandler)
},
methods: {
resizeHandler() {
if (this.chart) {
this.chart.clear()
setTimeout(() => {
this.chart.setOption(this.getChartSetOption())
this.chart.resize()
}, 1000)
}
},
getMax() {
let tickIntervalNum = 0
if (this.yData.length) {
let s = this.yData[0]
for (var i = 1; i < this.yData.length; i++) {
if (s < this.yData[i]) {
s = this.yData[i]
}
}
tickIntervalNum = s
}
return tickIntervalNum || 1
},
getChartSetOption() {
let maxVal = this.getMax()
// 计算合适的最大值,向上取整到最接近的整数
let yAxisMax = Math.ceil(maxVal)
// 确保最小值为0
let yAxisMin = 0
// 计算间隔,确保正好显示5个点 (0, interval, 2*interval, 3*interval, 4*interval)
let interval = Math.ceil(yAxisMax / 5)
var option = {
grid: {
top: "37",
bottom: "0",
left: "13",
right: "16",
containLabel: true
},
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
type: "solid"
}
},
padding: 12,
borderColor: "transparent",
borderWidth: 1,
backgroundColor: "rgba(255, 255, 255, 0.95)",
borderRadius: 4,
textStyle: {
color: "rgba(0, 0, 0, 0.65)",
fontSize: 14
},
formatter: (params) => {
return `
<div style="font-weight:normal;color:rgba(0, 0, 0, 0.65); line-height: 20px;margin-bottom:4px;">${params[0].name}</div>
<div style="rgba(0, 0, 0, 0.65);display:flex;align-items:center; line-height: 20px;"> <div style="width: 6px;
height: 6px;background: ${params[0].color};border-radius:50%;margin-right:7.8px;"></div>
${this.title}:${params[0].value}辆
</div>
`
}
},
xAxis: {
type: "category",
// boundaryGap: false,
// splitNumber: 4,
axisLine: {
show: false
},
axisTick: {
show: false,
lineStyle: {
color: "#fff"
}
},
splitLine: {
show: false, // 隐藏网格线
color: "#E9E9E9"
},
axisLine: {
show: false
},
axisLabel: {
// rotate: 30, // 横轴名称旋转
// interval: 0,// 强制显示所有标签
show: true,
color: "rgba(0, 0, 0, 0.65)",
fontSize: "12px"
},
data: this.xData
},
yAxis: {
type: "value",
name: "辆",
nameTextStyle: {
color: "rgba(0, 0, 0, 0.65)",
align: "right"
},
offset: 10,
labelLine: {
show: true
},
axisLine: {
show: false,
lineStyle: {
color: "#E7EBEF"
}
},
axisLabel: {
show: true,
color: "rgba(0, 0, 0, 0.65)",
fontSize: "12px"
},
splitLine: {
show: true, // 根据隐藏网格线
color: "#E9E9E9"
},
axisTick: {
show: false
},
// 设置y轴固定显示5个点
min: yAxisMin,
max: interval * 5, // 确保最大值是间隔的4倍,这样就有0,1,2,3,4共5个点
interval: interval
},
series: [
{
type: "line",
avoidLabelOverlap: false,
label: {
formatter: "{c}%",
position: "top",
fontSize: 11,
show: false,
color: "#999999"
},
showSymbol: true,
itemStyle: {
color: "#2A58AD"
},
data: this.yData
}
]
}
return option
},
destroyChart() {
// 移除窗口 resize 事件监听器
window.removeEventListener("resize", this.resizeHandler)
// 销毁 ECharts 实例
if (this.chart) {
this.chart.dispose()
this.chart = null
}
}
},
beforeDestroy() {
this.destroyChart()
},
// 如果使用的是 Vue 3,则使用 beforeUnmount
beforeUnmount() {
this.destroyChart()
}
}
</script>
<style scoped lang="scss">
.canvas {
width: 100%;
height: 100%;
}
</style>
<template>
<div class="header">
<div>{{ title }}趋势</div>
<div class="times">
<div
:class="{
time: true,
active: index === activeIndex
}"
v-for="(item, index) in timeopts"
:key="index"
@click="handleClick(index)"
>
{{ item.label }}
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
activeIndex: 0,
timeopts: [
{ label: "近7日", value: 1 },
{ label: "本月", value: 2 },
{ label: "上月", value: 3 },
{ label: "近30日", value: 4 }
]
}
},
props: {
title: {
type: String,
default: "评估量趋势"
}
},
methods: {
handleClick(index) {
if (this.activeIndex != index) {
this.activeIndex = index
let data = this.timeopts[index]
this.$emit("handleClick", data, this.activeIndex, index)
}
}
}
}
</script>
<style scoped lang="scss">
.header {
display: flex;
align-items: center;
justify-content: space-between;
.times {
display: flex;
align-items: center;
border: 1px solid #dbdbdb;
border-radius: 2px;
box-sizing: border-box;
.time {
padding: 7.5px 18px;
line-height: 17px;
cursor: pointer;
color: #1d1d1d;
font-size: 12px;
font-weight: 400;
border-right: 1px solid #dbdbdb;
box-sizing: border-box;
}
.active {
color: #ffffff;
background: #2a58ad;
&:first-child {
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
}
&:last-child {
border-right: none;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
}
.time:last-child {
border-right: none;
}
}
}
</style>
<!--评估量趋势 -->
<template>
<div class="container">
<line-header @handleClick="handleClick" :title="title"></line-header>
<echart-line
class="echart"
:xData="xData"
:yData="yData"
id="turnoverRef"
:title="title"
></echart-line>
</div>
</template>
<script>
import lineHeader from "./lineHeader.vue"
import echartLine from "./echartLine.vue"
import { getDealData } from "@/api/usedCarManagement.js"
export default {
components: {
lineHeader,
echartLine
},
data() {
return {
dateType: 1,
title: "二手车成交量",
xData: [],
yData: []
}
},
created() {
this.getDealData()
},
methods: {
getDealData() {
let params = {
dateType: this.dateType,
merchantNos: ""
}
getDealData(params)
.then((res) => {
this.handleData(res)
})
.catch((err) => {
new Error(err)
})
},
handleData(data) {
let xData = [],
yData = []
data.forEach((item) => {
xData.push(item.date)
yData.push(item.count)
})
this.xData = xData
this.yData = yData
},
handleClick(data) {
this.dateType = data.value
this.getDealData()
}
}
}
</script>
<style scoped lang="scss">
.container {
height: 385px;
padding: 20px;
background: #ffffff;
margin-bottom: 16px;
.echart {
height: 319px;
}
}
</style>
<!--总部定价师估价与意见 -->
<template>
<div class="edit-assess">
<div class="title">总部定价师估价与意见</div>
<div class="edit-form-wrapper">
<glsx-combi-form
class="edit-form-container"
ref="editFormRef"
:isBlock="true"
label-width="150px"
:form-ref="editChildRef"
:form-obj="assessForm"
:form-data="assessFormData"
:form-rules="assessRules"
>
</glsx-combi-form>
</div>
</div>
</template>
<script>
export default {
props: {
detailInfo: {
type: Object,
default: function () {
return {}
}
}
},
data() {
return {
editChildRef: "editChildRef",
assessForm: {
evalPrice: "",
evalOpinion: ""
},
assessFormData: [
{
label: "评估价",
name: "evalPrice",
type: "input",
isClear: true,
maxlength: 7,
width: "570px",
placeholder: "请输入",
append: "元"
},
{
label: "评估意见",
name: "evalOpinion",
type: "input",
maxlength: 200,
inputType: "textarea",
// showLimit: true,
rows: 4,
width: "570px",
placeholder: "请输入"
}
],
assessRules: {
evalPrice: [
{
required: true,
message: "请输入",
trigger: "blur"
},
{
validator: (rule, value, callback) => {
if (!value) {
callback()
return
}
// 校验是否为整数
if (!/^\d+$/.test(value)) {
callback(new Error("只能输入整数"))
} else {
callback()
}
},
trigger: "blur"
},
{
validator: (rule, value, callback) => {
if (!value) {
callback()
return
}
const numValue = parseInt(value, 10)
if (isNaN(numValue)) {
callback(new Error("请输入有效整数"))
} else if (numValue <= 0) {
callback(new Error("评估价必须大于0"))
} else if (numValue > 9999999) {
callback(new Error("评估价必须小于9999999"))
} else {
callback()
}
},
trigger: "blur"
}
],
evalOpinion: [
{
required: true,
message: "请输入",
trigger: "blur"
}
]
}
}
},
watch: {
detailInfo(val) {
console.log(val, "detailInfo")
this.assessForm = {
evalPrice: val.evalPrice,
evalOpinion: val.evalOpinion
}
}
},
methods: {
async confirm() {
try {
const formRef = this.$refs.editFormRef
if (!formRef || !formRef.$refs || !formRef.$refs[this.editChildRef]) {
console.error("Form reference not found")
return false
}
const isValid = await formRef.$refs[this.editChildRef].validate()
console.log(isValid, "isValid")
return isValid
} catch (error) {
console.error("Validation failed:", error)
return false
}
}
}
}
</script>
<style lang="scss" scoped>
.edit-assess {
background: #fff;
margin: 20px;
.title {
color: #333333;
font-size: 16px;
font-weight: bold;
padding: 13.5px 20px;
border-bottom: 1px solid #e5e5e5;
line-height: 23px;
box-sizing: border-box;
}
.edit-form-wrapper {
padding: 20px;
::v-deep .el-input__suffix-inner {
color: #333333;
font-size: 14px;
}
}
}
</style>
<template>
<div class="info-wrapper">
<div class="item" v-for="(item, index) in configData" :key="index">
<div class="title">{{ item.title }}</div>
<div class="detail-content">
<div class="form_div" v-if="item.infoData && item.infoData.length">
<el-form
ref="ruleForm"
class="edit-sub-block"
label-width="150px"
:inline="true"
:model="detailInfo"
:rules="rules"
>
<el-row :gutter="20">
<template v-for="(item, key) in item.infoData">
<el-col :span="item.col ? item.col : 12" :key="key">
<el-form-item :label="item.title + ':'" :prop="item.key">
<template v-if="item.type == 'imgList'">
<div
class="photo-box"
v-if="
detailInfo[item.key] && detailInfo[item.key].length
"
>
<glsx-preview
:key="preIndex"
:image-url-arr="
detailInfo[item.key] ? detailInfo[item.key] : []
"
:picOptions="{ ...picOptions, type: item.type }"
limit="1"
></glsx-preview>
</div>
<template v-else> - </template>
</template>
<template v-else-if="item.isEdit">
<template v-if="item.type == 'input'">
<el-input
v-model="detailInfo[item.key]"
:placeholder="`请输入${item.label}`"
:maxlength="item.maxLength || ''"
size="small"
class="edit-form-item"
></el-input>
</template>
<template v-else-if="item.type == 'date'">
<el-date-picker
v-model="detailInfo[item.key]"
type="date"
:placeholder="item.label"
size="small"
class="edit-form-item"
:picker-options="item.pickerOptions"
>
</el-date-picker>
</template>
<template v-else-if="item.type == 'textarea'">
<el-input
type="textarea"
:rows="3"
placeholder="请输入"
v-model="detailInfo[item.key]"
:maxlength="item.maxLength"
class="edit-form-item"
>
</el-input>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="detailInfo[item.key]"
:placeholder="`请选择${item.label}`"
size="small"
class="edit-form-item"
>
<el-option
v-for="item in item.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</template>
</template>
<template v-else>
<div
v-if="item.className && item.className(detailInfo)"
:style="{
background: item.className(detailInfo)
}"
:class="'dot'"
></div>
<div class="flex">
{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
<template v-if="item.suffixText">
<div class="unit">
{{ item.suffixText }}
</div>
</template>
</div>
</template>
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
</div>
<template v-if="item.subTitle">
<div v-for="signIndex in item.sign" :key="signIndex">
<div class="subtitle">{{ item.subTitle }}{{ signIndex }}</div>
<div class="detail-content">
<div class="form_div" v-if="item.subData && item.subData.length">
<el-form
class="edit-sub-block"
label-width="150px"
:inline="true"
>
<el-row :gutter="20">
<template v-for="(item, key) in item.subData">
<el-col :span="item.col ? item.col : 12" :key="key">
<el-form-item :label="item.title + ':'">
<div
v-if="item.className && item.className(detailInfo)"
:style="{
background: item.className(detailInfo)
}"
:class="'dot'"
></div>
<template>
{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</template>
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
</div>
</div>
</template>
<script>
import { deepClone } from "@/common/util"
export default {
props: {
detailInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
detailInfo: {
evalPrice: "2000",
evalOpinion:
"分享时机,在不同的时机分析用户是否有分享的意愿,提供给他们合适的分享内容,能让分享的效果更好。尤其是刚上线的产品,很难通过产品的内部体系来实现快速的用户增长,所以会更加依赖于分享来达到广泛的传播,获取目标用户。所以监听用户的截图操作,提示用户进行分享,既缩短了以前分享截图的操作路径,避免了在之前长路径中的行为流失(比如截图完成后忘记分享或觉得麻烦放弃分享等等),也让用户觉得更加贴心。"
},
configData: [
{
title: "总部定价师估价与意见",
infoData: [
{
title: "评估价",
key: "evalPrice",
col: 24,
formatter: (row) => {
return row.evalPrice || row.evalPrice === 0
? row.evalPrice + "元"
: "-"
}
},
{
title: "评估意见",
key: "evalOpinion",
col: 24
}
]
}
]
}
}
}
</script>
<style scoped lang="scss">
@import "./detail.scss";
</style>
.info-wrapper {
background-color: #fff;
margin: 0 20px;
.item {
margin-bottom: 20px;
.title {
color: #333333;
font-size: 16px;
font-weight: bold;
padding: 13.5px 20px;
border-bottom: 1px solid #e5e5e5;
line-height: 23px;
box-sizing: border-box;
}
.form_div {
color: #333333;
padding: 20px;
font-size: 14px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
::v-deep .el-form-item__label {
color: #666666;
font-size: 14px;
line-height: 20px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-col {
margin-bottom: 20px;
}
::v-deep .el-form-item__content {
width: calc(100% - 150px);
word-break: break-all;
line-height: 20px;
}
::v-deep el-form-item--medium .el-form-item__label {
line-height: 20px;
}
}
.unit {
margin-left: 8px;
flex-shrink: 0;
line-height: 32px;
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.photo-box {
display: flex;
align-items: center;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
border-radius: 4px;
}
::v-deep .video-poster {
position: absolute;
width: 104px;
height: 104px;
object-fit: fill;
top: 0;
right: 0;
left: 0;
bottom: 0;
border-radius: 4px;
}
::v-deep .mask {
border-radius: 4px;
}
::v-deep .pic-box {
margin-right: 16px;
.video-poster {
width: 90px;
height: 90px;
}
}
}
}
}
}
<!-- 评估动态 -->
<template>
<div class="dynamics-wrapper" v-if="dynamicsData && dynamicsData.length">
<div class="title">评估动态</div>
<div class="timeline-box">
<el-timeline>
<el-timeline-item
:color="index == 0 ? '#2a58ad' : ''"
v-for="(item, index) in dynamicsData"
:key="index"
>
<div class="time-box">
<div class="createdBy">
<div>
{{ item.opType == 20 ? "驻店人员" : "总部定价师" }}:<span>{{
item.createdBy
}}</span>
</div>
<div class="time">{{ item.quoteTime }}</div>
</div>
<!-- 评估师驳回 -->
<template v-if="item.opType == 30">
<div class="reject-box">
<span> 驳回原因:</span>
<div class="reason">{{ item.rejectReason }}</div>
</div>
<div class="reject-box">
<span>驳回意见:</span>
<div class="reason">{{ item.rejectSuggestion }}</div>
</div>
</template>
<template v-else-if="item.opType == 10">
<div class="reject-box">
<span>评估价:</span>
<div class="reason">{{ item.evalPrice }}元</div>
</div>
<div class="reject-box">
<span>评估意见:</span>
<div class="reason">{{ item.evalOpinion }}</div>
</div>
</template>
<template v-else-if="item.opType == 20">
<div class="reject-box">
<span>意向报价:</span>
<div class="reason">{{ item.customerTargetPrice }}元</div>
</div>
<div class="reject-box">
<span>报价反馈:</span>
<div class="reason">{{ item.customerTargetPriceFeedback }}</div>
</div>
</template>
</div>
</el-timeline-item>
</el-timeline>
</div>
</div>
</template>
<script>
export default {
props: {
dynamicsData: {
type: Array,
default: () => []
}
},
data() {
return {}
}
}
</script>
<style lang="scss" scoped>
.dynamics-wrapper {
background: #fff;
margin: 0 20px 20px;
.title {
color: #333333;
font-size: 16px;
padding: 13.5px 20px;
line-height: 23px;
border-bottom: 1px solid #e5e5e5;
font-weight: 600;
}
.timeline-box {
padding: 18px 20px;
.time-box {
.createdBy {
display: flex;
align-items: center;
justify-content: space-between;
max-width: 896px;
margin-bottom: 4px;
color: #666666;
font-size: 14px;
font-weight: 400;
line-height: 20px;
.time {
color: #999999;
font-size: 12px;
font-weight: 400;
}
span {
color: #333333;
font-size: 14px;
font-weight: 400;
}
}
.reject-box {
color: #999999;
font-size: 12px;
font-weight: 400;
margin-bottom: 4px;
display: flex;
align-items: flex-start;
line-height: 16px;
span {
white-space: nowrap;
}
.reason {
color: #333333;
font-weight: 400;
max-width: 832px;
}
}
}
::v-deep .el-timeline-item {
padding-bottom: 12px !important;
}
}
}
</style>
import {
getEvalOrderDetail,
getEvalOrderPriceHistory
} from "@/api/usedCarManagement"
import vehicleInfo from "./vehicleInfo.vue"
import dynamics from "./dynamics.vue"
import assessInfo from "./assessInfo.vue"
import assess from "./assess.vue"
import rejectDialog from "./rejectDialog.vue"
export const evaluateMixin = {
components: {
rejectDialog,
vehicleInfo,
dynamics,
assess,
assessInfo
},
data() {
return {
detailInfo: null,
dynamicsData: [],
evalOrderNo: this.$route.query.evalOrderNo
}
},
created() {
this.getEvalOrderDetail()
this.getEvalOrderPriceHistory()
},
methods: {
handleCancel() {
this.$router.push("/evaluationManagement")
},
getEvalOrderDetail() {
getEvalOrderDetail({
evalOrderNo: this.evalOrderNo
}).then((res) => {
console.log("res", res)
this.detailInfo = res
this.loading = false
})
},
getEvalOrderPriceHistory() {
getEvalOrderPriceHistory({
evalOrderNo: this.evalOrderNo
}).then((res) => {
console.log("res", res)
this.dynamicsData = res
})
}
}
}
<!-- 驳回 -->
<template>
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="confirm"
:btnLoding="btnLoding"
>
<div class="reject-dialog">
<glsx-combi-form
class="edit-form-container"
ref="formRef"
label-width="120px"
default-width="400px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
export default {
name: "RejectDialog",
data() {
return {
btnLoding: false,
infoForm: {
rejectReason: "",
rejectSuggestion: ""
},
dialogConfig: {
title: "驳回",
width: "560px"
},
rejectRef: "rejectRef",
formRules: {
rejectReason: [
{ required: true, message: "请输入驳回原因", trigger: "blur" }
],
rejectSuggestion: [
{ required: true, message: "请输入", trigger: "blur" }
]
},
editFormData: [
{
label: "驳回原因",
name: "rejectReason",
type: "input",
placeholder: "请输入驳回原因",
maxlength: 50
},
{
label: "驳回意见",
name: "rejectSuggestion",
type: "input",
placeholder: "请输入",
maxlength: 200,
inputType: "textarea",
showLimit: true,
rows: 4
}
],
baseData: {}
}
},
props: {
rejectVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
visible: {
get() {
return this.rejectVisible
},
set(newVal) {
console.log(newVal, "999")
this.$emit("dialogClose", { flag: newVal, attrName: "rejectVisible" })
}
}
},
mounted() {
console.log("paramsObj", this.paramsObj)
},
methods: {
async confirm() {
const isValid = await this.$refs.formRef.$refs[this.rejectRef].validate()
console.log(isValid)
if (isValid) {
this.$emit("handleAddConfirm")
}
},
handleLoading() {
this.btnLoding = !this.btnLoding
},
handleClose() {
console.log("handleClose")
// this.visible = false
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__header {
padding: 16px 20px !important;
color: #333333;
font-size: 20px;
font-weight: bold;
}
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
padding: 14px 20px !important;
}
::v-deep .el-dialog__body {
padding: 32px 20px !important;
}
.reject-dialog {
::v-deep .el-form-item--small.el-form-item {
margin: 0 0 20px !important;
}
::v-deep .el-textarea .el-input__count {
right: 16px;
bottom: 3px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<!-- 评估单详情 -->
<template>
<div class="evalOrderDetail" v-loading="loading">
<template v-if="detailInfo">
<div class="layout">
<!-- 车辆信息 -->
<vehicle-info :detailInfo="detailInfo"></vehicle-info>
<!-- 总部定价师估价与意见 -->
<assess-info :detailInfo="detailInfo"></assess-info>
<!-- 评估动态 -->
<dynamics :dynamicsData="dynamicsData"></dynamics>
</div>
<div class="footer">
<el-button class="cancel-btn" @click="handleCancel">关闭</el-button>
</div>
</template>
</div>
</template>
<script>
import { evaluateMixin } from "./components/evaluateMixin"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default {
mixins: [evaluateMixin, reportTrackPageMixin],
data() {
return {
loading: false,
trackBusinessParam: {},
track_event_code: "evaluate_management_detail",
track_businessParam_key: "trackBusinessParam"
}
},
mounted() {
this.loading = true
this.trackBusinessParam = { evalOrderNo: this.evalOrderNo }
this.onPageShow()
},
methods: {}
}
</script>
<style lang="scss" scoped>
.evalOrderDetail {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
.footer {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
cursor: pointer;
.cancel-btn {
color: #666666;
font-size: 14px;
width: 56px;
padding: 5px 14px;
height: 32px;
border-radius: 4px;
background: #e8e8e8;
line-height: 22px;
box-sizing: border-box;
}
}
}
.layout {
height: calc(100% - 65px);
overflow-y: scroll;
}
</style>
<template>
<div class="evaluate-wrapper" v-loading="loading">
<template v-if="detailInfo">
<div class="layout">
<!-- 车辆信息 -->
<vehicle-info :detailInfo="detailInfo"></vehicle-info>
<!-- 总部定价师估价与意见 -->
<assess ref="assessRef" :detailInfo="detailInfo"></assess>
<!-- 评估动态 -->
<dynamics :dynamicsData="dynamicsData"></dynamics>
</div>
<div class="footer">
<el-button
size="small"
:loading="btnLoding"
class="save-btn"
@click="handleSave"
:data-track="
JSON.stringify({
evalOrderNo: this.evalOrderNo
})
"
data-event-code="evaluate_management_assess_save"
>
保存
</el-button>
<el-button
size="small"
class="reject-btn"
plain
@click="handleReject"
:data-track="
JSON.stringify({
evalOrderNo: this.evalOrderNo
})
"
data-event-code="evaluate_management_reject_save"
>
驳回
</el-button>
<el-button class="cancel-btn" size="small" @click="handleCancel"
>关闭</el-button
>
</div>
</template>
<reject-dialog
ref="rejectDialogRef"
v-if="rejectVisible"
:rejectVisible="rejectVisible"
:paramsObj="paramsObj"
@handleAddConfirm="handleAddConfirm"
@dialogClose="dialogClose"
></reject-dialog>
</div>
</template>
<script>
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
import { evaluateMixin } from "./components/evaluateMixin"
import { evaluateCar } from "@/api/usedCarManagement"
export default {
mixins: [evaluateMixin, reportTrackPageMixin],
data() {
return {
btnLoding: false,
loading: false,
rejectVisible: false,
paramsObj: {},
trackBusinessParam: {},
track_event_code: "evaluate_management_assess",
track_businessParam_key: "trackBusinessParam"
}
},
mounted() {
this.loading = true
this.trackBusinessParam = { evalOrderNo: this.evalOrderNo }
this.onPageShow()
},
methods: {
handleReject() {
this.rejectVisible = !this.rejectVisible
},
dialogClose() {
this.rejectVisible = !this.rejectVisible
},
handleAddConfirm() {
let params = {
vin: this.detailInfo.vin,
opType: 30, //10评估师报价,20客户报价,30评估师驳回
evalOrderNo: this.evalOrderNo,
...this.$refs.rejectDialogRef.infoForm
}
this.submitData(params, 2)
},
async handleSave() {
let isValid = await this.$refs.assessRef.confirm()
if (isValid) {
let params = {
vin: this.detailInfo.vin,
opType: 10, //10评估师报价,20客户报价,30评估师驳回
evalOrderNo: this.evalOrderNo,
...this.$refs.assessRef.assessForm
}
this.submitData(params, 1)
}
},
submitData(params, isFlag) {
this.$confirm("请确认是否要执行当前操作?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (isFlag == 1) {
this.btnLoding = true
} else {
this.$refs.rejectDialogRef &&
this.$refs.rejectDialogRef?.handleLoading()
}
evaluateCar(params)
.then((res) => {
if (res.data.code == 0) {
this.$message.success("操作成功")
this.handleCancel()
this.$refs.rejectDialogRef &&
this.$refs.rejectDialogRef?.handleLoading()
this.rejectVisible = false
this.btnLoding = false
} else if (res.data.code == 1000) {
this.refreshPage()
this.$message.error(res.data.msg)
this.$refs.rejectDialogRef &&
this.$refs.rejectDialogRef?.handleLoading()
this.btnLoding = false
} else {
this.$message.error(res.data.msg)
this.$refs.rejectDialogRef &&
this.$refs.rejectDialogRef?.handleLoading()
this.btnLoding = false
}
})
.catch((err) => {
this.btnLoding = false
})
})
},
refreshPage() {
// 方式一:重新加载当前路由
this.$router.go(0)
this.getEvalOrderDetail()
this.getEvalOrderPriceHistory()
}
}
}
</script>
<style lang="scss" scoped>
.evaluate-wrapper {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
.footer {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
.save-btn {
// width: 60px;
padding: 5px 14px;
line-height: 22px;
border-radius: 4px;
border: 1px solid #2a58ad;
background: #2a58ad;
color: #ffffff;
font-size: 14px;
height: 32px;
box-sizing: border-box;
}
.cancel-btn {
color: #666666;
font-size: 14px;
width: 56px;
height: 32px;
padding: 5px 14px;
border-radius: 4px;
background: #e8e8e8;
line-height: 22px;
box-sizing: border-box;
}
.reject-btn {
// width: 60px;
border-radius: 4px;
opacity: 1;
border: 1px solid #2a58ad;
padding: 5px 14px;
line-height: 22px;
height: 32px;
box-sizing: border-box;
color: #2a58ad;
font-size: 14px;
// margin: 0 10px;
}
}
}
.layout {
height: calc(100% - 65px);
overflow-y: scroll;
}
</style>
.info-wrapper {
margin: 0 20px;
.item {
margin-bottom: 20px;
background-color: #fff;
.title {
color: #333333;
font-size: 16px;
font-weight: bold;
padding: 13.5px 20px;
border-bottom: 1px solid #e5e5e5;
line-height: 23px;
box-sizing: border-box;
}
.subtitle {
color: #333333;
font-size: 16px;
font-weight: bold;
padding: 13.5px 0;
border-bottom: 1px solid #e5e5e5;
line-height: 23px;
box-sizing: border-box;
margin: -20px 20px 0;
}
.form_div {
color: #333333;
padding: 20px;
font-size: 14px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
::v-deep .el-form-item__label {
color: #666666;
font-size: 14px;
line-height: 20px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-col {
margin-bottom: 20px;
}
::v-deep .el-form-item__content {
width: calc(100% - 175px);
word-break: break-all;
line-height: 20px;
}
::v-deep .el-form-item--medium .el-form-item__label {
line-height: 20px;
}
}
::v-deep .edit-form-item {
width: 100%;
}
.flex {
display: flex;
align-items: align-items;
}
.unit {
margin-left: 8px;
flex-shrink: 0;
line-height: 32px;
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.photo-box {
display: flex;
align-items: center;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
border-radius: 4px;
}
::v-deep .pic-box {
margin-right: 16px;
.video-poster {
width: 90px;
height: 90px;
}
}
}
}
}
}
<template>
<div class="range">
<div
:class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference"
>
<template v-if="infinity">
<el-input-number
class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"
></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number
class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"
></el-input-number>
</template>
<template v-else>
<el-input
v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"
></el-input>
<span class="el-range-separator">至</span>
<el-input
v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"
></el-input>
</template>
<i
v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"
></i>
</div>
<div class="errorTips" v-if="tipsShow">最大金额需大于最小金额</div>
</div>
</template>
<script>
import { limitPrice } from "@/common/format"
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: "",
endInput: ""
},
tipsShow: false
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean,
regRuleStr: {
type: String,
default: "priceReg"
}
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
if (val.length == 0) {
this.tipsShow = false
}
}
}
},
methods: {
handleStartInput(event) {
this.userInput[0] = limitPrice(
event,
this.oldVal.startInput,
15,
2,
"",
"",
this.regRuleStr
)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
this.userInput[1] = limitPrice(
event,
this.oldVal.endInput,
15,
2,
"",
"",
this.regRuleStr
)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
this.tipsShow = false
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
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
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
.errorTips {
color: red;
// text-align: center;
font-size: 12px;
}
}
</style>
<!-- 驳回 -->
<template>
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm"
:btnLoding="btnLoding"
>
<div class="sun-dialog">
<glsx-combi-form
class="edit-form-container"
ref="formRef"
label-width="150px"
default-width="406px"
:isBlock="true"
:form-ref="sunRef"
:form-obj="form"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
<div class="flex-item" v-if="paramsObj.id">
<span class="flex-title">录入时间:</span>
<span class="flex-content">{{ paramsObj.createdDate }}</span>
</div>
</div>
</baseDialog>
</template>
<script>
import { vehicleCategoryOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util"
import { getServiceStore } from "@api/order"
import {
updateSunlightConfig,
createSunlightConfig
} from "@api/usedCarManagement"
export default {
name: "sunDialog",
data() {
return {
btnLoding: false,
isShow: false,
userInfo: this.$store.state.d2admin.user.info,
form: {
sellerMerchantId: "",
sellerMerchantName: "",
carType: "",
sunlightInspiresPrice: ""
},
dialogConfig: {
title: "新增激励",
width: "640px"
},
sunRef: "sunRef",
formRules: {
sellerMerchantId: [
{ required: true, message: "请选择", trigger: "change" }
],
carType: [{ required: true, message: "请选择", trigger: "change" }],
sunlightInspiresPrice: [
{ required: true, message: "请输入", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (!value) {
callback()
return
}
// 校验是否为有效数字
if (!/^\d+(\.\d+)?$/.test(value)) {
callback(new Error("请输入有效的数字格式"))
} else {
callback()
}
},
trigger: "blur"
},
{
validator: (rule, value, callback) => {
if (!value) {
callback()
return
}
// 校验小数位数不超过两位
if (!/^\d+(\.\d{1,2})?$/.test(value)) {
callback(new Error("最多只能输入两位小数"))
} else {
callback()
}
},
trigger: "blur"
},
{
validator: (rule, value, callback) => {
if (!value) {
callback()
return
}
const numValue = parseFloat(value)
if (isNaN(numValue)) {
callback(new Error("请输入有效数字"))
} else if (numValue <= 0) {
callback(new Error("激励价格必须大于0"))
} else if (numValue > 9999999.99) {
callback(new Error("激励价格必须小于9999999.99"))
} else {
callback()
}
}
}
]
},
editFormData: [
{
label: "4S门店",
name: "sellerMerchantId",
placeholder: "请选择",
type: "select",
optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "storeIdList",
isDisabled: this.paramsObj.id ? true : false,
changeAttr: (val) => {
console.log(this.findIndexIds("storeIdList", "merchantId", val))
this.form.sellerMerchantName =
this.baseData.storeIdList[
this.findIndexIds("storeIdList", "merchantId", val)
].merchantName
console.log(this.form.sellerMerchantName)
}
},
{
label: "车辆类型",
name: "carType",
placeholder: "请选择",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "vehicleCategoryOpt"
},
{
label: "激励价格(元)",
placeholder: "请输入",
name: "sunlightInspiresPrice",
type: "input",
maxlength: 11
}
],
baseData: {
vehicleCategoryOpt: deepClone(vehicleCategoryOpt),
storeIdList: []
}
}
},
props: {
sunVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
visible: {
get() {
this.clearData()
return this.sunVisible
},
set(newVal) {
this.$emit("dialogClose", { flag: newVal, attrName: "sunVisible" })
}
}
},
created() {
this.getServiceStore()
},
methods: {
clearData() {
this.form = {
sellerMerchantId: "",
sellerMerchantName: "",
carType: "",
sunlightInspiresPrice: ""
}
this.initData()
},
findIndexIds(optKey, key, value) {
return this.baseData[optKey].findIndex((item) => {
return item[key] == value
})
},
getServiceStore() {
getServiceStore({
scene: 7
}).then((res) => {
this.baseData.storeIdList = res || []
this.getOptionsList("editFormData", false)
})
},
initData() {
if (this.paramsObj.id) {
this.dialogConfig.title = "修改激励"
this.form = {
...this.paramsObj
}
}
},
handleAddConfirm() {
this.$refs.formRef.$refs[this.sunRef].validate((valid) => {
if (valid) {
this.btnLoding = true
let params = {
sellerMerchantId: this.form.sellerMerchantId,
sellerMerchantName: this.form.sellerMerchantName,
carType: this.form.carType,
sunlightInspiresPrice: this.form.sunlightInspiresPrice
}
if (this.paramsObj.id) {
params.id = this.paramsObj.id
params.updatedBy = this.userInfo.detail.userName
} else {
params.createdBy = this.userInfo.detail.userName
}
let Methods = this.paramsObj.id
? updateSunlightConfig
: createSunlightConfig
Methods(params).then((res) => {
this.btnLoding = false
if (res.data.code == 0) {
this.$message.success("操作成功")
this.visible = true
this.$emit("handleAddConfirm")
} else {
this.$message.error(res.data.msg)
}
})
}
})
},
handleClose() {
console.log("handleClose")
// this.visible = false
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find((k) => k.name == refreshSigle)
var index = this[formName].findIndex((k) => k.name == refreshSigle)
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (
["select", "radio"].includes(item.type) &&
this.baseData[item.optionsName].length
) {
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
padding: 32px 20px !important;
}
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
padding: 14px 20px !important;
}
::v-deep .el-dialog__header {
padding: 16px 20px !important;
color: #333333;
font-size: 20px;
font-weight: bold;
}
.sun-dialog {
::v-deep .el-form-item--small.el-form-item {
margin: 0 0 20px !important;
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
.flex-item {
display: flex;
align-items: center;
.flex-title {
color: #666666;
font-size: 14px;
width: 150px;
text-align: right;
display: inline-block;
}
.flex-content {
color: #333333;
font-size: 14px;
}
}
}
.sun-dialog {
min-height: 150px;
}
</style>
.info-wrapper {
background-color: #fff;
margin: 0 20px;
.item {
margin-bottom: 20px;
.title {
color: #333333;
font-size: 16px;
font-weight: bold;
padding: 13.5px 20px;
border-bottom: 1px solid #e5e5e5;
line-height: 23px;
box-sizing: border-box;
}
.form_div {
color: #333333;
padding: 20px;
font-size: 14px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
::v-deep .el-form-item__label {
color: #666666;
font-size: 14px;
line-height: 20px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-col {
margin-bottom: 20px;
}
::v-deep .el-form-item__content {
width: calc(100% - 150px);
word-break: break-all;
line-height: 20px;
.unit {
// margin-left: 8px;
flex-shrink: 0;
line-height: 32px;
}
}
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.photo-box {
display: flex;
align-items: center;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
}
::v-deep .pic-box {
margin-right: 16px;
.video-poster {
width: 90px;
height: 90px;
}
}
}
}
}
.flex {
display: flex;
align-items: center;
line-height: 20px;
}
}
<!-- 运营管理 -->
<template>
<div class="list-wrap">
<div class="header" slot="header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index"
>
</el-tab-pane>
</el-tabs>
<components :is="tabName" :scene-type="activeName"></components>
</div>
</div>
</template>
<script>
import contract from "./components/contract/index.vue"
import sunshine from "./components/sunshine/index.vue"
export default {
components: {
contract,
sunshine
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "合同管理",
name: "0"
},
{
label: "阳光激励",
name: "1"
}
],
tabName: "contract"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
handleClick() {
const arr = {
0: "contract",
1: "sunshine"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style scoped lang="scss">
.list-wrap {
padding: 0 26px 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
.el-tabs__nav-wrap {
padding: 0 20px;
}
.el-tabs__nav-wrap {
height: 54px;
line-height: 54px;
font-size: 16px;
}
}
}
}
</style>
<template>
<div class="detail-block">
<div class="title flex">{{title}}</div>
<div class="block-content">
<slot></slot>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
title: {
type: String,
default: ''
}
},
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.detail-block {
background: #ffffff;
.title {
height: 50px;
border-bottom: 1px solid #e5e5e5;
text-indent: 20px;
font-weight: 500;
color: #333333;
font-size: 16px;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!