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) { ...@@ -72,3 +72,15 @@ export function serviceMerchantRelateQrcode(data) {
data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode` data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode`
return request(data, 'post') 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) { ...@@ -90,3 +90,9 @@ export function queryFeeCategoryByType(data) {
data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType` data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType`
return request(data, RequestMethods.POST) 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" ...@@ -11,7 +11,8 @@ export const TYPE_NAME = "confType"
*/ */
export const BaseData = { export const BaseData = {
channelType: "channelType", channelType: "channelType",
productType: "productType" productType: "productType",
productServiceItemList: "productServiceItemList"
} }
/** /**
...@@ -449,17 +450,17 @@ export const warrantyProList = [1, 4, 6, 12, 14] ...@@ -449,17 +450,17 @@ export const warrantyProList = [1, 4, 6, 12, 14]
// 所属场景 // 所属场景
export const sceneCodeList = [ export const sceneCodeList = [
{ confId: 0, confValue: "1.0 新车车损升级" }, { confId: 1, confValue: "1.1精品升级" },
{ confId: 1, confValue: "1.1 次新车精品升级" }, { confId: 2, confValue: "1.2次新车转化" },
{ confId: 2, confValue: "1.2 次新车膨胀金活动" }, { confId: 3, confValue: "1.3售后众筹" },
{ confId: 3, confValue: "1.3 售后直播众筹活动" } { confId: 0, confValue: "2.0会员权益/升级" }
] ]
// 所属场景 // 所属场景
export const sceneList = { export const sceneList = {
0: "1.0新车车损升级", 1: "1.1精品升级",
1: "1.1次新车精品升级", 2: "1.2次新车转化",
2: "1.2次新车膨胀金活动", 3: "1.3售后众筹",
3: "1.3售后直播众筹活动" 0: "2.0会员权益/升级"
} }
// 导流方下拉选项对应 // 导流方下拉选项对应
...@@ -481,10 +482,10 @@ export const attrToVal = [ ...@@ -481,10 +482,10 @@ export const attrToVal = [
] ]
export const sceneType = { export const sceneType = {
0: "1.0 新车车损升级", 1: "1.1精品升级",
1: "1.1 次新车精品升级", 2: "1.2次新车转化",
2: "1.2 次新车膨胀金活动", 3: "1.3售后众筹",
3: "1.3 售后直播众筹活动" 0: "2.0会员权益/升级"
} }
export const proportionType = { export const proportionType = {
......
...@@ -195,6 +195,12 @@ export const routerName = { ...@@ -195,6 +195,12 @@ export const routerName = {
parentId: "90608", parentId: "90608",
label: "订单质保二维码配置", label: "订单质保二维码配置",
handle: "handleQrcode" handle: "handleQrcode"
},
{
authId: "9060804",
parentId: "90608",
label: "场景入口",
handle: "handleSceneEntry"
} }
], ],
component: _import("systemConfig/yqStoreManage/yqStoreManage") component: _import("systemConfig/yqStoreManage/yqStoreManage")
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @Last Modified time: 2020-11-15 10:22:06 * @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 { // import {
// BaseData // BaseData
// } from '@/common/constants' // } from '@/common/constants'
...@@ -19,7 +19,9 @@ export default { ...@@ -19,7 +19,9 @@ export default {
// 渠道类型 // 渠道类型
channelType: [], channelType: [],
// 产品分类 // 产品分类
productType: [] productType: [],
// 2.0场景素材可选服务项目
productServiceItemList: []
}, },
actions: { actions: {
/** /**
...@@ -29,10 +31,19 @@ export default { ...@@ -29,10 +31,19 @@ export default {
*/ */
init({ state, dispatch, commit }) { init({ state, dispatch, commit }) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
Promise.all([getChannelType({}), getProductType({})]).then( Promise.all([getChannelType({}), getProductType({}), getProductServiceItems({})]).then(
async ([channelType, productType]) => { async ([channelType, productType, productServiceItemList]) => {
// 处理服务项目数据
let arr = []
productServiceItemList.forEach(val => {
arr.push({
serviceCode: val.serviceCode,
serviceName: val.serviceName
})
})
state.channelType = channelType state.channelType = channelType
state.productType = productType state.productType = productType
state.productServiceItemList = arr
// console.log(productType, "productType") // console.log(productType, "productType")
await dispatch("save2db", { await dispatch("save2db", {
name: "", name: "",
...@@ -49,6 +60,7 @@ export default { ...@@ -49,6 +60,7 @@ export default {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
state.channelType = [] state.channelType = []
state.productType = [] state.productType = []
state.productServiceItemList = []
await dispatch("save2db", { await dispatch("save2db", {
name: "", name: "",
value: state value: state
...@@ -101,8 +113,8 @@ export default { ...@@ -101,8 +113,8 @@ export default {
state = state =
(await dispatch("getFromdb", "base")) || (await dispatch("init")) (await dispatch("getFromdb", "base")) || (await dispatch("init"))
} }
const { channelType, productType } = state const { channelType, productType, productServiceItemList } = state
resolve({ channelType, productType }) resolve({ channelType, productType, productServiceItemList })
}) })
}, },
/** /**
......
...@@ -33,7 +33,8 @@ export default { ...@@ -33,7 +33,8 @@ export default {
copyGoodsCode: '', copyGoodsCode: '',
shoppingMallFlag: '0', shoppingMallFlag: '0',
goodsSpecificationSingleList: [], goodsSpecificationSingleList: [],
specificationSingleDetailList: [] specificationSingleDetailList: [],
selectedSceneCode: ''
} }
}, },
mutations: { mutations: {
......
...@@ -8,13 +8,15 @@ ...@@ -8,13 +8,15 @@
<el-tabs v-model="searchForm.sceneType"> <el-tabs v-model="searchForm.sceneType">
<!-- <el-tab-pane label="1.0新车车损升级" <!-- <el-tab-pane label="1.0新车车损升级"
name="0" /> --> name="0" /> -->
<el-tab-pane label="1.1次新车精品升级" <el-tab-pane :label="sceneList['1']"
name="1" /> name="1" />
<!-- <el-tab-pane label="1.2次新车膨胀金活动" <!-- <el-tab-pane label="1.2次新车膨胀金活动"
name="2" /> --> name="2" /> -->
<el-tab-pane v-if="!specialAccout" <el-tab-pane v-if="!specialAccout"
label="1.3售后直播众筹活动" :label="sceneList['3']"
name="3" /> name="3" />
<el-tab-pane :label="sceneList['0']"
name="0" />
</el-tabs> </el-tabs>
<el-card class="finance_list_summary" <el-card class="finance_list_summary"
:body-style="{ padding: 0 }" :body-style="{ padding: 0 }"
...@@ -517,7 +519,6 @@ ...@@ -517,7 +519,6 @@
<auth-button :data="scope" /> <auth-button :data="scope" />
</template> </template>
</el-table-column> </el-table-column>
</el-table-column>
</el-table> </el-table>
<el-pagination background <el-pagination background
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -549,6 +550,7 @@ import funnelOption from '../index/funnelOption' ...@@ -549,6 +550,7 @@ import funnelOption from '../index/funnelOption'
import { getServiceStore, getParkStore } from '@api/editCustomer' import { getServiceStore, getParkStore } from '@api/editCustomer'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { sceneList } from "@/common/constants"
import { import {
divisionTypeList, divisionTypeList,
payTypeList, payTypeList,
...@@ -774,8 +776,9 @@ export default { ...@@ -774,8 +776,9 @@ export default {
sunmmaryVisible: true, // 顶部统计模块 sunmmaryVisible: true, // 顶部统计模块
sellerName_visible: true, // 列表字段:转化员 sellerName_visible: true, // 列表字段:转化员
shopProfitType_visible: true, // 列表字段:流量方比例 shopProfitType_visible: true, // 列表字段:流量方比例
yq_visible: true// 列表字段:园区店 yq_visible: true, // 列表字段:园区店
/** 根据场景控制页面显示隐藏end */ /** 根据场景控制页面显示隐藏end */
sceneList: sceneList
} }
}, },
...@@ -1038,6 +1041,7 @@ export default { ...@@ -1038,6 +1041,7 @@ export default {
// console.log(params) // console.log(params)
// api[apiName](params).then(res => { // api[apiName](params).then(res => {
this.tableData = []
api.getList(params).then(res => { api.getList(params).then(res => {
let temp = 1 let temp = 1
this.tableData = res.list.map((item, index) => { this.tableData = res.list.map((item, index) => {
......
...@@ -228,6 +228,24 @@ ...@@ -228,6 +228,24 @@
</el-form-item> </el-form-item>
</div> </div>
</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> <div>
<div v-for="(item, index) in i.formBlock" :key="index" style="position: relative;"> <div v-for="(item, index) in i.formBlock" :key="index" style="position: relative;">
...@@ -416,7 +434,8 @@ import { uploadImg, uploadVideo } from '@/api/sys.base' ...@@ -416,7 +434,8 @@ import { uploadImg, uploadVideo } from '@/api/sys.base'
import { positionTypeList, applicableModelTypeList } from '@/common/constants' import { positionTypeList, applicableModelTypeList } from '@/common/constants'
import { limitPrice } from '@/common/format' import { limitPrice } from '@/common/format'
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info` 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 { export default {
name: 'productForm', name: 'productForm',
data() { data() {
...@@ -468,7 +487,8 @@ export default { ...@@ -468,7 +487,8 @@ export default {
priceReg: /^\d[\d\.]*$/ priceReg: /^\d[\d\.]*$/
}, },
selectedPositionIds: [], selectedPositionIds: [],
membraneTypeList: membraneTypeList membraneTypeList: membraneTypeList,
productServiceItemList: []
} }
}, },
...@@ -555,9 +575,16 @@ export default { ...@@ -555,9 +575,16 @@ export default {
} else if (this.formData.goodsType == 12 || this.formData.goodsType == 14 || this.formData.goodsType == 4 || this.formData.goodsType == 6) { } else if (this.formData.goodsType == 12 || this.formData.goodsType == 14 || this.formData.goodsType == 4 || this.formData.goodsType == 6) {
this.membranesFormBlock = [copyMembranesFormBlock[1]] this.membranesFormBlock = [copyMembranesFormBlock[1]]
} }
this.getProductServiceItemList()
}, },
methods: { methods: {
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
selectBlur() { selectBlur() {
this.editOptionIndex = -1 this.editOptionIndex = -1
this.showOptionInput = false this.showOptionInput = false
...@@ -666,7 +693,8 @@ export default { ...@@ -666,7 +693,8 @@ export default {
// 全选 // 全选
selectAll(value, targetItem) { selectAll(value, targetItem) {
if (targetItem.name == 'positionIds') { 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=>{ this.formData.positionIds = deepClone(positionTypeList).map(item=>{
return item.position return item.position
}) })
...@@ -780,6 +808,7 @@ export default { ...@@ -780,6 +808,7 @@ export default {
deductionStandard: item.deductionStandard deductionStandard: item.deductionStandard
}) })
} }
if (this.formData.sceneType === 0) this.formData.productServiceItemList = this.productServiceItemList
this.formData.goodsPositionList = arr this.formData.goodsPositionList = arr
this.$emit('handleAddConfirm', this.formData) this.$emit('handleAddConfirm', this.formData)
} else { } else {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
:key="indx" :key="indx"
:src="val.content ? val.content : val"> :src="val.content ? val.content : val">
<div style="width: 100%;"> <div style="width: 100%;">
<div class="line-block">
<span class="message-item-span"> <span class="message-item-span">
<span class="label">场景:</span> <span class="label">场景:</span>
{{ goodsInfoData.sceneName || '--' }} {{ goodsInfoData.sceneName || '--' }}
...@@ -55,7 +56,12 @@ ...@@ -55,7 +56,12 @@
<span class="label">品牌:</span> <span class="label">品牌:</span>
{{ goodsInfoData.brandMerchantName || '--' }} {{ goodsInfoData.brandMerchantName || '--' }}
</span> </span>
<span class="message-item-span" v-if="goodsInfoData.goodsType == 1"> <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> <span class="label">适用车型:</span>
{{ goodsInfoData.applicableModelNames || '--' }} {{ goodsInfoData.applicableModelNames || '--' }}
</span> </span>
...@@ -63,6 +69,10 @@ ...@@ -63,6 +69,10 @@
<span class="label">部位:</span> <span class="label">部位:</span>
{{ goodsInfoData.positionNames || '--' }} {{ goodsInfoData.positionNames || '--' }}
</span> </span>
<span class="message-item-block" v-if="goodsInfoData.selectedSceneCode == 0">
<span class="label">包含服务项目:</span>
<span>{{ goodsInfoData.serviceItems || '--' }}</span>
</span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -75,8 +85,8 @@ ...@@ -75,8 +85,8 @@
<script> <script>
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { getProductInfo } from '@/api/product' import { getProductInfo } from '@/api/product'
import { positionTypeList, applicableModelTypeList } from '@/common/constants' import { positionTypeList, applicableModelTypeList, BaseData } from '@/common/constants'
import { mapMutations, mapGetters } from 'vuex' import { mapMutations, mapGetters, mapActions } from 'vuex'
export default { export default {
name: 'sourceMaterial', name: 'sourceMaterial',
data() { data() {
...@@ -95,8 +105,17 @@ export default { ...@@ -95,8 +105,17 @@ export default {
computed: { computed: {
...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' }) ...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
}, },
mounted() {
this.getProductServiceItemList()
},
methods: { methods: {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']), ...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
changeSelect(value) { changeSelect(value) {
// 获取素材详情数据 // 获取素材详情数据
getProductInfo({ getProductInfo({
...@@ -119,7 +138,8 @@ export default { ...@@ -119,7 +138,8 @@ export default {
status: this.goodsInfoData.status, status: this.goodsInfoData.status,
linkMerchants: [], linkMerchants: [],
speciLinkMerchants: [], speciLinkMerchants: [],
selectedSceneCode: tempVal.sceneType selectedSceneCode: tempVal.sceneType,
serviceItems: this.productServiceItemList.map(v => {return v.serviceName})?.join(',') // 暂时不可配置 拿所有服务项目
} }
this.setUpdateGoodsInfo(ObjData) this.setUpdateGoodsInfo(ObjData)
}) })
...@@ -143,20 +163,23 @@ export default { ...@@ -143,20 +163,23 @@ export default {
display: flex; display: flex;
padding: 16px; padding: 16px;
background: #F9F9F9; background: #F9F9F9;
span{ .line-block{
display: inline-block; display: flex;
}
.message-item-span{ .message-item-span{
width: 33%; flex: 1;
.label{ .label{
flex-shrink: 0;
display: inline-block;
color: #666666; color: #666666;
width: 154px; width: 154px;
text-align: right; text-align: right;
} }
} }
}
.message-item-block{ .message-item-block{
width: 100%; display: flex;
.label{ .label{
flex-shrink: 0;
color: #666666; color: #666666;
width: 154px; width: 154px;
text-align: right; text-align: right;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<span>规格明细</span> <span>规格明细</span>
<el-button type="text" @click="saveShopConfirm" v-if="goodsInfoData.status != 1 && goodsInfoData.status != 2">保存</el-button> <el-button type="text" @click="saveShopConfirm" v-if="goodsInfoData.status != 1 && goodsInfoData.status != 2">保存</el-button>
</div> </div>
<singleSpecificationForm v-if="goodsInfoData.specificationType == '1'" @handleAddConfirm="handleAddConfirm"></singleSpecificationForm> <singleSpecificationForm v-if="goodsInfoData.specificationType == '1'" @handleAddConfirm="handleAddConfirm" :productServiceItemList="productServiceItemList"></singleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" v-else @handleAddConfirm="handleAddConfirm"></multipleSpecificationForm> <multipleSpecificationForm ref="multipleSpecificationFormRef" v-else @handleAddConfirm="handleAddConfirm" :productServiceItemList="productServiceItemList"></multipleSpecificationForm>
</div> </div>
<div class="sync_type_class"> <div class="sync_type_class">
<span>同步至采购商城:</span> <span>同步至采购商城:</span>
...@@ -33,7 +33,8 @@ import { deepClone } from '@/common/util' ...@@ -33,7 +33,8 @@ import { deepClone } from '@/common/util'
import multipleSpecificationForm from './multipleSpecificationForm.vue' import multipleSpecificationForm from './multipleSpecificationForm.vue'
import singleSpecificationForm from './singleSpecificationForm.vue' import singleSpecificationForm from './singleSpecificationForm.vue'
import { addOrEditBaseGoods, saveTempGoods } from '@/api/commodity' 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 { export default {
name: 'specifications', name: 'specifications',
components: { components: {
...@@ -43,7 +44,8 @@ export default { ...@@ -43,7 +44,8 @@ export default {
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
productPositionTypeList: [] productPositionTypeList: [],
productServiceItemList: []
} }
}, },
computed: { computed: {
...@@ -54,8 +56,15 @@ export default { ...@@ -54,8 +56,15 @@ export default {
// 多规格 // 多规格
this.goodsInfoData.specificationType = '2' this.goodsInfoData.specificationType = '2'
} }
this.getProductServiceItemList()
}, },
methods: { methods: {
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']), ...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
handleSpecsEdit(num) { handleSpecsEdit(num) {
if (!this.goodsInfoData.goodsId.length) { if (!this.goodsInfoData.goodsId.length) {
...@@ -149,7 +158,9 @@ export default { ...@@ -149,7 +158,9 @@ export default {
type: item.type, type: item.type,
stock: 999999, stock: 999999,
purchasePrice: item.purchasePrice, 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 goodsSpecificationList = arr
...@@ -189,7 +200,9 @@ export default { ...@@ -189,7 +200,9 @@ export default {
type: item.type, type: item.type,
stock: 999999, stock: 999999,
purchasePrice: item.purchasePrice, 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 { ...@@ -225,7 +238,9 @@ export default {
upgradePrice: val.upgradePrice, upgradePrice: val.upgradePrice,
warningValue: val.warningValue, warningValue: val.warningValue,
warrantyPeriod: val.warrantyPeriod, warrantyPeriod: val.warrantyPeriod,
editGoodNameInput: false editGoodNameInput: false,
serviceItemArr: val.upgradeGoodsServiceItemsList?.map(v => { return v.serviceCode }) || [],
serviceYears: val.serviceYears
} }
}) })
let specificationDetailList = [] let specificationDetailList = []
......
...@@ -91,7 +91,8 @@ export default { ...@@ -91,7 +91,8 @@ export default {
copyGoodsCode: '', copyGoodsCode: '',
shoppingMallFlag: '0', shoppingMallFlag: '0',
goodsSpecificationSingleList: [], goodsSpecificationSingleList: [],
specificationSingleDetailList: [] specificationSingleDetailList: [],
selectedSceneCode: ''
}, },
editGoodsData: false editGoodsData: false
} }
...@@ -174,7 +175,9 @@ export default { ...@@ -174,7 +175,9 @@ export default {
upgradePrice: val.upgradePrice, upgradePrice: val.upgradePrice,
warningValue: val.warningValue, warningValue: val.warningValue,
warrantyPeriod: val.warrantyPeriod, warrantyPeriod: val.warrantyPeriod,
editGoodNameInput: false editGoodNameInput: false,
serviceItemArr: val.upgradeGoodsServiceItemsList?.map(v => { return v.serviceCode }) || [],
serviceYears: val.serviceYears
} }
}) })
res.goodsSpecificationNameList && res.goodsSpecificationNameList.forEach(val => { res.goodsSpecificationNameList && res.goodsSpecificationNameList.forEach(val => {
...@@ -287,7 +290,7 @@ export default { ...@@ -287,7 +290,7 @@ export default {
}) })
}, },
filterEmpty(data) { filterEmpty(data) {
return (data ?? '') === '' return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
}, },
checkGoodsInfo(num, callback) { checkGoodsInfo(num, callback) {
// 根据规格类型赋值进行校验判断 // 根据规格类型赋值进行校验判断
...@@ -322,13 +325,23 @@ export default { ...@@ -322,13 +325,23 @@ export default {
item.purchasePriceEmpty = true item.purchasePriceEmpty = true
item.specificationDataEmpty = true item.specificationDataEmpty = true
if (this.goodsInfoData.goodsType == 1) item.positionEmpty = true if (this.goodsInfoData.goodsType == 1) item.positionEmpty = true
if (this.goodsInfoData.selectedSceneCode === 0) {
item.serviceYearsEmpty = true
item.serviceItemArrEmpty = true
}
return item return item
}) })
this.goodsInfoData.goodsSpecificationList = arr this.goodsInfoData.goodsSpecificationList = arr
this.goodsInfoData.goodsSpecificationSingleList = arr this.goodsInfoData.goodsSpecificationSingleList = arr
let specialList = [] let specialList = []
if (this.goodsInfoData.goodsType == 1) specialList = ['position'] if (this.goodsInfoData.goodsType == 1) { // 膜类 位置 质保 采购价 必填
let requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'purchasePrice', 'upgradePrice', 'warrantyPeriod'] 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++) { for (var i = 0; i < confirmShopData.length; i++) {
const item = confirmShopData[i] const item = confirmShopData[i]
if (this.goodsInfoData.specificationType == '2') item.specificationData = item.specsValueList.join(';~;') if (this.goodsInfoData.specificationType == '2') item.specificationData = item.specsValueList.join(';~;')
...@@ -341,7 +354,7 @@ export default { ...@@ -341,7 +354,7 @@ export default {
} catch (error) { } catch (error) {
return document.getElementById('specificationDetailList').scrollIntoView() 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() return document.getElementById('specificationDetailList').scrollIntoView()
} }
} }
...@@ -354,6 +367,7 @@ export default { ...@@ -354,6 +367,7 @@ export default {
item.warrantyPeriod = item.warrantyPeriod && parseFloat(item.warrantyPeriod) item.warrantyPeriod = item.warrantyPeriod && parseFloat(item.warrantyPeriod)
item.purchasePrice = item.purchasePrice && parseFloat(item.purchasePrice) item.purchasePrice = item.purchasePrice && parseFloat(item.purchasePrice)
item.warningValue = item.warningValue && parseFloat(item.warningValue) item.warningValue = item.warningValue && parseFloat(item.warningValue)
item.serviceYears = item.serviceYears && parseFloat(item.serviceYears)
delete item.shopPriceEmpty delete item.shopPriceEmpty
delete item.shopMinPriceEmpty delete item.shopMinPriceEmpty
delete item.upgradePriceEmpty delete item.upgradePriceEmpty
...@@ -361,6 +375,8 @@ export default { ...@@ -361,6 +375,8 @@ export default {
delete item.purchasePriceEmpty delete item.purchasePriceEmpty
delete item.positionEmpty 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)) { if (![1, 2].includes(this.goodsInfoData.status) && num && JSON.stringify(confirmShopData) !== JSON.stringify(this.copyUpgradeGoodsList)) {
...@@ -383,6 +399,12 @@ export default { ...@@ -383,6 +399,12 @@ export default {
} }
callback() 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) { saveAssignByMerchantEvent(data, isDelete) {
let flag = this.goodsInfoData.distributionType == '1' let flag = this.goodsInfoData.distributionType == '1'
// flag true按规格保存 // flag true按规格保存
......
...@@ -261,7 +261,8 @@ export default { ...@@ -261,7 +261,8 @@ export default {
goodsDescList: data.goodsDescList, goodsDescList: data.goodsDescList,
goodsPositionList: data.goodsPositionList || [], goodsPositionList: data.goodsPositionList || [],
carTypeList: data.carTypeList, carTypeList: data.carTypeList,
convertedValue: data.convertedValue convertedValue: data.convertedValue,
productServiceItemList: data.productServiceItemList
} }
params.goodsImgList.forEach(i => { params.goodsImgList.forEach(i => {
delete i.createdDate delete i.createdDate
......
...@@ -84,19 +84,20 @@ export default { ...@@ -84,19 +84,20 @@ export default {
sceneTypeList: sceneTypeList:
[ [
{ {
confId: 0,
confLabel: '1.0新车车损升级',
disabled: true
}, {
confId: 1, confId: 1,
confLabel: '1.1次新车精品升级' confLabel: '1.1精品升级'
}, { }, {
confId: 2, confId: 2,
confLabel: '1.2次新车膨胀金活动', confLabel: '1.2次新车转化',
disabled: true disabled: true
}, { }, {
confId: 3, confId: 3,
confLabel: '1.3售后直播众筹活动' confLabel: '1.3售后众筹'
},
{
confId: 0,
confLabel: '2.0会员权益/升级',
// disabled: true
} }
] ]
}, },
...@@ -129,7 +130,7 @@ export default { ...@@ -129,7 +130,7 @@ export default {
methods: { methods: {
changeScene(value) { changeScene(value) {
if (value == 1) { if (value == 1 || value == 0) {
this.yqStoreVisible = true this.yqStoreVisible = true
} else if (value == 3) { } else if (value == 3) {
this.yqStoreVisible = false this.yqStoreVisible = false
...@@ -163,7 +164,7 @@ export default { ...@@ -163,7 +164,7 @@ export default {
handleRelateConfirm() { handleRelateConfirm() {
const params = this.getParams() const params = this.getParams()
if (params.scene == 1) { if (params.scene == 1 || params.scene == 0) {
if (this.choose4sData.length == 0) { if (this.choose4sData.length == 0) {
this.notice.warningTips('请选择4s店') this.notice.warningTips('请选择4s店')
return return
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-button type="text" /> <el-button type="text" />
<div slot="auth-button" <div slot="auth-button"
slot-scope="scope" slot-scope="scope"
v-if="scope.scope.scene" v-if="!filterEmpty(scope.scope.scene)"
class="btnClass"> class="btnClass">
<!-- <auth-button slot="auth-button" <!-- <auth-button slot="auth-button"
:data="scope.scope" /> --> :data="scope.scope" /> -->
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
label: "业务场景", label: "业务场景",
prop: "scene", prop: "scene",
formatter: (cellValue) => { formatter: (cellValue) => {
if (!cellValue.scene) return '' if (this.filterEmpty(cellValue.scene)) return ''
return sceneList[cellValue.scene] return sceneList[cellValue.scene]
} }
}, },
...@@ -701,6 +701,10 @@ export default { ...@@ -701,6 +701,10 @@ export default {
} }
}) })
}, },
// 校验是否有值
filterEmpty(data) {
return (data ?? '') === ''
},
filterNode(value, data, node) { filterNode(value, data, node) {
if (!value) return true if (!value) return true
let parentNode = node.parent 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>
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" <wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog"
v-if="QRcodeDialog" v-if="QRcodeDialog"
:merchant-info="recordInfo" /> :merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible"
:info="recordInfo"
v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose"
@keyDowmGetList="keyDowmGetList" />
</d2-container> </d2-container>
</template> </template>
...@@ -66,6 +71,7 @@ import { BaseData, manageTypeList } from '@/common/constants.js' ...@@ -66,6 +71,7 @@ import { BaseData, manageTypeList } from '@/common/constants.js'
// import { getParkStore } from '@api/editCustomer' // import { getParkStore } from '@api/editCustomer'
import qrcodeDialog from './qRcodeDialog' import qrcodeDialog from './qRcodeDialog'
import wxQRcodeDialog from './wxQRcodeDialog' import wxQRcodeDialog from './wxQRcodeDialog'
import sceneEntryDialog from './sceneEntryDialog'
export default { export default {
name: 'ServiceManage', name: 'ServiceManage',
data() { data() {
...@@ -218,13 +224,15 @@ export default { ...@@ -218,13 +224,15 @@ export default {
}, },
qRcodeVisible: false, qRcodeVisible: false,
QRcodeDialog: false, QRcodeDialog: false,
recordInfo: {} recordInfo: {},
sceneEntryVisible: false
} }
}, },
components: { components: {
qrcodeDialog, qrcodeDialog,
wxQRcodeDialog wxQRcodeDialog,
sceneEntryDialog
}, },
mounted() { mounted() {
...@@ -297,6 +305,16 @@ export default { ...@@ -297,6 +305,16 @@ export default {
dialogClose() { dialogClose() {
this.qRcodeVisible = !this.qRcodeVisible 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!