Commit b6ec5fef by 张立顺

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

2 parents fd19a487 4d9dff5f
......@@ -3915,7 +3915,7 @@
},
"@vue/vue-loader-v15": {
"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==",
"dev": true,
"requires": {
......@@ -3928,7 +3928,11 @@
"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
}
......@@ -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
},
......@@ -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": {
......
......@@ -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 = {
......@@ -896,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: "图文" },
......
......@@ -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] || '-'
......
......@@ -419,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>
......
......@@ -316,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>
......@@ -507,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']),
......
......@@ -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)
......
......@@ -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 = {
......
......@@ -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 {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!