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 1728 additions and 212 deletions
......@@ -3524,27 +3524,6 @@
"whatwg-fetch": "^3.6.2"
},
"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": {
"version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
......@@ -3934,6 +3913,31 @@
"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": {
"version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
......@@ -5927,7 +5931,7 @@
},
"cross-spawn": {
"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==",
"dev": true,
"requires": {
......@@ -7142,7 +7146,7 @@
},
"ignore": {
"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==",
"dev": true
},
......@@ -8883,7 +8887,7 @@
"dependencies": {
"big.js": {
"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=="
},
"json5": {
......@@ -13531,7 +13535,7 @@
},
"p-try": {
"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==",
"dev": true
},
......@@ -16713,7 +16717,7 @@
},
"type-fest": {
"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==",
"dev": true
},
......@@ -17101,7 +17105,7 @@
},
"vue-hot-reload-api": {
"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==",
"dev": true
},
......@@ -18014,7 +18018,7 @@
},
"yarn": {
"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=="
},
"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
......@@ -44,3 +44,14 @@ export function downloadPdf(data) {
data.method = `${path}refundApplyRecord.downloadPdf`
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) {
data.method = `${path}order.field.setting.update`
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 = [
export const businessNature = [
{ confId: 1, confName: "直营渠道" },
{ confId: 2, confName: "直营4S店" },
{ confId: 3, confName: "合资收购" }
// { confId: 3, confName: "合资收购" },
{ confId: 4, confName: "投资收购-利丰" },
{ confId: 5, confName: "投资收购-内蒙古" },
{ confId: 6, confName: "服务商投资" }
]
// 店面配置 业务性质
export const businessNatureShow = {
......@@ -847,6 +850,7 @@ export const auditTypeList = [
// 人员管理-员工审核-审核状态
export const refundExamine_status = [
{ confId: 0, confValue: "运营审核" },
{ confId: 1, confValue: "商务审核" },
{ confId: 2, confValue: "财务复核" },
{ confId: 3, confValue: "财务结算" },
......@@ -895,6 +899,17 @@ export const subBusinessList = [
{ 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 = [
{ 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>
<el-row class="table-header">
<el-col :span="leftSpan">
<span v-text="title" />
<el-col :span="leftSpan" :class="titleClassName">
<span v-text="title" class="table-header-title" />
<slot name="left" />
</el-col>
<el-col :span="24 - leftSpan">
......@@ -19,6 +27,10 @@ export default {
required: false,
default: ''
},
titleClassName:{
type: String,
default: ''
},
leftSpan: {
type: Number,
required: false,
......
......@@ -780,7 +780,13 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleExportLabel"
}
},
{
authId: "9061912",
parentId: "90619",
label: "员工注册码",
handle: "employeeRegistrationCode"
},
],
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 @@
<script>
import { getDetailList, getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util'
import { BaseData } from '@/common/constants.js'
import { BaseData, inviteStatusList } from '@/common/constants.js'
import { mapActions } from 'vuex'
export default {
name: 'CouponsDetail',
......@@ -30,7 +30,9 @@ export default {
usedFlagList: [],
employeeNameList: [],
sellerNameList: [],
couponTypeList: []
couponTypeList: [],
inviteStatus: '',
carSeriesName: ''
},
searchFormSearch: {},
getListApi: getDetailList,
......@@ -58,10 +60,30 @@ export default {
label: '车主姓名',
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: '手机号',
prop: 'customerPhone',
width: '120px'
}, {
label: '预约状态',
prop: 'inviteStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.inviteStatusList.find(item => item.confId === cellValue.inviteStatus)?.confValue
}
}, {
label: '礼券名称',
prop: 'couponName',
addHtml: 'couponName'
......@@ -130,7 +152,8 @@ export default {
employeeNameList: [],
sellerNameList: [],
couponTypeList: [],
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }]
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }],
inviteStatusList: inviteStatusList
}
}
},
......
<!-- 发券宝 -->
<template>
<d2-container class="coupons">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="parentSearchForm"
:form-data="copyShowFormData"
/>
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="parentSearchForm"
:form-data="copyShowFormData" />
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
<el-button size="small"
type="primary"
@click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
<el-button size="small"
@click="handleReset"> 重置 </el-button>
</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">
<auth-button
:show-btn-ids="
activeName === 'storeList' ? ['9030601', '9030605'] : ['9030605']
"
category="Button"
/>
<auth-button :show-btn-ids="
activeName === 'storeList' ? ['9030601', '9030605'] : ['9030605']
"
category="Button" />
</span>
<el-tabs v-model="activeName" type="card" @tab-click="handleReset">
<el-tab-pane label="店面列表" name="storeList">
<store-list
v-if="activeName == 'storeList'"
ref="storeList"
:parent-search-form="parentSearchForm"
/>
<el-tabs v-model="activeName"
type="card"
@tab-click="handleReset">
<el-tab-pane label="店面列表"
name="storeList">
<store-list v-if="activeName == 'storeList'"
ref="storeList"
:parent-search-form="parentSearchForm" />
</el-tab-pane>
<el-tab-pane label="领用明细" name="couponsDetail">
<coupons-detail
v-if="activeName == 'couponsDetail'"
ref="couponsDetail"
:parent-search-form="parentSearchForm"
/>
<el-tab-pane label="领用明细"
name="couponsDetail">
<coupons-detail v-if="activeName == 'couponsDetail'"
ref="couponsDetail"
:parent-search-form="parentSearchForm" />
</el-tab-pane>
</el-tabs>
</div>
<edit-coupons-dialog
:coupons-visible="couponsVisible"
@couponClose="couponClose"
/>
<edit-coupons-dialog :coupons-visible="couponsVisible"
@couponClose="couponClose" />
</d2-container>
</template>
......@@ -56,7 +55,7 @@ import editCouponsDialog from './editCouponsDialog'
// import { asyncExportExcel } from '@api/sys.base'
import { getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util'
import { BaseData } from '@/common/constants.js'
import { BaseData, inviteStatusList } from '@/common/constants.js'
import { mapActions, mapState } from 'vuex'
export default {
name: 'Coupons',
......@@ -89,7 +88,8 @@ export default {
employeeNameList: [],
sellerNameList: [],
couponTypeList: [],
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }]
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }],
inviteStatusList: inviteStatusList
}
}
},
......@@ -224,6 +224,22 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions',
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
break
......@@ -259,7 +275,7 @@ export default {
var params = {
...this.parentSearchForm,
startDate: this.parentSearchForm.useTime && this.parentSearchForm.useTime.length ? Util.dateFormate(this.parentSearchForm.useTime[0], 'YYYY-MM-DD HH:mm:ss') : '',
endDate: this.parentSearchForm.useTime && this.parentSearchForm.useTime.length ? Util.dateFormate(this.parentSearchForm.useTime[1], 'YYYY-MM-DD') + ' 23:59:59' : '',
endDate: this.parentSearchForm.useTime && this.parentSearchForm.useTime.length ? Util.dateFormate(this.parentSearchForm.useTime[1], 'YYYY-MM-DD') + ' 23:59:59' : '',
currentPage: 1,
method: method
}
......
......@@ -251,9 +251,9 @@ export default {
: shopType == '2'
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
: this.equitySceneType.includes(formData?.goodsType) || this.extendedPosiType.includes(formData?.goodsType)
? (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'])
? (this.extendedPosiType.includes(formData?.goodsType) && !this.baseConfig.supplierCode.includes(`${formData.supplierCode}`)
? ['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']
// 未勾选基础商品类型
if (!this.formData.productType?.includes(1)) spliceForm.push('baseSupplyModeStr')
......
......@@ -36,3 +36,205 @@ export const crowdUpgradeSupplyModeList = [{
confId: 2,
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 @@
<!-- 商品信息块 -->
<div v-if="idx == 1" class="flex_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'">
<el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`"
......@@ -25,14 +25,20 @@
style="margin-bottom: 0">
<div class="incid_box">
<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>
<!-- 商品分类 延保类 -->
<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="value">{{ ele['positionNames'] }}</div>
</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ ele['warrantyPeriod'] }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务时间/年:</div>
......@@ -59,13 +65,13 @@
<div v-else>
<el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`"
:rules="rules[item.name]"
:label="item.label ? (item.unit ? (item.label + '(元)/件') : item.label) + ':' : ''"
v-if="item.name !== 'positionStr' || (item.name == 'positionStr' && extendedPosiType.includes(ele.goodsType) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`))"
:label="item.label ? (item.unit ? (membraneTypeList.includes(ele['goodsType']) ? item.label + `(元)/车` : (item.label + '(元)/件')) : item.label) + ':' : ''"
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'"
class="dis-in-block"
style="margin-bottom: 0">
<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>
</div>
</el-form-item>
......@@ -125,7 +131,7 @@
class="dis-in-block"
style="margin-bottom: 0">
<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>
</el-form-item>
</div>
......@@ -171,6 +177,7 @@ export default {
return {
equitySceneType: baseConfig.equitySceneType || [], // 权益类目
extendedPosiType: baseConfig.extendedPosiType || [], // 延保类
membraneTypeList: baseConfig.membraneTypeList,
userInfo: this.$store.state.d2admin.user.info,
formData: {},
examineFlag: false,
......@@ -223,6 +230,9 @@ export default {
},
mounted() {
deepClone(this.originData?.groundingGoodsList)?.forEach((v, index) => {
this.filterForm(index, deepClone(this.originData))
})
this.formData = deepClone(this.originData)
this.$nextTick(() => {
const $store = this.$store.getters['d2admin/auth/curBtns']
......@@ -238,6 +248,36 @@ export default {
...mapActions({
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) {
if (item?.voucherFileUrl?.includes('.pdf')) {
......@@ -317,6 +357,13 @@ export default {
.groundingGoods-item{
padding-top: 15px;
border-bottom: 1px solid #E5E5E5;
.item{
display: inline-block;
width: 33%;
}
.message-box{
width: 100%
}
}
.groundingGoods-item:last-child{
border: none;
......
......@@ -226,6 +226,27 @@ export default {
},
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: '嘀加成本/元',
prop: 'djCost',
formatter: (cellValue) => {
......
......@@ -15,6 +15,7 @@ import { sceneList, BaseData } from '@/common/constants.js'
import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main"
import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data'
export default {
name: 'PackageDetail',
components: {
......@@ -32,7 +33,10 @@ export default {
sellPrice: [{ required: true }],
minSellPrice: [{ required: true }],
djCost: [{ required: true }],
thirdPartyCost: [{ required: true }]
thirdPartyCost: [{ required: true }],
upgradeProductCost: [{ required: true }],
recoveryCost: [{ required: true }],
virtualAccountCost: [{ required: true }]
},
editForm: [{
title: '套餐信息',
......@@ -42,78 +46,43 @@ export default {
}, {
name: 'sellPrice',
label: '售价',
unit: true
// unit: true
isPrice: true
}, {
name: 'minSellPrice',
label: '最低售价',
unit: true
// unit: true
isPrice: true
}, {
name: 'djCost',
label: '嘀加成本',
unit: 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: '所属分类',
value: 'goodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
name: 'upgradeProductCost',
label: '产品、升级成本',
// unit: true
isPrice: true
}, {
name: 'positionStr',
label: '上架部位'
name: 'recoveryCost',
label: '回收成本',
// unit: true
isPrice: true
}, {
name: 'goodsAlias',
label: '商品别名'
}, {
name: 'sellPrice',
label: '售价',
unit: true
}, {
name: 'minSellPrice',
label: '最低售价',
unit: true
name: 'virtualAccountCost',
label: '虚拟对账成本',
// unit: true
isPrice: true
}, {
name: 'djCost',
label: '嘀加成本',
unit: true
// unit: true
isPrice: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
// unit: true
isPrice: true
}]
}, {
title: '商品信息',
formBlock: []
}, {
title: '门店信息',
formBlock: [{
name: 'sceneName',
......@@ -137,7 +106,11 @@ export default {
show: false,
editData: {},
examineFlag: false,
detailId: ''
detailId: '',
warrantyTypeShow: {
0: '质保卡',
1: '质保权益卡'
},
}
},
mounted() {
......@@ -155,24 +128,33 @@ export default {
}),
async getBaseData() {
this.extendedPosiTypeList = await this.get(BaseData.extendedPosiTypeList)
this.positionTypeList = await this.get(BaseData.positionTypeList)
},
getDetailInfo(id) {
getPackageDetailInfo({ id }).then(res => {
res.reviewLogList?.forEach(val => {
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?.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({
goodsType: val?.goodsType, // 类目值
upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id
upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称
goodsAlias: val?.goodsAlias, // 商品别名
goodsAlias: val?.goodsAlias || '-', // 商品别名
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
upgradePrice: val?.upgradePrice, // 参考售价
positionStr: deepClone(this.extendedPosiTypeList)?.filter(subVal => val?.position == subVal.position)[0]?.confName || '', // 上架部位
// upgradePrice: val?.upgradePrice, // 参考售价
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('/') : '', // 部位名称
positionNamesArr: positionNamesArr, // 多部位数组
purchasePrice: val?.upgradeGoods?.purchasePrice, // 采购价
......@@ -190,7 +172,15 @@ export default {
validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价
djCost: val?.djCost, // 嘀加成本
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] || '-'
......
......@@ -130,7 +130,8 @@
<!-- 权益服务 -->
<td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<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 v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</span>
......@@ -418,6 +419,7 @@
</td>
<td style="width: 60px;">
<el-button type="text"
:disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0"
@click="delspecificationValueList(subIndex)">删除
</el-button>
</td>
......@@ -717,6 +719,17 @@ export default {
this.serviceItemsVisible = true
},
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
let upgradePrice = 0
data.forEach(v => { // 参考售价通过已选服务项目的销售成本自动累计
......@@ -1063,7 +1076,7 @@ export default {
// 批量服务时间
handleBatchServiceTimeInput(newValue) {
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, 'oldserviceYears', this.batchObj['serviceYears'])
},
......@@ -1149,7 +1162,7 @@ export default {
// 服务时间
handleServiceTimeInput(newValue, index) {
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], 'oldserviceYears', this.goodsInfoData.goodsSpecificationList[index]['serviceYears'])
},
......@@ -1163,14 +1176,16 @@ export default {
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], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['minSuitCarPrice'])
this.handlePriceConflict()
// 取消适用车价区间校验
// this.handlePriceConflict()
},
maxSuitCarPriceInput(newValue, index) {
newValue = newValue.replace(/[^\d.]/g, '')
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], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['maxSuitCarPrice'])
this.handlePriceConflict()
// 取消适用车价区间校验
// this.handlePriceConflict()
},
// 是否必填
priceRangeIsRequired(minValue, maxValue) {
......@@ -1178,7 +1193,7 @@ export default {
},
// 单个商品车价区间是否正确
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() {
const priceRanges = []
......@@ -1242,10 +1257,15 @@ export default {
td{
display: inline-block;
text-align: center;
vertical-align: middle;
width: 220px;
height: 100%;
line-height: 40px;
border-right: 1px solid #E8E8EA;
span{
display: inline-block;
vertical-align: middle;
}
}
td:last-child{
border-right: none;
......
......@@ -49,11 +49,13 @@
<td v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</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 v-if="equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<span class="color-red">*</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 v-if="equitySceneType.includes(goodsInfoData.goodsType)">
......@@ -83,7 +85,7 @@
<el-input v-else placeholder="商品名称"
size="small"
:class="{ 'w-150-per': true, 'border-red': (filterEmpty(subItem.specificationData) && subItem.specificationDataEmpty) || subItem.specificationDataError }"
maxlength="20"
maxlength="50"
:ref="'specificationDataInput' + subIndex"
v-model.trim="subItem.specificationData"
@blur="handleGoodsNameBlur($event, subIndex)">
......@@ -314,7 +316,9 @@
</div>
</td>
<td style="width: 60px;">
<!-- SPU状态是草稿/SKU上架为待审核状态/SKU是待上架状态 -->
<el-button type="text"
:disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0"
@click="delgoodsSpecificationSingleList(subIndex)">删除
</el-button>
</td>
......@@ -359,6 +363,27 @@
</el-form>
</el-row>
</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>
</template>
<script>
......@@ -397,7 +422,16 @@ export default {
serviceSelected: [],
serviceSelectIndex: null,
positionTypeList: [], // 太阳膜类商品部位
extendedPosiTypeList: [] // 延保类商品部位
extendedPosiTypeList: [], // 延保类商品部位
serviceYearsVisible: false, // 批量服务时间弹窗
batchForm: {
serviceYears: ''
},
batchRules: {
serviceYears: [
{ required: true, message: '请输入服务时间', trigger: 'blur' }
]
}
}
},
props: {
......@@ -475,6 +509,7 @@ export default {
this.maxPrice = priceArr.length ? Math.max(...priceArr) : 0
this.getBaseData()
this.computedTableWidth(this.goodsInfoData?.goodsType)
console.log(this.goodsInfoData.goodsSpecificationSingleList)
},
methods: {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
......@@ -528,6 +563,17 @@ export default {
this.serviceItemsVisible = true
},
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
let upgradePrice = 0
data.forEach(v => { // 参考售价通过已选服务项目的销售成本自动累计
......@@ -540,6 +586,28 @@ export default {
this.serviceSelected = []
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() {
this.serviceItemsVisible = false
},
......@@ -708,7 +776,7 @@ export default {
// 服务时间
handleServiceTimeInput(newValue, index) {
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], 'oldserviceYears', this.goodsInfoData.goodsSpecificationSingleList[index]['serviceYears'])
},
......@@ -722,14 +790,16 @@ export default {
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], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationSingleList[index]['minSuitCarPrice'])
this.handlePriceConflict()
// 取消适用车价区间校验
// this.handlePriceConflict()
},
maxSuitCarPriceInput(newValue, index) {
newValue = newValue.replace(/[^\d.]/g, '')
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], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationSingleList[index]['maxSuitCarPrice'])
this.handlePriceConflict()
// 取消适用车价区间校验
// this.handlePriceConflict()
},
// 是否必填
priceRangeIsRequired(minValue, maxValue) {
......@@ -737,7 +807,7 @@ export default {
},
// 单个商品车价区间是否正确
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() {
const priceRanges = []
......@@ -798,10 +868,15 @@ export default {
td{
display: inline-block;
text-align: center;
vertical-align: middle;
width: 220px;
height: 100%;
line-height: 40px;
border-right: 1px solid #E8E8EA;
span{
display: inline-block;
vertical-align: middle;
}
}
td:last-child{
border-right: none;
......
......@@ -144,6 +144,7 @@ export default {
entityCardFlag: val.entityCardFlag == 'Y',
minSuitCarPrice: val.minSuitCarPrice,
maxSuitCarPrice: val.maxSuitCarPrice,
merchantGoodsInfos: val?.merchantGoodsInfos,
// 编辑产品价格输入框限制
oldpurchasePrice: val.purchasePrice,
oldupgradePrice: val.upgradePrice,
......@@ -180,7 +181,8 @@ export default {
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('/') : '',
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.setUpdateGoodsInfo(objData)
......@@ -436,7 +438,8 @@ export default {
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 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 (singleMaxpriceRangeNode && singleMaxpriceRangeNode[0]?.$el?.className?.includes('border-red')) throw true
......
......@@ -27,6 +27,7 @@ export default {
return {
userInfo: this.$store.state.d2admin.user.info,
txtObj: {
运营审核: '审核通过后,退款单据自动流转至商务审核。',
商务审核: '审核通过后,退款单据自动流转至财务复核。',
财务复核: '审核通过后,退款单据自动流转至财务结算。'
},
......@@ -88,13 +89,16 @@ export default {
methods: {
handleAddConfirm() {
var params = {}
var params = {
status: 1
}
params.remark = this.infoForm.remark
if (this.examineType == '商务审核') {
params.status = 2
} else {
params.status = 3
const obj = {
'运营审核': 1,
'商务审核': 2,
'财务复核': 3,
}
params.status = obj[this.examineType]
if (this.infoList.length > 1) {
params.idList = this.infoList.map((item) => {
return item.id
......
......@@ -301,6 +301,7 @@
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:detail="detail"
:order-type="1"
:scene="scene"
v-if="signRefundVisible"
@dialogClose="dialogClose" />
<!-- 超管修改备注 -->
......@@ -377,6 +378,7 @@ export default {
}],
progressList: [],
scene: '',
signRefundVisible: false,
signRefundFlag: false,
remarkVisible: false,
......@@ -398,6 +400,7 @@ export default {
},
mounted() {
this.signRefundFlag = this.$route.query.signRefundFlag
this.scene = this.$route.query.scene
this.getBaseData()
this.getGoodsOrderDetail()
const $store = this.$store.getters['d2admin/auth/curBtns']
......
......@@ -44,7 +44,7 @@
</span>
<!-- 审核 -->
<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"
:show-btn-ids="['9040805']" />
</span>
......@@ -56,7 +56,7 @@
</span>
<!-- 驳回 -->
<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"
:show-btn-ids="['9040807']" />
</span>
......@@ -158,6 +158,18 @@ export default {
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '服务对接',
name: 'yqMerchantName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '流量方',
name: 'shopMerchantName',
type: 'input',
maxlength: '20',
isClear: true
}],
getListApi: refundApplyRecordPage,
tableParams: {
......@@ -216,6 +228,14 @@ export default {
return ""
}
}
}, {
label: '所属服务对接',
prop: 'yqMerchantName',
width: '200px'
}, {
label: '所属流量方',
prop: 'shopMerchantName',
width: '200px'
}, {
label: '申请人',
prop: 'createdBy'
......@@ -235,6 +255,7 @@ export default {
},
className: (cellValue) => {
return {
0: 'blueSpot',
1: 'blueSpot',
2: 'blueSpot',
3: 'blueSpot',
......@@ -326,6 +347,16 @@ export default {
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() {
var selectedData = []
......@@ -355,7 +386,22 @@ export default {
return false
}
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 => {
if (item.status != 1) { // 非“商务审核”状态不允许批量商务审核
_flag = false
......@@ -393,14 +439,13 @@ export default {
handleExamine(row) {
console.log(row)
const selectedData = []
let examineType = ''
selectedData.push(row)
if (row.status == 1) {
examineType = '商务审核'
} else if (row.status == 2) {
examineType = '财务复核'
const obj = {
0: '运营审核',
1: '商务审核',
2: '财务复核',
}
this.handleBatchExamine_commit(selectedData, examineType)
this.handleBatchExamine_commit(selectedData, obj[row.status])
},
// 关闭审核弹窗
......@@ -415,11 +460,13 @@ export default {
handleReject(row) {
console.log(row)
this.infos = []
if (row.status == 1) {
this.rejectType = '商务驳回'
} else if (row.status == 2 || row.status == 3) {
this.rejectType = '财务驳回'
const obj = {
0: '运营驳回',
1: '商务驳回',
2: '财务驳回',
3: '财务驳回'
}
this.rejectType = obj[row.status]
console.log('rejectType', this.rejectType)
this.infos.push(row)
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
<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
<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
......@@ -111,7 +111,7 @@ export default {
label: "业务场景",
key: "bussinessType",
formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType]
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-"
}
},
......
......@@ -294,7 +294,7 @@ export default {
formatter: (cell) => {
if (!(cell.bussinessTypeList && cell.bussinessTypeList.length))
return "-"
const mapObj = { 1: "延保", 2: "轻改" }
const mapObj = { 1: "会员权益/升级", 2: "轻改" }
return cell.bussinessTypeList
.map((item) => mapObj[item])
.join("、")
......@@ -462,7 +462,7 @@ export default {
sceneTypeList: [
{
id: 1,
name: "延保"
name: "会员权益/升级"
},
{
id: 2,
......
......@@ -224,7 +224,7 @@ export default {
label: "业务场景",
prop: "bussinessType",
formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType]
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-"
}
},
......
......@@ -73,32 +73,27 @@ export default {
filterWordsData() {
const toneWords = contantData.toneWords
const toneList = contantData.toneList
// 构建一个正则表达式,匹配数组h中每个元素的叠词
const regex = new RegExp(`(${toneWords.map(str => str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')).join('|')})\\1+`, 'g');
const {redundantWords} = this.itemData.fluency
let words = ''
try {
words = JSON.parse(redundantWords).content
} catch (error) {
}
const matches = words.match(regex)||[];
let redundantWordsList = new Map()
matches.forEach((i) => {
const l = i.slice(0, 1);
const v = redundantWordsList.get(l);
if (v) {
redundantWordsList.set(l, v + (i.length - 1));
} else {
redundantWordsList.set(l, i.length - 1);
const wordCountMap = new Map();
toneWords.forEach(word => {
const count = (words.match(new RegExp(word, 'g')) || []).length;
if(count>0) {
wordCountMap.set(word, count);
}
});
const positionX = [...redundantWordsList.keys()]
const positionY = [...redundantWordsList.values()];
const wordNum = positionY.reduce((cur,prev)=>{
return cur+prev
},0)
let star = 5 - Math.ceil(wordNum/2)
if(star < 1) {
const positionX = [...wordCountMap.keys()]
const positionY = [...wordCountMap.values()];
const wordNum = positionY.reduce((cur, prev) => {
return cur + prev
}, 0)
let star = 5 - Math.ceil(wordNum / 2)
if (star < 1) {
star = 1
}
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
......@@ -107,6 +107,12 @@
v-if="qRcodeVisible"
@dialogClose="dialogClose"
/>
<employee-dialog
:employee-visible="employeeVisible"
:info="recordInfo"
v-if="employeeVisible"
@dialogClose="employeeDialogClose"
/>
<!-- 门店标签 -->
<flag-dialog
:flag-visible="flagVisible"
......@@ -128,12 +134,14 @@ import {
} from "@api/index"
import { businessNature, storeType } from "@/common/constants.js"
import qrcodeDialog from "./components/qRcodeDialog"
import employeeDialog from "./components/employeeDialog"
import flagDialog from "./components/flagDialog"
export default {
name: "ShopConfigIndex",
components: {
qrcodeDialog,
flagDialog
flagDialog,
employeeDialog
},
data() {
return {
......@@ -262,7 +270,13 @@ export default {
prop: "areaSupervisionList",
width: "200px",
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
}
},
......@@ -330,6 +344,7 @@ export default {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }]
},
qRcodeVisible: false,
employeeVisible: false,
flagVisible: false
}
},
......@@ -364,7 +379,11 @@ export default {
async getBaseData() {
this.getOptionsList()
},
//员工注册码
employeeRegistrationCode(row) {
this.recordInfo = row
this.employeeVisible = !this.employeeVisible
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -589,6 +608,9 @@ export default {
dialogClose() {
this.qRcodeVisible = !this.qRcodeVisible
},
employeeDialogClose() {
this.employeeVisible = !this.employeeVisible
},
// 工单配置
handleSet(row) {
......
......@@ -15,6 +15,7 @@
prop="businessType">
<el-select v-model="form.businessType"
placeholder="请选择"
clearable
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
......@@ -417,7 +418,7 @@ export default {
return new Promise((resolve, reject) => {
getShopSetting({ merchantId }).then(res => {
// this.setInfo = res
let areaSupervisionList = []
let areaSupervisionList = []
res.areaSupervisionList?.forEach(item => {
const target = this.supervisionOptionsList.find(ele => ele.userId == item.userId)
if(target) areaSupervisionList.push(item.userId)
......@@ -452,7 +453,7 @@ export default {
resolve()
})
})
},
checkSelectOption() {
......@@ -524,7 +525,7 @@ export default {
}
},
async merchantStaffByRoleList() {
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
merchantStaffByRoleList({ roleName: '区域督导' }).then((result) => {
let copyResult = deepClone(result)
this.supervisionOptionsList = copyResult.map((item) => {
......@@ -541,7 +542,7 @@ export default {
},
// 获取全部员工 过滤出服务商负责人可选数据
async findMerchantStaffList() {
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
findMerchantStaffList({ merchantId: -1 }).then(res => {
// 服务商负责人(根据角色名过滤)
let arr = []
......@@ -555,13 +556,13 @@ export default {
resolve()
})
})
},
// 根据4s店或者园区店查询员工信息
async getSelectList(info) {
const { merchantId } = info
// 取园区店下所有员工 0422版本 刘世权更改
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
getResidentStaffList({ merchantId }).then((result) => {
this.residentManagerOptionsList = result.map((item) => {
return {
......@@ -574,7 +575,7 @@ export default {
resolve()
})
})
},
chooseYear() {
this.listByMerchantIdAndYear(this.year)
......@@ -582,7 +583,7 @@ export default {
// 根据年份获取产值列表
async listByMerchantIdAndYear(year) {
const { merchantId } = this.info
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
listByMerchantIdAndYear({ yearStr: year, merchantId: merchantId }).then((result) => {
this.outputValueListByYear = result || []
if (this.outputValueListByYear && this.outputValueListByYear.length > 0) {
......@@ -798,7 +799,7 @@ export default {
},
async findSellerMerchantStaffList() {
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
findSellerMerchantStaffList({}).then((result) => {
this.sellerMerchantStaffList = result.map((item) => {
return {
......
......@@ -947,6 +947,7 @@ export default {
// 收入所属公司下拉框选中对象
let incomeOwnerMerchantInfo = this.baseData?.contractAttributionList?.find(item => item['merchantId'] == _formData?.incomeOwnerMerchantId)
let params = {
flag: this.addOrEdit == 'edit' ? 0 : this.addOrEdit == 'add' ? 1 : '', // 新增修改标识(0:修改,1:新增)
scene: _formData?.scene, // 业务类型
shopInfo: shopInfo,
shopContractInfo: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!