Commit b6ec5fef by 张立顺

Merge branch 'SAAS+V4.43.1-0819' into SAAS+V4.44-0902

2 parents fd19a487 4d9dff5f
...@@ -3915,7 +3915,7 @@ ...@@ -3915,7 +3915,7 @@
}, },
"@vue/vue-loader-v15": { "@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1", "version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz", "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==", "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -3928,7 +3928,11 @@ ...@@ -3928,7 +3928,11 @@
"dependencies": { "dependencies": {
"hash-sum": { "hash-sum": {
"version": "1.0.2", "version": "1.0.2",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", "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==", "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true "dev": true
} }
...@@ -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
}, },
...@@ -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": {
......
...@@ -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 = {
...@@ -896,6 +899,17 @@ export const subBusinessList = [ ...@@ -896,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: "图文" },
......
...@@ -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="店面列表"
ref="storeList" name="storeList">
:parent-search-form="parentSearchForm" <store-list v-if="activeName == 'storeList'"
/> ref="storeList"
: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
...@@ -259,7 +275,7 @@ export default { ...@@ -259,7 +275,7 @@ export default {
var params = { var params = {
...this.parentSearchForm, ...this.parentSearchForm,
startDate: this.parentSearchForm.useTime && this.parentSearchForm.useTime.length ? Util.dateFormate(this.parentSearchForm.useTime[0], 'YYYY-MM-DD HH:mm:ss') : '', 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, currentPage: 1,
method: method method: method
} }
......
...@@ -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: '所属分类',
value: 'goodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, { }, {
name: 'positionStr', name: 'recoveryCost',
label: '上架部位' label: '回收成本',
// unit: true
isPrice: true
}, { }, {
name: 'goodsAlias', name: 'virtualAccountCost',
label: '商品别名' label: '虚拟对账成本',
}, { // unit: true
name: 'sellPrice', isPrice: true
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] || '-'
......
...@@ -419,6 +419,7 @@ ...@@ -419,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>
......
...@@ -316,7 +316,9 @@ ...@@ -316,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>
...@@ -507,6 +509,7 @@ export default { ...@@ -507,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']),
......
...@@ -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)
......
...@@ -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 = {
......
...@@ -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"
...@@ -417,7 +418,7 @@ export default { ...@@ -417,7 +418,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getShopSetting({ merchantId }).then(res => { getShopSetting({ merchantId }).then(res => {
// this.setInfo = res // this.setInfo = res
let areaSupervisionList = [] let areaSupervisionList = []
res.areaSupervisionList?.forEach(item => { res.areaSupervisionList?.forEach(item => {
const target = this.supervisionOptionsList.find(ele => ele.userId == item.userId) const target = this.supervisionOptionsList.find(ele => ele.userId == item.userId)
if(target) areaSupervisionList.push(item.userId) if(target) areaSupervisionList.push(item.userId)
...@@ -452,7 +453,7 @@ export default { ...@@ -452,7 +453,7 @@ export default {
resolve() resolve()
}) })
}) })
}, },
checkSelectOption() { checkSelectOption() {
...@@ -524,7 +525,7 @@ export default { ...@@ -524,7 +525,7 @@ export default {
} }
}, },
async merchantStaffByRoleList() { async merchantStaffByRoleList() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
merchantStaffByRoleList({ roleName: '区域督导' }).then((result) => { merchantStaffByRoleList({ roleName: '区域督导' }).then((result) => {
let copyResult = deepClone(result) let copyResult = deepClone(result)
this.supervisionOptionsList = copyResult.map((item) => { this.supervisionOptionsList = copyResult.map((item) => {
...@@ -541,7 +542,7 @@ export default { ...@@ -541,7 +542,7 @@ export default {
}, },
// 获取全部员工 过滤出服务商负责人可选数据 // 获取全部员工 过滤出服务商负责人可选数据
async findMerchantStaffList() { async findMerchantStaffList() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
findMerchantStaffList({ merchantId: -1 }).then(res => { findMerchantStaffList({ merchantId: -1 }).then(res => {
// 服务商负责人(根据角色名过滤) // 服务商负责人(根据角色名过滤)
let arr = [] let arr = []
...@@ -555,13 +556,13 @@ export default { ...@@ -555,13 +556,13 @@ export default {
resolve() resolve()
}) })
}) })
}, },
// 根据4s店或者园区店查询员工信息 // 根据4s店或者园区店查询员工信息
async getSelectList(info) { async getSelectList(info) {
const { merchantId } = info const { merchantId } = info
// 取园区店下所有员工 0422版本 刘世权更改 // 取园区店下所有员工 0422版本 刘世权更改
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getResidentStaffList({ merchantId }).then((result) => { getResidentStaffList({ merchantId }).then((result) => {
this.residentManagerOptionsList = result.map((item) => { this.residentManagerOptionsList = result.map((item) => {
return { return {
...@@ -574,7 +575,7 @@ export default { ...@@ -574,7 +575,7 @@ export default {
resolve() resolve()
}) })
}) })
}, },
chooseYear() { chooseYear() {
this.listByMerchantIdAndYear(this.year) this.listByMerchantIdAndYear(this.year)
...@@ -582,7 +583,7 @@ export default { ...@@ -582,7 +583,7 @@ export default {
// 根据年份获取产值列表 // 根据年份获取产值列表
async listByMerchantIdAndYear(year) { async listByMerchantIdAndYear(year) {
const { merchantId } = this.info const { merchantId } = this.info
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
listByMerchantIdAndYear({ yearStr: year, merchantId: merchantId }).then((result) => { listByMerchantIdAndYear({ yearStr: year, merchantId: merchantId }).then((result) => {
this.outputValueListByYear = result || [] this.outputValueListByYear = result || []
if (this.outputValueListByYear && this.outputValueListByYear.length > 0) { if (this.outputValueListByYear && this.outputValueListByYear.length > 0) {
...@@ -798,7 +799,7 @@ export default { ...@@ -798,7 +799,7 @@ export default {
}, },
async findSellerMerchantStaffList() { async findSellerMerchantStaffList() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
findSellerMerchantStaffList({}).then((result) => { findSellerMerchantStaffList({}).then((result) => {
this.sellerMerchantStaffList = result.map((item) => { this.sellerMerchantStaffList = result.map((item) => {
return { return {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!