Commit f9bbbd52 by 张晓玮

Merge branch 'zhangxw_dev_v4.17.0' into 'dev_v4.17.0'

Zhangxw dev v4.17.0

See merge request !91
2 parents 72ec76f1 c7feb16c
......@@ -72,3 +72,15 @@ export function serviceMerchantRelateQrcode(data) {
data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode`
return request(data, 'post')
}
// 获取园区店配置的场景入口
export function getYqMerchantSceneConfigAPI(data) {
data.method = `dj.api.smartcarlife.select.openScene.info`
return request(data, 'post')
}
// 配置园区店场景入口
export function settingYqMerchantSceneAPI(data) {
data.method = `dj.api.smartcarlife.update.openScene.info`
return request(data, 'post')
}
......@@ -90,3 +90,9 @@ export function queryFeeCategoryByType(data) {
data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType`
return request(data, RequestMethods.POST)
}
// 2.0场景 素材可选的服务项目
export function getProductServiceItems(data) {
data.method = `dj.api.smartcarlife.vd.item.list.single`
return request(data)
}
......@@ -11,7 +11,8 @@ export const TYPE_NAME = "confType"
*/
export const BaseData = {
channelType: "channelType",
productType: "productType"
productType: "productType",
productServiceItemList: "productServiceItemList"
}
/**
......@@ -449,17 +450,17 @@ export const warrantyProList = [1, 4, 6, 12, 14]
// 所属场景
export const sceneCodeList = [
{ confId: 0, confValue: "1.0 新车车损升级" },
{ confId: 1, confValue: "1.1 次新车精品升级" },
{ confId: 2, confValue: "1.2 次新车膨胀金活动" },
{ confId: 3, confValue: "1.3 售后直播众筹活动" }
{ confId: 1, confValue: "1.1精品升级" },
{ confId: 2, confValue: "1.2次新车转化" },
{ confId: 3, confValue: "1.3售后众筹" },
{ confId: 0, confValue: "2.0会员权益/升级" }
]
// 所属场景
export const sceneList = {
0: "1.0新车车损升级",
1: "1.1次新车精品升级",
2: "1.2次新车膨胀金活动",
3: "1.3售后直播众筹活动"
1: "1.1精品升级",
2: "1.2次新车转化",
3: "1.3售后众筹",
0: "2.0会员权益/升级"
}
// 导流方下拉选项对应
......@@ -481,10 +482,10 @@ export const attrToVal = [
]
export const sceneType = {
0: "1.0 新车车损升级",
1: "1.1 次新车精品升级",
2: "1.2 次新车膨胀金活动",
3: "1.3 售后直播众筹活动"
1: "1.1精品升级",
2: "1.2次新车转化",
3: "1.3售后众筹",
0: "2.0会员权益/升级"
}
export const proportionType = {
......
......@@ -195,6 +195,12 @@ export const routerName = {
parentId: "90608",
label: "订单质保二维码配置",
handle: "handleQrcode"
},
{
authId: "9060804",
parentId: "90608",
label: "场景入口",
handle: "handleSceneEntry"
}
],
component: _import("systemConfig/yqStoreManage/yqStoreManage")
......
......@@ -5,7 +5,7 @@
* @Last Modified time: 2020-11-15 10:22:06
*/
import { getChannelType, getProductType } from "@/api/sys.base"
import { getChannelType, getProductType, getProductServiceItems } from "@/api/sys.base"
// import {
// BaseData
// } from '@/common/constants'
......@@ -19,7 +19,9 @@ export default {
// 渠道类型
channelType: [],
// 产品分类
productType: []
productType: [],
// 2.0场景素材可选服务项目
productServiceItemList: []
},
actions: {
/**
......@@ -29,10 +31,19 @@ export default {
*/
init({ state, dispatch, commit }) {
return new Promise(async (resolve) => {
Promise.all([getChannelType({}), getProductType({})]).then(
async ([channelType, productType]) => {
Promise.all([getChannelType({}), getProductType({}), getProductServiceItems({})]).then(
async ([channelType, productType, productServiceItemList]) => {
// 处理服务项目数据
let arr = []
productServiceItemList.forEach(val => {
arr.push({
serviceCode: val.serviceCode,
serviceName: val.serviceName
})
})
state.channelType = channelType
state.productType = productType
state.productServiceItemList = arr
// console.log(productType, "productType")
await dispatch("save2db", {
name: "",
......@@ -49,6 +60,7 @@ export default {
return new Promise(async (resolve) => {
state.channelType = []
state.productType = []
state.productServiceItemList = []
await dispatch("save2db", {
name: "",
value: state
......@@ -101,8 +113,8 @@ export default {
state =
(await dispatch("getFromdb", "base")) || (await dispatch("init"))
}
const { channelType, productType } = state
resolve({ channelType, productType })
const { channelType, productType, productServiceItemList } = state
resolve({ channelType, productType, productServiceItemList })
})
},
/**
......
......@@ -33,7 +33,8 @@ export default {
copyGoodsCode: '',
shoppingMallFlag: '0',
goodsSpecificationSingleList: [],
specificationSingleDetailList: []
specificationSingleDetailList: [],
selectedSceneCode: ''
}
},
mutations: {
......
......@@ -8,13 +8,15 @@
<el-tabs v-model="searchForm.sceneType">
<!-- <el-tab-pane label="1.0新车车损升级"
name="0" /> -->
<el-tab-pane label="1.1次新车精品升级"
<el-tab-pane :label="sceneList['1']"
name="1" />
<!-- <el-tab-pane label="1.2次新车膨胀金活动"
name="2" /> -->
<el-tab-pane v-if="!specialAccout"
label="1.3售后直播众筹活动"
:label="sceneList['3']"
name="3" />
<el-tab-pane :label="sceneList['0']"
name="0" />
</el-tabs>
<el-card class="finance_list_summary"
:body-style="{ padding: 0 }"
......@@ -517,7 +519,6 @@
<auth-button :data="scope" />
</template>
</el-table-column>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
......@@ -549,6 +550,7 @@ import funnelOption from '../index/funnelOption'
import { getServiceStore, getParkStore } from '@api/editCustomer'
import { mapActions, mapState } from 'vuex'
import { baseConfig } from "@/main"
import { sceneList } from "@/common/constants"
import {
divisionTypeList,
payTypeList,
......@@ -774,8 +776,9 @@ export default {
sunmmaryVisible: true, // 顶部统计模块
sellerName_visible: true, // 列表字段:转化员
shopProfitType_visible: true, // 列表字段:流量方比例
yq_visible: true// 列表字段:园区店
yq_visible: true, // 列表字段:园区店
/** 根据场景控制页面显示隐藏end */
sceneList: sceneList
}
},
......@@ -1038,6 +1041,7 @@ export default {
// console.log(params)
// api[apiName](params).then(res => {
this.tableData = []
api.getList(params).then(res => {
let temp = 1
this.tableData = res.list.map((item, index) => {
......
......@@ -228,6 +228,24 @@
</el-form-item>
</div>
</div>
<!-- 2.0场景 服务项目字段 -->
<div v-if="formData['sceneType'] === 0">
<el-form-item prop="serviceItems"
label="包含服务项目"
id="serviceItems"
:label-width="'120px'"
class="dis-in-block"
:style="{'margin-bottom': '22px'}">
<div v-for="(subItem, subIndex) in productServiceItemList" :key="subIndex">
<el-input
v-model.trim="subItem.serviceName"
placeholder="服务项目"
style="width: 432px;margin-bottom: 15px;"
disabled>
</el-input>
</div>
</el-form-item>
</div>
</div>
<div>
<div v-for="(item, index) in i.formBlock" :key="index" style="position: relative;">
......@@ -416,7 +434,8 @@ import { uploadImg, uploadVideo } from '@/api/sys.base'
import { positionTypeList, applicableModelTypeList } from '@/common/constants'
import { limitPrice } from '@/common/format'
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
import { membraneTypeList } from '@/common/constants.js'
import { membraneTypeList, BaseData } from '@/common/constants.js'
import { mapActions } from 'vuex'
export default {
name: 'productForm',
data() {
......@@ -468,7 +487,8 @@ export default {
priceReg: /^\d[\d\.]*$/
},
selectedPositionIds: [],
membraneTypeList: membraneTypeList
membraneTypeList: membraneTypeList,
productServiceItemList: []
}
},
......@@ -555,9 +575,16 @@ export default {
} else if (this.formData.goodsType == 12 || this.formData.goodsType == 14 || this.formData.goodsType == 4 || this.formData.goodsType == 6) {
this.membranesFormBlock = [copyMembranesFormBlock[1]]
}
this.getProductServiceItemList()
},
methods: {
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
selectBlur() {
this.editOptionIndex = -1
this.showOptionInput = false
......@@ -666,7 +693,8 @@ export default {
// 全选
selectAll(value, targetItem) {
if (targetItem.name == 'positionIds') {
if (this.formData.positionIds.length < deepClone(positionTypeList).length) {
// (deepClone(positionTypeList).length + 1) 会有个全选选项 需处理
if (this.formData.positionIds.length < (deepClone(positionTypeList).length + 1)) {
this.formData.positionIds = deepClone(positionTypeList).map(item=>{
return item.position
})
......@@ -780,6 +808,7 @@ export default {
deductionStandard: item.deductionStandard
})
}
if (this.formData.sceneType === 0) this.formData.productServiceItemList = this.productServiceItemList
this.formData.goodsPositionList = arr
this.$emit('handleAddConfirm', this.formData)
} else {
......
......@@ -47,15 +47,21 @@
:key="indx"
:src="val.content ? val.content : val">
<div style="width: 100%;">
<span class="message-item-span">
<span class="label">场景:</span>
{{ goodsInfoData.sceneName || '--' }}
</span>
<span class="message-item-span">
<span class="label">品牌:</span>
{{ goodsInfoData.brandMerchantName || '--' }}
</span>
<span class="message-item-span" v-if="goodsInfoData.goodsType == 1">
<div class="line-block">
<span class="message-item-span">
<span class="label">场景:</span>
{{ goodsInfoData.sceneName || '--' }}
</span>
<span class="message-item-span">
<span class="label">品牌:</span>
{{ goodsInfoData.brandMerchantName || '--' }}
</span>
<span class="message-item-span">
<span class="label">供应方:</span>
{{ goodsInfoData.supplierName || '--' }}
</span>
</div>
<span class="message-item-block" v-if="goodsInfoData.goodsType == 1">
<span class="label">适用车型:</span>
{{ goodsInfoData.applicableModelNames || '--' }}
</span>
......@@ -63,6 +69,10 @@
<span class="label">部位:</span>
{{ goodsInfoData.positionNames || '--' }}
</span>
<span class="message-item-block" v-if="goodsInfoData.selectedSceneCode == 0">
<span class="label">包含服务项目:</span>
<span>{{ goodsInfoData.serviceItems || '--' }}</span>
</span>
</div>
</div>
</el-form-item>
......@@ -75,8 +85,8 @@
<script>
import { deepClone } from '@/common/util'
import { getProductInfo } from '@/api/product'
import { positionTypeList, applicableModelTypeList } from '@/common/constants'
import { mapMutations, mapGetters } from 'vuex'
import { positionTypeList, applicableModelTypeList, BaseData } from '@/common/constants'
import { mapMutations, mapGetters, mapActions } from 'vuex'
export default {
name: 'sourceMaterial',
data() {
......@@ -95,8 +105,17 @@ export default {
computed: {
...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
},
mounted() {
this.getProductServiceItemList()
},
methods: {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
changeSelect(value) {
// 获取素材详情数据
getProductInfo({
......@@ -119,7 +138,8 @@ export default {
status: this.goodsInfoData.status,
linkMerchants: [],
speciLinkMerchants: [],
selectedSceneCode: tempVal.sceneType
selectedSceneCode: tempVal.sceneType,
serviceItems: this.productServiceItemList.map(v => {return v.serviceName})?.join(',') // 暂时不可配置 拿所有服务项目
}
this.setUpdateGoodsInfo(ObjData)
})
......@@ -143,20 +163,23 @@ export default {
display: flex;
padding: 16px;
background: #F9F9F9;
span{
display: inline-block;
}
.message-item-span{
width: 33%;
.label{
color: #666666;
width: 154px;
text-align: right;
.line-block{
display: flex;
.message-item-span{
flex: 1;
.label{
flex-shrink: 0;
display: inline-block;
color: #666666;
width: 154px;
text-align: right;
}
}
}
.message-item-block{
width: 100%;
display: flex;
.label{
flex-shrink: 0;
color: #666666;
width: 154px;
text-align: right;
......
......@@ -16,8 +16,8 @@
<span>规格明细</span>
<el-button type="text" @click="saveShopConfirm" v-if="goodsInfoData.status != 1 && goodsInfoData.status != 2">保存</el-button>
</div>
<singleSpecificationForm v-if="goodsInfoData.specificationType == '1'" @handleAddConfirm="handleAddConfirm"></singleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" v-else @handleAddConfirm="handleAddConfirm"></multipleSpecificationForm>
<singleSpecificationForm v-if="goodsInfoData.specificationType == '1'" @handleAddConfirm="handleAddConfirm" :productServiceItemList="productServiceItemList"></singleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" v-else @handleAddConfirm="handleAddConfirm" :productServiceItemList="productServiceItemList"></multipleSpecificationForm>
</div>
<div class="sync_type_class">
<span>同步至采购商城:</span>
......@@ -33,7 +33,8 @@ import { deepClone } from '@/common/util'
import multipleSpecificationForm from './multipleSpecificationForm.vue'
import singleSpecificationForm from './singleSpecificationForm.vue'
import { addOrEditBaseGoods, saveTempGoods } from '@/api/commodity'
import { mapGetters, mapMutations } from 'vuex'
import { mapGetters, mapMutations, mapActions } from 'vuex'
import { BaseData } from '@/common/constants.js'
export default {
name: 'specifications',
components: {
......@@ -43,7 +44,8 @@ export default {
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
productPositionTypeList: []
productPositionTypeList: [],
productServiceItemList: []
}
},
computed: {
......@@ -54,8 +56,15 @@ export default {
// 多规格
this.goodsInfoData.specificationType = '2'
}
this.getProductServiceItemList()
},
methods: {
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
handleSpecsEdit(num) {
if (!this.goodsInfoData.goodsId.length) {
......@@ -149,7 +158,9 @@ export default {
type: item.type,
stock: 999999,
purchasePrice: item.purchasePrice,
warningValue: item.warningValue
warningValue: item.warningValue,
upgradeGoodsServiceItemsList: deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)),
serviceYears: item.serviceYears
})
})
goodsSpecificationList = arr
......@@ -189,7 +200,9 @@ export default {
type: item.type,
stock: 999999,
purchasePrice: item.purchasePrice,
warningValue: item.warningValue
warningValue: item.warningValue,
upgradeGoodsServiceItemsList: deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)),
serviceYears: item.serviceYears,
})
})
}
......@@ -225,7 +238,9 @@ export default {
upgradePrice: val.upgradePrice,
warningValue: val.warningValue,
warrantyPeriod: val.warrantyPeriod,
editGoodNameInput: false
editGoodNameInput: false,
serviceItemArr: val.upgradeGoodsServiceItemsList?.map(v => { return v.serviceCode }) || [],
serviceYears: val.serviceYears
}
})
let specificationDetailList = []
......
......@@ -91,7 +91,8 @@ export default {
copyGoodsCode: '',
shoppingMallFlag: '0',
goodsSpecificationSingleList: [],
specificationSingleDetailList: []
specificationSingleDetailList: [],
selectedSceneCode: ''
},
editGoodsData: false
}
......@@ -174,7 +175,9 @@ export default {
upgradePrice: val.upgradePrice,
warningValue: val.warningValue,
warrantyPeriod: val.warrantyPeriod,
editGoodNameInput: false
editGoodNameInput: false,
serviceItemArr: val.upgradeGoodsServiceItemsList?.map(v => { return v.serviceCode }) || [],
serviceYears: val.serviceYears
}
})
res.goodsSpecificationNameList && res.goodsSpecificationNameList.forEach(val => {
......@@ -287,7 +290,7 @@ export default {
})
},
filterEmpty(data) {
return (data ?? '') === ''
return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
},
checkGoodsInfo(num, callback) {
// 根据规格类型赋值进行校验判断
......@@ -322,13 +325,23 @@ export default {
item.purchasePriceEmpty = true
item.specificationDataEmpty = true
if (this.goodsInfoData.goodsType == 1) item.positionEmpty = true
if (this.goodsInfoData.selectedSceneCode === 0) {
item.serviceYearsEmpty = true
item.serviceItemArrEmpty = true
}
return item
})
this.goodsInfoData.goodsSpecificationList = arr
this.goodsInfoData.goodsSpecificationSingleList = arr
let specialList = []
if (this.goodsInfoData.goodsType == 1) specialList = ['position']
let requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'purchasePrice', 'upgradePrice', 'warrantyPeriod']
if (this.goodsInfoData.goodsType == 1) { // 膜类 位置 质保 采购价 必填
specialList = ['position', 'purchasePrice', 'warrantyPeriod']
} else if (this.goodsInfoData.selectedSceneCode === 0) { // 2.0 场景 服务项目 服务时间必填
specialList = ['serviceItemArr', 'serviceYears']
} else { // 其余商品类型 采购价 质保必填
specialList = ['purchasePrice', 'warrantyPeriod']
}
let requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'upgradePrice']
for (var i = 0; i < confirmShopData.length; i++) {
const item = confirmShopData[i]
if (this.goodsInfoData.specificationType == '2') item.specificationData = item.specsValueList.join(';~;')
......@@ -341,7 +354,7 @@ export default {
} catch (error) {
return document.getElementById('specificationDetailList').scrollIntoView()
}
if ((Number(item.shopPrice) > Number(item.shopMinPrice)) || Number(item.shopPrice) > Number(item.upgradePrice)) {
if (this.formatPrice(confirmShopData[i])) {
return document.getElementById('specificationDetailList').scrollIntoView()
}
}
......@@ -354,13 +367,16 @@ export default {
item.warrantyPeriod = item.warrantyPeriod && parseFloat(item.warrantyPeriod)
item.purchasePrice = item.purchasePrice && parseFloat(item.purchasePrice)
item.warningValue = item.warningValue && parseFloat(item.warningValue)
item.serviceYears = item.serviceYears && parseFloat(item.serviceYears)
delete item.shopPriceEmpty
delete item.shopMinPriceEmpty
delete item.upgradePriceEmpty
delete item.warrantyPeriodEmpty
delete item.purchasePriceEmpty
delete item.positionEmpty
delete item.specificationDataEmpty
delete item.specificationDataEmpty
delete item.serviceYearsEmpty
delete item.serviceItemArrEmpty
}
// 对比商品数据 下架/草稿商品是否有变化 提交/关联门店
if (![1, 2].includes(this.goodsInfoData.status) && num && JSON.stringify(confirmShopData) !== JSON.stringify(this.copyUpgradeGoodsList)) {
......@@ -383,6 +399,12 @@ export default {
}
callback()
},
// 校验零售价成本价最低价关系
formatPrice(item) {
return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice))
|| (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice))
|| (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice))
},
saveAssignByMerchantEvent(data, isDelete) {
let flag = this.goodsInfoData.distributionType == '1'
// flag true按规格保存
......
......@@ -261,7 +261,8 @@ export default {
goodsDescList: data.goodsDescList,
goodsPositionList: data.goodsPositionList || [],
carTypeList: data.carTypeList,
convertedValue: data.convertedValue
convertedValue: data.convertedValue,
productServiceItemList: data.productServiceItemList
}
params.goodsImgList.forEach(i => {
delete i.createdDate
......
......@@ -84,19 +84,20 @@ export default {
sceneTypeList:
[
{
confId: 0,
confLabel: '1.0新车车损升级',
disabled: true
}, {
confId: 1,
confLabel: '1.1次新车精品升级'
confLabel: '1.1精品升级'
}, {
confId: 2,
confLabel: '1.2次新车膨胀金活动',
confLabel: '1.2次新车转化',
disabled: true
}, {
confId: 3,
confLabel: '1.3售后直播众筹活动'
confLabel: '1.3售后众筹'
},
{
confId: 0,
confLabel: '2.0会员权益/升级',
// disabled: true
}
]
},
......@@ -129,7 +130,7 @@ export default {
methods: {
changeScene(value) {
if (value == 1) {
if (value == 1 || value == 0) {
this.yqStoreVisible = true
} else if (value == 3) {
this.yqStoreVisible = false
......@@ -163,7 +164,7 @@ export default {
handleRelateConfirm() {
const params = this.getParams()
if (params.scene == 1) {
if (params.scene == 1 || params.scene == 0) {
if (this.choose4sData.length == 0) {
this.notice.warningTips('请选择4s店')
return
......
......@@ -35,7 +35,7 @@
<el-button type="text" />
<div slot="auth-button"
slot-scope="scope"
v-if="scope.scope.scene"
v-if="!filterEmpty(scope.scope.scene)"
class="btnClass">
<!-- <auth-button slot="auth-button"
:data="scope.scope" /> -->
......@@ -449,7 +449,7 @@ export default {
label: "业务场景",
prop: "scene",
formatter: (cellValue) => {
if (!cellValue.scene) return ''
if (this.filterEmpty(cellValue.scene)) return ''
return sceneList[cellValue.scene]
}
},
......@@ -701,6 +701,10 @@ export default {
}
})
},
// 校验是否有值
filterEmpty(data) {
return (data ?? '') === ''
},
filterNode(value, data, node) {
if (!value) return true
let parentNode = node.parent
......
<!-- 下载对账单 -->
<template>
<d2-dialog title="场景入口"
:is-visible="sceneEntryVisible"
class="qRcodeDailog"
width="750px"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="scene-box">
<div class="scene-item" v-for="(item, index) in sceneList" :key="index">
<img class="scene-image" :src="`https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_${item.sceneType}.png`" alt="">
<div class="item-text">
<div class="text-name">{{ item.sceneName }}</div>
<div class="text-tips">{{ item.sceneDesc }}</div>
</div>
<div class="switch-box">
<el-switch v-model="item.isOpen"
active-value="Y"
inactive-value="N"
active-text="开"
inactive-text="关"/>
<!-- <div class="switch-text">开通此场景</div> -->
</div>
</div>
</div>
</d2-dialog>
</template>
<script>
import { getYqMerchantSceneConfigAPI, settingYqMerchantSceneAPI } from "@api/serviceManage"
export default {
name: 'SceneEntryDialog',
data() {
return {
sceneList: [{
sceneName: '1.1 精品升级',
sceneDesc: '1.1 太阳膜升级转化下单',
sceneType: 1,
isOpen: 'N'
}, {
sceneName: '2.0 会员权益/升级',
sceneDesc: '2.0 新车车损下单',
sceneType: 0,
isOpen: 'N'
}]
}
},
props: {
sceneEntryVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
components: {},
mounted() {
// 获取当前园区店开通的场景入口
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.yqMerchantId }).then(res => {
res?.forEach(val => {
this.sceneList.map(v => {
if (v.sceneType === val.scene && val.sceneOpenFlag === 1) {
v.isOpen = 'Y'
}
return v
})
})
})
},
methods: {
// 配置园区店场景入口
handleAddConfirm() {
let arr = []
this.sceneList.forEach(v => {
arr.push({
merchantId: this.info.yqMerchantId,
sceneOpenFlag: v.isOpen === 'Y' ? 1 : 0,
scene: v.sceneType
})
})
settingYqMerchantSceneAPI({ list: arr }).then(res => {
this.notice.okTips()
this.handleClose()
this.$emit('keyDowmGetList')
})
},
handleClose() {
this.$emit('dialogClose', true)
}
}
}
</script>
<style lang="scss" scoped>
.scene-box{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
.scene-item{
display: flex;
align-items: center;
width: 343px;
background: #F4F5FA;
border-radius: 12px;
padding: 16px;
box-sizing: border-box;
.scene-image{
width: 64px;
height: 64px;
margin-right: 12px;
}
.item-text{
.text-name{
font-size: 16px;
color: #333333;
font-weight: 500;
}
.text-tips{
margin-top: 5px;
font-size: 12px;
color: #9B9B9E;
font-weight: 400;
}
}
.switch-box{
flex-grow: 1;
text-align: center;
.switch-text{
margin-top: 5px;
font-size: 12px;
color: #2a58ad;
}
}
}
}
::v-deep .el-switch__label {
position: absolute;
display: none;
color: #fff;
}
/*打开时文字位置设置*/
::v-deep .el-switch__label--right {
z-index: 1;
right: 20px;
}
/*关闭时文字位置设置*/
::v-deep .el-switch__label--left {
z-index: 1;
left: 20px;
}
::v-deep .el-switch__label--left.is-active {
display: block;
span{
font-size: 12px;
color: #999999;
}
}
::v-deep .el-switch__label--right.is-active {
display: block;
span{
font-size: 12px;
color: #FFFFFF;
}
}
</style>
......@@ -32,7 +32,7 @@
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope">
<!-- <el-button type="text"
<!-- <el-button type="text"
size="mini"
style="margin-right: 10px;"
@click="collectionQRcode(scope.row)">收款二维码</el-button> -->
......@@ -46,6 +46,11 @@
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog"
v-if="QRcodeDialog"
:merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible"
:info="recordInfo"
v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose"
@keyDowmGetList="keyDowmGetList" />
</d2-container>
</template>
......@@ -66,6 +71,7 @@ import { BaseData, manageTypeList } from '@/common/constants.js'
// import { getParkStore } from '@api/editCustomer'
import qrcodeDialog from './qRcodeDialog'
import wxQRcodeDialog from './wxQRcodeDialog'
import sceneEntryDialog from './sceneEntryDialog'
export default {
name: 'ServiceManage',
data() {
......@@ -218,13 +224,15 @@ export default {
},
qRcodeVisible: false,
QRcodeDialog: false,
recordInfo: {}
recordInfo: {},
sceneEntryVisible: false
}
},
components: {
qrcodeDialog,
wxQRcodeDialog
wxQRcodeDialog,
sceneEntryDialog
},
mounted() {
......@@ -297,6 +305,16 @@ export default {
dialogClose() {
this.qRcodeVisible = !this.qRcodeVisible
},
// 场景入口
handleSceneEntry(row) {
this.recordInfo = row
this.sceneEntryVisible = !this.sceneEntryVisible
},
sceneDialogClose() {
this.sceneEntryVisible = !this.sceneEntryVisible
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!