Commit a146d1e5 by zhangxw

服务项目按适用车价细化需求开发

1 parent f4701f21
......@@ -827,7 +827,8 @@ export const downloadReportManage_reportType = [
{ confId: "selleruseruserdipadanalysis", confValue: "驻店人员平板使用分析" },
{ confId: "dailybehaviorsummary", confValue: "日行为汇总表" },
{ confId: "weeklybehaviorsummary", confValue: "周行为汇总表" },
{ confId: "businessDataSummary", confValue: "业务数据汇总" }
{ confId: "businessDataSummary", confValue: "业务数据汇总" },
{ confId: "yanbaoMerAndPerRanking", confValue: "门店产值及个人成交排名" }
]
// 下载报表 业务类型
......
......@@ -23,3 +23,14 @@ export function filterSpecsStr(data) {
return "-"
}
}
export function convertYuanToWan(yuan) {
// 将元转换为万元
const wan = yuan / 10000
// 判断小数部分是否为零
if (wan % 1 === 0) {
return wan.toFixed(0) // 如果是整数,保留0位小数
} else {
return wan.toFixed(2) // 否则保留2位小数
}
}
......@@ -270,7 +270,7 @@ import relateStoreTable from './relateStoreTable.vue'
import { getList, getAccountMerchantList } from '@/api/merchant'
import selectGoodsDialog from '../../components/selectGoodsDialog.vue'
import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption'
import { filterSpecsStr, convertYuanToWan } from '../../filterOption'
export default {
name: 'GroundingForm',
components: {
......@@ -610,7 +610,9 @@ export default {
..._valueObj,
goodsName: _valueObj.goodsInfo.goodsName,
tempGoodsTypeName: result,
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList?.map(item => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})?.join(','), // 服务项目
positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(_valueObj),
djCost: _valueObj?.djCost,
......
......@@ -16,7 +16,7 @@ import { BaseData, sceneCodeList } from '@/common/constants.js'
import { mapActions } from 'vuex'
import { deepClone } from '@/common/util'
import { baseConfig } from '@/main'
import { filterSpecsStr } from "../filterOption"
import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default {
name: 'EditGrounding',
components: {
......@@ -307,7 +307,9 @@ export default {
...res?.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
tempGoodsTypeName: result,
serviceItemNames: res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
serviceItemNames: res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})?.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('/'),
......
......@@ -16,7 +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'
import { filterSpecsStr, convertYuanToWan } from '../filterOption'
export default {
name: 'GroundingDetail',
components: {
......@@ -226,7 +226,9 @@ export default {
...res.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
tempGoodsTypeName: result,
serviceItemNames: res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
serviceItemNames: res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})?.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('/'),
......
......@@ -269,7 +269,7 @@ import { getList, getAccountMerchantList } from '@/api/merchant'
import { upgradeSupplyModeList, crowdUpgradeSupplyModeList, packageGoodsForm } from "../../grounding/constants/data"
import selectGoodsDialog from '../../components/selectGoodsDialog.vue'
import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption'
import { filterSpecsStr, convertYuanToWan } from '../../filterOption'
export default {
name: 'GroundingForm',
components: {
......@@ -462,7 +462,11 @@ export default {
..._valueObj,
goodsName: _valueObj.goodsInfo.goodsName,
tempGoodsTypeName: result,
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList?.map(item => { return this.extendedPosiType.includes(_valueObj?.goodsInfo?.goodsType) ? item.serviceName : `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList?.map(item => {
return this.extendedPosiType.includes(_valueObj?.goodsInfo?.goodsType) ?
item.serviceName :
`${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})?.join(','), // 服务项目
positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(_valueObj),
djCost: _valueObj?.djCost,
......@@ -541,7 +545,7 @@ export default {
this.$set(this.formData.groundingGoodsList[index], 'upgradeProductCost', '')
}
// 当商品信息自带嘀加成本时,将输入框置灰
if (!this.filterEmpty(this.formData.groundingGoodsList[index]?.upgradeGoods?.djCost)) {
if (!this.filterEmpty(this.formData.groundingGoodsList[index]?.upgradeGoods?.djCost) && _formBlock[_formBlock.findIndex(subItem => subItem.name == 'djCost')]) {
this.$set(_formBlock[_formBlock.findIndex(subItem => subItem.name == 'djCost')], 'isDisabled', true)
}
this.show = true
......
......@@ -16,7 +16,7 @@ import { packageGoodsForm } from '../grounding/constants/data'
import { mapActions } from 'vuex'
import { deepClone } from '@/common/util'
import { baseConfig } from '@/main'
import { filterSpecsStr } from "../filterOption"
import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default {
name: 'EditPackage',
components: {
......@@ -251,7 +251,9 @@ export default {
goodsName: val.goodsName,
upgradeGoodsName: val?.upgradeGoodsName,
tempGoodsTypeName: result,
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})?.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('/'),
......@@ -351,6 +353,12 @@ export default {
this.editData = data
// 判断套餐的所有子商品适用车型是否存在交集
let seriesIdFlag = false
// let copyGroundingGoodsList = deepClone(data?.groundingGoodsList)
// const seriesIdsSet = copyGroundingGoodsList?.filter(v => {
// return v?.upgradeGoods?.carTypeConfigList?.length
// })?.map(item => {
// return new Set(item.upgradeGoods.carTypeConfigList.map(bItem => bItem.seriesId))
// })
const seriesIdsSet = data?.groundingGoodsList?.map(item =>
new Set(item?.upgradeGoods?.carTypeConfigList?.map(bItem => bItem.seriesId))
)
......@@ -368,28 +376,35 @@ export default {
break
}
}
const confirmSave = () => {
this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
this.checkEvent(params)
}).catch(err => {
console.log(err)
})
}
if (seriesIdFlag) {
this.$confirm('<p>当前套餐商品的适用车型不一致,</p>是否确认继续使用?', '提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
if ((num == 1)) {
this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
this.checkEvent(params)
}).catch(err => {
console.log(err)
})
if (num === 1) {
confirmSave()
} else {
this.checkEvent(params)
}
})
} else {
this.checkEvent(params)
if (num === 1) {
confirmSave()
} else {
this.checkEvent(params)
}
}
},
checkEvent(params) {
......
......@@ -16,7 +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"
import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default {
name: 'PackageDetail',
components: {
......@@ -183,7 +183,9 @@ export default {
upgradeGoodsName: val?.upgradeGoodsName,
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result,
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})?.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('/'),
......
......@@ -121,7 +121,7 @@ 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'
import { filterSpecsStr, convertYuanToWan } from '../../filterOption'
export default {
name: 'DrawerDetail',
components: {ellipsisPopover},
......@@ -178,7 +178,9 @@ export default {
}
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.serviceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => {
return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${convertYuanToWan(v.minPrice)}-${convertYuanToWan(v.maxPrice)}万` : ''}`
})?.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('/')
......
......@@ -227,7 +227,7 @@
size="small"
v-model="subItem.djCost"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.djCost) && subItem.djCostEmpty }"
:disabled="goodsInfoData.scrmFlag == 'Y'"
:disabled="true"
@input="handlePrice($event, subIndex, 'djCost')">
<el-popover v-if="filterEmpty(subItem.djCost) && subItem.djCostEmpty"
slot="suffix"
......@@ -567,6 +567,9 @@ export default {
specsInputVal: '',
specsStartInputVal: '',
specsEndInputVal: '',
oldspecsInputVal: '',
oldspecsStartInputVal: '',
oldspecsEndInputVal: '',
reg: {
priceReg: /^\d[\d\.]*$/
},
......@@ -804,15 +807,37 @@ export default {
this.serviceSelectIndex = index
this.serviceItemsVisible = true
},
// 防止精度丢失
highPrecisionAdd(arr) {
// 转换为字符串处理小数,避免浮点数精度问题
let total = 0
arr.forEach((item) => {
const num = parseFloat(item)
if (!isNaN(num)) {
total = this.addPrecise(total, num)
}
})
return total
},
addPrecise(a, b) {
const aStr = a.toString()
const bStr = b.toString()
const aDecimalLen = (aStr.split(".")[1] || "").length
const bDecimalLen = (bStr.split(".")[1] || "").length
const maxDecimalLen = Math.max(aDecimalLen, bDecimalLen)
const multiplier = Math.pow(10, maxDecimalLen)
const aInt = Math.round(a * multiplier)
const bInt = Math.round(b * multiplier)
const result = (aInt + bInt) / multiplier
return result
},
handleRelateServiceConfirm(data) {
// 批量操作服务项目
if (this.filterEmpty(this.serviceSelectIndex)) {
this.goodsInfoData?.goodsSpecificationList.map(v => {
if (v.checked) {
v.serviceItemArr = data
v.djCost = data.reduce((v, i) => {
return v + i.standardSalesCost
}, 0)
v.djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
}
return v
})
......@@ -820,13 +845,11 @@ export default {
}
const index = this.serviceSelectIndex
let djCost = 0
data.forEach(v => { // 嘀加成本通过已选服务项目的销售成本自动累计
djCost += v.standardSalesCost
})
// 嘀加成本通过已选服务项目的销售成本自动累计
djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
if (!data?.length) djCost = ''
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'serviceItemArr', data)
// 暂时放开嘀加成本与服务项目联动累加
// this.$set(this.goodsInfoData.goodsSpecificationList[index], 'djCost', djCost)
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'djCost', djCost)
this.serviceSelectIndex = null
this.serviceSelected = []
this.serviceItemsVisible = false
......@@ -984,7 +1007,11 @@ export default {
handleSpecsInput(e, key) {
if (this.selectTypeSequence > 0) {
let newValue = e.replace(/[^\d.]/g, '')
let oldValue = this[key]
let oldValue = this[`old${key}`]
// let intergerDigit = this.selectTypeSequence == 3 ? 3 : 2 // 整数位数
// let pointDigit = this.selectTypeSequence == 3 ? 2 : 0 // 小数位数
// let maxValue = this.selectTypeSequence == 3 ? 200 : 99 // 最大值
// this.$set(this, key, limitPrice(newValue, oldValue, intergerDigit, pointDigit, 0, maxValue))
this.$set(this, key, limitPrice(newValue, oldValue, 2, this.selectTypeSequence == 3 ? 2 : 0, 0))
this.$set(this, `old${key}`, this[key])
}
......@@ -1033,8 +1060,11 @@ export default {
if (this.selectTypeSequence == 3) {
this.specsStartInputVal = tag.specificationValue?.split('-')[0]
this.specsEndInputVal = tag.specificationValue?.split('-')[1]
this.oldspecsStartInputVal = tag.specificationValue?.split('-')[0]
this.oldspecsEndInputVal = tag.specificationValue?.split('-')[1]
} else {
this.specsInputVal = tag.specificationValue
this.oldspecsInputVal = tag.specificationValue
}
this.tempTag = tag.specificationValue
this.isChange = true
......@@ -1139,7 +1169,7 @@ export default {
for (let i = 0; i < ranges.length; i++) {
const [rangeStart, rangeEnd] = ranges[i].map(Number)
// 判断是否存在冲突
if (start <= rangeEnd && end >= rangeStart) {
if (start < rangeEnd && end > rangeStart) {
return true
}
}
......
......@@ -40,10 +40,18 @@
label="年限"
align="center">
</el-table-column>
<el-table-column prop="standardSalesCost"
label="销售成本/元"
<el-table-column prop="price"
label="适用车价/万元"
width="140"
align="center">
<template slot-scope="scope">
<span>{{ `${convertYuanToWan(scope.row.minPrice)}-${convertYuanToWan(scope.row.maxPrice)}`}}</span>
</template>
</el-table-column>
<el-table-column prop="djCost"
label="嘀加成本/元"
width="100"
align="center">
</el-table-column>
<el-table-column prop="serviceOverview"
width="210"
......@@ -81,6 +89,7 @@
<script>
import { deepClone } from '@/common/util'
import { convertYuanToWan } from '../../filterOption'
export default {
name: 'RelateServiceDialog',
data() {
......@@ -90,7 +99,8 @@ export default {
// 分页
total: 0,
currentPage: 1,
pageSize: 20
pageSize: 20,
convertYuanToWan
}
},
......@@ -115,10 +125,15 @@ export default {
mounted() {
this.selectedData = deepClone(this.serviceSelected)
// 若是历史服务项目数据不回显(历史已选服务项目没有适用车价)
this.selectedData = this.selectedData?.filter(val => !this.filterEmpty(val.serviceItemId))
this.getSelectingList()
},
methods: {
filterEmpty(data) {
return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
},
selectable(row) {
const { selectedData } = this
// 每个服务项目code只能选中一个 按等级和年限区分
......@@ -143,8 +158,8 @@ export default {
pageSize: this.pageSize
}).then(res => {
res?.list?.forEach(val => {
val.uniqueValue = `${val.serviceName}-${val.serviceGrade}/${val.servicePeriod}`
val.uniqueCode = `${val.serviceCode}-${val.serviceGrade}/${val.servicePeriod}`
val.uniqueValue = `${val.serviceName}-${val.serviceGrade}/${val.servicePeriod}${(val.serviceItemId) ? `/${this.convertYuanToWan(val.minPrice)}-${this.convertYuanToWan(val.maxPrice)}万` : ''}`
val.uniqueCode = `${val.serviceCode}-${val.serviceGrade}/${val.servicePeriod}${(val.serviceItemId) ? `/${val.serviceItemId}` : ''}`
})
this.selectingData = res.list
this.total = res.total
......
......@@ -226,7 +226,7 @@
<td v-if="(extendedPosiType.includes(goodsInfoData.goodsType) || equitySceneType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<el-input placeholder="请输入"
size="small"
:disabled="goodsInfoData.scrmFlag == 'Y'"
:disabled="true"
v-model="subItem.djCost"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.djCost) && subItem.djCostEmpty }"
@input="handlePrice($event, subIndex, 'djCost')">
......@@ -650,15 +650,37 @@ export default {
this.serviceSelectIndex = index
this.serviceItemsVisible = true
},
// 防止精度丢失
highPrecisionAdd(arr) {
// 转换为字符串处理小数,避免浮点数精度问题
let total = 0
arr.forEach((item) => {
const num = parseFloat(item)
if (!isNaN(num)) {
total = this.addPrecise(total, num)
}
})
return total
},
addPrecise(a, b) {
const aStr = a.toString()
const bStr = b.toString()
const aDecimalLen = (aStr.split(".")[1] || "").length
const bDecimalLen = (bStr.split(".")[1] || "").length
const maxDecimalLen = Math.max(aDecimalLen, bDecimalLen)
const multiplier = Math.pow(10, maxDecimalLen)
const aInt = Math.round(a * multiplier)
const bInt = Math.round(b * multiplier)
const result = (aInt + bInt) / multiplier
return result
},
handleRelateServiceConfirm(data) {
// 批量操作权益服务项目
if (this.filterEmpty(this.serviceSelectIndex)) {
this.goodsInfoData?.goodsSpecificationSingleList.map(v => {
if (v.checked) {
v.serviceItemArr = data
v.djCost = data.reduce((v, i) => {
return v + i.standardSalesCost
}, 0)
v.djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
}
return v
})
......@@ -666,13 +688,11 @@ export default {
}
const index = this.serviceSelectIndex
let djCost = 0
data.forEach(v => { // 嘀加成本通过已选服务项目的销售成本自动累计
djCost += v.standardSalesCost
})
// 嘀加成本通过已选服务项目的销售成本自动累计
djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
if (!data?.length) djCost = ''
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'serviceItemArr', data)
// 暂时放开嘀加成本与服务项目联动累加
// this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'djCost', djCost)
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'djCost', djCost)
this.serviceSelectIndex = null
this.serviceSelected = []
this.serviceItemsVisible = false
......
......@@ -34,6 +34,7 @@ import { addProductManage, UpdateProductManage } from '@api/productManage'
import { BaseData, applicableModelTypeList } from '@/common/constants.js'
import { getGoodsInfoById } from '@api/commodity'
import { baseConfig } from '@/main'
import { convertYuanToWan } from '../filterOption'
export default {
name: 'EditProductManage',
components: {
......@@ -129,8 +130,8 @@ export default {
let objData = {}
this.copyUpgradeGoodsList = deepClone(res.upgradeGoodsList).map((val, index) => {
val?.upgradeGoodsServiceItemsList?.forEach(v => {
v.uniqueValue = `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}`
v.uniqueCode = `${v.serviceCode}-${v.serviceGrade}/${v.servicePeriod}`
v.uniqueValue = `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${convertYuanToWan(v.minPrice)}-${convertYuanToWan(v.maxPrice)}万` : ''}`
v.uniqueCode = `${v.serviceCode}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${v.serviceItemId}` : ''}`
})
return {
id: val.id,
......@@ -192,8 +193,8 @@ export default {
goodsSpecificationSingleList: deepClone(this.copyUpgradeGoodsList),
upgradeGoodsList: res.upgradeGoodsList?.map(val => {
val?.upgradeGoodsServiceItemsList?.map(v => {
v.uniqueValue = `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}`
v.uniqueCode = `${v.serviceCode}-${v.serviceGrade}/${v.servicePeriod}`
v.uniqueValue = `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${convertYuanToWan(v.minPrice)}-${convertYuanToWan(v.maxPrice)}万` : ''}`
v.uniqueCode = `${v.serviceCode}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${v.serviceItemId}` : ''}`
return v
})
return val
......@@ -274,7 +275,10 @@ export default {
serviceName: val.serviceName,
serviceGrade: val.serviceGrade,
servicePeriod: val.servicePeriod,
standardSalesCost: val.standardSalesCost
djCost: val.djCost,
serviceItemId: val.serviceItemId,
minPrice: val.minPrice,
maxPrice: val.maxPrice
})
})
arr.push({
......@@ -330,7 +334,10 @@ export default {
serviceName: val.serviceName,
serviceGrade: val.serviceGrade,
servicePeriod: val.servicePeriod,
standardSalesCost: val.standardSalesCost
djCost: val.djCost,
serviceItemId: val.serviceItemId,
minPrice: val.minPrice,
maxPrice: val.maxPrice
})
})
if (item.statusFlag != 2) {
......
......@@ -203,7 +203,7 @@ import { mapActions } from "vuex"
import { limitPrice } from "@/common/format"
import selectGoodsDialog from "../../../components/selectGoodsDialog.vue"
import { baseConfig } from "@/main"
import { filterSpecsStr } from "../../../filterOption"
import { filterSpecsStr, convertYuanToWan } from "../../../filterOption"
import { businessLineOpt } from "@/common/constants.js"
import { computeProductProfitDetail } from "@api/shelfManage"
export default {
......@@ -342,7 +342,7 @@ export default {
tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}`
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})
?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods),
......@@ -403,7 +403,7 @@ export default {
tempGoodsTypeName: result,
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}`
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})
?.join(","), // 服务项目
// positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
......
......@@ -324,7 +324,7 @@ import { mapActions } from "vuex"
import { limitPrice } from "@/common/format"
import selectGoodsDialog from "../../../components/selectGoodsDialog.vue"
import { baseConfig } from "@/main"
import { filterSpecsStr } from "../../../filterOption"
import { filterSpecsStr, convertYuanToWan } from "../../../filterOption"
import { computeProductProfitDetail } from "@api/shelfManage"
export default {
name: "PackageTab",
......@@ -559,7 +559,7 @@ export default {
tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}`
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})
?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods),
......@@ -720,7 +720,7 @@ export default {
tempGoodsTypeName: result,
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}`
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})
?.join(","), // 服务项目
// positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
......
......@@ -195,7 +195,7 @@ import { deepClone } from "@/common/util"
import { mapActions } from "vuex"
import { limitPrice } from "@/common/format"
import { baseConfig } from "@/main"
import { filterSpecsStr } from "@/views/goods/filterOption"
import { filterSpecsStr, convertYuanToWan } from "@/views/goods/filterOption"
import { businessLineOpt } from "@/common/constants.js"
export default {
name: "GoodTab",
......@@ -317,7 +317,7 @@ export default {
tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}`
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})
?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods),
......
......@@ -311,7 +311,7 @@ import { businessNature, businessLineOpt } from "@/common/constants.js"
import { mapActions } from "vuex"
import { limitPrice } from "@/common/format"
import { baseConfig } from "@/main"
import { filterSpecsStr } from "@/views/goods/filterOption"
import { filterSpecsStr, convertYuanToWan } from "@/views/goods/filterOption"
export default {
name: "PackageTab",
......@@ -442,7 +442,7 @@ export default {
tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}`
return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}${(item.serviceItemId) ? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(item.maxPrice)}万` : ''}`
})
?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!