Commit 32ebdf6e by 前端

Merge branch 'SAAS+V4.49.2-0225' into 'develop'

上线合并

See merge request !410
2 parents daab82c7 1d20afa9
......@@ -68,7 +68,8 @@ export function batchUpdateStatus(data) {
// 批量复制
export function batchUpdateBatchCopy(data) {
data.method = `${path}merchantGoodsInfo.updateBatchCopy`
// data.method = `${path}merchantGoodsInfo.updateBatchCopy`
data.method = `${path}merchantGoodsInfo.addBatchCopy`
return request(data, "post")
}
......
......@@ -42,3 +42,15 @@ export function getExtendServiceItemsParts(data) {
data.method = `${path}vd.item.getExtendUnitList`
return request(data, 'post')
}
// 获取适用车系列表
export function getCarSeriesList(data) {
data.method = `${path}common.car.series.page`
return request(data, 'post')
}
// 分页获取上架商品所需的升级商品信息
export function getUpgradeProductList(data) {
data.method = `${path}productManager.listUpgradeGoodsWithPage`
return request(data, 'post')
}
......@@ -440,11 +440,29 @@ export default {
v.goodsInfo = {}
shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice
v.listShowSpecificationData =
val.goodsSpecificationNameList?.length > 1
? v.specificationData &&
v.specificationData?.replace(/;~;/g, " ")
: "-"
let specificationTypeSequenceArr = v.specificationTypeSequence?.split(';~;')
let specificationValueSequenceArr = v?.specificationData?.split(';~;')
const suffixMapping = {
1: '年',
2: '(km/万)',
3: '万'
}
if (specificationTypeSequenceArr?.length) {
specificationValueSequenceArr?.forEach((val, index) => {
const suffix = suffixMapping[specificationTypeSequenceArr[index]]
if (suffix) {
specificationValueSequenceArr[index] = `${val}${suffix}`
}
})
v.listShowSpecificationData = specificationValueSequenceArr?.join('/')
} else {
v.listShowSpecificationData = v?.specificationData?.replace(RegExp(';~;', 'g'), '/')
}
// v.listShowSpecificationData =
// val.goodsSpecificationNameList?.length > 1
// ? v.specificationData &&
// v.specificationData?.replace(/;~;/g, " ")
// : "-"
v.goodsInfo.goodsName = v.upgradeGoodsName
// v.goodsInfo.goodsTypeName = val.goodsInfo?.goodsTypeName
v.goodsInfo.goodsTypeName = types
......
......@@ -32,7 +32,9 @@ export default {
goodsSpecificationSingleList: [],
specificationSingleDetailList: [],
selectedSceneCode: '',
goodsType: ''
goodsType: '',
baseGoodsNameEmpty: false,
scrmFlag: 'N'
}
},
mutations: {
......
<template>
<el-popover
v-if="isTextLong"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="content"
>
<span ref="textRef" slot="reference" class="line-ellipsis">{{ truncatedText }}</span>
</el-popover>
<span v-else>{{ content || '-' }}</span>
</template>
<script>
export default {
name: 'EllipsisPopover',
props: {
content: {}
},
data() {
return {
maxWidth: 0
}
},
computed: {
truncatedText() {
const maxLength = Math.ceil(this.maxWidth / 12);
return this.content?.length > maxLength ? this.content.slice(0, maxLength) + '...' : this.content;
},
isTextLong() {
const maxLength = Math.ceil(this.maxWidth / 12);
return this.content?.length >= maxLength;
},
},
mounted() {
this.$nextTick(() => {
this.maxWidth = this.$refs.textRef?.getBoundingClientRect().width - 30 // 获取元素宽度
})
}
}
</script>
<style scoped>
.line-ellipsis {
display: inline-block;
width: 100%;
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 显示省略号 */
}
</style>
\ No newline at end of file
<template>
<d2-dialog
:title="title"
:is-visible.sync="selectGoodsVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleSelectGoodsConfirm"
@closeDialog="handleSelectGoodsClose"
class="selectGoods">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
<template slot="commodityCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入商品ID"
v-model.trim="searchForm['commodityCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'commodityCode')" />
</template>
<template slot="type">
<el-input :style="{ width: '100%'}"
placeholder="请输入商品编码"
v-model.trim="searchForm['type']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'type')" />
</template>
<template slot="thirdPartyCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入第三方编码"
v-model.trim="searchForm['thirdPartyCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'thirdPartyCode')" />
</template>
<template slot="baseGoodsCommodityCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入系列ID"
v-model.trim="searchForm['baseGoodsCommodityCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'baseGoodsCommodityCode')" />
</template>
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'" filterable
@change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
</div>
<d2-table ref="groundingIndexTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="select_btn" slot-scope="scope">
<el-radio v-model="selectedRowId" :label="scope.scope.id" :disabled="packageSelectIds && packageSelectIds.includes(scope.scope.id)">{{ '' }}</el-radio>
</template>
</d2-table>
</d2-dialog>
</template>
<script>
import { getUpgradeProductList } from '@api/productManage'
import { getAllCategory } from '@api/product'
import { filterSpecsStr } from '../filterOption'
export default {
name: 'SelectGoodsDialog',
props: {
title: {
type: String,
default: "选择商品"
},
selectGoodsVisible: {
type: Boolean,
default: false
},
upgradeGoodsId: {},
packageSelectIds: {}
},
data() {
return {
getListApi: getUpgradeProductList,
showFormData: [{
label: '商品名称',
name: 'upgradeGoodsName',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商品ID',
name: 'commodityCode',
addHtml: 'commodityCode'
}, {
label: '规格',
name: 'specificationData',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商品编码',
name: 'type',
addHtml: 'type'
}, {
label: '第三方编码',
name: 'thirdPartyCode',
addHtml: 'thirdPartyCode'
}, {
label: '适用车型',
name: 'carTypeSearch',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '所属系列',
name: 'goodsName',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '系列ID',
name: 'baseGoodsCommodityCode',
addHtml: 'baseGoodsCommodityCode'
}, {
label: '所属分类',
name: 'goodsType',
addHtml: 'goodsCascader'
}],
searchForm: {
upgradeGoodsName: '',
commodityCode: '',
specificationData: '',
type: '',
thirdPartyCode: '',
carTypeSearch: '',
goodsName: '',
baseGoodsCommodityCode: ''
},
tempGoodsType: [],
baseData: {
productTypeList: [],
productList: []
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [{
label: '',
width: '60',
addHtml: 'select_btn'
}, {
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '商品名称',
prop: 'upgradeGoodsName',
width: 150,
formatter: (cellValue) => {
return cellValue.upgradeGoodsName || '-'
}
}, {
label: '商品ID',
prop: 'commodityCode',
width: 180,
formatter: (cellValue) => {
return cellValue.commodityCode || '-'
}
}, {
label: '规格',
prop: 'specificationData',
formatter: (cellValue) => {
return this.filterSpecsStr(cellValue)
}
}, {
label: '商品编码',
prop: 'type',
formatter: (cellValue) => {
return cellValue.type || '-'
}
}, {
label: '第三方编码',
prop: 'thirdPartyCode',
width: 100,
formatter: (cellValue) => {
return cellValue?.thirdPartyCode || '-'
}
}, {
label: '适用车型',
prop: '',
formatter: (cellValue) => {
return cellValue?.carTypeConfigList?.length ? cellValue.carTypeConfigList.map(item => item.seriesName).join('/') : '-'
}
}, {
label: '所属系列',
prop: 'goodsName',
formatter: (cellValue) => {
return cellValue?.goodsInfo?.goodsName || '-'
},
width: 140
}, {
label: '系列ID',
prop: 'baseGoodsCommodityCode',
width: 170
}, {
label: '所属分类',
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
},
width: 170
}]
},
selectedRowId: '',
filterSpecsStr // 处理规格单位
}
},
mounted() {
this.selectedRowId = this.upgradeGoodsId
// 获取全部类目 屏蔽服务商自建类目
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
},
methods: {
searchInput(e, key) {
if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm[key] = e.replace(/[^a-zA-Z0-9]/g, '')
}
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
setTableFinishFun(data) {
this.tableData = data
},
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
handleSelectGoodsConfirm() {
let selectData = this.tableData?.find(v => v.id == this.selectedRowId)
if (!selectData) return this.$message.warning('请选择商品')
this.$emit('handleSelectGoodsConfirm', selectData)
},
handleSelectGoodsClose() {
this.$emit('handleSelectGoodsClose')
},
handleReset() {
this.searchForm = {
upgradeGoodsName: '',
commodityCode: '',
specificationData: '',
type: '',
thirdPartyCode: '',
carTypeSearch: '',
goodsName: '',
baseGoodsCommodityCode: ''
}
this.tempGoodsType = []
// 重新查询
this.$refs.groundingIndexTable.refreshTable(true, true)
},
}
}
</script>
<style lang="scss" scoped>
.show-search {
::v-deep .d2-search-block {
padding: 0;
}
}
</style>
\ No newline at end of file
export function filterSpecsStr(data) {
let specificationTypeSequenceArr = (data?.specificationTypeSequence && data?.specificationTypeSequence?.split(';~;')) || []
let specificationValueSequenceArr = data?.specificationData?.split(';~;')
const suffixMapping = {
1: '年',
2: '(km/万)',
3: '万'
}
if (specificationTypeSequenceArr?.length) {
specificationValueSequenceArr?.forEach((val, index) => {
const suffix = suffixMapping[specificationTypeSequenceArr[index]]
if (suffix) {
specificationValueSequenceArr[index] = `${val}${suffix}`
}
})
return specificationValueSequenceArr?.join('/')
} else if (data?.specificationData?.includes(';~;')) {
return data?.specificationData?.replace(RegExp(';~;', 'g'), '/')
} else {
return '-'
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
<el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input>
</el-form-item>
<el-form-item label="复制门店:" prop="selectMerchantObj">
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword multiple collapse-tags
placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable>
<el-option v-for="subItem in storeData" :key="subItem.merchantId"
......@@ -121,7 +121,6 @@ export default {
},
handleBatchCopyConfirm() {
this.$refs.batchCopyForm.validate((valid) => {
console.log(valid)
if (valid) {
this.$emit('handleBatchCopyConfirm', this.selectData?.selectMerchantObj)
}
......
......@@ -26,50 +26,42 @@
<div class="incid_box">
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(formData[item.key]) ? subItem.label + `(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value text-hide">{{ subItem.unit ? priceFilter(formData[subItem.value]) : formData[subItem.value] }}</div>
<div class="value">
<ellipsis-popover :content="subItem.unit ? priceFilter(formData.upgradeGoods[subItem.value]) : formData.upgradeGoods[subItem.value] || ''"></ellipsis-popover>
</div>
</div>
<!-- 权益/延保非第三方展示 -->
<div class="item" v-if="(equitySceneType.includes(formData[item.key]) || extendedPosiType.includes(formData[item.key])) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">嘀加成本元/件:</div>
<div class="value">
<ellipsis-popover :content="priceFilter(formData.upgradeGoods['djCost']) || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 1太阳膜/延保类 -->
<!-- 商品分类 1太阳膜 -->
<div class="item" v-if="formData[item.key] == '1'">
<div class="label">部位:</div>
<div class="value">{{ formData['positionNames'] }}</div>
</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ formData['warrantyPeriod'] }}</div>
<div class="value">
<ellipsis-popover :content="formData.upgradeGoods['positionNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<!-- 商品分类 权益服务 非第三方 -->
<div class="item" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务时间/年:</div>
<div class="value">{{ formData['serviceYears'] }}</div>
<div class="label">服务项目:</div>
<div class="value">
<ellipsis-popover :content="formData.upgradeGoods['serviceItemNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<!-- 商品分类 权益服务 -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">实体卡:</div>
<div class="value">{{ formData['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<div class="item" v-if="equitySceneType.includes(formData[item.key]) || extendedPosiType.includes(formData[item.key])">
<div class="label">适用车价:</div>
<div v-if="!filterEmpty(formData['minSuitCarPrice']) && !filterEmpty(formData['maxSuitCarPrice'])">{{ formData['minSuitCarPrice'] }} - {{ formData['maxSuitCarPrice'] }}万</div>
<div v-else>-</div>
<div class="value">{{ formData.upgradeGoods['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item flex_1" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务项目:</div>
<div class="value">{{ formData['serviceItemNames'] }}</div>
</div>
<!-- 延保类非第三方供应 -->
<div class="item" v-if="extendedPosiType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务项目:</div>
<div class="value text-hide">{{ formData['serviceItemNames'] || '-' }}</div>
</div>
<div class="item" v-if="extendedPosiType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务年限:</div>
<div class="value">{{ !filterEmpty(formData.serviceYears) ? (formData.serviceYears + '年') : '-' }}</div>
</div>
<div class="item" v-if="extendedPosiType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">公里数:</div>
<div class="value">{{ !filterEmpty(formData.kilometers) ? (formData.kilometers + '万公里') : '-' }}</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">
<ellipsis-popover :content="`${formData.upgradeGoods['warrantyPeriod']}年` || ''"></ellipsis-popover>
</div>
</div>
</div>
</el-form-item>
......@@ -161,11 +153,13 @@ import { deepClone } from '@/common/util'
import { mapActions } from 'vuex'
import { baseConfig } from "@/main"
import relateStoreTable from "./relateStoreTable.vue"
import ellipsisPopover from '../../components/ellipsisPopover.vue'
export default {
name: 'GroundingForm',
components: {
relateStoreTable,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
ellipsisPopover
},
data() {
return {
......@@ -338,7 +332,7 @@ export default {
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
return `${(Math.round(num * pow) / pow).toFixed(2)}元`
},
handleClose() {
this.$emit('handleClose')
......@@ -395,6 +389,9 @@ export default {
width: 150px;
text-align: right;
}
.value {
width: calc(100% - 150px);
}
.text-hide {
width: calc(100% - 150px);
overflow: hidden;
......
......@@ -56,6 +56,9 @@ export const packageGoodsForm = [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
......@@ -70,6 +73,9 @@ export const packageGoodsForm = [{
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
......@@ -152,6 +158,7 @@ export const packageGoodsForm = [{
type: 'input',
width: '432px',
unit: true,
isDisabled: false,
handleInput: true
}, {
name: 'thirdPartyCost',
......@@ -173,6 +180,9 @@ export const packageGoodsDetail = [
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
......@@ -187,6 +197,9 @@ export const packageGoodsDetail = [
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
......
......@@ -16,6 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util'
import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data'
import { baseConfig } from "@/main"
import { filterSpecsStr } from '../filterOption'
export default {
name: 'GroundingDetail',
components: {
......@@ -53,6 +54,9 @@ export default {
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
......@@ -67,6 +71,9 @@ export default {
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
......@@ -159,7 +166,8 @@ export default {
1: '质保权益卡'
},
detailId: '',
productServiceItemList: []
productServiceItemList: [],
filterSpecsStr
}
},
mounted() {
......@@ -183,7 +191,7 @@ export default {
const productType = []
if (res?.upgradeProductFlag == 'Y') productType.push(2)
if (res?.baseProductFlag == 'Y') productType.push(1)
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = res.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = res.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
const productTypeTextArr = []
......@@ -203,29 +211,27 @@ export default {
if (res.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList
}
res.tempGoodsTypeName = result // 所属分类
res.productTypeStr = productTypeTextArr?.length ? productTypeTextArr.join(';') : '-'
res.warrantyTypeStr = this.warrantyTypeShow[res?.warrantyType] || '-'
res.baseSupplyModeStr = baseSupplyModeList?.filter(v => v.confId == res.baseSupplyMode)[0]?.confName || ''
res.upgradeSupplyModeStr = arr?.filter(v => v.confId == res.upgradeSupplyMode)[0]?.confName || ''
res.sceneName = sceneList[res.sceneType] || '-'
res.upgradePrice = res.upgradeGoods?.upgradePrice
res.purchasePrice = res.upgradeGoods?.purchasePrice
res.positionNames = positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '' // 部位
res.productType = productType
res.serviceItemNames = res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return this.extendedPosiType.includes(res?.goodsType) ? item.serviceName : `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(',') // 服务项目
res.warrantyPeriod = res.upgradeGoods?.warrantyPeriod
res.serviceYears = res.upgradeGoods?.serviceYears
res.merchantGoodsRefList = res.merchantGoodsRefList || []
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || ''
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
res.voucherList = res?.voucherList || []
res.positionStr = deepClone(this.positionTypeList)?.filter(val => res?.position == val.position)[0]?.confName || ''
res.minSuitCarPrice = res?.upgradeGoods?.minSuitCarPrice
res.maxSuitCarPrice = res?.upgradeGoods?.maxSuitCarPrice
res.supplierCode = res?.goodsInfo?.supplierCode
res.financeCheckFlagStr = res?.financeCheckFlag == 'Y' ? '开启' : res?.financeCheckFlag == 'N' ? '关闭' : '-'
res.kilometers = res?.upgradeGoods?.kilometers
res.upgradeGoods = {
...res.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
tempGoodsTypeName: result,
serviceItemNames: res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(res?.upgradeGoods),
carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
upgradeCommodityCode: res?.upgradeGoods?.commodityCode
}
this.editData = res || {}
this.$nextTick(() => {
this.show = true
......
......@@ -471,7 +471,7 @@ export default {
parentProp: 'goodsInfo',
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
......@@ -977,11 +977,16 @@ export default {
},
// 批量复制弹窗确定
handleBatchCopyConfirm(data) {
let merchantGoodsRefList = []
data?.forEach(v => {
merchantGoodsRefList.push({
merchantId: v.merchantId,
merchantName: v.merchantName
})
})
const params = {
ids: this.batchCopySelectData.map(v => { return v.id }) || [], // 商品id
sceneType: this.batchCopySelectScene, // 业务场景
merchantId: data?.merchantId,
merchantName: data?.merchantName
merchantGoodsRefList
}
batchUpdateBatchCopy(params).then(() => {
this.notice.okTips()
......
......@@ -27,50 +27,44 @@
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(ele[item.key]) ? subItem.label +
`(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value text-hide">{{ subItem.unit ? priceFilter(ele[subItem.value]) : ele[subItem.value] }}</div>
<div class="value">
<ellipsis-popover :content="subItem.unit ? priceFilter(ele.upgradeGoods[subItem.value]) : ele.upgradeGoods[subItem.value] || ''"></ellipsis-popover>
</div>
</div>
<!-- 权益/延保非第三方展示 -->
<div class="item" v-if="(equitySceneType.includes(ele[item.key]) || extendedPosiType.includes(ele[item.key])) && !baseConfig.supplierCode.includes(`${ele.supplierCode}`)">
<div class="label">嘀加成本元/件:</div>
<div class="value">
<ellipsis-popover :content="priceFilter(ele.upgradeGoods['djCost'])"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 延保类 -->
<div class="item" v-if="ele[item.key] == 1">
<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 class="value">
<ellipsis-popover :content="ele.upgradeGoods['positionNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务时间/年:</div>
<div class="value">{{ ele['serviceYears'] }}</div>
<!-- 商品分类 权益升级 -->
<div class="item" v-if="(equitySceneType.includes(ele[item.key]) || extendedPosiType.includes(ele[item.key])) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务项目:</div>
<div class="value">
<ellipsis-popover :content="ele.upgradeGoods['serviceItemNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<!-- 商品分类 权益服务 -->
<div class="item" v-if="equitySceneType.includes(ele[item.key])">
<div class="label">实体卡:</div>
<div class="value">{{ ele['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<div class="item" v-if="equitySceneType.includes(ele[item.key]) || extendedPosiType.includes(ele[item.key])">
<div class="label">适用车价:</div>
<div v-if="!filterEmpty(ele['minSuitCarPrice']) && !filterEmpty(ele['maxSuitCarPrice'])">{{ ele['minSuitCarPrice'] }} - {{ ele['maxSuitCarPrice'] }}万</div>
<div v-else>-</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item flex_1" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务项目:</div>
<div class="value">{{ ele['serviceItemNames'] }}</div>
</div>
<!-- 延保类非第三方 -->
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务项目:</div>
<div class="value text-hide">{{ ele['serviceItemNames'] || '-' }}</div>
</div>
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务年限:</div>
<div class="value">{{ !filterEmpty(ele['serviceYears']) ? ele['serviceYears'] + '年' : '-' }}</div>
<div class="value">
<ellipsis-popover :content="ele.upgradeGoods['entityCardFlag'] == 'Y' ? '是' : '否'"></ellipsis-popover>
</div>
</div>
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">公里数:</div>
<div class="value">{{ !filterEmpty(ele['kilometers']) ? ele['kilometers'] + '万公里' : '-' }}</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">
<ellipsis-popover :content="`${ele.upgradeGoods['warrantyPeriod']}年` || ''"></ellipsis-popover>
</div>
</div>
</div>
</el-form-item>
......@@ -180,11 +174,13 @@ import { deepClone } from '@/common/util'
import { mapActions } from 'vuex'
import { baseConfig } from "@/main"
import relateStoreTable from "../../grounding/components/relateStoreTable.vue"
import ellipsisPopover from '../../components/ellipsisPopover.vue'
export default {
name: 'GroundingForm',
components: {
relateStoreTable,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
ellipsisPopover
},
data() {
return {
......@@ -331,7 +327,7 @@ export default {
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
return `${(Math.round(num * pow) / pow).toFixed(2)}元`
},
// 返回
handleClose() {
......@@ -400,6 +396,9 @@ export default {
width: 150px;
text-align: right;
}
.value{
width: calc(100% - 150px);
}
.text-hide {
width: calc(100% - 150px);
overflow: hidden;
......
......@@ -16,6 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main"
import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data'
import { filterSpecsStr } from "../filterOption"
export default {
name: 'PackageDetail',
components: {
......@@ -118,6 +119,7 @@ export default {
0: '质保卡',
1: '质保权益卡'
},
filterSpecsStr
}
},
mounted() {
......@@ -150,7 +152,7 @@ export default {
if (val.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList
}
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
this.editForm[1].formBlock.push(packageGoodsDetail)
......@@ -159,25 +161,8 @@ export default {
res.groundingGoodsList.push({
goodsType: val?.goodsType, // 类目值
upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id
upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称
goodsAlias: val?.goodsAlias || '-', // 商品别名
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result, // 商品所属类目
// upgradePrice: val?.upgradePrice, // 参考售价
positionStr: deepClone(this.positionTypeList)?.filter(subVal => val?.position == subVal.position)[0]?.confName || '', // 上架部位
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // 部位名称
positionNamesArr: positionNamesArr, // 多部位数组
purchasePrice: val?.upgradeGoods?.purchasePrice, // 采购价
upgradeCommodityCode: val?.upgradeCommodityCode, // 商品ID
serviceYears: val?.upgradeGoods?.serviceYears, // 服务时间
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return this.extendedPosiType.includes(val?.goodsType) ? item.serviceName : `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
kilometers: val?.upgradeGoods?.kilometers, // 公里数
type: val?.upgradeGoods?.type, // 编码
thirdPartyCode: val?.upgradeGoods?.thirdPartyCode, // 第三方编码
entityCardFlag: val?.upgradeGoods?.entityCardFlag, // 是否实体卡
goodsName: val?.goodsName, // 素材名称(所属系列)
minSuitCarPrice: val?.upgradeGoods?.minSuitCarPrice, // 适用车价最低价
maxSuitCarPrice: val?.upgradeGoods?.maxSuitCarPrice, // 适用车价最高价
sellPrice: val?.sellPrice, // 售价
minSellPrice: val?.minSellPrice, // 最低售价
validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价
......@@ -191,7 +176,19 @@ export default {
virtualAccountCost: val?.virtualAccountCost, // 虚拟对账成本
recoveryCost: val?.recoveryCost, // 回收成本
warrantyPeriod: val?.upgradeGoods?.warrantyPeriod, // 质保年限
upgradePrice: val?.upgradeGoods?.upgradePrice // 参考售价
upgradePrice: val?.upgradeGoods?.upgradePrice, // 参考售价
upgradeGoods: {
...val?.upgradeGoods,
goodsName: val.goodsName,
upgradeGoodsName: val?.upgradeGoodsName,
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result,
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(val?.upgradeGoods),
carTypeConfigName: val?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
upgradeCommodityCode: val?.upgradeCommodityCode
}
})
})
res.sceneName = sceneList[res.sceneType] || '-'
......
<!-- 适用车型弹窗 -->
<template>
<div>
<d2-dialog title="选择适用车型"
:is-visible.sync="carSeriesVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleCarSeriesConfirm"
@closeDialog="handleCarSeriesClose"
class="carSeries">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable"
:data="selectingData"
height="320px"
class="table"
border
@select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号"
align="center"
type="index"
width="55" />
<el-table-column
prop="seriesName"
label="车系"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="childName"
label="所属子品牌"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="brandName"
label="所属品牌"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
</el-table>
<el-pagination small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<div class="selectedBox">
<div class="title">
<div class="title_txt">已选</div>
<div class="title_btn" @click="clearSelect">清空</div>
</div>
<div class="content">
<div class="item" v-for="(subItem, subIdx) in selectedData" :key="subIdx">
<div class="item_txt"><span>{{ subItem.seriesName }}</span></div>
<div class="del_item" @click="delItem(subItem)"><i class="el-icon-error"></i></div>
</div>
</div>
</div>
</el-row>
</d2-dialog>
</div>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'CarSeriesDialog',
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 10,
curId: '',
isVisible: false
}
},
props: {
carSeriesVisible: {
type: Boolean,
default: false
},
carSeriesApi: {
type: Function,
default: () => { }
},
carSeriesSelected: {
type: Array,
default: () => []
},
carSeriesSearchForm: {
type: Object,
default: () => { }
},
extendServicePartList: {
type: Array,
default: () => []
}
},
mounted() {
this.selectedData = deepClone(this.carSeriesSelected)
this.curId = deepClone(this.carSeriesSelected)[0]?.gradeId || deepClone(this.carSeriesSelected)[0]?.id
this.getSelectingList()
},
methods: {
getSelectingList() {
let params = deepClone(this.carSeriesSearchForm)
this.carSeriesApi({
...params,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list || []
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.seriesId)
this.selectingData.forEach((item) => {
exitIds.includes(item.seriesId) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.seriesId === row.seriesId
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.seriesId !== row.seriesId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.seriesId === item.seriesId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
clearSelect() {
this.selectedData = []
this.$refs.seletingTable.clearSelection()
},
delItem(row) {
this.selectedData = this.selectedData.filter(item => item.seriesId !== row.seriesId)
const obj = this.selectingData.find(v => v.seriesId == row.seriesId)
if (obj) this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleCarSeriesConfirm() {
if (!this.selectedData?.length) return this.$message.warning('请选择适用车型')
this.$emit('handleCarSeriesConfirm', this.selectedData)
},
handleCarSeriesClose() {
this.$emit('handleCarSeriesClose')
}
}
}
</script>
<style lang="scss" scoped>
.carSeries .table {
margin: 0 auto 20px !important;
width: 100%;
}
.carSeries .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 2;
}
.selectedBox{
flex: 1;
height: 320px;
border: 1px solid #E5E5E5;
margin-left: 10px;
.title{
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px 0 16px;
border-bottom: 1px solid #E5E5E5;
.title_txt{
font-size: 16px;
font-weight: 600;
color: #333333;
}
.title_btn{
cursor: pointer;
font-size: 14px;
color: #185EFE;
}
}
.content{
padding: 16px 10px;
height: calc(100% - 75px);
overflow-y: scroll;
.item{
display: flex;
align-items: center;
justify-content: space-between;
height: 32px;
color: #666666;
padding: 0 8px;
.del_item{
cursor: pointer;
}
}
.item:hover{
background: #F6F9FF;
}
}
}
}
.service-service .carSeries .el-table .cell,
.d2-form .carSeries .el-table .cell {
line-height: 26px !important;
}
.service-service .carSeries .el-table--medium td,
.d2-form .carSeries .el-table--medium td {
padding: 6px 8px !important;
}
.carSeries .red {
color: red;
}
.carSeries .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.text_hide{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .text_hide p{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
}
::v-deep .el-radio__original {
display: none !important;
}
::v-deep .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
.pdfDialog{
::v-deep .el-dialog__header {
padding: 10px 16px 4px;
background-color: #141516;
.el-dialog__title {
color: #fff;
font-size: 16px;
}
}
::v-deep .el-dialog__body {
padding: 0;
background-color: #202223;
}
}
</style>
......@@ -45,32 +45,42 @@
</p>
<div class="flex_box">
<el-form-item class="d2-drawer-item"
label="规格:">
<ellipsis-popover :content="item.specificationName"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="编码:">
<span>{{ item.type }}</span>
<ellipsis-popover :content="item.type"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="第三方编码:">
<span>{{ item.thirdPartyCode }}</span>
<ellipsis-popover :content="item.thirdPartyCode"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<span>{{ !filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '-' }}</span>
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<ellipsis-popover :content="!filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<span>{{ !filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '-' }}</span>
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<ellipsis-popover :content="!filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '-' }}</span>
<el-form-item v-if="(equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) || extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType'))) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))" class="d2-drawer-item"
:label="'嘀加成本(元)/件:'">
<ellipsis-popover :content="!filterEmpty(item.djCost) ? priceFilter(item.djCost) : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item" label="适用车型:">
<ellipsis-popover :content="item.carSeriesName"></ellipsis-popover>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务时间:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '-' }}</span>
label="服务项目:">
<ellipsis-popover :content="!filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<ellipsis-popover :content="item.positionNames || '-'"></ellipsis-popover>
</el-form-item>
<el-form-item
class="d2-drawer-item"
......@@ -78,38 +88,11 @@
label="实体卡:">
<span>{{ item.entityCardFlag == 'Y' ? '是' : '否' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) || extendedPosiType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="适用车价:">
<span v-if="!filterEmpty(item.minSuitCarPrice) && !filterEmpty(item.maxSuitCarPrice)">{{ item.minSuitCarPrice }} - {{ item.maxSuitCarPrice }}万</span>
<span v-else>-</span>
</el-form-item>
<el-form-item
class="d2-drawer-item flex_1"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务项目:">
<span>{{ !filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '-' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item flex_1"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<span>{{ item.positionNames || '-' }}</span>
</el-form-item>
<!-- 延保类非第三方 -->
<el-form-item class="d2-drawer-item"
v-if="extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务项目:">
<span style="display: inline-block;width: 210px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">{{ !filterEmpty(item.extendServiceItemNames) ? item.extendServiceItemNames : '-' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务年限:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '-' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="公里数:">
<span>{{ !filterEmpty(item.kilometers) ? (item.kilometers + '万公里') : '-' }}</span>
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<ellipsis-popover :content="!filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '-'"></ellipsis-popover>
</el-form-item>
</div>
</el-form>
......@@ -137,8 +120,11 @@
import { getGoodsInfoById } from '@/api/commodity'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from '@/main'
import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption'
export default {
name: 'DrawerDetail',
components: {ellipsisPopover},
data() {
return {
equitySceneType: baseConfig.equitySceneType || [], // 权益类目
......@@ -147,7 +133,8 @@ export default {
commodityInfo: {},
membraneTypeList: baseConfig.membraneTypeList,
supplierCode: baseConfig.supplierCode, // 供应方
operationLogList: [] // 操作信息
operationLogList: [], // 操作信息
filterSpecsStr
}
},
......@@ -185,10 +172,16 @@ export default {
getInfo(id) {
getGoodsInfoById({ id: id }).then(res => {
res?.upgradeGoodsList?.forEach(item => {
let obj = {
...item,
specificationTypeSequence: res?.specificationPermutationList?.find(v => v.specificationValueSequence == item.specificationData)?.specificationTypeSequence
}
const positionNamesArr = deepClone(this.positionTypeList).filter(val => item.position?.split(',')?.includes(val.position + '')) || []
item.positionNames = positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : ''
item.serviceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',')
item.extendServiceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}` })?.join(',')
item.specificationName = this.filterSpecsStr(obj)
item.carSeriesName = item?.carTypeConfigList?.map(v => { return v.seriesName })?.join('/')
})
res?.operationLogList?.forEach(val => {
val.updatedDateStr = val.updatedDate ? Util.dateFormate(val.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
......@@ -266,6 +259,10 @@ export default {
.el-form-item__label{
flex-shrink: 0;
}
.el-form-item__content {
width: 100%;
height: 36px;
}
}
.flex_1{
width: 100%;
......
......@@ -34,7 +34,7 @@
:placeholder="item.label"
:maxlength="item.maxlength"
:style="{ width: item.width || formItemWidth }"
:disabled="item.isDisabled"
:disabled="item.isDisabled || pageData.pageDisabled"
clearable
@input="input($event, item)"
@blur="blur(item)"
......@@ -50,13 +50,14 @@
@change="selectAddAttr($event, item)"
:style="{ width: item.width || formItemWidth }"
filterable
:disabled="item.isDisabled"
:disabled="item.isDisabled || pageData.pageDisabled"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem[item.optionId]"
:label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"
:disabled="subItem.isDisabled"
/>
</el-select>
<!-- 可添加选项选择框 -->
......@@ -70,7 +71,7 @@
@blur="selectBlur"
@focus="selectFocus"
filterable
:disabled="item.isDisabled"
:disabled="item.isDisabled || pageData.pageDisabled"
>
<el-option
v-for="(subItem, subIndex) in item.optionList"
......@@ -176,7 +177,7 @@
<!-- 级联选择器 -->
<el-cascader v-else-if="item.type === 'cascader'" :style="{ width: item.width || formItemWidth }" :options="item.optionList"
v-model="formData[item.name]" :placeholder="'请选择' + item.label" filterable
@change="selectAddAttr($event, item)" aria-hidden="false"
@change="selectAddAttr($event, item)" aria-hidden="false" :disabled="pageData.pageDisabled"
:props="{ checkStrictly: true, label: item.optionLabel, value: item.optionId }">
</el-cascader>
</el-form-item>
......@@ -611,10 +612,13 @@ import { baseConfig } from "@/main"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default {
name: "ProductForm",
inject: ['pageData'],
data() {
return {
equitySceneType: baseConfig.equitySceneType || [],
membraneTypeList: baseConfig.membraneTypeList || [],
extendedPosiType: baseConfig.extendedPosiType || [], // 延保类
supplierCode: baseConfig.supplierCode || [],
solarFilmArr: baseConfig.solarFilmArr || [1, 111, 112],
userInfo: this.$store.state.d2admin.user.info,
lookImgVisible: false,
......@@ -790,6 +794,20 @@ export default {
this.selectedPositionIds = arr
this.setUpdateGoodsInfo({ goodsPositionList: newVal })
}
},
'formData.goodsType': {
handler() {
if (this.addOrEdit === 'edit' && (this.formData?.status != 3 || this.formData?.scrmFlag == 'Y')) return
this.setFormItemStatus()
},
deep: true
},
'formData.supplierCode': {
handler() {
if (this.addOrEdit === 'edit' && (this.formData?.status != 3 || this.formData?.scrmFlag == 'Y')) return
this.setFormItemStatus()
},
deep: true
}
},
......@@ -822,6 +840,47 @@ export default {
get: "d2admin/base/get"
}),
...mapMutations("goodsInfoData", ["setUpdateGoodsInfo"]),
setFormItemStatus() {
// 获取供应方和延保类目的选项列表
const supplierIndex = this.formList[0]?.formBlock.findIndex(val => val.name === "supplierCode")
const goodsTypeIndex = this.formList[0]?.formBlock.findIndex(val => val.name === 'tempGoodsType')
const suppOptionList = this.formList[0]?.formBlock[supplierIndex]?.optionList
const goodsTypeOptionList = this.formList[0]?.formBlock[goodsTypeIndex]?.optionList
// 更新供应方选项的 disabled 状态
const updateSupplierOptions = (isDisabled) => {
suppOptionList?.forEach(item => {
item.isDisabled = isDisabled && !this.supplierCode?.includes(`${item.id}`)
})
this.$set(this.formList[0].formBlock[supplierIndex], 'optionList', suppOptionList)
}
// 更新延保类目选项的 disabled 状态
const updateGoodsTypeOptions = (isDisabled) => {
const updatedGoodsTypeOptionList = goodsTypeOptionList.map(item => {
const newItem = { ...item, disabled: isDisabled && this.extendedPosiType?.includes(item.categoryType) };
if (newItem.children) {
newItem.children = newItem.children.map(i => ({
...i,
disabled: newItem.disabled,
children: i.children ? i.children.map(j => ({ ...j, disabled: newItem.disabled })) : undefined
}))
}
return newItem
})
this.$set(this.formList[0].formBlock[goodsTypeIndex], 'optionList', updatedGoodsTypeOptionList)
}
// 根据 goodsType 更新供应方选项
if (this.extendedPosiType?.includes(this.formData?.goodsType)) {
updateSupplierOptions(true)
} else {
updateSupplierOptions(false)
}
// 根据 supplierCode 更新延保类目选项
if (this.formData?.supplierCode && !this.supplierCode?.includes(`${this.formData?.supplierCode}`)) {
updateGoodsTypeOptions(true)
} else {
updateGoodsTypeOptions(false)
}
},
selectBlur() {
this.editOptionIndex = -1
this.showOptionInput = false
......@@ -1006,7 +1065,7 @@ export default {
if (!fileInfo) return
if (fileInfo?.size / 1024 / 1024 > 10) {
document.getElementById(`${targetItem.name}file`).value = ""
return this.$message("请上传10M以内图片")
return this.$message.warning("请上传10M以内图片")
}
reader.readAsDataURL(fileInfo)
reader.onload = (e) => {
......@@ -1057,7 +1116,7 @@ export default {
if (e.total / 1024 / 1024 > 20) {
return this.$message({
message: "视频内容大于20M",
type: "error"
type: "warning"
})
}
const imgFile = e.target.result
......@@ -1139,7 +1198,7 @@ export default {
this.solarFilmArr?.includes(this.formData?.goodsType)
) {
// 太阳膜类目 产品名称关键字与类目不匹配
this.$message.error(
this.$message.warning(
"产品名称必须包含“太阳膜”字样才可将产品挂在太阳膜类目下"
)
}
......
......@@ -54,7 +54,8 @@ export default {
label: '产品名称',
type: 'input',
maxlength: 20,
width: '432px'
width: '432px',
isDisabled: false
},
{
name: 'tempGoodsType',
......@@ -94,7 +95,8 @@ export default {
optionId: 'id',
optionLabel: 'relatedPartyName',
partitionFlag: 2,
width: '432px'
width: '432px',
isDisabled: false
}, {
name: 'thumbUrl',
label: '缩略图',
......@@ -179,7 +181,8 @@ export default {
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
const obj = this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'tempGoodsType')]
obj.optionList = res?.list || []
if (this.addOrEdit === 'edit' && this.formData?.status != 3) {
// SCRM同步过来商品 或者非草稿支持在当前类目下变更1.2.3级类目,不允许更换一级类目
if (this.addOrEdit === 'edit' && (this.formData?.status != 3 || this.formData?.scrmFlag == 'Y')) {
obj.optionList.forEach(item => {
if (item.categoryType != this.editData.goodsType) {
item.disabled = true
......@@ -191,6 +194,37 @@ export default {
})
}
})
} else {
const goodsTypeIndex = this.editForm[0]?.formBlock.findIndex(val => val.name === 'tempGoodsType')
const goodsTypeOptionList = this.editForm[0]?.formBlock[goodsTypeIndex]?.optionList
// 更新延保类目选项的 disabled 状态
const updateGoodsTypeOptions = (isDisabled) => {
const updatedGoodsTypeOptionList = goodsTypeOptionList.map(item => {
const newItem = { ...item, disabled: isDisabled && this.baseConfig?.extendedPosiType?.includes(item.categoryType) };
if (newItem.children) {
newItem.children = newItem.children.map(i => ({
...i,
disabled: newItem.disabled,
children: i.children ? i.children.map(j => ({ ...j, disabled: newItem.disabled })) : undefined
}))
}
return newItem
})
this.$set(this.editForm[0].formBlock[goodsTypeIndex], 'optionList', updatedGoodsTypeOptionList)
}
// 根据 supplierCode 更新延保类目选项
if (this.formData?.supplierCode && !this.baseConfig?.supplierCode?.includes(`${this.formData?.supplierCode}`)) {
updateGoodsTypeOptions(true)
} else {
updateGoodsTypeOptions(false)
}
}
// SCRM同步过来商品字段不可编辑
if (this.formData?.scrmFlag == 'Y') {
let disabledLabel = ['goodsName', 'supplierCode']
for (var i = 0; i < disabledLabel.length; i++) {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == disabledLabel[i])].isDisabled = true
}
}
})
},
......@@ -202,7 +236,22 @@ export default {
if (num == 1) {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'brandMerchantCode')].optionList = res
} else {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'supplierCode')].optionList = res
const supplierIndex = this.editForm[0]?.formBlock.findIndex(val => val.name === "supplierCode")
this.editForm[0].formBlock[supplierIndex].optionList = res
const suppOptionList = this.editForm[0]?.formBlock[supplierIndex]?.optionList
// 更新供应方选项的 disabled 状态
const updateSupplierOptions = (isDisabled) => {
suppOptionList?.forEach(item => {
item.isDisabled = isDisabled && !this.baseConfig?.supplierCode?.includes(`${item.id}`)
})
this.$set(this.editForm[0].formBlock[supplierIndex], 'optionList', suppOptionList)
}
// 根据 goodsType 更新供应方选项
if (this.baseConfig?.extendedPosiType?.includes(this.formData?.goodsType)) {
updateSupplierOptions(true)
} else {
updateSupplierOptions(false)
}
}
})
},
......
......@@ -4,19 +4,24 @@
<div class="content-box">
<div class="sync_type_class">
<span class="label"><span class="color-red">*</span>使用模式:</span>
<el-radio-group v-model="goodsInfoData.shoppingMallFlag">
<el-radio-group v-model="goodsInfoData.shoppingMallFlag" :disabled="pageData.pageDisabled">
<el-radio :label="'1'">采购上架及分发至单店</el-radio>
<el-radio :label="'0'">仅分发至单店</el-radio>
</el-radio-group>
</div>
<div style="margin-left: 120px;">
<div class="add-btns">
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '2'"
<div v-if="goodsInfoData.specificationType == '2'">
<el-button icon="el-icon-plus"
type="primary" plain
:disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled"
@click="handleSpecsEdit(1)">新增规格</el-button>
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '1'" @click="addShop">新增商品</el-button>
<el-button :disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled" type="primary" plain @click="handleSpecsManage">规格组合管理</el-button>
</div>
<el-button icon="el-icon-plus" :disabled="pageData.pageDisabled" v-if="goodsInfoData.specificationType == '1'" type="primary" plain @click="addShop">新增商品</el-button>
<div class="assi_type">
<span>规格:</span>
<el-radio-group v-model="goodsInfoData.specificationType" @change="changeRadio">
<el-radio-group v-model="goodsInfoData.specificationType" :disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled" @change="changeRadio">
<el-radio :label="'1'">单规格</el-radio>
<el-radio :label="'2'">多规格</el-radio>
</el-radio-group>
......@@ -47,6 +52,7 @@ export default {
singleSpecificationForm,
multipleSpecificationForm
},
inject: ['pageData'],
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
......@@ -85,6 +91,10 @@ export default {
handleSpecsEdit(num) {
this.$refs.multipleSpecificationFormRef.handleSpecsEdit(num)
},
// 规格管理
handleSpecsManage() {
this.$refs.multipleSpecificationFormRef.handleSpecsManage()
},
// 新增商品
addShop() {
this.$refs.singleSpecificationFormRef.addShop()
......
<template>
<d2-dialog
title="规格组合管理"
:is-visible.sync="specsManageVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleSpecsManageConfirm"
@closeDialog="handleSpecsManageClose"
class="specsManage">
<div class="serach-item" v-for="(item, index) in specificationData" :key="index">
<span class="label">{{ `${item.specificationName}:` }}</span>
<el-select v-model="item.selected" collapse-tags multiple placeholder="请选择">
<el-option v-for="(subItem, subIndex) in item.specificationValueList"
:key="subIndex"
:label="subItem.specificationValue"
:value="subItem.specificationValue"></el-option>
</el-select>
</div>
<el-button type="primary" @click="handleSearch">搜索</el-button>
<div class="btn_content">
<el-button type="primary" plain @click="handleBatchUpdateStatus(1)">批量启用</el-button>
<el-button type="primary" plain @click="handleBatchUpdateStatus(2)">批量禁用</el-button>
</div>
<el-table ref="seletingTable"
:data="tableData"
height="380px"
class="table"
@select="handleChange"
@select-all="handleAll"
border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号"
align="center"
type="index"
width="55" />
<el-table-column
v-for="(item, index) in specificationData"
:key="index"
:label="item.specificationName"
:show-overflow-tooltip="true"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.specsValueList[index] }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span :class="{ 'greenSpot': scope.row.statusFlag != 2, 'redSpot': scope.row.statusFlag == 2 }"></span>
<span>{{ scope.row.statusFlag == 2 ? '禁用中' : '启用中' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button
@click="handleUpdateStatus(scope.row)"
type="text">{{ scope.row.statusFlag != 2 ? '禁用' : '启用' }}</el-button>
</template>
</el-table-column>
</el-table>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'SpecsManage',
props: {
specsManageVisible: {
type: Boolean
},
specificationDetailList: {
type: Array
},
goodsList: {
type: Array
}
},
data () {
return {
carSeriesSearchForm: {},
specificationData: [],
tableData: [],
selectedData: []
}
},
mounted () {
this.specificationData = deepClone(this.specificationDetailList)
this.specificationData.forEach(item => {
this.$set(item, 'selected', [])
})
this.initTableData(true)
},
methods: {
handleSearch() {
this.selectedData = []
this.tableData = []
this.initTableData()
const spliceIndex = this.tableData.reduce((indices, item, index) => {
this.specificationData.forEach((spec) => {
if (spec.selected?.length > 0 && !spec.selected.includes(item.specsValueList[this.specificationData.indexOf(spec)])) {
indices.push(index)
}
})
return indices
}, [])
this.tableData = this.tableData.filter((_, index) => !spliceIndex.includes(index))
},
initTableData(loadFlag) {
this.tableData = deepClone(this.goodsList)
this.tableData = this.specificationData.reduce((acc, spec, i) => {
const values = spec.specificationValueList.map(v => v.specificationValue)
if (i === 0) {
return values.map(value => ({ specsValueList: [value], statusFlag: 1 }))
}
const newAcc = []
acc.forEach(item => {
values.forEach(value => {
newAcc.push({ ...item, specsValueList: [...item.specsValueList, value] })
})
})
return newAcc
}, [])
if (loadFlag) {
this.tableData?.forEach(v => {
this.goodsList?.forEach(item => {
if (v?.specsValueList?.join(';~;') == item?.specsValueList?.join(';~;')) v.statusFlag = item.statusFlag || 1
})
})
}
this.updateTableDataStatus()
this.copyTableData = deepClone(this.tableData)
},
updateTableDataStatus() {
this.copyTableData?.forEach(copyItem => {
this.tableData.forEach(item => {
if (copyItem.specsValueList.join(';~;') === item.specsValueList.join(';~;')) {
item.statusFlag = copyItem.statusFlag
}
})
})
},
handleAll(selection) {
this.selectedData = selection.length ? [...this.tableData] : []
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.specsValueList?.join(';~;') == row.specsValueList?.join(';~;')
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.specsValueList?.join(';~;') != row.specsValueList?.join(';~;')
))
},
handleUpdateStatus(item) {
const toggleStatus = (v) => {
if (v.specsValueList.join(';~;') === item.specsValueList.join(';~;')) {
v.statusFlag = v.statusFlag != 2 ? 2 : 1
}
}
this.tableData.forEach(toggleStatus)
this.copyTableData.forEach(toggleStatus)
},
handleBatchUpdateStatus(statusFlag) {
if (!this.selectedData.length) {
return this.$message({
message: '请选择要操作的数据',
type: 'warning',
customClass: 'message-Z-zinde'
})
}
if (this.selectedData.some(v => v.statusFlag == statusFlag)) {
return this.$message({
message: `请勾选${statusFlag != 2 ? '禁用中' : '启用中'}的规格组合结果`,
type: 'warning',
customClass: 'message-Z-zinde'
})
}
const updateStatus = (v) => {
this.selectedData.forEach(item => {
if (v.specsValueList.join(';~;') === item.specsValueList.join(';~;')) {
v.statusFlag = statusFlag
}
})
}
this.tableData.forEach(updateStatus)
this.copyTableData.forEach(updateStatus)
},
handleSpecsManageConfirm() {
this.$emit('handleSpecsManageConfirm', this.copyTableData)
},
handleSpecsManageClose () {
this.$emit('handleSpecsManageClose')
}
}
}
</script>
<style lang="scss" scoped>
.specsManage{
.serach-item{
display: inline-block;
margin-right: 10px;
margin-bottom: 15px;
}
.label{
display: inline-block;
}
.btn_content{
margin: 20px 0;
}
.greenSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #2cca74;
margin-right: 5px;
display: inline-block;
}
.redSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #eb4e4e;
margin-right: 5px;
display: inline-block;
}
}
</style>
\ No newline at end of file
......@@ -33,7 +33,7 @@
<auth-button category="Button" :show-btn-ids="['9030701']" />
</span>
<!-- 批量导入 -->
<auth-button category="Button" style="display: inline-block;" :show-btn-ids="['9030707']" />
<!-- <auth-button category="Button" style="display: inline-block;" :show-btn-ids="['9030707']" /> -->
</span>
<!-- 导出 -->
<auth-button category="Button" style="display: inline-block" :show-btn-ids="['9030702']" />
......@@ -66,7 +66,7 @@
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9030703']" />
</span>
<auth-button :data="scope.scope"
<auth-button :data="scope.scope" v-if="scope.scope.goodsInfo.scrmFlag != 'Y'"
:show-btn-ids="['9030706']" />
</div>
</d2-table>
......@@ -210,7 +210,7 @@ export default {
parentProp: 'goodsInfo',
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
......
......@@ -341,7 +341,16 @@
/>&nbsp;%
</span>
</el-form-item>
<el-form-item label="阳光激励费:" prop="sunlightIncentiveCost">
<el-form-item label="隐私设置:">
<el-switch
v-model="form.costPrivacyShowFlag"
class="switchStyle" active-color="#2a58ad"
active-value="Y"
inactive-value="N">
</el-switch>
<span class="flag-text">查看订单商品成本</span>
</el-form-item>
<!-- <el-form-item label="阳光激励费:" prop="sunlightIncentiveCost">
<div>
<span class="rateInput_s">精品升级</span>
<el-input
......@@ -380,7 +389,7 @@
placeholder="请输入比例"
/>&nbsp;%
</div>
</el-form-item>
</el-form-item> -->
<el-form-item>
<div class="btnCon">
<el-button
......@@ -551,6 +560,7 @@ export default {
this.directorList[item.directorType].push(item.directorUserId)
}
})
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || ''
this.form = deepClone(res)
if (!this.form.serviceMerchantServiceChargeConfig) {
// 未设置过时,手续费默认为打开并且费率为2
......@@ -918,14 +928,14 @@ export default {
})
}
_params.directorList = directorList
_params.boutiqueSunshineInspiration =
shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration =
shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration =
shopMerchantConfig.boutiqueMarketInspiration
_params.quotationMarketInspiration =
shopMerchantConfig.quotationMarketInspiration
// _params.boutiqueSunshineInspiration =
// shopMerchantConfig.boutiqueSunshineInspiration
// _params.quotationSunshineInspiration =
// shopMerchantConfig.quotationSunshineInspiration
// _params.boutiqueMarketInspiration =
// shopMerchantConfig.boutiqueMarketInspiration
// _params.quotationMarketInspiration =
// shopMerchantConfig.quotationMarketInspiration
console.log(_params)
shopSetting({ dataString: JSON.stringify(_params) }).then((res) => {
this.notice.okTips()
......@@ -1311,4 +1321,8 @@ export default {
.rateInput_d {
margin-top: 20px;
}
.flag-text{
color: #333333;
margin-left: 10px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!