Commit c3258a30 by 前端

Merge branch 'SAAS+V4.44-0902' of http://192.168.3.233:8090/saas_plus/dj-car-lif…

…e-system into SAAS+V4.44-0902
2 parents da8673a7 b6ec5fef
Showing 43 changed files with 1775 additions and 210 deletions
...@@ -3524,27 +3524,6 @@ ...@@ -3524,27 +3524,6 @@
"whatwg-fetch": "^3.6.2" "whatwg-fetch": "^3.6.2"
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": { "acorn-walk": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz", "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
...@@ -3934,6 +3913,31 @@ ...@@ -3934,6 +3913,31 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
=======
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
>>>>>>> SAAS+V4.43.1-0819
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
...@@ -5927,7 +5931,7 @@ ...@@ -5927,7 +5931,7 @@
}, },
"cross-spawn": { "cross-spawn": {
"version": "6.0.5", "version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -7142,7 +7146,7 @@ ...@@ -7142,7 +7146,7 @@
}, },
"ignore": { "ignore": {
"version": "4.0.6", "version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "resolved": "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true "dev": true
}, },
...@@ -8883,7 +8887,7 @@ ...@@ -8883,7 +8887,7 @@
"dependencies": { "dependencies": {
"big.js": { "big.js": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", "resolved": "https://registry.npmmirror.com/big.js/-/big.js-3.2.0.tgz",
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q=="
}, },
"json5": { "json5": {
...@@ -13531,7 +13535,7 @@ ...@@ -13531,7 +13535,7 @@
}, },
"p-try": { "p-try": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true "dev": true
}, },
...@@ -16713,7 +16717,7 @@ ...@@ -16713,7 +16717,7 @@
}, },
"type-fest": { "type-fest": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.6.0.tgz",
"integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true "dev": true
}, },
...@@ -17101,7 +17105,7 @@ ...@@ -17101,7 +17105,7 @@
}, },
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true "dev": true
}, },
...@@ -18014,7 +18018,7 @@ ...@@ -18014,7 +18018,7 @@
}, },
"yarn": { "yarn": {
"version": "1.22.19", "version": "1.22.19",
"resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz", "resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ==" "integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
}, },
"yorkie": { "yorkie": {
......
import request from "./request"
// const path = 'dj.api.'
const path2 = "dj.api.smartcarlife."
/** 积分管理-积分审批列表*/
export function getList(data) {
data.method = `${path2}staff.motivation.page`
return request(data)
}
/** 积分管理-积分审批*/
export function pointCheck(data) {
data.method = `${path2}staff.motivation.audit`
return request(data)
}
/**积分管理-积分审批列表导出*/
export function exportFile(data) {
data.method = `${path2}staff.motivation.list.export`
return request(data)
}
/**积分管理-积分审批详情*/
export function getPointDetail(data) {
data.method = `${path2}staff.motivation.detail`
return request(data)
}
/**积分管理-积分明细列表*/
export function getScorePage(data) {
data.method = `${path2}staff.score.page`
return request(data)
}
/**积分管理-积分明细列表导出*/
export function exportScore(data) {
data.method = `${path2}staff.score.export`
return request(data)
}
// 积分管理-积分明细收益列表
export function getDetailList(data) {
data.method = `${path2}staff.score.detail.list`
return request(data)
}
// 积分管理-积分明细收益列表导出
export function exportDetailScore(data) {
data.method = `${path2}staff.score.detail.list.export`
return request(data)
}
// 积分管理-积分明细收益记录详情
export function getScoreDetail(data) {
data.method = `${path2}staff.score.detail`
return request(data)
}
export function getShopMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
...@@ -44,3 +44,14 @@ export function downloadPdf(data) { ...@@ -44,3 +44,14 @@ export function downloadPdf(data) {
data.method = `${path}refundApplyRecord.downloadPdf` data.method = `${path}refundApplyRecord.downloadPdf`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
export function getOrderDefaultInfo(data) {
data.method = `${path}refundApplyRecord.getOrderDefaultInfo`
return request(data, RequestMethods.POST)
}
// 修改退款申请
export function update(data) {
data.method = `${path}refundApplyRecord.update`
return request(data, RequestMethods.POST)
}
...@@ -109,3 +109,8 @@ export function orderFieldSettingUpdate(data) { ...@@ -109,3 +109,8 @@ export function orderFieldSettingUpdate(data) {
data.method = `${path}order.field.setting.update` data.method = `${path}order.field.setting.update`
return request(data, "post") return request(data, "post")
} }
//员工注册码
export function employeeRegister(data) {
data.method = `${path}serviceMerchant.shopSetting`
return request(data, RequestMethods.POST)
}
...@@ -679,7 +679,10 @@ export const applyStatus = [ ...@@ -679,7 +679,10 @@ export const applyStatus = [
export const businessNature = [ export const businessNature = [
{ confId: 1, confName: "直营渠道" }, { confId: 1, confName: "直营渠道" },
{ confId: 2, confName: "直营4S店" }, { confId: 2, confName: "直营4S店" },
{ confId: 3, confName: "合资收购" } // { confId: 3, confName: "合资收购" },
{ confId: 4, confName: "投资收购-利丰" },
{ confId: 5, confName: "投资收购-内蒙古" },
{ confId: 6, confName: "服务商投资" }
] ]
// 店面配置 业务性质 // 店面配置 业务性质
export const businessNatureShow = { export const businessNatureShow = {
...@@ -847,6 +850,7 @@ export const auditTypeList = [ ...@@ -847,6 +850,7 @@ export const auditTypeList = [
// 人员管理-员工审核-审核状态 // 人员管理-员工审核-审核状态
export const refundExamine_status = [ export const refundExamine_status = [
{ confId: 0, confValue: "运营审核" },
{ confId: 1, confValue: "商务审核" }, { confId: 1, confValue: "商务审核" },
{ confId: 2, confValue: "财务复核" }, { confId: 2, confValue: "财务复核" },
{ confId: 3, confValue: "财务结算" }, { confId: 3, confValue: "财务结算" },
...@@ -895,6 +899,17 @@ export const subBusinessList = [ ...@@ -895,6 +899,17 @@ export const subBusinessList = [
{ confId: "1", confValue: "延保" } { confId: "1", confValue: "延保" }
] ]
// 商品库-发卷宝-领用明细-预约状态
export const inviteStatusList = [
{ confId: 1, confValue: "待预约" },
{ confId: 2, confValue: "已预约" },
{ confId: 3, confValue: "取消预约" },
{ confId: 4, confValue: "已施工" },
{ confId: 5, confValue: "过期到店" },
{ confId: 6, confValue: "已撤销" },
{ confId: 7, confValue: "已支付" }
]
// 内容管理-员工群发-内容类型 // 内容管理-员工群发-内容类型
export const contentTypeList = [ export const contentTypeList = [
{ confId: 1, confValue: "图文" }, { confId: 1, confValue: "图文" },
......
<!--
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-06-12 15:21:09
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-08-19 15:10:19
* @FilePath: \dj-car-life-system\src\components\d2-table-header\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<el-row class="table-header"> <el-row class="table-header">
<el-col :span="leftSpan"> <el-col :span="leftSpan" :class="titleClassName">
<span v-text="title" /> <span v-text="title" class="table-header-title" />
<slot name="left" /> <slot name="left" />
</el-col> </el-col>
<el-col :span="24 - leftSpan"> <el-col :span="24 - leftSpan">
...@@ -19,6 +27,10 @@ export default { ...@@ -19,6 +27,10 @@ export default {
required: false, required: false,
default: '' default: ''
}, },
titleClassName:{
type: String,
default: ''
},
leftSpan: { leftSpan: {
type: Number, type: Number,
required: false, required: false,
......
...@@ -626,6 +626,14 @@ export const routerName = { ...@@ -626,6 +626,14 @@ export const routerName = {
}, },
auth: [ auth: [
{ {
authId: "9040809",
parentId: "90408",
label: "批量运营审核",
category: "Button",
type: "primary",
handle: "batchOperatorAudit"
},
{
authId: "9040801", authId: "9040801",
parentId: "90408", parentId: "90408",
label: "批量商务审核", label: "批量商务审核",
......
...@@ -780,7 +780,13 @@ export const routerName = { ...@@ -780,7 +780,13 @@ export const routerName = {
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleExportLabel" handle: "handleExportLabel"
} },
{
authId: "9061912",
parentId: "90619",
label: "员工注册码",
handle: "employeeRegistrationCode"
},
], ],
component: _import("systemConfig/ShopConfig/index") component: _import("systemConfig/ShopConfig/index")
}, },
......
/*
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-08-13 14:35:06
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-08-19 15:21:02
* @FilePath: \dj-car-life-system\src\router\modules\914_pointManagement.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
914: {
path: "/pointManagement",
name: "pointManagement",
meta: {
title: "积分管理",
authId: "914",
parentId: "1",
cache: false
}
},
91401: {
path: "/pointExamine",
name: "pointExamine",
meta: {
title: "积分审批",
authId: "91401",
parentId: "914",
cache: false
},
auth: [
{
authId: "9140101",
parentId: "91401",
label: "审核",
handle: "handleCheck"
},
{
authId: "9140102",
parentId: "91401",
label: "查看",
handle: "handleDetail"
},
{
authId: "9140103",
parentId: "91401",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("pointManagement/pointExamine")
},
91402: {
path: "/pointParticulars",
name: "pointParticulars",
meta: {
title: "积分明细",
authId: "91402",
parentId: "914",
cache: false
},
auth: [
{
authId: "9140201",
parentId: "91402",
label: "明细",
handle: "handleDetail",
addRoutePath: [
{
authId: "91403",
name: "详情",
parentId: "91402"
}
]
},
{
authId: "9140202",
parentId: "91402",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("pointManagement/pointParticulars")
},
91403: {
path: "/pointDetail",
name: "pointDetail",
meta: {
title: "详情",
authId: "91403",
parentId: "91402",
cache: false,
activePath: "/pointDetail"
},
component: _import("pointManagement/pointDetail")
},
}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script> <script>
import { getDetailList, getDistinctColum } from '@api/coupons' import { getDetailList, getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { BaseData } from '@/common/constants.js' import { BaseData, inviteStatusList } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
export default { export default {
name: 'CouponsDetail', name: 'CouponsDetail',
...@@ -30,7 +30,9 @@ export default { ...@@ -30,7 +30,9 @@ export default {
usedFlagList: [], usedFlagList: [],
employeeNameList: [], employeeNameList: [],
sellerNameList: [], sellerNameList: [],
couponTypeList: [] couponTypeList: [],
inviteStatus: '',
carSeriesName: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
getListApi: getDetailList, getListApi: getDetailList,
...@@ -58,10 +60,30 @@ export default { ...@@ -58,10 +60,30 @@ export default {
label: '车主姓名', label: '车主姓名',
prop: 'customerName' prop: 'customerName'
}, { }, {
label: '客户车型',
prop: 'carSeriesName',
width: '200px',
formatter: cellValue => {
let cartypeShow = ''
if (cellValue.customerInfo && cellValue.customerInfo.carBrand) {
cartypeShow = cellValue.customerInfo.carBrand + ' - ' + cellValue.customerInfo.carChildsBrandName + ' - ' + cellValue.customerInfo.carSeriesName
} else {
cartypeShow = '-'
}
return cartypeShow
}
}, {
label: '手机号', label: '手机号',
prop: 'customerPhone', prop: 'customerPhone',
width: '120px' width: '120px'
}, { }, {
label: '预约状态',
prop: 'inviteStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.inviteStatusList.find(item => item.confId === cellValue.inviteStatus)?.confValue
}
}, {
label: '礼券名称', label: '礼券名称',
prop: 'couponName', prop: 'couponName',
addHtml: 'couponName' addHtml: 'couponName'
...@@ -130,7 +152,8 @@ export default { ...@@ -130,7 +152,8 @@ export default {
employeeNameList: [], employeeNameList: [],
sellerNameList: [], sellerNameList: [],
couponTypeList: [], couponTypeList: [],
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }] usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }],
inviteStatusList: inviteStatusList
} }
} }
}, },
......
<!-- 发券宝 --> <!-- 发券宝 -->
<template> <template>
<d2-container class="coupons"> <d2-container class="coupons">
<div class="header" slot="header"> <div class="header"
<d2-search slot="header">
ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="parentSearchForm" :search-form="parentSearchForm"
:form-data="copyShowFormData" :form-data="copyShowFormData" />
/>
<div class="up-btns"> <div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch"> <el-button size="small"
type="primary"
@click="handleSearch">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button size="small"
@click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content" style="position: positive"> <div class="d2-container-content"
style="position: positive">
<span style="position: absolute; right: 41px; top: 42px; z-index: 999"> <span style="position: absolute; right: 41px; top: 42px; z-index: 999">
<auth-button <auth-button :show-btn-ids="
:show-btn-ids="
activeName === 'storeList' ? ['9030601', '9030605'] : ['9030605'] activeName === 'storeList' ? ['9030601', '9030605'] : ['9030605']
" "
category="Button" category="Button" />
/>
</span> </span>
<el-tabs v-model="activeName" type="card" @tab-click="handleReset"> <el-tabs v-model="activeName"
<el-tab-pane label="店面列表" name="storeList"> type="card"
<store-list @tab-click="handleReset">
v-if="activeName == 'storeList'" <el-tab-pane label="店面列表"
name="storeList">
<store-list v-if="activeName == 'storeList'"
ref="storeList" ref="storeList"
:parent-search-form="parentSearchForm" :parent-search-form="parentSearchForm" />
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="领用明细" name="couponsDetail"> <el-tab-pane label="领用明细"
<coupons-detail name="couponsDetail">
v-if="activeName == 'couponsDetail'" <coupons-detail v-if="activeName == 'couponsDetail'"
ref="couponsDetail" ref="couponsDetail"
:parent-search-form="parentSearchForm" :parent-search-form="parentSearchForm" />
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<edit-coupons-dialog <edit-coupons-dialog :coupons-visible="couponsVisible"
:coupons-visible="couponsVisible" @couponClose="couponClose" />
@couponClose="couponClose"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -56,7 +55,7 @@ import editCouponsDialog from './editCouponsDialog' ...@@ -56,7 +55,7 @@ import editCouponsDialog from './editCouponsDialog'
// import { asyncExportExcel } from '@api/sys.base' // import { asyncExportExcel } from '@api/sys.base'
import { getDistinctColum } from '@api/coupons' import { getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { BaseData } from '@/common/constants.js' import { BaseData, inviteStatusList } from '@/common/constants.js'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'Coupons', name: 'Coupons',
...@@ -89,7 +88,8 @@ export default { ...@@ -89,7 +88,8 @@ export default {
employeeNameList: [], employeeNameList: [],
sellerNameList: [], sellerNameList: [],
couponTypeList: [], couponTypeList: [],
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }] usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }],
inviteStatusList: inviteStatusList
} }
} }
}, },
...@@ -224,6 +224,22 @@ export default { ...@@ -224,6 +224,22 @@ export default {
isClear: true, isClear: true,
pickerOptions: 'rangePickerOptions', pickerOptions: 'rangePickerOptions',
keyFn: this.handleSearch keyFn: this.handleSearch
}, {
label: '预约状态',
name: 'inviteStatus',
type: 'select',
// multiple: true,
isClear: true,
optionList: this.baseData.inviteStatusList,
optionId: 'confId',
optionLabel: 'confValue',
keyFn: this.handleSearch
}, {
label: '客户车型',
name: 'carSeriesName',
type: 'input',
isClear: true,
keyFn: this.handleSearch
}) })
this.copyShowFormData = copyShowFormData this.copyShowFormData = copyShowFormData
break break
......
...@@ -251,9 +251,9 @@ export default { ...@@ -251,9 +251,9 @@ export default {
: shopType == '2' : shopType == '2'
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost'] ? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
: this.equitySceneType.includes(formData?.goodsType) || this.extendedPosiType.includes(formData?.goodsType) : this.equitySceneType.includes(formData?.goodsType) || this.extendedPosiType.includes(formData?.goodsType)
? (this.extendedPosiType.includes(formData?.goodsType) && this.baseConfig.supplierCode.includes(`${formData.supplierCode}`) ? (this.extendedPosiType.includes(formData?.goodsType) && !this.baseConfig.supplierCode.includes(`${formData.supplierCode}`)
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost'] ? ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost']
: ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost']) : ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost'])
: ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost'] : ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
// 未勾选基础商品类型 // 未勾选基础商品类型
if (!this.formData.productType?.includes(1)) spliceForm.push('baseSupplyModeStr') if (!this.formData.productType?.includes(1)) spliceForm.push('baseSupplyModeStr')
......
...@@ -36,3 +36,205 @@ export const crowdUpgradeSupplyModeList = [{ ...@@ -36,3 +36,205 @@ export const crowdUpgradeSupplyModeList = [{
confId: 2, confId: 2,
confName: '门店' confName: '门店'
}] }]
// 套餐上架商品信息form表单
export const packageGoodsForm = [{
name: 'upgradeGoodsId',
label: '上架商品',
isRequired: true,
type: 'searchSelect',
optionList: [],
isClear: false,
optionId: 'confId',
optionNameLabel: 'confNameValue',
optionTypeNameLabel: 'confTypeNameValue',
width: '432px'
}, {
type: 'incidBox',
key: 'goodsType',
detailInfo: [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '商品编码',
value: 'type'
}, {
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '所属系列',
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, {
name: 'position',
label: '上架部位',
type: 'radio',
radioGroupList: []
}, {
name: 'goodsAlias',
label: '商品别名',
type: 'input',
maxlength: 50,
width: '432px'
}, {
name: 'warrantyType',
label: '质保卡类型',
type: 'select',
isClear: false,
optionList: [{
confId: 0,
confName: '质保卡'
}, {
confId: 1,
confName: '质保权益卡'
}],
optionId: 'confId',
optionLabel: 'confName',
width: '432px'
}, {
name: 'upgradeSupplyMode',
label: '升级/产品供货模式',
type: 'radio',
index: 2,
radioGroupList: []
}, {
name: 'sellPrice',
label: '售价',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'minSellPrice',
label: '最低售价',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'upgradeProductCost',
label: '产品、升级成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'recoveryCost',
label: '回收成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'virtualAccountCost',
label: '虚拟对账成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'djCost',
label: '嘀加成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}]
// 套餐查看详情form
export const packageGoodsDetail = [
{
name: 'upgradeGoodsName',
label: '上架商品',
type: 'incidBox',
key: 'goodsType',
detailInfo: [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '商品编码',
value: 'type'
}, {
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '所属系列',
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, {
name: 'positionStr',
label: '上架部位'
}, {
name: 'goodsAlias',
label: '商品别名'
}, {
name: 'warrantyTypeStr',
label: '质保卡类型'
}, {
name: 'upgradeSupplyModeStr',
label: '升级产品供货模式'
}, {
name: 'sellPrice',
label: '售价',
unit: true
}, {
name: 'minSellPrice',
label: '最低售价',
unit: true
}, {
name: 'upgradeProductCost',
label: '产品、升级成本',
unit: true
}, {
name: 'recoveryCost',
label: '回收成本',
unit: true
}, {
name: 'virtualAccountCost',
label: '虚拟对账成本',
unit: true
}, {
name: 'djCost',
label: '嘀加成本',
unit: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
}
]
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<!-- 商品信息块 --> <!-- 商品信息块 -->
<div v-if="idx == 1" class="flex_item"> <div v-if="idx == 1" class="flex_item">
<div v-for="(ele, eleIndex) in formData['groundingGoodsList']" :key="eleIndex" class="groundingGoods-item"> <div v-for="(ele, eleIndex) in formData['groundingGoodsList']" :key="eleIndex" class="groundingGoods-item">
<div v-for="(item, index) in i.formBlock" :key="index" :class="(item.type === 'incidBox' || item.type === 'table' || item.type === 'upload') ? 'item message-box' : 'item'"> <div v-for="(item, index) in i.formBlock[eleIndex]" :key="index" :class="(item.type === 'incidBox') ? 'item message-box' : 'item'">
<!-- 商品附带信息 --> <!-- 商品附带信息 -->
<div v-if="item.type === 'incidBox'"> <div v-if="item.type === 'incidBox'">
<el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`" <el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`"
...@@ -25,14 +25,20 @@ ...@@ -25,14 +25,20 @@
style="margin-bottom: 0"> style="margin-bottom: 0">
<div class="incid_box"> <div class="incid_box">
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex"> <div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.unit ? (subItem.label + '(元)/件') : subItem.label }}:</div> <div class="label">{{ subItem.unit ? (membraneTypeList.includes(ele[item.key]) ? subItem.label +
`(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value">{{ subItem.unit ? priceFilter(ele[subItem.value]) : ele[subItem.value] }}</div> <div class="value">{{ subItem.unit ? priceFilter(ele[subItem.value]) : ele[subItem.value] }}</div>
</div> </div>
<!-- 商品分类 延保类 --> <!-- 商品分类 延保类 -->
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)"> <div class="item" v-if="ele[item.key] == 1 || (extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`))">
<div class="label">部位:</div> <div class="label">部位:</div>
<div class="value">{{ ele['positionNames'] }}</div> <div class="value">{{ ele['positionNames'] }}</div>
</div> </div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ ele['warrantyPeriod'] }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) --> <!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)"> <div class="item" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务时间/年:</div> <div class="label">服务时间/年:</div>
...@@ -59,13 +65,13 @@ ...@@ -59,13 +65,13 @@
<div v-else> <div v-else>
<el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`" <el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`"
:rules="rules[item.name]" :rules="rules[item.name]"
:label="item.label ? (item.unit ? (item.label + '(元)/件') : item.label) + ':' : ''" :label="item.label ? (item.unit ? (membraneTypeList.includes(ele['goodsType']) ? item.label + `(元)/车` : (item.label + '(元)/件')) : item.label) + ':' : ''"
v-if="item.name !== 'positionStr' || (item.name == 'positionStr' && extendedPosiType.includes(ele.goodsType) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`))" v-if="item.name !== 'positionStr' || (item.name == 'positionStr' && ele.goodsType == 1) || (item.name == 'positionStr' && extendedPosiType.includes(ele.goodsType) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`))"
:label-width="item.label ? '180px' : '0px'" :label-width="item.label ? '180px' : '0px'"
class="dis-in-block" class="dis-in-block"
style="margin-bottom: 0"> style="margin-bottom: 0">
<div> <div>
<span>{{ item.unit ? priceFilter(ele[item.name]) : (ele[item.name]) }}</span> <span>{{ item.unit ? priceFilter(ele[item.name]) : (ele[item.name])}}</span>
<span v-if="item.name == 'minSellPrice'">{{ ele['validMinSellPrice'] == 'Y' ? '(校验最低价)' : '(不校验最低价)' }}</span> <span v-if="item.name == 'minSellPrice'">{{ ele['validMinSellPrice'] == 'Y' ? '(校验最低价)' : '(不校验最低价)' }}</span>
</div> </div>
</el-form-item> </el-form-item>
...@@ -125,7 +131,7 @@ ...@@ -125,7 +131,7 @@
class="dis-in-block" class="dis-in-block"
style="margin-bottom: 0"> style="margin-bottom: 0">
<div> <div>
<span>{{ item.unit ? priceFilter(formData[item.name]) : formData[item.name] }}</span> <span>{{ item.unit || item.isPrice ? priceFilter(formData[item.name]) || '-' : formData[item.name] || '-' }}</span>
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
...@@ -171,6 +177,7 @@ export default { ...@@ -171,6 +177,7 @@ export default {
return { return {
equitySceneType: baseConfig.equitySceneType || [], // 权益类目 equitySceneType: baseConfig.equitySceneType || [], // 权益类目
extendedPosiType: baseConfig.extendedPosiType || [], // 延保类 extendedPosiType: baseConfig.extendedPosiType || [], // 延保类
membraneTypeList: baseConfig.membraneTypeList,
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
formData: {}, formData: {},
examineFlag: false, examineFlag: false,
...@@ -223,6 +230,9 @@ export default { ...@@ -223,6 +230,9 @@ export default {
}, },
mounted() { mounted() {
deepClone(this.originData?.groundingGoodsList)?.forEach((v, index) => {
this.filterForm(index, deepClone(this.originData))
})
this.formData = deepClone(this.originData) this.formData = deepClone(this.originData)
this.$nextTick(() => { this.$nextTick(() => {
const $store = this.$store.getters['d2admin/auth/curBtns'] const $store = this.$store.getters['d2admin/auth/curBtns']
...@@ -238,6 +248,36 @@ export default { ...@@ -238,6 +248,36 @@ export default {
...mapActions({ ...mapActions({
get: 'd2admin/base/get' get: 'd2admin/base/get'
}), }),
filterForm(index, formData) {
const { formList } = this
const itemData = formData?.groundingGoodsList[index]
// 1 太阳膜 2 (1.3场景商品)
const shopType = itemData?.goodsType == 1 ? '1' : itemData?.sceneType == 3 ? '2' : ''
const shopForm = deepClone(formList[1].formBlock[index])
// 太阳膜/延保类(第三方供应方)保留上架部位字段 positionStr
const spliceForm = shopType == '1'
? ['giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
: shopType == '2'
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
: this.equitySceneType.includes(itemData?.goodsType) || this.extendedPosiType.includes(itemData?.goodsType)
? (this.extendedPosiType.includes(itemData?.goodsType) && !this.baseConfig.supplierCode.includes(`${itemData.supplierCode}`)
? ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost']
: ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost'])
: ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
// 回收成本:产品供货模式选择“门店回收原厂+嘀加”时展示
if (itemData.upgradeSupplyMode == 4) {
spliceForm.indexOf('recoveryCost') > -1 && spliceForm.splice(spliceForm.indexOf('recoveryCost'), 1)
}
// 虚拟对账成本:产品供货模式选择“门店套码+嘀加”“ 服务商自采+嘀加”时展示
if (itemData.upgradeSupplyMode == 3 || itemData.upgradeSupplyMode == 5) {
spliceForm.indexOf('virtualAccountCost') > -1 && spliceForm.splice(spliceForm.indexOf('virtualAccountCost'), 1)
}
const newForm = shopForm.filter(v => !spliceForm?.includes(v.name))
this.$set(this.formList[1].formBlock, index, newForm)
this.$nextTick(() => {
this.show = true
})
},
// 文件预览 // 文件预览
handleFileView(item) { handleFileView(item) {
if (item?.voucherFileUrl?.includes('.pdf')) { if (item?.voucherFileUrl?.includes('.pdf')) {
...@@ -317,6 +357,13 @@ export default { ...@@ -317,6 +357,13 @@ export default {
.groundingGoods-item{ .groundingGoods-item{
padding-top: 15px; padding-top: 15px;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
.item{
display: inline-block;
width: 33%;
}
.message-box{
width: 100%
}
} }
.groundingGoods-item:last-child{ .groundingGoods-item:last-child{
border: none; border: none;
......
...@@ -226,6 +226,27 @@ export default { ...@@ -226,6 +226,27 @@ export default {
}, },
width: '100' width: '100'
}, { }, {
label: '产品、升级成本/元',
prop: 'upgradeProductCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.upgradeProductCost)
},
width: '150'
}, {
label: '虚拟对账成本/元',
prop: 'virtualAccountCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.virtualAccountCost)
},
width: '150'
}, {
label: '回收成本/元',
prop: 'recoveryCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.recoveryCost)
},
width: '100'
}, {
label: '嘀加成本/元', label: '嘀加成本/元',
prop: 'djCost', prop: 'djCost',
formatter: (cellValue) => { formatter: (cellValue) => {
......
...@@ -15,6 +15,7 @@ import { sceneList, BaseData } from '@/common/constants.js' ...@@ -15,6 +15,7 @@ import { sceneList, BaseData } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data'
export default { export default {
name: 'PackageDetail', name: 'PackageDetail',
components: { components: {
...@@ -32,7 +33,10 @@ export default { ...@@ -32,7 +33,10 @@ export default {
sellPrice: [{ required: true }], sellPrice: [{ required: true }],
minSellPrice: [{ required: true }], minSellPrice: [{ required: true }],
djCost: [{ required: true }], djCost: [{ required: true }],
thirdPartyCost: [{ required: true }] thirdPartyCost: [{ required: true }],
upgradeProductCost: [{ required: true }],
recoveryCost: [{ required: true }],
virtualAccountCost: [{ required: true }]
}, },
editForm: [{ editForm: [{
title: '套餐信息', title: '套餐信息',
...@@ -42,78 +46,43 @@ export default { ...@@ -42,78 +46,43 @@ export default {
}, { }, {
name: 'sellPrice', name: 'sellPrice',
label: '售价', label: '售价',
unit: true // unit: true
isPrice: true
}, { }, {
name: 'minSellPrice', name: 'minSellPrice',
label: '最低售价', label: '最低售价',
unit: true // unit: true
isPrice: true
}, { }, {
name: 'djCost', name: 'upgradeProductCost',
label: '嘀加成本', label: '产品、升级成本',
unit: true // unit: true
}, { isPrice: true
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
}]
}, {
title: '商品信息',
formBlock: [{
name: 'upgradeGoodsName',
label: '上架商品',
type: 'incidBox',
key: 'goodsType',
detailInfo: [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '商品编码',
value: 'type'
}, {
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '所属系列',
value: 'goodsName'
}, { }, {
label: '所属分类', name: 'recoveryCost',
value: 'goodsTypeName' label: '回收成本',
// unit: true
isPrice: true
}, { }, {
label: '商品ID', name: 'virtualAccountCost',
value: 'upgradeCommodityCode' label: '虚拟对账成本',
}] // unit: true
}, { isPrice: true
name: 'positionStr',
label: '上架部位'
}, {
name: 'goodsAlias',
label: '商品别名'
}, {
name: 'sellPrice',
label: '售价',
unit: true
}, {
name: 'minSellPrice',
label: '最低售价',
unit: true
}, { }, {
name: 'djCost', name: 'djCost',
label: '嘀加成本', label: '嘀加成本',
unit: true // unit: true
isPrice: true
}, { }, {
name: 'thirdPartyCost', name: 'thirdPartyCost',
label: '第三方成本', label: '第三方成本',
unit: true // unit: true
isPrice: true
}] }]
}, { }, {
title: '商品信息',
formBlock: []
}, {
title: '门店信息', title: '门店信息',
formBlock: [{ formBlock: [{
name: 'sceneName', name: 'sceneName',
...@@ -137,7 +106,11 @@ export default { ...@@ -137,7 +106,11 @@ export default {
show: false, show: false,
editData: {}, editData: {},
examineFlag: false, examineFlag: false,
detailId: '' detailId: '',
warrantyTypeShow: {
0: '质保卡',
1: '质保权益卡'
},
} }
}, },
mounted() { mounted() {
...@@ -155,24 +128,33 @@ export default { ...@@ -155,24 +128,33 @@ export default {
}), }),
async getBaseData() { async getBaseData() {
this.extendedPosiTypeList = await this.get(BaseData.extendedPosiTypeList) this.extendedPosiTypeList = await this.get(BaseData.extendedPosiTypeList)
this.positionTypeList = await this.get(BaseData.positionTypeList)
}, },
getDetailInfo(id) { getDetailInfo(id) {
getPackageDetailInfo({ id }).then(res => { getPackageDetailInfo({ id }).then(res => {
res.reviewLogList?.forEach(val => { res.reviewLogList?.forEach(val => {
val.updatedDateStr = val.updatedDate ? Util.dateFormate(val.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '' val.updatedDateStr = val.updatedDate ? Util.dateFormate(val.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
}) })
let arr = []
if (res.sceneType == 3) { // 1.3场景 升级产品供货模式
arr = crowdUpgradeSupplyModeList
}
res.groundingGoodsList = [] res.groundingGoodsList = []
res?.merchantGoodsInfoList?.forEach(val => { res?.merchantGoodsInfoList?.forEach(val => {
if (val.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList
}
this.editForm[1].formBlock.push(packageGoodsDetail)
// 延保类回显部位 // 延保类回显部位
const positionNamesArr = deepClone(this.extendedPosiTypeList).filter(subVal => (val?.upgradeGoods?.position?.split(','))?.includes(subVal.position + '')) || [] const positionNamesArr = deepClone(this.positionTypeList.concat(this.extendedPosiTypeList)).filter(subVal => (val?.upgradeGoods?.position?.split(','))?.includes(subVal.position + '')) || []
res.groundingGoodsList.push({ res.groundingGoodsList.push({
goodsType: val?.goodsType, // 类目值 goodsType: val?.goodsType, // 类目值
upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id
upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称 upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称
goodsAlias: val?.goodsAlias, // 商品别名 goodsAlias: val?.goodsAlias || '-', // 商品别名
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目 goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
upgradePrice: val?.upgradePrice, // 参考售价 // upgradePrice: val?.upgradePrice, // 参考售价
positionStr: deepClone(this.extendedPosiTypeList)?.filter(subVal => val?.position == subVal.position)[0]?.confName || '', // 上架部位 positionStr: deepClone(this.positionTypeList.concat(this.extendedPosiTypeList))?.filter(subVal => val?.position == subVal.position)[0]?.confName || '', // 上架部位
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // 部位名称 positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // 部位名称
positionNamesArr: positionNamesArr, // 多部位数组 positionNamesArr: positionNamesArr, // 多部位数组
purchasePrice: val?.upgradeGoods?.purchasePrice, // 采购价 purchasePrice: val?.upgradeGoods?.purchasePrice, // 采购价
...@@ -190,7 +172,15 @@ export default { ...@@ -190,7 +172,15 @@ export default {
validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价 validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价
djCost: val?.djCost, // 嘀加成本 djCost: val?.djCost, // 嘀加成本
thirdPartyCost: val?.thirdPartyCost, // 第三方成本 thirdPartyCost: val?.thirdPartyCost, // 第三方成本
supplierCode: val?.goodsInfo?.supplierCode // 供应方 supplierCode: val?.goodsInfo?.supplierCode, // 供应方
warrantyTypeStr: this.warrantyTypeShow[val?.warrantyType] || '-', // 质保卡类型
upgradeSupplyMode: val?.upgradeSupplyMode,
upgradeSupplyModeStr: arr?.filter(v => v.confId == val.upgradeSupplyMode)[0]?.confName || '', // 升级产品供货模式
upgradeProductCost: val?.upgradeProductCost, // 升级产品成本
virtualAccountCost: val?.virtualAccountCost, // 虚拟对账成本
recoveryCost: val?.recoveryCost, // 回收成本
warrantyPeriod: val?.upgradeGoods?.warrantyPeriod, // 质保年限
upgradePrice: val?.upgradeGoods?.upgradePrice // 参考售价
}) })
}) })
res.sceneName = sceneList[res.sceneType] || '-' res.sceneName = sceneList[res.sceneType] || '-'
......
...@@ -130,7 +130,8 @@ ...@@ -130,7 +130,8 @@
<!-- 权益服务 --> <!-- 权益服务 -->
<td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"> <td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</span> <span class="color-red">*</span>
<span>可选择的服务项目(多选)</span> <span>服务项目(多选)</span>
<img src="@/assets/icon-edit.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="serviceSelectFocus()" />
</td> </td>
<td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"> <td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</span> <span class="color-red">*</span>
...@@ -418,6 +419,7 @@ ...@@ -418,6 +419,7 @@
</td> </td>
<td style="width: 60px;"> <td style="width: 60px;">
<el-button type="text" <el-button type="text"
:disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0"
@click="delspecificationValueList(subIndex)">删除 @click="delspecificationValueList(subIndex)">删除
</el-button> </el-button>
</td> </td>
...@@ -717,6 +719,17 @@ export default { ...@@ -717,6 +719,17 @@ export default {
this.serviceItemsVisible = true this.serviceItemsVisible = true
}, },
handleRelateServiceConfirm(data) { handleRelateServiceConfirm(data) {
// 批量操作服务项目
if (!this.serviceSelectIndex) {
this.goodsInfoData?.goodsSpecificationList.map(v => {
v.serviceItemArr = data
v.upgradePrice = data.reduce((v, i) => {
return v + i.standardSalesCost
}, 0)
return v
})
return this.serviceItemsVisible = false
}
const index = this.serviceSelectIndex const index = this.serviceSelectIndex
let upgradePrice = 0 let upgradePrice = 0
data.forEach(v => { // 参考售价通过已选服务项目的销售成本自动累计 data.forEach(v => { // 参考售价通过已选服务项目的销售成本自动累计
...@@ -1063,7 +1076,7 @@ export default { ...@@ -1063,7 +1076,7 @@ export default {
// 批量服务时间 // 批量服务时间
handleBatchServiceTimeInput(newValue) { handleBatchServiceTimeInput(newValue) {
newValue = newValue.replace(/[^\d.]/g, '') newValue = newValue.replace(/[^\d.]/g, '')
let oldValue = `${this.batchObj['oldserviceYears']}` let oldValue = this.batchObj['oldserviceYears'] ? `${this.batchObj['oldserviceYears']}` : ''
this.$set(this.batchObj, 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1)) this.$set(this.batchObj, 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1))
this.$set(this.batchObj, 'oldserviceYears', this.batchObj['serviceYears']) this.$set(this.batchObj, 'oldserviceYears', this.batchObj['serviceYears'])
}, },
...@@ -1149,7 +1162,7 @@ export default { ...@@ -1149,7 +1162,7 @@ export default {
// 服务时间 // 服务时间
handleServiceTimeInput(newValue, index) { handleServiceTimeInput(newValue, index) {
newValue = newValue.replace(/[^\d.]/g, '') newValue = newValue.replace(/[^\d.]/g, '')
let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldserviceYears']}` let oldValue = this.goodsInfoData.goodsSpecificationList[index]['oldserviceYears'] ? `${this.goodsInfoData.goodsSpecificationList[index]['oldserviceYears']}` : ''
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1)) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1))
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldserviceYears', this.goodsInfoData.goodsSpecificationList[index]['serviceYears']) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldserviceYears', this.goodsInfoData.goodsSpecificationList[index]['serviceYears'])
}, },
...@@ -1163,14 +1176,16 @@ export default { ...@@ -1163,14 +1176,16 @@ export default {
let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldminSuitCarPrice']}` let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldminSuitCarPrice']}`
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'minSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0)) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'minSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0))
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['minSuitCarPrice']) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['minSuitCarPrice'])
this.handlePriceConflict() // 取消适用车价区间校验
// this.handlePriceConflict()
}, },
maxSuitCarPriceInput(newValue, index) { maxSuitCarPriceInput(newValue, index) {
newValue = newValue.replace(/[^\d.]/g, '') newValue = newValue.replace(/[^\d.]/g, '')
let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldmaxSuitCarPrice']}` let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldmaxSuitCarPrice']}`
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'maxSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0)) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'maxSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0))
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['maxSuitCarPrice']) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['maxSuitCarPrice'])
this.handlePriceConflict() // 取消适用车价区间校验
// this.handlePriceConflict()
}, },
// 是否必填 // 是否必填
priceRangeIsRequired(minValue, maxValue) { priceRangeIsRequired(minValue, maxValue) {
...@@ -1178,7 +1193,7 @@ export default { ...@@ -1178,7 +1193,7 @@ export default {
}, },
// 单个商品车价区间是否正确 // 单个商品车价区间是否正确
priceIsError(minValue, maxValue) { priceIsError(minValue, maxValue) {
return !this.filterEmpty(minValue) && !this.filterEmpty(maxValue) && Number(minValue) >= Number(maxValue) return !this.filterEmpty(minValue) && !this.filterEmpty(maxValue) && Number(minValue) > Number(maxValue)
}, },
handlePriceConflict() { handlePriceConflict() {
const priceRanges = [] const priceRanges = []
...@@ -1242,10 +1257,15 @@ export default { ...@@ -1242,10 +1257,15 @@ export default {
td{ td{
display: inline-block; display: inline-block;
text-align: center; text-align: center;
vertical-align: middle;
width: 220px; width: 220px;
height: 100%; height: 100%;
line-height: 40px; line-height: 40px;
border-right: 1px solid #E8E8EA; border-right: 1px solid #E8E8EA;
span{
display: inline-block;
vertical-align: middle;
}
} }
td:last-child{ td:last-child{
border-right: none; border-right: none;
......
...@@ -49,11 +49,13 @@ ...@@ -49,11 +49,13 @@
<td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"> <td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</span> <span class="color-red">*</span>
<span>服务项目</span> <span>服务项目</span>
<img v-if="$$(goodsInfoData.goodsSpecificationSingleList,'length')" src="@/assets/icon-edit.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="serviceSelectFocus()" />
</td> </td>
<!-- 仅权益升级类目展示 --> <!-- 仅权益升级类目展示 -->
<td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"> <td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</span> <span class="color-red">*</span>
<span>服务时间/年</span> <span>服务时间/年</span>
<img v-if="$$(goodsInfoData.goodsSpecificationSingleList,'length')" src="@/assets/icon-edit.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="batchServiceYears()" />
</td> </td>
<!-- 仅权益升级类目展示 --> <!-- 仅权益升级类目展示 -->
<td v-if="equitySceneType.includes(goodsInfoData.goodsType)"> <td v-if="equitySceneType.includes(goodsInfoData.goodsType)">
...@@ -83,7 +85,7 @@ ...@@ -83,7 +85,7 @@
<el-input v-else placeholder="商品名称" <el-input v-else placeholder="商品名称"
size="small" size="small"
:class="{ 'w-150-per': true, 'border-red': (filterEmpty(subItem.specificationData) && subItem.specificationDataEmpty) || subItem.specificationDataError }" :class="{ 'w-150-per': true, 'border-red': (filterEmpty(subItem.specificationData) && subItem.specificationDataEmpty) || subItem.specificationDataError }"
maxlength="20" maxlength="50"
:ref="'specificationDataInput' + subIndex" :ref="'specificationDataInput' + subIndex"
v-model.trim="subItem.specificationData" v-model.trim="subItem.specificationData"
@blur="handleGoodsNameBlur($event, subIndex)"> @blur="handleGoodsNameBlur($event, subIndex)">
...@@ -314,7 +316,9 @@ ...@@ -314,7 +316,9 @@
</div> </div>
</td> </td>
<td style="width: 60px;"> <td style="width: 60px;">
<!-- SPU状态是草稿/SKU上架为待审核状态/SKU是待上架状态 -->
<el-button type="text" <el-button type="text"
:disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0"
@click="delgoodsSpecificationSingleList(subIndex)">删除 @click="delgoodsSpecificationSingleList(subIndex)">删除
</el-button> </el-button>
</td> </td>
...@@ -359,6 +363,27 @@ ...@@ -359,6 +363,27 @@
</el-form> </el-form>
</el-row> </el-row>
</service-items-dialog> </service-items-dialog>
<d2-dialog title="服务时间"
:is-visible.sync="serviceYearsVisible"
width="25%"
btn-ok-label="确定"
@confirmDialog="handleServiceYearsConfirm"
@closeDialog="handleServiceYearsClose">
<el-form ref="serviceYears-dialog-form"
:model="batchForm"
inline
:rules="batchRules"
label-width="120px">
<el-form-item label="服务时间:"
prop="serviceYears">
<el-input class="w-320"
size="small"
maxlength="20"
v-model="batchForm.serviceYears"
placeholder="请输入服务时间"></el-input>
</el-form-item>
</el-form>
</d2-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -397,7 +422,16 @@ export default { ...@@ -397,7 +422,16 @@ export default {
serviceSelected: [], serviceSelected: [],
serviceSelectIndex: null, serviceSelectIndex: null,
positionTypeList: [], // 太阳膜类商品部位 positionTypeList: [], // 太阳膜类商品部位
extendedPosiTypeList: [] // 延保类商品部位 extendedPosiTypeList: [], // 延保类商品部位
serviceYearsVisible: false, // 批量服务时间弹窗
batchForm: {
serviceYears: ''
},
batchRules: {
serviceYears: [
{ required: true, message: '请输入服务时间', trigger: 'blur' }
]
}
} }
}, },
props: { props: {
...@@ -475,6 +509,7 @@ export default { ...@@ -475,6 +509,7 @@ export default {
this.maxPrice = priceArr.length ? Math.max(...priceArr) : 0 this.maxPrice = priceArr.length ? Math.max(...priceArr) : 0
this.getBaseData() this.getBaseData()
this.computedTableWidth(this.goodsInfoData?.goodsType) this.computedTableWidth(this.goodsInfoData?.goodsType)
console.log(this.goodsInfoData.goodsSpecificationSingleList)
}, },
methods: { methods: {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']), ...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
...@@ -528,6 +563,17 @@ export default { ...@@ -528,6 +563,17 @@ export default {
this.serviceItemsVisible = true this.serviceItemsVisible = true
}, },
handleRelateServiceConfirm(data) { handleRelateServiceConfirm(data) {
// 批量操作服务项目
if (!this.serviceSelectIndex) {
this.goodsInfoData?.goodsSpecificationSingleList.map(v => {
v.serviceItemArr = data
v.upgradePrice = data.reduce((v, i) => {
return v + i.standardSalesCost
}, 0)
return v
})
return this.serviceItemsVisible = false
}
const index = this.serviceSelectIndex const index = this.serviceSelectIndex
let upgradePrice = 0 let upgradePrice = 0
data.forEach(v => { // 参考售价通过已选服务项目的销售成本自动累计 data.forEach(v => { // 参考售价通过已选服务项目的销售成本自动累计
...@@ -540,6 +586,28 @@ export default { ...@@ -540,6 +586,28 @@ export default {
this.serviceSelected = [] this.serviceSelected = []
this.serviceItemsVisible = false this.serviceItemsVisible = false
}, },
batchServiceYears() {
this.batchForm.serviceYears = ''
this.serviceYearsVisible = true
this.$nextTick(() => {
this.$refs['serviceYears-dialog-form'].clearValidate()
})
},
handleServiceYearsClose() {
this.serviceYearsVisible = false
},
handleServiceYearsConfirm() {
this.$refs['serviceYears-dialog-form'].validate((valid, opt) => {
if (valid) {
const serviceYears = this.batchForm.serviceYears
this.goodsInfoData.goodsSpecificationSingleList.map(v => {
v.serviceYears = serviceYears
return v
})
this.serviceYearsVisible = false
}
})
},
handleRelateServiceClose() { handleRelateServiceClose() {
this.serviceItemsVisible = false this.serviceItemsVisible = false
}, },
...@@ -708,7 +776,7 @@ export default { ...@@ -708,7 +776,7 @@ export default {
// 服务时间 // 服务时间
handleServiceTimeInput(newValue, index) { handleServiceTimeInput(newValue, index) {
newValue = newValue.replace(/[^\d.]/g, '') newValue = newValue.replace(/[^\d.]/g, '')
let oldValue = `${this.goodsInfoData.goodsSpecificationSingleList[index]['oldserviceYears']}` let oldValue = this.goodsInfoData.goodsSpecificationSingleList[index]['oldserviceYears'] ? `${this.goodsInfoData.goodsSpecificationSingleList[index]['oldserviceYears']}` : ''
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1)) this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1))
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'oldserviceYears', this.goodsInfoData.goodsSpecificationSingleList[index]['serviceYears']) this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'oldserviceYears', this.goodsInfoData.goodsSpecificationSingleList[index]['serviceYears'])
}, },
...@@ -722,14 +790,16 @@ export default { ...@@ -722,14 +790,16 @@ export default {
let oldValue = `${this.goodsInfoData.goodsSpecificationSingleList[index]['oldminSuitCarPrice']}` let oldValue = `${this.goodsInfoData.goodsSpecificationSingleList[index]['oldminSuitCarPrice']}`
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'minSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0)) this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'minSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0))
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationSingleList[index]['minSuitCarPrice']) this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationSingleList[index]['minSuitCarPrice'])
this.handlePriceConflict() // 取消适用车价区间校验
// this.handlePriceConflict()
}, },
maxSuitCarPriceInput(newValue, index) { maxSuitCarPriceInput(newValue, index) {
newValue = newValue.replace(/[^\d.]/g, '') newValue = newValue.replace(/[^\d.]/g, '')
let oldValue = `${this.goodsInfoData.goodsSpecificationSingleList[index]['oldmaxSuitCarPrice']}` let oldValue = `${this.goodsInfoData.goodsSpecificationSingleList[index]['oldmaxSuitCarPrice']}`
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'maxSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0)) this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'maxSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0))
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationSingleList[index]['maxSuitCarPrice']) this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationSingleList[index]['maxSuitCarPrice'])
this.handlePriceConflict() // 取消适用车价区间校验
// this.handlePriceConflict()
}, },
// 是否必填 // 是否必填
priceRangeIsRequired(minValue, maxValue) { priceRangeIsRequired(minValue, maxValue) {
...@@ -737,7 +807,7 @@ export default { ...@@ -737,7 +807,7 @@ export default {
}, },
// 单个商品车价区间是否正确 // 单个商品车价区间是否正确
priceIsError(minValue, maxValue) { priceIsError(minValue, maxValue) {
return !this.filterEmpty(minValue) && !this.filterEmpty(maxValue) && Number(minValue) >= Number(maxValue) return !this.filterEmpty(minValue) && !this.filterEmpty(maxValue) && Number(minValue) > Number(maxValue)
}, },
handlePriceConflict() { handlePriceConflict() {
const priceRanges = [] const priceRanges = []
...@@ -798,10 +868,15 @@ export default { ...@@ -798,10 +868,15 @@ export default {
td{ td{
display: inline-block; display: inline-block;
text-align: center; text-align: center;
vertical-align: middle;
width: 220px; width: 220px;
height: 100%; height: 100%;
line-height: 40px; line-height: 40px;
border-right: 1px solid #E8E8EA; border-right: 1px solid #E8E8EA;
span{
display: inline-block;
vertical-align: middle;
}
} }
td:last-child{ td:last-child{
border-right: none; border-right: none;
......
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
entityCardFlag: val.entityCardFlag == 'Y', entityCardFlag: val.entityCardFlag == 'Y',
minSuitCarPrice: val.minSuitCarPrice, minSuitCarPrice: val.minSuitCarPrice,
maxSuitCarPrice: val.maxSuitCarPrice, maxSuitCarPrice: val.maxSuitCarPrice,
merchantGoodsInfos: val?.merchantGoodsInfos,
// 编辑产品价格输入框限制 // 编辑产品价格输入框限制
oldpurchasePrice: val.purchasePrice, oldpurchasePrice: val.purchasePrice,
oldupgradePrice: val.upgradePrice, oldupgradePrice: val.upgradePrice,
...@@ -180,7 +181,8 @@ export default { ...@@ -180,7 +181,8 @@ export default {
goodsName: res.goodsInfo.goodsName, goodsName: res.goodsInfo.goodsName,
applicableModelNames: res.goodsInfo?.goodsType == 1 ? deepClone(applicableModelTypeList).filter(val => res.goodsInfo?.carTypeList?.indexOf(val.confId) > -1).map(item => item.confName).join('/') : '', applicableModelNames: res.goodsInfo?.goodsType == 1 ? deepClone(applicableModelTypeList).filter(val => res.goodsInfo?.carTypeList?.indexOf(val.confId) > -1).map(item => item.confName).join('/') : '',
positionNames: res.goodsInfo?.goodsType == 1 ? deepClone(this.positionTypeList).filter(val => selectedPositions.indexOf(val.position) > -1).map(item => item.confName).join('/') : '', positionNames: res.goodsInfo?.goodsType == 1 ? deepClone(this.positionTypeList).filter(val => selectedPositions.indexOf(val.position) > -1).map(item => item.confName).join('/') : '',
supplierCode: res.goodsInfo.supplierCode supplierCode: res.goodsInfo.supplierCode,
merchantGoodsInfos: res?.merchantGoodsInfos
} }
this.productFormData = deepClone({ ...res.goodsInfo, status: res?.status, oldconvertedValue: res.goodsInfo?.convertedValue }) || {} this.productFormData = deepClone({ ...res.goodsInfo, status: res?.status, oldconvertedValue: res.goodsInfo?.convertedValue }) || {}
this.setUpdateGoodsInfo(objData) this.setUpdateGoodsInfo(objData)
...@@ -436,7 +438,8 @@ export default { ...@@ -436,7 +438,8 @@ export default {
const singleMaxpriceRangeNode = this.$refs['specifications-form']?.$refs.singleSpecificationFormRef?.$refs[`max-car-price-range-input${i}`] const singleMaxpriceRangeNode = this.$refs['specifications-form']?.$refs.singleSpecificationFormRef?.$refs[`max-car-price-range-input${i}`]
const multipleMinPriceRangeNode = this.$refs['specifications-form']?.$refs.multipleSpecificationFormRef?.$refs[`min-car-price-range-input${i}`] const multipleMinPriceRangeNode = this.$refs['specifications-form']?.$refs.multipleSpecificationFormRef?.$refs[`min-car-price-range-input${i}`]
const multipleMaxPriceRangeNode = this.$refs['specifications-form']?.$refs.multipleSpecificationFormRef?.$refs[`max-car-price-range-input${i}`] const multipleMaxPriceRangeNode = this.$refs['specifications-form']?.$refs.multipleSpecificationFormRef?.$refs[`max-car-price-range-input${i}`]
if (this.handlePriceConflict()?.length) throw true // 去掉适用车价校验
// if (this.handlePriceConflict()?.length) throw true
// 获取适用车价元素 // 获取适用车价元素
if (singleMinpriceRangeNode && singleMinpriceRangeNode[0]?.$el?.className?.includes('border-red')) throw true if (singleMinpriceRangeNode && singleMinpriceRangeNode[0]?.$el?.className?.includes('border-red')) throw true
if (singleMaxpriceRangeNode && singleMaxpriceRangeNode[0]?.$el?.className?.includes('border-red')) throw true if (singleMaxpriceRangeNode && singleMaxpriceRangeNode[0]?.$el?.className?.includes('border-red')) throw true
......
<template> <template>
<div>
<baseDialog <baseDialog
:is-show.sync="dialogShow" :is-show.sync="dialogShow"
:config="dialogConfig.setting" :config="dialogConfig.setting"
...@@ -99,7 +100,9 @@ ...@@ -99,7 +100,9 @@
</el-form> </el-form>
</div> </div>
<div class="examine-record"> <div class="examine-record">
<div class="title">操作记录</div> <div class="title">
操作记录<el-button type="text" class="edit-btn" @click="handleRecordUpdate">编辑</el-button>
</div>
<div class="record-div"> <div class="record-div">
<div <div
class="record-div-d" class="record-div-d"
...@@ -142,8 +145,8 @@ ...@@ -142,8 +145,8 @@
<el-button type="text"> <el-button type="text">
{{ {{
item.remark item.remark
? item.remark.length > 15 ? item.remark.length > 12
? item.remark.slice(0, 15) + "..." ? item.remark.slice(0, 12) + "..."
: item.remark : item.remark
: "-" : "-"
}} }}
...@@ -177,11 +180,16 @@ ...@@ -177,11 +180,16 @@
</el-carousel> </el-carousel>
</el-dialog> </el-dialog>
</baseDialog> </baseDialog>
<!-- 修改信息 -->
<refund-update-dialog v-if="refundVisible" :refund-visible="refundVisible" :detailInfo="detailInfo" @dialogClose="handleRecordUpdate" @refundConfirm="refundConfirm" />
</div>
</template> </template>
<script> <script>
import { getById } from "@api/refundExamine" import { getById } from "@api/refundExamine"
import { Util, deepClone, downLoadFile } from "@/common/util" import { Util, deepClone, downLoadFile } from "@/common/util"
import refundUpdateDialog from './refundUpdateDialog'
import { import {
transferAccountsStatusShow, transferAccountsStatusShow,
sceneType, sceneType,
...@@ -189,6 +197,9 @@ import { ...@@ -189,6 +197,9 @@ import {
} from "@/common/constants.js" } from "@/common/constants.js"
export default { export default {
name: "DetailDialog", name: "DetailDialog",
components: {
refundUpdateDialog
},
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
...@@ -245,7 +256,8 @@ export default { ...@@ -245,7 +256,8 @@ export default {
loading: true, loading: true,
imgVisible: false, imgVisible: false,
photoList: [], photoList: [],
imgList: [] imgList: [],
refundVisible: false
} }
}, },
methods: { methods: {
...@@ -276,6 +288,17 @@ export default { ...@@ -276,6 +288,17 @@ export default {
item.optPerShow = "发起人" item.optPerShow = "发起人"
item.optTimeShow = "发起时间" item.optTimeShow = "发起时间"
item.optRemarkShow = "备注" item.optRemarkShow = "备注"
} else if (item.beforeStatus == 0) {
item.optShow = "运营审核"
item.optPerShow = "审核人"
item.optTimeShow = "审核时间"
if (item.afterStatus == 1) {
item.optStautsShow = "通过"
item.optRemarkShow = "备注"
} else if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else if (item.beforeStatus == 1) { } else if (item.beforeStatus == 1) {
item.optShow = "商务审核" item.optShow = "商务审核"
item.optPerShow = "审核人" item.optPerShow = "审核人"
...@@ -318,6 +341,17 @@ export default { ...@@ -318,6 +341,17 @@ export default {
}) })
}, },
// 更新信息
handleRecordUpdate() {
this.refundVisible = !this.refundVisible
},
// 关闭驳回弹窗
refundConfirm(obj) {
this.loading = true
this.getDetail()
},
// URL下载文件并修改文件名 // URL下载文件并修改文件名
download(item) { download(item) {
const x = new XMLHttpRequest() const x = new XMLHttpRequest()
...@@ -337,28 +371,35 @@ export default { ...@@ -337,28 +371,35 @@ export default {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
this.imgList = url this.imgList = url
this.imgUrlName = name this.imgUrlName = name
} },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.examine-record { .examine-record {
box-sizing: border-box;
width: 1040px; width: 1040px;
min-height: 157px; min-height: 157px;
background: #ffffff; // border: 1px solid #e5e5e5;
border: 1px solid #e5e5e5; border-radius: 4px;
margin-top: 23px; background: #fafafa;
padding: 16px 20px;
.title { .title {
margin: 16px 20px; // width: 64px;
width: 64px; height: 23px;
height: 22px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 600; font-weight: 600;
font-size: 16px;
color: #333333; color: #333333;
text-align: center; font-size: 16px;
text-align: left;
}
.title .edit-btn {
color: #185efe;
font-size: 16px;
margin-left: 8px;
} }
// .dot { // .dot {
...@@ -386,7 +427,7 @@ export default { ...@@ -386,7 +427,7 @@ export default {
} }
.record-div { .record-div {
margin: 16px 20px; margin: 16px 0;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
......
...@@ -27,6 +27,7 @@ export default { ...@@ -27,6 +27,7 @@ export default {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
txtObj: { txtObj: {
运营审核: '审核通过后,退款单据自动流转至商务审核。',
商务审核: '审核通过后,退款单据自动流转至财务复核。', 商务审核: '审核通过后,退款单据自动流转至财务复核。',
财务复核: '审核通过后,退款单据自动流转至财务结算。' 财务复核: '审核通过后,退款单据自动流转至财务结算。'
}, },
...@@ -88,13 +89,16 @@ export default { ...@@ -88,13 +89,16 @@ export default {
methods: { methods: {
handleAddConfirm() { handleAddConfirm() {
var params = {} var params = {
status: 1
}
params.remark = this.infoForm.remark params.remark = this.infoForm.remark
if (this.examineType == '商务审核') { const obj = {
params.status = 2 '运营审核': 1,
} else { '商务审核': 2,
params.status = 3 '财务复核': 3,
} }
params.status = obj[this.examineType]
if (this.infoList.length > 1) { if (this.infoList.length > 1) {
params.idList = this.infoList.map((item) => { params.idList = this.infoList.map((item) => {
return item.id return item.id
......
...@@ -301,6 +301,7 @@ ...@@ -301,6 +301,7 @@
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible" <new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:detail="detail" :detail="detail"
:order-type="1" :order-type="1"
:scene="scene"
v-if="signRefundVisible" v-if="signRefundVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" />
<!-- 超管修改备注 --> <!-- 超管修改备注 -->
...@@ -377,6 +378,7 @@ export default { ...@@ -377,6 +378,7 @@ export default {
}], }],
progressList: [], progressList: [],
scene: '',
signRefundVisible: false, signRefundVisible: false,
signRefundFlag: false, signRefundFlag: false,
remarkVisible: false, remarkVisible: false,
...@@ -398,6 +400,7 @@ export default { ...@@ -398,6 +400,7 @@ export default {
}, },
mounted() { mounted() {
this.signRefundFlag = this.$route.query.signRefundFlag this.signRefundFlag = this.$route.query.signRefundFlag
this.scene = this.$route.query.scene
this.getBaseData() this.getBaseData()
this.getGoodsOrderDetail() this.getGoodsOrderDetail()
const $store = this.$store.getters['d2admin/auth/curBtns'] const $store = this.$store.getters['d2admin/auth/curBtns']
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</span> </span>
<!-- 审核 --> <!-- 审核 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="scope.scope.status == 1 || scope.scope.status == 2"> v-if="scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9040805']" /> :show-btn-ids="['9040805']" />
</span> </span>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</span> </span>
<!-- 驳回 --> <!-- 驳回 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="scope.scope.status == 1 || scope.scope.status == 2 || scope.scope.status == 3"> v-if="scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2 || scope.scope.status == 3">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9040807']" /> :show-btn-ids="['9040807']" />
</span> </span>
...@@ -158,6 +158,18 @@ export default { ...@@ -158,6 +158,18 @@ export default {
type: 'input', type: 'input',
maxlength: '50', maxlength: '50',
isClear: true isClear: true
}, {
label: '服务对接',
name: 'yqMerchantName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '流量方',
name: 'shopMerchantName',
type: 'input',
maxlength: '20',
isClear: true
}], }],
getListApi: refundApplyRecordPage, getListApi: refundApplyRecordPage,
tableParams: { tableParams: {
...@@ -217,6 +229,14 @@ export default { ...@@ -217,6 +229,14 @@ export default {
} }
} }
}, { }, {
label: '所属服务对接',
prop: 'yqMerchantName',
width: '200px'
}, {
label: '所属流量方',
prop: 'shopMerchantName',
width: '200px'
}, {
label: '申请人', label: '申请人',
prop: 'createdBy' prop: 'createdBy'
}, { }, {
...@@ -235,6 +255,7 @@ export default { ...@@ -235,6 +255,7 @@ export default {
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
0: 'blueSpot',
1: 'blueSpot', 1: 'blueSpot',
2: 'blueSpot', 2: 'blueSpot',
3: 'blueSpot', 3: 'blueSpot',
...@@ -326,6 +347,16 @@ export default { ...@@ -326,6 +347,16 @@ export default {
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
// 批量运营审核
batchOperatorAudit() {
var selectedData = []
console.log(this.$refs.recordTable.mutiSelectArr.refundList)
if (this.$refs.recordTable.mutiSelectArr.refundList) {
selectedData = this.$refs.recordTable.mutiSelectArr.refundList
}
this.handleBatchExamine_commit(selectedData, "运营审核")
},
// 批量商务审核 // 批量商务审核
batchBusinessExamine() { batchBusinessExamine() {
var selectedData = [] var selectedData = []
...@@ -355,7 +386,22 @@ export default { ...@@ -355,7 +386,22 @@ export default {
return false return false
} }
let _flag = true let _flag = true
if (examineType == '商务审核') {
if (examineType == '运营审核') {
selectedData.forEach(item => {
if (item.status != 0) { // 非“运营审核”状态不允许批量运营审核
_flag = false
}
})
if (!_flag) {
this.$message({
message: "请选择待运营审核的退款记录;本次操作无效",
type: "warning",
showClose: true
})
return
}
} else if (examineType == '商务审核') {
selectedData.forEach(item => { selectedData.forEach(item => {
if (item.status != 1) { // 非“商务审核”状态不允许批量商务审核 if (item.status != 1) { // 非“商务审核”状态不允许批量商务审核
_flag = false _flag = false
...@@ -393,14 +439,13 @@ export default { ...@@ -393,14 +439,13 @@ export default {
handleExamine(row) { handleExamine(row) {
console.log(row) console.log(row)
const selectedData = [] const selectedData = []
let examineType = ''
selectedData.push(row) selectedData.push(row)
if (row.status == 1) { const obj = {
examineType = '商务审核' 0: '运营审核',
} else if (row.status == 2) { 1: '商务审核',
examineType = '财务复核' 2: '财务复核',
} }
this.handleBatchExamine_commit(selectedData, examineType) this.handleBatchExamine_commit(selectedData, obj[row.status])
}, },
// 关闭审核弹窗 // 关闭审核弹窗
...@@ -415,11 +460,13 @@ export default { ...@@ -415,11 +460,13 @@ export default {
handleReject(row) { handleReject(row) {
console.log(row) console.log(row)
this.infos = [] this.infos = []
if (row.status == 1) { const obj = {
this.rejectType = '商务驳回' 0: '运营驳回',
} else if (row.status == 2 || row.status == 3) { 1: '商务驳回',
this.rejectType = '财务驳回' 2: '财务驳回',
3: '财务驳回'
} }
this.rejectType = obj[row.status]
console.log('rejectType', this.rejectType) console.log('rejectType', this.rejectType)
this.infos.push(row) this.infos.push(row)
this.rejectVisible = !this.rejectVisible this.rejectVisible = !this.rejectVisible
......
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"
>
<div class="detail-content">
<div class="form_div">
<el-form class="edit-sub-block" label-width="110px" :inline="true">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="积分类型:">
{{ detailInfo.infoName ? detailInfo.infoName : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="积分明细:" class="halfItem">
{{
detailInfo.rewardScore
? (detailInfo.type == 0 ? "+" : "-") +
detailInfo.rewardScore
: "--"
}}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="客户名称:">
{{ detailInfo.customerName ? detailInfo.customerName : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="客户手机号:" class="halfItem">
{{ detailInfo.customerPhone ? detailInfo.customerPhone : "-" }}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="订单编号:">
{{ detailInfo.orderCode ? detailInfo.orderCode : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="商品名称:" class="halfItem">
{{ detailInfo.goodsName ? detailInfo.goodsName : "-" }}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="积分变化时间:">
{{ detailInfo.rewardTime ? detailInfo.rewardTime : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="员工名称:" class="halfItem">
{{ detailInfo.staffName ? detailInfo.staffName : "-" }}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="员工手机号:" class="halfItem">
{{ detailInfo.staffPhone ? detailInfo.staffPhone : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="门店名称:" class="halfItem">
{{ detailInfo.merchantName ? detailInfo.merchantName : "-" }}
</el-form-item></el-col
>
</el-row>
<el-row>
<el-col :span="12">
<template
v-if="
detailInfo.infoName == '积分兑换' ||
detailInfo.infoName == '积分返还'
"
>
<el-form-item label="兑换时间:" class="halfItem">
{{
detailInfo.withdrawalTime ? detailInfo.withdrawalTime : "-"
}}
</el-form-item>
</template>
<template v-if="detailInfo.infoName == '退款抵扣'">
<el-form-item label="退款时间:" class="halfItem">
{{ detailInfo.refundTime ? detailInfo.refundTime : "-" }}
</el-form-item></template
>
<template v-if="detailInfo.infoName == '错单抵扣'">
<el-form-item label="错单时间:" class="halfItem">
{{ detailInfo.errorTime ? detailInfo.errorTime : "-" }}
</el-form-item>
</template>
<template v-if="detailInfo.infoName == '撤单抵扣'">
<el-form-item label="撤单时间:" class="halfItem">
{{ detailInfo.revokeTime ? detailInfo.revokeTime : "-" }}
</el-form-item>
</template>
</el-col>
</el-row>
</el-form>
</div>
</div>
</baseDialog>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { getScoreDetail } from "@api/point"
export default {
name: "DetailDialog",
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: ""
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
watch: {
id(val) {
if (val) this.getDetail()
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "查看详情",
width: "1080px"
}
},
detailInfo: {}
}
},
methods: {
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
getScoreDetail({ id: this.id }).then((res) => {
if (res) {
console.log(res)
res.rewardTime = res.rewardTime
? Util.dateFormate(res.rewardTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.withdrawalTime = res.withdrawalTime
? Util.dateFormate(res.withdrawalTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.refundTime = res.refundTime
? Util.dateFormate(res.refundTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.errorTime = res.errorTime
? Util.dateFormate(res.errorTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.revokeTime = res.revokeTime
? Util.dateFormate(res.revokeTime, "YYYY-MM-DD HH:mm:ss")
: "--"
this.detailInfo = res
}
})
}
}
}
</script>
<style lang="scss" scoped>
.form_div {
color: #333333;
padding: 20px 30px;
// border-bottom: 1px solid #eee;
// .edit-sub-title {
// font-weight: bold;
// margin-bottom: 10px;
// }
.edit-sub-block {
// padding: 0 10px;
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
.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-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
}
.edit-sub-block-two {
.el-form-item {
// width: 300px;
margin-bottom: 0px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="detail-wrap">
<d2-container class="point-list">
<div class="detail-tabs">
<div
class="detail-tabs-item"
v-for="(item, index) in list"
:key="index"
>
<div class="title">{{ item.title }}</div>
<div class="score">
{{ detailObj[item.key] ||detailObj[item.key]==0? detailObj[item.key] : "--" }}
</div>
</div>
</div>
<div class="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header
:title="'积分明细列表'"
:title-class-name="'tableHeaderTitle'"
>
<el-button size="small" type="primary" @click="handleExport"> 导出 </el-button>
</d2-table-header>
<d2-table
ref="pointTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<!-- 查看 -->
<el-button type="text" @click="handleDetail(scope.scope)"
>详情</el-button
>
</div>
</d2-table>
<!-- 详细信息 -->
<point-detail-dialog
:visible.sync="detailVisible"
v-if="detailVisible"
:id="recordInfo.id"
/>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { getDetailList, exportDetailScore } from "@api/point"
import pointDetailDialog from "./components/pointDetailDialog"
export default {
components: {
pointDetailDialog
},
data() {
return {
detailVisible: false,
recordInfo: {},
searchForm: {
infoName: "",
rewardTime: []
},
searchFormSearch: {},
list: [
{
title: "当前积分",
key: "currentScore"
},
{
title: "累计收益积分",
key: "totalRewardScore"
},
{
title: "累计兑换积分",
key: "totalWithdrawalScore"
}
],
showFormData: [
{
label: "积分类型",
name: "infoName",
type: "select",
optionId: "confId",
optionLabel: "confLabel",
optionsName: "infoNameList"
},
{
label: "积分变化时间",
name: "rewardTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
],
getListApi: getDetailList,
baseData: {
infoNameList: [
{
confId: "积分收益",
confLabel: "积分收益"
},
{
confId: "积分兑换",
confLabel: "积分兑换"
},
{
confId: "退款抵扣",
confLabel: "退款抵扣"
},
{
confId: "撤单抵扣",
confLabel: "撤单抵扣"
},
{
confId: "错单抵扣",
confLabel: "错单抵扣"
}
]
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: true,
tableColumns: [
{
label: "积分类型",
prop: "infoName"
},
{
label: "积分明细",
prop: "rewardScore",
formatter: (cell) => {
return cell.rewardScore
? (cell.type == 0 ? "+" : "-") + cell.rewardScore
: "--"
}
},
{
label: "当前积分",
prop: "finalTotalScore"
},
{
label: "变化前积分",
prop: "currentTotalScore"
},
{
label: "积分变化时间",
prop: "updatedTime",
formatter: (cell) => {
return Util.dateFormate(cell.updatedTime, "YYYY-MM-DD HH:mm:ss")
}
}
]
}
}
},
created() {
this.detailObj = this.$route.query
console.log(this.detailObj)
this.getOptionsList()
},
methods: {
// 导出
handleExport() {
let params = {
...this.searchFormSearch,
currentPage: 1,
pageSize: 9999
}
exportDetailScore(params).then((res) => {
console.log(res)
this.$open(res.data)
})
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.rewardTime&&this.searchFormSearch.rewardTime.length) {
this.searchFormSearch.rewardTimeBegin =
Util.dateFormate(
this.searchFormSearch.rewardTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.rewardTimeEnd =
Util.dateFormate(
this.searchFormSearch.rewardTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
delete this.searchFormSearch.rewardTime
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
// 查看详情
handleDetail(data) {
this.recordInfo = data
this.detailVisible = true
},
handleSearch() {
this.$refs.pointTable.refreshTable()
},
handleReset() {
this.searchForm = {
infoName: "",
rewardTime: []
}
this.searchFormSearch = {}
this.$refs.pointTable.refreshTable(true, true)
}
}
}
</script>
<style lang="scss" scoped>
.d2-container-content {
::v-deep {
.tableHeaderTitle {
font-weight: 500;
font-size: 16px;
color: #333333;
}
}
}
.detail-wrap {
margin: 16px 24px;
.detail-tabs {
width: 100%;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-around;
padding: 20px 16px;
box-sizing: border-box;
margin-bottom: 16px;
.detail-tabs-item {
flex: 1;
height: 104px;
background: #f8faff;
border-radius: 5px;
padding: 20px;
box-sizing: border-box;
margin-right: 16px;
.title {
font-size: 16px;
color: #333333;
}
.score {
font-weight: 700;
font-size: 28px;
color: #185efe;
line-height: 42px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<d2-container class="point-list">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header
:title="'积分明细列表'"
:title-class-name="'tableHeaderTitle'"
>
<auth-button category="Button" :show-btn-ids="['9140202']" />
</d2-table-header>
<d2-table
ref="pointTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
>
<div slot="auth-button" slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9140201']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { getScorePage, getShopMerchantList,exportScore } from "@api/point"
export default {
data() {
return {
searchForm: {
staffName: "",
staffPhone: "",
merchantId: ""
},
getListApi: getScorePage,
showFormData: [
{
label: "员工名称",
name: "staffName",
type: "input",
isClear: true
},
{
label: "员工手机号",
name: "staffPhone",
type: "input",
isClear: true
},
{
label: "门店名称",
name: "merchantId",
type: "select",
optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "merchantServiceList"
}
],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: true,
tableColumns: [
{
label: "门店名称",
prop: "merchantName"
},
{
label: "员工名称",
prop: "staffName"
},
{
label: "员工手机号",
prop: "staffPhone"
},
{
label: "当前积分",
prop: "currentScore"
},
{
label: "累计收益积分",
prop: "totalRewardScore"
},
{
label: "累计兑换积分",
prop: "totalWithdrawalScore"
}
]
},
baseData: {
merchantServiceList: []
}
}
},
mounted() {
getShopMerchantList({}).then((res) => {
this.baseData.merchantServiceList = res
this.getOptionsList()
})
},
methods: {
// 导出
handleExport() {
let params = {
...this.searchForm,
currentPage: 1,
pageSize: 9999
}
exportScore(params).then((res) => {
console.log(res)
this.$open(res.data)
})
},
handleDetail(data) {
this.$router.push({
name: "pointDetail",
query: data
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.pointTable.refreshTable()
},
handleReset() {
this.searchForm = {
staffName: "",
staffPhone: "",
merchantId: ""
}
this.$refs.pointTable.refreshTable(true, true)
}
}
}
</script>
<style scoped lang="scss">
.d2-container-content {
::v-deep {
.tableHeaderTitle {
font-weight: 500;
font-size: 16px;
color: #333333;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
label: "业务场景", label: "业务场景",
key: "bussinessType", key: "bussinessType",
formatter(row) { formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
......
...@@ -294,7 +294,7 @@ export default { ...@@ -294,7 +294,7 @@ export default {
formatter: (cell) => { formatter: (cell) => {
if (!(cell.bussinessTypeList && cell.bussinessTypeList.length)) if (!(cell.bussinessTypeList && cell.bussinessTypeList.length))
return "-" return "-"
const mapObj = { 1: "延保", 2: "轻改" } const mapObj = { 1: "会员权益/升级", 2: "轻改" }
return cell.bussinessTypeList return cell.bussinessTypeList
.map((item) => mapObj[item]) .map((item) => mapObj[item])
.join("、") .join("、")
...@@ -462,7 +462,7 @@ export default { ...@@ -462,7 +462,7 @@ export default {
sceneTypeList: [ sceneTypeList: [
{ {
id: 1, id: 1,
name: "延保" name: "会员权益/升级"
}, },
{ {
id: 2, id: 2,
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter(row) { formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
......
...@@ -73,32 +73,27 @@ export default { ...@@ -73,32 +73,27 @@ export default {
filterWordsData() { filterWordsData() {
const toneWords = contantData.toneWords const toneWords = contantData.toneWords
const toneList = contantData.toneList const toneList = contantData.toneList
// 构建一个正则表达式,匹配数组h中每个元素的叠词
const regex = new RegExp(`(${toneWords.map(str => str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')).join('|')})\\1+`, 'g');
const {redundantWords} = this.itemData.fluency const {redundantWords} = this.itemData.fluency
let words = '' let words = ''
try { try {
words = JSON.parse(redundantWords).content words = JSON.parse(redundantWords).content
} catch (error) { } catch (error) {
} }
const matches = words.match(regex)||[]; const wordCountMap = new Map();
let redundantWordsList = new Map() toneWords.forEach(word => {
matches.forEach((i) => { const count = (words.match(new RegExp(word, 'g')) || []).length;
const l = i.slice(0, 1); if(count>0) {
const v = redundantWordsList.get(l); wordCountMap.set(word, count);
if (v) {
redundantWordsList.set(l, v + (i.length - 1));
} else {
redundantWordsList.set(l, i.length - 1);
} }
}); });
const positionX = [...redundantWordsList.keys()] const positionX = [...wordCountMap.keys()]
const positionY = [...redundantWordsList.values()]; const positionY = [...wordCountMap.values()];
const wordNum = positionY.reduce((cur,prev)=>{ const wordNum = positionY.reduce((cur, prev) => {
return cur+prev return cur + prev
},0) }, 0)
let star = 5 - Math.ceil(wordNum/2) let star = 5 - Math.ceil(wordNum / 2)
if(star < 1) { if (star < 1) {
star = 1 star = 1
} }
this.wordsData = { this.wordsData = {
......
<!--
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-08-20 10:57:01
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-08-20 11:14:12
* @FilePath: \dj-car-life-system\src\views\systemConfig\ShopConfig\components\employeeDialog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<d2-dialog
title="员工注册码"
:is-visible="employeeVisible"
class="qRcodeDailog"
width="750px"
btn-ok-label="下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm"
>
<div class="employee-wrap">
<div class="title">员工注册码</div>
<div class="code"></div>
</div>
</d2-dialog>
</template>
<script>
// alipayQrcode
import { employeeRegister } from "@api/shopConfig"
export default {
name: "employeeDialog",
data() {
return {
// 基本数据
baseData: {
merchantList: []
},
qrCodeURL: ""
}
},
props: {
employeeVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: null
}
},
watch: {},
created() {},
components: {},
mounted() {
console.log(this.info)
},
methods: {
// 下载图片 filename是图片名称
downImg(url, name) {
// 创建a标签 并设置其相关属性,最后触发其点击事件
const a = document.createElement("a")
const clickEvent = document.createEvent("MouseEvents")
a.setAttribute("href", url)
a.setAttribute("download", name)
a.setAttribute("target", "_blank")
clickEvent.initEvent("click", true, true)
a.dispatchEvent(clickEvent)
},
handleAddConfirm() {
this.downImg()
},
handleClose() {
this.$emit("dialogClose", true)
}
}
}
</script>
<style scoped lang="scss">
.employee-wrap {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
.title {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom:8px;
}
.code {
width: 120px;
height: 120px;
background: #333333;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -107,6 +107,12 @@ ...@@ -107,6 +107,12 @@
v-if="qRcodeVisible" v-if="qRcodeVisible"
@dialogClose="dialogClose" @dialogClose="dialogClose"
/> />
<employee-dialog
:employee-visible="employeeVisible"
:info="recordInfo"
v-if="employeeVisible"
@dialogClose="employeeDialogClose"
/>
<!-- 门店标签 --> <!-- 门店标签 -->
<flag-dialog <flag-dialog
:flag-visible="flagVisible" :flag-visible="flagVisible"
...@@ -128,12 +134,14 @@ import { ...@@ -128,12 +134,14 @@ import {
} from "@api/index" } from "@api/index"
import { businessNature, storeType } from "@/common/constants.js" import { businessNature, storeType } from "@/common/constants.js"
import qrcodeDialog from "./components/qRcodeDialog" import qrcodeDialog from "./components/qRcodeDialog"
import employeeDialog from "./components/employeeDialog"
import flagDialog from "./components/flagDialog" import flagDialog from "./components/flagDialog"
export default { export default {
name: "ShopConfigIndex", name: "ShopConfigIndex",
components: { components: {
qrcodeDialog, qrcodeDialog,
flagDialog flagDialog,
employeeDialog
}, },
data() { data() {
return { return {
...@@ -262,7 +270,13 @@ export default { ...@@ -262,7 +270,13 @@ export default {
prop: "areaSupervisionList", prop: "areaSupervisionList",
width: "200px", width: "200px",
formatter: (cellValue) => { formatter: (cellValue) => {
let areaSuper = (cellValue.areaSupervisionList && cellValue.areaSupervisionList.length) ? cellValue.areaSupervisionList.map(item => item.userName).join('/') : '-' let areaSuper =
cellValue.areaSupervisionList &&
cellValue.areaSupervisionList.length
? cellValue.areaSupervisionList
.map((item) => item.userName)
.join("/")
: "-"
return areaSuper return areaSuper
} }
}, },
...@@ -330,6 +344,7 @@ export default { ...@@ -330,6 +344,7 @@ export default {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }] fileName: [{ required: true, message: "请上传文件", trigger: "change" }]
}, },
qRcodeVisible: false, qRcodeVisible: false,
employeeVisible: false,
flagVisible: false flagVisible: false
} }
}, },
...@@ -364,7 +379,11 @@ export default { ...@@ -364,7 +379,11 @@ export default {
async getBaseData() { async getBaseData() {
this.getOptionsList() this.getOptionsList()
}, },
//员工注册码
employeeRegistrationCode(row) {
this.recordInfo = row
this.employeeVisible = !this.employeeVisible
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -589,6 +608,9 @@ export default { ...@@ -589,6 +608,9 @@ export default {
dialogClose() { dialogClose() {
this.qRcodeVisible = !this.qRcodeVisible this.qRcodeVisible = !this.qRcodeVisible
}, },
employeeDialogClose() {
this.employeeVisible = !this.employeeVisible
},
// 工单配置 // 工单配置
handleSet(row) { handleSet(row) {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
prop="businessType"> prop="businessType">
<el-select v-model="form.businessType" <el-select v-model="form.businessType"
placeholder="请选择" placeholder="请选择"
clearable
class="el_select itd"> class="el_select itd">
<el-option v-for="item in businessNature" <el-option v-for="item in businessNature"
:key="item.confId" :key="item.confId"
......
...@@ -947,6 +947,7 @@ export default { ...@@ -947,6 +947,7 @@ export default {
// 收入所属公司下拉框选中对象 // 收入所属公司下拉框选中对象
let incomeOwnerMerchantInfo = this.baseData?.contractAttributionList?.find(item => item['merchantId'] == _formData?.incomeOwnerMerchantId) let incomeOwnerMerchantInfo = this.baseData?.contractAttributionList?.find(item => item['merchantId'] == _formData?.incomeOwnerMerchantId)
let params = { let params = {
flag: this.addOrEdit == 'edit' ? 0 : this.addOrEdit == 'add' ? 1 : '', // 新增修改标识(0:修改,1:新增)
scene: _formData?.scene, // 业务类型 scene: _formData?.scene, // 业务类型
shopInfo: shopInfo, shopInfo: shopInfo,
shopContractInfo: { shopContractInfo: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!