Commit df799594 by 前端

Merge branch 'SAAS+V4.51.0-0331' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.51.0-0331
2 parents d5494254 90edaefb
Showing 34 changed files with 986 additions and 178 deletions
...@@ -145,3 +145,33 @@ export function exportGrantRecord(data) { ...@@ -145,3 +145,33 @@ export function exportGrantRecord(data) {
data.method = 'dj.api.smartcarlife.resident.coupon.grant.record.export' data.method = 'dj.api.smartcarlife.resident.coupon.grant.record.export'
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 月度统计列表
export function monthlyStatistisc(data) {
data.method = 'dj.api.smartcarlife.resident.point.monthly.statistics'
return request(data, RequestMethods.POST)
}
// 月度统计导出
export function monthlyStatistiscExport(data) {
data.method = 'dj.api.smartcarlife.resident.point.monthly.statistics.export'
return request(data, RequestMethods.POST)
}
// 门店品牌
export function brandList(data = {}) {
data.method = 'dj.api.smartcarlife.common.car.brand.list'
return request(data, RequestMethods.POST)
}
// 归属商户
export function yqMerchantList(data = {}) {
data.method = 'dj.smartcarlife.api.yqMerchant.list'
return request(data, RequestMethods.POST)
}
// 服务门店
export function query4SRefByYqShop(data = {}) {
data.method = 'dj.api.scenemerchantref.query4SRefByYqShop'
return request(data, RequestMethods.POST)
}
...@@ -217,3 +217,14 @@ export function deliverTargeConfigImport(data) { ...@@ -217,3 +217,14 @@ export function deliverTargeConfigImport(data) {
return request(data, "post", ["file"]) return request(data, "post", ["file"])
} }
/** 主机厂交付数 end */ /** 主机厂交付数 end */
// 新增或者修改预警设置
export function saveOrUpdateWarningConfig(data) {
data.method = `dj.api.smartcarlife.warningmsg.WarningThreshold.saveOrUpdateEarlyWarningThresholdConfig`
return request(data)
}
// 根据商户号查询预警
export function findWarningConfig(data) {
data.method = `dj.api.smartcarlife.warningmsg.WarningThreshold.findByMerchantNo`
return request(data)
}
...@@ -827,7 +827,8 @@ export const downloadReportManage_reportType = [ ...@@ -827,7 +827,8 @@ export const downloadReportManage_reportType = [
{ confId: "selleruseruserdipadanalysis", confValue: "驻店人员平板使用分析" }, { confId: "selleruseruserdipadanalysis", confValue: "驻店人员平板使用分析" },
{ confId: "dailybehaviorsummary", confValue: "日行为汇总表" }, { confId: "dailybehaviorsummary", confValue: "日行为汇总表" },
{ confId: "weeklybehaviorsummary", confValue: "周行为汇总表" }, { confId: "weeklybehaviorsummary", confValue: "周行为汇总表" },
{ confId: "businessDataSummary", confValue: "业务数据汇总" } { confId: "businessDataSummary", confValue: "业务数据汇总" },
{ confId: "yanbaoMerAndPerRanking", confValue: "门店产值及个人成交排名" }
] ]
// 下载报表 业务类型 // 下载报表 业务类型
...@@ -982,7 +983,10 @@ export const filterOpt = [ ...@@ -982,7 +983,10 @@ export const filterOpt = [
{ confId: 2, confValue: "待我处理的" }, { confId: 2, confValue: "待我处理的" },
{ confId: 3, confValue: "我处理过的" } { confId: 3, confValue: "我处理过的" }
] ]
export const supervisorStatuOpt=[
{ confId: 1, confValue: "已跟进" },
{ confId: 0, confValue: "未跟进" }
]
// 驻店积分管理 状态 // 驻店积分管理 状态
export const pointStatusOpt = [ export const pointStatusOpt = [
{ confId: 1, confValue: "启用" }, { confId: 1, confValue: "启用" },
......
...@@ -890,6 +890,12 @@ export const routerName = { ...@@ -890,6 +890,12 @@ export const routerName = {
parentId: "90619", parentId: "90619",
label: "删除", label: "删除",
handle: "handleDelete" handle: "handleDelete"
},
{
authId: "9061927",
parentId: "90619",
label: "预警设置",
handle: "warningHandle"
} }
], ],
// component: _import("systemConfig/ShopConfig/index") // component: _import("systemConfig/ShopConfig/index")
......
...@@ -98,7 +98,8 @@ import { ...@@ -98,7 +98,8 @@ import {
warnStageyOpt, warnStageyOpt,
statusOpt, statusOpt,
priorityShowText, priorityShowText,
filterOpt filterOpt,
supervisorStatuOpt
} from "@/common/constants.js" } from "@/common/constants.js"
export default { export default {
name: "Details", name: "Details",
...@@ -123,6 +124,7 @@ export default { ...@@ -123,6 +124,7 @@ export default {
salespersonId: "", salespersonId: "",
createTime: [dayjs().subtract(30, "day").toDate(), dayjs().toDate()], createTime: [dayjs().subtract(30, "day").toDate(), dayjs().toDate()],
bussinessType: "", bussinessType: "",
supervisorCompletionFlag:'',
statusList: [], statusList: [],
storePersonId: "", storePersonId: "",
searchType: "" searchType: ""
...@@ -285,7 +287,17 @@ export default { ...@@ -285,7 +287,17 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "businessOpt" optionsName: "businessOpt"
} },
{
label: "督导跟进",
name: "supervisorCompletionFlag",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "supervisorStatuOpt"
},
], ],
getListApi: warningMsgDetailListWithPage, getListApi: warningMsgDetailListWithPage,
// 表格参数 // 表格参数
...@@ -316,6 +328,11 @@ export default { ...@@ -316,6 +328,11 @@ export default {
width: "150" width: "150"
}, },
{ {
label: "指标说明",
prop: "msgDetail",
width: "150"
},
{
label: "预警周期", label: "预警周期",
prop: "updatedDate", prop: "updatedDate",
width: "180", width: "180",
...@@ -396,6 +413,22 @@ export default { ...@@ -396,6 +413,22 @@ export default {
} }
}, },
{ {
label: "督导跟进",
prop: "statusName",
width: "100",
formatter: (cellValue) => {
return cellValue.supervisorCompletionFlag==1 ? '已跟进' :cellValue.supervisorCompletionFlag===0?'未跟进': "--"
},
className: (cellValue) => {
return {
1: "yellowSpot",
2: "greenSpot",
3: "ashSpot",
0: "ashSpot"
}[cellValue.supervisorCompletionFlag]
}
},
{
label: "下次跟进人", label: "下次跟进人",
prop: "followerName", prop: "followerName",
width: "150" width: "150"
...@@ -421,6 +454,7 @@ export default { ...@@ -421,6 +454,7 @@ export default {
warnStageyOpt: deepClone(warnStageyOpt), warnStageyOpt: deepClone(warnStageyOpt),
statusOpt: deepClone(statusOpt), statusOpt: deepClone(statusOpt),
filterOpt: deepClone(filterOpt), filterOpt: deepClone(filterOpt),
supervisorStatuOpt:deepClone(supervisorStatuOpt),
supervisorOpt: [], supervisorOpt: [],
saleOpt: [], saleOpt: [],
categoryList: [], categoryList: [],
...@@ -464,6 +498,7 @@ export default { ...@@ -464,6 +498,7 @@ export default {
this.searchForm.staffName = this.params_obj.staffName this.searchForm.staffName = this.params_obj.staffName
this.searchForm.merchantName = this.params_obj.merchantName this.searchForm.merchantName = this.params_obj.merchantName
this.searchForm.bussinessType = this.params_obj.bussinessType this.searchForm.bussinessType = this.params_obj.bussinessType
this.searchForm.supervisorCompletionFlag=this.params_obj.supervisorCompletionFlag
this.searchForm.statusList = this.params_obj.statusList this.searchForm.statusList = this.params_obj.statusList
} }
this.getBaseData() this.getBaseData()
...@@ -489,7 +524,7 @@ export default { ...@@ -489,7 +524,7 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
console.log("this.searchForm.warnCycle", this.searchForm.warnCycle) console.log("this.searchForm", this.searchForm)
if (this.searchForm.warnCycle) { if (this.searchForm.warnCycle) {
this.searchForm.warningStartDate = Util.dateFormate( this.searchForm.warningStartDate = Util.dateFormate(
this.searchForm.warnCycle[0], this.searchForm.warnCycle[0],
...@@ -538,6 +573,7 @@ export default { ...@@ -538,6 +573,7 @@ export default {
salespersonId: "", salespersonId: "",
createTime: [dayjs().subtract(30, "day").toDate(), dayjs().toDate()], createTime: [dayjs().subtract(30, "day").toDate(), dayjs().toDate()],
bussinessType: "", bussinessType: "",
supervisorCompletionFlag:'',
statusList: [], statusList: [],
storePersonId: "", storePersonId: "",
searchType: "" searchType: ""
......
...@@ -184,7 +184,19 @@ export default { ...@@ -184,7 +184,19 @@ export default {
label: '跟进内容', label: '跟进内容',
prop: 'followNotes', prop: 'followNotes',
width: '250px' width: '250px'
}, { },
{
label: "执行完成时间",
prop: "completionTime",
width: "150",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.completionTime,
"YYYY-MM-DD HH:mm:ss"
)
}
},
{
label: '跟进人', label: '跟进人',
prop: 'followerName' prop: 'followerName'
}, { }, {
......
...@@ -161,7 +161,19 @@ export default { ...@@ -161,7 +161,19 @@ export default {
label: '跟进内容', label: '跟进内容',
prop: 'followNotes', prop: 'followNotes',
width: '250px' width: '250px'
}, { },
{
label: "执行完成时间",
prop: "completionTime",
width: "150",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.completionTime,
"YYYY-MM-DD"
)
}
},
{
label: '跟进人', label: '跟进人',
prop: 'followerName' prop: 'followerName'
}, { }, {
......
...@@ -118,7 +118,7 @@ import { Util, deepClone, downLoadFile } from '@/common/util' ...@@ -118,7 +118,7 @@ import { Util, deepClone, downLoadFile } from '@/common/util'
import detailDialog from './components/detailDialog' import detailDialog from './components/detailDialog'
import handleDialog from './components/handleDialog' import handleDialog from './components/handleDialog'
import { findAllData, findAllPersonRelations, warningMsgDetailListWithPage, warningMsgDetailListWithPageExport } from '@api/earlyWarningManager' import { findAllData, findAllPersonRelations, warningMsgDetailListWithPage, warningMsgDetailListWithPageExport } from '@api/earlyWarningManager'
import { businessOpt, priorityOpt, warnStageyOpt, statusOpt, priorityShowText, filterOpt } from '@/common/constants.js' import { businessOpt, priorityOpt, warnStageyOpt, statusOpt, priorityShowText, filterOpt ,supervisorStatuOpt} from '@/common/constants.js'
export default { export default {
name: 'Details', name: 'Details',
props: { props: {
...@@ -140,6 +140,7 @@ export default { ...@@ -140,6 +140,7 @@ export default {
salespersonId: '', salespersonId: '',
createTime: '', createTime: '',
bussinessType: '', bussinessType: '',
supervisorCompletionFlag:'',
statusList: [], statusList: [],
storePersonId: '', storePersonId: '',
searchType: '' searchType: ''
...@@ -269,6 +270,16 @@ export default { ...@@ -269,6 +270,16 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'businessOpt' optionsName: 'businessOpt'
},
{
label: "督导跟进",
name: "supervisorCompletionFlag",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "supervisorStatuOpt"
}], }],
getListApi: warningMsgDetailListWithPage, getListApi: warningMsgDetailListWithPage,
// 表格参数 // 表格参数
...@@ -295,7 +306,13 @@ export default { ...@@ -295,7 +306,13 @@ export default {
label: '预警事项', label: '预警事项',
prop: 'rule', prop: 'rule',
width: '150' width: '150'
}, { },
{
label: "指标说明",
prop: "msgDetail",
width: "150"
},
{
label: '预警周期', label: '预警周期',
prop: 'updatedDate', prop: 'updatedDate',
width: '180', width: '180',
...@@ -358,6 +375,22 @@ export default { ...@@ -358,6 +375,22 @@ export default {
}[cellValue.status] }[cellValue.status]
} }
}, { }, {
label: "督导跟进",
prop: "statusName",
width: "100",
formatter: (cellValue) => {
return cellValue.supervisorCompletionFlag==1 ? '已跟进' :cellValue.supervisorCompletionFlag===0?'未跟进': "--"
},
className: (cellValue) => {
return {
1: "yellowSpot",
2: "greenSpot",
3: "ashSpot",
0: "ashSpot"
}[cellValue.supervisorCompletionFlag]
}
},
{
label: '下次跟进人', label: '下次跟进人',
prop: 'followerName', prop: 'followerName',
width: '150' width: '150'
...@@ -379,6 +412,7 @@ export default { ...@@ -379,6 +412,7 @@ export default {
warnStageyOpt: deepClone(warnStageyOpt), warnStageyOpt: deepClone(warnStageyOpt),
statusOpt: deepClone(statusOpt), statusOpt: deepClone(statusOpt),
filterOpt: deepClone(filterOpt), filterOpt: deepClone(filterOpt),
supervisorStatuOpt:deepClone(supervisorStatuOpt),
supervisorOpt: [], supervisorOpt: [],
saleOpt: [], saleOpt: [],
categoryList: [], categoryList: [],
...@@ -419,6 +453,7 @@ export default { ...@@ -419,6 +453,7 @@ export default {
this.searchForm.merchantName = this.params_obj.merchantName this.searchForm.merchantName = this.params_obj.merchantName
this.searchForm.bussinessType = this.params_obj.bussinessType this.searchForm.bussinessType = this.params_obj.bussinessType
this.searchForm.statusList = this.params_obj.statusList this.searchForm.statusList = this.params_obj.statusList
this.searchForm.supervisorCompletionFlag=this.params_obj.supervisorCompletionFlag
} }
this.getBaseData() this.getBaseData()
}, },
...@@ -470,6 +505,7 @@ export default { ...@@ -470,6 +505,7 @@ export default {
salespersonId: '', salespersonId: '',
createTime: '', createTime: '',
bussinessType: '', bussinessType: '',
supervisorCompletionFlag:'',
statusList: [], statusList: [],
storePersonId: '', storePersonId: '',
searchType: '' searchType: ''
......
...@@ -23,3 +23,14 @@ export function filterSpecsStr(data) { ...@@ -23,3 +23,14 @@ export function filterSpecsStr(data) {
return "-" 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' ...@@ -270,7 +270,7 @@ import relateStoreTable from './relateStoreTable.vue'
import { getList, getAccountMerchantList } from '@/api/merchant' import { getList, getAccountMerchantList } from '@/api/merchant'
import selectGoodsDialog from '../../components/selectGoodsDialog.vue' import selectGoodsDialog from '../../components/selectGoodsDialog.vue'
import ellipsisPopover from '../../components/ellipsisPopover.vue' import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption' import { filterSpecsStr, convertYuanToWan } from '../../filterOption'
export default { export default {
name: 'GroundingForm', name: 'GroundingForm',
components: { components: {
...@@ -610,7 +610,9 @@ export default { ...@@ -610,7 +610,9 @@ export default {
..._valueObj, ..._valueObj,
goodsName: _valueObj.goodsInfo.goodsName, goodsName: _valueObj.goodsInfo.goodsName,
tempGoodsTypeName: result, 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('/') : '', positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(_valueObj), specificationData: this.filterSpecsStr(_valueObj),
djCost: _valueObj?.djCost, djCost: _valueObj?.djCost,
......
...@@ -16,7 +16,7 @@ import { BaseData, sceneCodeList } from '@/common/constants.js' ...@@ -16,7 +16,7 @@ import { BaseData, sceneCodeList } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import { filterSpecsStr } from "../filterOption" import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default { export default {
name: 'EditGrounding', name: 'EditGrounding',
components: { components: {
...@@ -307,7 +307,9 @@ export default { ...@@ -307,7 +307,9 @@ export default {
...res?.upgradeGoods, ...res?.upgradeGoods,
goodsName: res.goodsInfo.goodsName, goodsName: res.goodsInfo.goodsName,
tempGoodsTypeName: result, 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('/') : '', positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(res?.upgradeGoods), specificationData: this.filterSpecsStr(res?.upgradeGoods),
carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'), carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
......
...@@ -16,7 +16,7 @@ import { mapActions } from 'vuex' ...@@ -16,7 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data' import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { filterSpecsStr } from '../filterOption' import { filterSpecsStr, convertYuanToWan } from '../filterOption'
export default { export default {
name: 'GroundingDetail', name: 'GroundingDetail',
components: { components: {
...@@ -226,7 +226,9 @@ export default { ...@@ -226,7 +226,9 @@ export default {
...res.upgradeGoods, ...res.upgradeGoods,
goodsName: res.goodsInfo.goodsName, goodsName: res.goodsInfo.goodsName,
tempGoodsTypeName: result, 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('/') : '', positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(res?.upgradeGoods), specificationData: this.filterSpecsStr(res?.upgradeGoods),
carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'), carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
......
...@@ -269,7 +269,7 @@ import { getList, getAccountMerchantList } from '@/api/merchant' ...@@ -269,7 +269,7 @@ import { getList, getAccountMerchantList } from '@/api/merchant'
import { upgradeSupplyModeList, crowdUpgradeSupplyModeList, packageGoodsForm } from "../../grounding/constants/data" import { upgradeSupplyModeList, crowdUpgradeSupplyModeList, packageGoodsForm } from "../../grounding/constants/data"
import selectGoodsDialog from '../../components/selectGoodsDialog.vue' import selectGoodsDialog from '../../components/selectGoodsDialog.vue'
import ellipsisPopover from '../../components/ellipsisPopover.vue' import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption' import { filterSpecsStr, convertYuanToWan } from '../../filterOption'
export default { export default {
name: 'GroundingForm', name: 'GroundingForm',
components: { components: {
...@@ -462,7 +462,11 @@ export default { ...@@ -462,7 +462,11 @@ export default {
..._valueObj, ..._valueObj,
goodsName: _valueObj.goodsInfo.goodsName, goodsName: _valueObj.goodsInfo.goodsName,
tempGoodsTypeName: result, 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('/') : '', positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(_valueObj), specificationData: this.filterSpecsStr(_valueObj),
djCost: _valueObj?.djCost, djCost: _valueObj?.djCost,
...@@ -541,7 +545,7 @@ export default { ...@@ -541,7 +545,7 @@ export default {
this.$set(this.formData.groundingGoodsList[index], 'upgradeProductCost', '') 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.$set(_formBlock[_formBlock.findIndex(subItem => subItem.name == 'djCost')], 'isDisabled', true)
} }
this.show = true this.show = true
......
...@@ -16,7 +16,7 @@ import { packageGoodsForm } from '../grounding/constants/data' ...@@ -16,7 +16,7 @@ import { packageGoodsForm } from '../grounding/constants/data'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import { filterSpecsStr } from "../filterOption" import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default { export default {
name: 'EditPackage', name: 'EditPackage',
components: { components: {
...@@ -251,7 +251,9 @@ export default { ...@@ -251,7 +251,9 @@ export default {
goodsName: val.goodsName, goodsName: val.goodsName,
upgradeGoodsName: val?.upgradeGoodsName, upgradeGoodsName: val?.upgradeGoodsName,
tempGoodsTypeName: result, 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('/') : '', positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(val?.upgradeGoods), specificationData: this.filterSpecsStr(val?.upgradeGoods),
carTypeConfigName: val?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'), carTypeConfigName: val?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
...@@ -351,6 +353,12 @@ export default { ...@@ -351,6 +353,12 @@ export default {
this.editData = data this.editData = data
// 判断套餐的所有子商品适用车型是否存在交集 // 判断套餐的所有子商品适用车型是否存在交集
let seriesIdFlag = false 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 => const seriesIdsSet = data?.groundingGoodsList?.map(item =>
new Set(item?.upgradeGoods?.carTypeConfigList?.map(bItem => bItem.seriesId)) new Set(item?.upgradeGoods?.carTypeConfigList?.map(bItem => bItem.seriesId))
) )
...@@ -368,13 +376,7 @@ export default { ...@@ -368,13 +376,7 @@ export default {
break break
} }
} }
if (seriesIdFlag) { const confirmSave = () => {
this.$confirm('<p>当前套餐商品的适用车型不一致,</p>是否确认继续使用?', '提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
if ((num == 1)) {
this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', { this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
...@@ -384,13 +386,26 @@ export default { ...@@ -384,13 +386,26 @@ export default {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
}
if (seriesIdFlag) {
this.$confirm('<p>当前套餐商品的适用车型不一致,</p>是否确认继续使用?', '提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
if (num === 1) {
confirmSave()
} else { } else {
this.checkEvent(params) this.checkEvent(params)
} }
}) })
} else { } else {
if (num === 1) {
confirmSave()
} else {
this.checkEvent(params) this.checkEvent(params)
} }
}
}, },
checkEvent(params) { checkEvent(params) {
this.confirmEvent(params) this.confirmEvent(params)
......
...@@ -16,7 +16,7 @@ import { mapActions } from 'vuex' ...@@ -16,7 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data' import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data'
import { filterSpecsStr } from "../filterOption" import { filterSpecsStr, convertYuanToWan } from "../filterOption"
export default { export default {
name: 'PackageDetail', name: 'PackageDetail',
components: { components: {
...@@ -183,7 +183,9 @@ export default { ...@@ -183,7 +183,9 @@ export default {
upgradeGoodsName: val?.upgradeGoodsName, upgradeGoodsName: val?.upgradeGoodsName,
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目 goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result, 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('/') : '', positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(val?.upgradeGoods), specificationData: this.filterSpecsStr(val?.upgradeGoods),
carTypeConfigName: val?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'), carTypeConfigName: val?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
......
...@@ -121,7 +121,7 @@ import { getGoodsInfoById } from '@/api/commodity' ...@@ -121,7 +121,7 @@ import { getGoodsInfoById } from '@/api/commodity'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import ellipsisPopover from '../../components/ellipsisPopover.vue' import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption' import { filterSpecsStr, convertYuanToWan } from '../../filterOption'
export default { export default {
name: 'DrawerDetail', name: 'DrawerDetail',
components: {ellipsisPopover}, components: {ellipsisPopover},
...@@ -178,7 +178,9 @@ export default { ...@@ -178,7 +178,9 @@ export default {
} }
const positionNamesArr = deepClone(this.positionTypeList).filter(val => item.position?.split(',')?.includes(val.position + '')) || [] 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.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.extendServiceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}` })?.join(',')
item.specificationName = this.filterSpecsStr(obj) item.specificationName = this.filterSpecsStr(obj)
item.carSeriesName = item?.carTypeConfigList?.map(v => { return v.seriesName })?.join('/') item.carSeriesName = item?.carTypeConfigList?.map(v => { return v.seriesName })?.join('/')
......
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
size="small" size="small"
v-model="subItem.djCost" v-model="subItem.djCost"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.djCost) && subItem.djCostEmpty }" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.djCost) && subItem.djCostEmpty }"
:disabled="goodsInfoData.scrmFlag == 'Y'" :disabled="true"
@input="handlePrice($event, subIndex, 'djCost')"> @input="handlePrice($event, subIndex, 'djCost')">
<el-popover v-if="filterEmpty(subItem.djCost) && subItem.djCostEmpty" <el-popover v-if="filterEmpty(subItem.djCost) && subItem.djCostEmpty"
slot="suffix" slot="suffix"
...@@ -567,6 +567,9 @@ export default { ...@@ -567,6 +567,9 @@ export default {
specsInputVal: '', specsInputVal: '',
specsStartInputVal: '', specsStartInputVal: '',
specsEndInputVal: '', specsEndInputVal: '',
oldspecsInputVal: '',
oldspecsStartInputVal: '',
oldspecsEndInputVal: '',
reg: { reg: {
priceReg: /^\d[\d\.]*$/ priceReg: /^\d[\d\.]*$/
}, },
...@@ -804,15 +807,37 @@ export default { ...@@ -804,15 +807,37 @@ export default {
this.serviceSelectIndex = index this.serviceSelectIndex = index
this.serviceItemsVisible = true 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) { handleRelateServiceConfirm(data) {
// 批量操作服务项目 // 批量操作服务项目
if (this.filterEmpty(this.serviceSelectIndex)) { if (this.filterEmpty(this.serviceSelectIndex)) {
this.goodsInfoData?.goodsSpecificationList.map(v => { this.goodsInfoData?.goodsSpecificationList.map(v => {
if (v.checked) { if (v.checked) {
v.serviceItemArr = data v.serviceItemArr = data
v.djCost = data.reduce((v, i) => { v.djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
return v + i.standardSalesCost
}, 0)
} }
return v return v
}) })
...@@ -820,13 +845,11 @@ export default { ...@@ -820,13 +845,11 @@ export default {
} }
const index = this.serviceSelectIndex const index = this.serviceSelectIndex
let djCost = 0 let djCost = 0
data.forEach(v => { // 嘀加成本通过已选服务项目的销售成本自动累计 // 嘀加成本通过已选服务项目的销售成本自动累计
djCost += v.standardSalesCost djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
})
if (!data?.length) djCost = '' if (!data?.length) djCost = ''
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'serviceItemArr', data) 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.serviceSelectIndex = null
this.serviceSelected = [] this.serviceSelected = []
this.serviceItemsVisible = false this.serviceItemsVisible = false
...@@ -984,7 +1007,11 @@ export default { ...@@ -984,7 +1007,11 @@ export default {
handleSpecsInput(e, key) { handleSpecsInput(e, key) {
if (this.selectTypeSequence > 0) { if (this.selectTypeSequence > 0) {
let newValue = e.replace(/[^\d.]/g, '') 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, key, limitPrice(newValue, oldValue, 2, this.selectTypeSequence == 3 ? 2 : 0, 0))
this.$set(this, `old${key}`, this[key]) this.$set(this, `old${key}`, this[key])
} }
...@@ -1033,8 +1060,11 @@ export default { ...@@ -1033,8 +1060,11 @@ export default {
if (this.selectTypeSequence == 3) { if (this.selectTypeSequence == 3) {
this.specsStartInputVal = tag.specificationValue?.split('-')[0] this.specsStartInputVal = tag.specificationValue?.split('-')[0]
this.specsEndInputVal = tag.specificationValue?.split('-')[1] this.specsEndInputVal = tag.specificationValue?.split('-')[1]
this.oldspecsStartInputVal = tag.specificationValue?.split('-')[0]
this.oldspecsEndInputVal = tag.specificationValue?.split('-')[1]
} else { } else {
this.specsInputVal = tag.specificationValue this.specsInputVal = tag.specificationValue
this.oldspecsInputVal = tag.specificationValue
} }
this.tempTag = tag.specificationValue this.tempTag = tag.specificationValue
this.isChange = true this.isChange = true
...@@ -1139,7 +1169,7 @@ export default { ...@@ -1139,7 +1169,7 @@ export default {
for (let i = 0; i < ranges.length; i++) { for (let i = 0; i < ranges.length; i++) {
const [rangeStart, rangeEnd] = ranges[i].map(Number) const [rangeStart, rangeEnd] = ranges[i].map(Number)
// 判断是否存在冲突 // 判断是否存在冲突
if (start <= rangeEnd && end >= rangeStart) { if (start < rangeEnd && end > rangeStart) {
return true return true
} }
} }
......
...@@ -40,10 +40,18 @@ ...@@ -40,10 +40,18 @@
label="年限" label="年限"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column prop="standardSalesCost" <el-table-column prop="price"
label="销售成本/元" label="适用车价/万元"
width="140" width="140"
align="center"> 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>
<el-table-column prop="serviceOverview" <el-table-column prop="serviceOverview"
width="210" width="210"
...@@ -81,6 +89,7 @@ ...@@ -81,6 +89,7 @@
<script> <script>
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { convertYuanToWan } from '../../filterOption'
export default { export default {
name: 'RelateServiceDialog', name: 'RelateServiceDialog',
data() { data() {
...@@ -90,7 +99,8 @@ export default { ...@@ -90,7 +99,8 @@ export default {
// 分页 // 分页
total: 0, total: 0,
currentPage: 1, currentPage: 1,
pageSize: 20 pageSize: 20,
convertYuanToWan
} }
}, },
...@@ -115,10 +125,15 @@ export default { ...@@ -115,10 +125,15 @@ export default {
mounted() { mounted() {
this.selectedData = deepClone(this.serviceSelected) this.selectedData = deepClone(this.serviceSelected)
// 若是历史服务项目数据不回显(历史已选服务项目没有适用车价)
this.selectedData = this.selectedData?.filter(val => !this.filterEmpty(val.serviceItemId))
this.getSelectingList() this.getSelectingList()
}, },
methods: { methods: {
filterEmpty(data) {
return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
},
selectable(row) { selectable(row) {
const { selectedData } = this const { selectedData } = this
// 每个服务项目code只能选中一个 按等级和年限区分 // 每个服务项目code只能选中一个 按等级和年限区分
...@@ -143,8 +158,8 @@ export default { ...@@ -143,8 +158,8 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
}).then(res => { }).then(res => {
res?.list?.forEach(val => { res?.list?.forEach(val => {
val.uniqueValue = `${val.serviceName}-${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.uniqueCode = `${val.serviceCode}-${val.serviceGrade}/${val.servicePeriod}${(val.serviceItemId) ? `/${val.serviceItemId}` : ''}`
}) })
this.selectingData = res.list this.selectingData = res.list
this.total = res.total this.total = res.total
......
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
<td v-if="(extendedPosiType.includes(goodsInfoData.goodsType) || equitySceneType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"> <td v-if="(extendedPosiType.includes(goodsInfoData.goodsType) || equitySceneType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)">
<el-input placeholder="请输入" <el-input placeholder="请输入"
size="small" size="small"
:disabled="goodsInfoData.scrmFlag == 'Y'" :disabled="true"
v-model="subItem.djCost" v-model="subItem.djCost"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.djCost) && subItem.djCostEmpty }" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.djCost) && subItem.djCostEmpty }"
@input="handlePrice($event, subIndex, 'djCost')"> @input="handlePrice($event, subIndex, 'djCost')">
...@@ -650,15 +650,37 @@ export default { ...@@ -650,15 +650,37 @@ export default {
this.serviceSelectIndex = index this.serviceSelectIndex = index
this.serviceItemsVisible = true 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) { handleRelateServiceConfirm(data) {
// 批量操作权益服务项目 // 批量操作权益服务项目
if (this.filterEmpty(this.serviceSelectIndex)) { if (this.filterEmpty(this.serviceSelectIndex)) {
this.goodsInfoData?.goodsSpecificationSingleList.map(v => { this.goodsInfoData?.goodsSpecificationSingleList.map(v => {
if (v.checked) { if (v.checked) {
v.serviceItemArr = data v.serviceItemArr = data
v.djCost = data.reduce((v, i) => { v.djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
return v + i.standardSalesCost
}, 0)
} }
return v return v
}) })
...@@ -666,13 +688,11 @@ export default { ...@@ -666,13 +688,11 @@ export default {
} }
const index = this.serviceSelectIndex const index = this.serviceSelectIndex
let djCost = 0 let djCost = 0
data.forEach(v => { // 嘀加成本通过已选服务项目的销售成本自动累计 // 嘀加成本通过已选服务项目的销售成本自动累计
djCost += v.standardSalesCost djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
})
if (!data?.length) djCost = '' if (!data?.length) djCost = ''
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], 'serviceItemArr', data) 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.serviceSelectIndex = null
this.serviceSelected = [] this.serviceSelected = []
this.serviceItemsVisible = false this.serviceItemsVisible = false
......
...@@ -34,6 +34,7 @@ import { addProductManage, UpdateProductManage } from '@api/productManage' ...@@ -34,6 +34,7 @@ import { addProductManage, UpdateProductManage } from '@api/productManage'
import { BaseData, applicableModelTypeList } from '@/common/constants.js' import { BaseData, applicableModelTypeList } from '@/common/constants.js'
import { getGoodsInfoById } from '@api/commodity' import { getGoodsInfoById } from '@api/commodity'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import { convertYuanToWan } from '../filterOption'
export default { export default {
name: 'EditProductManage', name: 'EditProductManage',
components: { components: {
...@@ -129,8 +130,8 @@ export default { ...@@ -129,8 +130,8 @@ export default {
let objData = {} let objData = {}
this.copyUpgradeGoodsList = deepClone(res.upgradeGoodsList).map((val, index) => { this.copyUpgradeGoodsList = deepClone(res.upgradeGoodsList).map((val, index) => {
val?.upgradeGoodsServiceItemsList?.forEach(v => { val?.upgradeGoodsServiceItemsList?.forEach(v => {
v.uniqueValue = `${v.serviceName}-${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.uniqueCode = `${v.serviceCode}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${v.serviceItemId}` : ''}`
}) })
return { return {
id: val.id, id: val.id,
...@@ -192,8 +193,8 @@ export default { ...@@ -192,8 +193,8 @@ export default {
goodsSpecificationSingleList: deepClone(this.copyUpgradeGoodsList), goodsSpecificationSingleList: deepClone(this.copyUpgradeGoodsList),
upgradeGoodsList: res.upgradeGoodsList?.map(val => { upgradeGoodsList: res.upgradeGoodsList?.map(val => {
val?.upgradeGoodsServiceItemsList?.map(v => { val?.upgradeGoodsServiceItemsList?.map(v => {
v.uniqueValue = `${v.serviceName}-${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.uniqueCode = `${v.serviceCode}-${v.serviceGrade}/${v.servicePeriod}${(v.serviceItemId) ? `/${v.serviceItemId}` : ''}`
return v return v
}) })
return val return val
...@@ -274,7 +275,10 @@ export default { ...@@ -274,7 +275,10 @@ export default {
serviceName: val.serviceName, serviceName: val.serviceName,
serviceGrade: val.serviceGrade, serviceGrade: val.serviceGrade,
servicePeriod: val.servicePeriod, servicePeriod: val.servicePeriod,
standardSalesCost: val.standardSalesCost djCost: val.djCost,
serviceItemId: val.serviceItemId,
minPrice: val.minPrice,
maxPrice: val.maxPrice
}) })
}) })
arr.push({ arr.push({
...@@ -330,7 +334,10 @@ export default { ...@@ -330,7 +334,10 @@ export default {
serviceName: val.serviceName, serviceName: val.serviceName,
serviceGrade: val.serviceGrade, serviceGrade: val.serviceGrade,
servicePeriod: val.servicePeriod, servicePeriod: val.servicePeriod,
standardSalesCost: val.standardSalesCost djCost: val.djCost,
serviceItemId: val.serviceItemId,
minPrice: val.minPrice,
maxPrice: val.maxPrice
}) })
}) })
if (item.statusFlag != 2) { if (item.statusFlag != 2) {
......
...@@ -203,7 +203,7 @@ import { mapActions } from "vuex" ...@@ -203,7 +203,7 @@ import { mapActions } from "vuex"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import selectGoodsDialog from "../../../components/selectGoodsDialog.vue" import selectGoodsDialog from "../../../components/selectGoodsDialog.vue"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { filterSpecsStr } from "../../../filterOption" import { filterSpecsStr, convertYuanToWan } from "../../../filterOption"
import { businessLineOpt } from "@/common/constants.js" import { businessLineOpt } from "@/common/constants.js"
import { computeProductProfitDetail } from "@api/shelfManage" import { computeProductProfitDetail } from "@api/shelfManage"
export default { export default {
...@@ -342,7 +342,7 @@ export default { ...@@ -342,7 +342,7 @@ export default {
tempGoodsTypeName: result, tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => { ?.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(","), // 服务项目 ?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods), specificationData: this.filterSpecsStr(_formData.upgradeGoods),
...@@ -403,7 +403,7 @@ export default { ...@@ -403,7 +403,7 @@ export default {
tempGoodsTypeName: result, tempGoodsTypeName: result,
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList
?.map((item) => { ?.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(","), // 服务项目 ?.join(","), // 服务项目
// positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
......
...@@ -324,7 +324,7 @@ import { mapActions } from "vuex" ...@@ -324,7 +324,7 @@ import { mapActions } from "vuex"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import selectGoodsDialog from "../../../components/selectGoodsDialog.vue" import selectGoodsDialog from "../../../components/selectGoodsDialog.vue"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { filterSpecsStr } from "../../../filterOption" import { filterSpecsStr, convertYuanToWan } from "../../../filterOption"
import { computeProductProfitDetail } from "@api/shelfManage" import { computeProductProfitDetail } from "@api/shelfManage"
export default { export default {
name: "PackageTab", name: "PackageTab",
...@@ -559,7 +559,7 @@ export default { ...@@ -559,7 +559,7 @@ export default {
tempGoodsTypeName: result, tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => { ?.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(","), // 服务项目 ?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods), specificationData: this.filterSpecsStr(_formData.upgradeGoods),
...@@ -720,7 +720,7 @@ export default { ...@@ -720,7 +720,7 @@ export default {
tempGoodsTypeName: result, tempGoodsTypeName: result,
serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList
?.map((item) => { ?.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(","), // 服务项目 ?.join(","), // 服务项目
// positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
......
...@@ -195,7 +195,7 @@ import { deepClone } from "@/common/util" ...@@ -195,7 +195,7 @@ import { deepClone } from "@/common/util"
import { mapActions } from "vuex" import { mapActions } from "vuex"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { filterSpecsStr } from "@/views/goods/filterOption" import { filterSpecsStr, convertYuanToWan } from "@/views/goods/filterOption"
import { businessLineOpt } from "@/common/constants.js" import { businessLineOpt } from "@/common/constants.js"
export default { export default {
name: "GoodTab", name: "GoodTab",
...@@ -317,7 +317,7 @@ export default { ...@@ -317,7 +317,7 @@ export default {
tempGoodsTypeName: result, tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => { ?.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(","), // 服务项目 ?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods), specificationData: this.filterSpecsStr(_formData.upgradeGoods),
......
...@@ -311,7 +311,7 @@ import { businessNature, businessLineOpt } from "@/common/constants.js" ...@@ -311,7 +311,7 @@ import { businessNature, businessLineOpt } from "@/common/constants.js"
import { mapActions } from "vuex" import { mapActions } from "vuex"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { filterSpecsStr } from "@/views/goods/filterOption" import { filterSpecsStr, convertYuanToWan } from "@/views/goods/filterOption"
export default { export default {
name: "PackageTab", name: "PackageTab",
...@@ -442,7 +442,7 @@ export default { ...@@ -442,7 +442,7 @@ export default {
tempGoodsTypeName: result, tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => { ?.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(","), // 服务项目 ?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods), specificationData: this.filterSpecsStr(_formData.upgradeGoods),
......
...@@ -125,6 +125,7 @@ const isSelect = [ ...@@ -125,6 +125,7 @@ const isSelect = [
{ label: "近两个月出单", value: 1 }, { label: "近两个月出单", value: 1 },
{ label: "近三个月出单", value: 2 } { label: "近三个月出单", value: 2 }
] ]
export default { export default {
components: { components: {
carDialog carDialog
...@@ -134,6 +135,7 @@ export default { ...@@ -134,6 +135,7 @@ export default {
return { return {
sceneList, sceneList,
searchForm: { searchForm: {
showAllStaff:'',
staffType: 0, staffType: 0,
brandIdList: [this.baseConfig.brandId], brandIdList: [this.baseConfig.brandId],
sceneType: "0", sceneType: "0",
...@@ -205,6 +207,17 @@ export default { ...@@ -205,6 +207,17 @@ export default {
optionId: "id", optionId: "id",
optionLabel: "label", optionLabel: "label",
optionsName: "secondBrandIdList" optionsName: "secondBrandIdList"
},
{
label: "是否展示所有员工",
name: "showAllStaff",
type: "select",
optionList: [
{ label: "否", value: 0 },
{ label: "是", value: 1 }
],
optionId: "value",
optionLabel: "label"
} }
], ],
tableData: [], tableData: [],
...@@ -672,8 +685,8 @@ export default { ...@@ -672,8 +685,8 @@ export default {
// 第4列(员工姓名列)根据 staffUuid 进行合并 // 第4列(员工姓名列)根据 staffUuid 进行合并
const columnNum = this.searchForm.sceneType == "0" ? 7 : 6 const columnNum = this.searchForm.sceneType == "0" ? 7 : 6
if (columnIndex === 3 || columnIndex > columnNum) { if (columnIndex === 3 || columnIndex > columnNum) {
console.log(rowIndex, row.staffUuid) // console.log(rowIndex, row.staffUuid)
console.log(row, column, rowIndex, columnIndex) // console.log(row, column, rowIndex, columnIndex)
let rowspan = 1 let rowspan = 1
for (let i = rowIndex + 1; i < this.tableData.length; i++) { for (let i = rowIndex + 1; i < this.tableData.length; i++) {
...@@ -858,6 +871,7 @@ export default { ...@@ -858,6 +871,7 @@ export default {
this.getList() this.getList()
}, },
handleReset() { handleReset() {
this.searchForm.showAllStaff=''
this.searchForm.staffType = 0 this.searchForm.staffType = 0
this.searchForm.brandIdList = [this.baseConfig.brandId] this.searchForm.brandIdList = [this.baseConfig.brandId]
this.searchForm.merchantNameList = [] this.searchForm.merchantNameList = []
......
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
id: { id: {
type: Number, type: Number,
default: "" default: ""
} },
}, },
computed: { computed: {
dialogShow: { dialogShow: {
...@@ -328,9 +328,11 @@ export default { ...@@ -328,9 +328,11 @@ export default {
}) })
}, },
getOrderOperateData() { getOrderOperateData() {
let params = { let params = { operationType: 1}
orderCode: this.detailInfo.orderCode, if(this.detailInfo.status=='已失效'){
operationType: 1 params.id=this.id
}else{
params.orderCode=this.detailInfo.orderCode
} }
getOperationRecord(params).then((res) => { getOperationRecord(params).then((res) => {
console.log(res) console.log(res)
......
<template> <template>
<d2-container class="point-list"> <d2-container class="point-list">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'" <d2-search
:form-data="showFormData" /> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -13,21 +18,37 @@ ...@@ -13,21 +18,37 @@
<div class="d2-container-content"> <div class="d2-container-content">
<div class="header-flex"> <div class="header-flex">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index"> <el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index"
>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div> <div>
<span style="margin-right: 10px"><auth-button category="Button" :show-btn-ids="['9140105']" /></span> <span style="margin-right: 10px"
><auth-button category="Button" :show-btn-ids="['9140105']"
/></span>
<auth-button category="Button" :show-btn-ids="['9140103']" /> <auth-button category="Button" :show-btn-ids="['9140103']" />
</div> </div>
</div> </div>
<d2-table v-if="show" ref="pointTable" :search-form="searchFormSearch" :table-params="tableParams" <d2-table
:get-list-api="getListApi" :before-search-fn="beforeSearchFn"> v-if="show"
ref="pointTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<div slot="statusSlot" slot-scope="scope"> <div slot="statusSlot" slot-scope="scope">
<span :style="{ <span
:style="{
'background-color': statusEnum[scope.scope.status].color 'background-color': statusEnum[scope.scope.status].color
}" class="circle"></span> }"
class="circle"
></span>
<span>{{ statusEnum[scope.scope.status].name }}</span> <span>{{ statusEnum[scope.scope.status].name }}</span>
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
...@@ -37,22 +58,48 @@ ...@@ -37,22 +58,48 @@
</span> </span>
<!-- 审核 --> <!-- 审核 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9140101']" <auth-button
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1" /> :data="scope.scope"
<auth-button v-if=" :show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/>
<auth-button
v-if="
scope.scope.status == 1 && scope.scope.status == 1 &&
scope.scope.pointsRefundAvailable == 'Y' scope.scope.pointsRefundAvailable == 'Y'
" :data="scope.scope" :show-btn-ids="['9140104']" /> "
:data="scope.scope"
:show-btn-ids="['9140104']"
/>
</span> </span>
</div> </div>
</d2-table> </d2-table>
<!-- 详细信息 --> <!-- 详细信息 -->
<detail-dialog :visible.sync="detailVisible" v-if="detailVisible" :id="id" /> <detail-dialog
<d2-dialog title="提示" class="refund-dialog" v-if="refundVisible" :is-visible="refundVisible" :visible.sync="detailVisible"
@closeDialog="handleRefundClose" @confirmDialog="handleRefundConfirm"> v-if="detailVisible"
:id="id"
/>
<d2-dialog
title="提示"
class="refund-dialog"
v-if="refundVisible"
:is-visible="refundVisible"
@closeDialog="handleRefundClose"
@confirmDialog="handleRefundConfirm"
>
<div class="title">请确定此次退款的类型</div> <div class="title">请确定此次退款的类型</div>
<glsx-combi-form :isBlock="true" ref="refundFormRef" label-width="220px" :form-ref="handleFormRef" <glsx-combi-form
default-width="400px" :form-rules="formRules" :form-obj="refundForm" :form-data="refundFormData"> :isBlock="true"
ref="refundFormRef"
label-width="220px"
:form-ref="handleFormRef"
default-width="400px"
:form-rules="formRules"
:form-obj="refundForm"
:form-data="refundFormData"
>
</glsx-combi-form> </glsx-combi-form>
</d2-dialog> </d2-dialog>
</div> </div>
...@@ -81,7 +128,6 @@ export default { ...@@ -81,7 +128,6 @@ export default {
}, },
data() { data() {
var checkIntegral = (rule, value, callback) => { var checkIntegral = (rule, value, callback) => {
console.log(this.refundForm.remainingScore, 'this.refundForm.remainingScore')
if (!value) { if (!value) {
return callback(new Error("请输入退回积分")) return callback(new Error("请输入退回积分"))
} }
...@@ -91,26 +137,35 @@ export default { ...@@ -91,26 +137,35 @@ export default {
//第一次退款积分 //第一次退款积分
if (this.refundForm.firstInto) { if (this.refundForm.firstInto) {
if ( if (
value > this.refundForm.remainingScore && this.refundForm.refundType == 1 value > this.refundForm.remainingScore &&
this.refundForm.refundType == 1
) { ) {
callback(new Error("输入的积分超过当前订单最大积分")) callback(new Error("输入的积分超过当前订单最大积分"))
} else if ( } else if (
value >= this.refundForm.remainingScore && this.refundForm.refundType == 2 value >= this.refundForm.remainingScore &&
this.refundForm.refundType == 2
) { ) {
callback(new Error("输入的积分超过当前订单最大积分")) callback(new Error("输入的积分超过当前订单最大积分"))
} else { } else {
callback() callback()
} }
} else { } else {
if ( if (value > this.refundForm.remainingScore) {
value > this.refundForm.remainingScore
) {
callback(new Error("输入的积分超过当前订单最大积分")) callback(new Error("输入的积分超过当前订单最大积分"))
} else { } else {
callback() callback()
} }
} }
}
}
var checkAmount = (rule, value, callback) => {
if (!value) {
return callback(new Error("请输入退回金额"))
}
if (isNaN(value) || value <= 0) {
callback(new Error("输入大于0的数字"))
} else {
callback()
} }
} }
return { return {
...@@ -289,13 +344,15 @@ export default { ...@@ -289,13 +344,15 @@ export default {
orderCode: "", orderCode: "",
refundType: "", refundType: "",
refundPoints: "", refundPoints: "",
firstInto: true firstInto: true,
refundAmount:''
}, },
formRules: { formRules: {
refundType: [ refundType: [
{ required: true, message: "请选择退款类型", trigger: "change" } { required: true, message: "请选择退款类型", trigger: "change" }
], ],
refundPoints: [{ validator: checkIntegral, trigger: "blur" }] refundPoints: [{ validator: checkIntegral, trigger: "blur" }],
refundAmount: [{ validator: checkAmount, trigger: "blur" }]
}, },
refundFormData: [ refundFormData: [
{ {
...@@ -320,6 +377,13 @@ export default { ...@@ -320,6 +377,13 @@ export default {
type: "input", type: "input",
width: "290px", width: "290px",
isDisabled: false isDisabled: false
},
{
label: "退回金额",
name: "refundAmount",
type: "input",
width: "290px",
isDisabled: false
} }
] ]
} }
...@@ -589,7 +653,8 @@ export default { ...@@ -589,7 +653,8 @@ export default {
this.refundVisible = true this.refundVisible = true
this.refundForm.orderCode = data.orderCode this.refundForm.orderCode = data.orderCode
this.refundForm.tempPoints = data.integralIncome this.refundForm.tempPoints = data.integralIncome
this.refundForm.refundPoints = data.integralIncome this.refundForm.refundPoints = data.integralIncome //退还积分
this.refundForm.refundAmount = data.orderMoney //退还金额
//当前积分能抵扣的最大值 //当前积分能抵扣的最大值
this.getScore() this.getScore()
}, },
...@@ -599,16 +664,18 @@ export default { ...@@ -599,16 +664,18 @@ export default {
}).then((res) => { }).then((res) => {
this.refundForm.integralIncome = res.addScore this.refundForm.integralIncome = res.addScore
//最大积分 //最大积分
if (this.refundForm.refundPoints == this.refundForm.integralIncome) { if (this.refundForm.refundPoints == res.addScore) {
this.refundForm.remainingScore = res.remainingScore this.refundForm.remainingScore = res.remainingScore //剩余积分
// this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = true this.refundForm.firstInto = true
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退), this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundFormData[0].optionList[0].isDisabled = false this.refundFormData[this.findAttrIdx("refundType")].optionList[0].isDisabled = false
} else { } else {
this.refundForm.remainingScore = res.remainingScore this.refundForm.remainingScore = res.remainingScore
// this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = false this.refundForm.firstInto = false
this.refundForm.refundType = 2 this.refundForm.refundType = 2
this.refundFormData[0].optionList[0].isDisabled = true this.refundFormData[this.findAttrIdx("refundType")].optionList[0].isDisabled = true
} }
this.updateDisable() this.updateDisable()
}) })
...@@ -618,10 +685,13 @@ export default { ...@@ -618,10 +685,13 @@ export default {
if (this.refundForm.refundType == 1) { if (this.refundForm.refundType == 1) {
this.refundForm.refundPoints = this.refundForm.tempPoints this.refundForm.refundPoints = this.refundForm.tempPoints
} }
this.refundFormData[this.findAttrIdx("refundPoints")].isDisabled = disabled
this.refundFormData[1].isDisabled = disabled this.refundFormData[this.findAttrIdx("refundAmount")].isDisabled = disabled
this.refundFormData = deepClone(this.refundFormData) this.refundFormData = deepClone(this.refundFormData)
}, },
findAttrIdx(attrName) {
return this.refundFormData.findIndex((item) => item.name == attrName)
},
//关闭标记退款 //关闭标记退款
handleRefundClose() { handleRefundClose() {
this.refundVisible = false this.refundVisible = false
...@@ -634,7 +704,8 @@ export default { ...@@ -634,7 +704,8 @@ export default {
markAsRefunded({ markAsRefunded({
orderCode: this.refundForm.orderCode, orderCode: this.refundForm.orderCode,
refundType: this.refundForm.refundType, refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints refundPoints: this.refundForm.refundPoints,
refundAmount:this.refundForm.refundAmount
}).then((res) => { }).then((res) => {
if (res) { if (res) {
this.$message.success("退款成功!") this.$message.success("退款成功!")
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
> >
<el-radio :label="1">分值</el-radio> <el-radio :label="1">分值</el-radio>
<el-radio :label="2">排名</el-radio> <el-radio :label="2">排名</el-radio>
<el-radio :label="3">满勤</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div slot="ratingRankHtml" slot-scope="scope"> <div slot="ratingRankHtml" slot-scope="scope">
...@@ -363,9 +364,11 @@ export default { ...@@ -363,9 +364,11 @@ export default {
this.showOrHideAttr("editFormData", "评级项目", false) this.showOrHideAttr("editFormData", "评级项目", false)
this.showOrHideAttr("editFormData", "评级方式", false) this.showOrHideAttr("editFormData", "评级方式", false)
this.pointRule() this.pointRule()
// if (this.infoForm.ratingMethod == 1) { if (this.infoForm.ratingMethod == 1) {
// this.showOrHideAttr('editFormData', '评级积分', false) this.showOrHideAttr('editFormData', '评级积分', false)
// } } else if (this.infoForm.ratingMethod == 2) {
this.showOrHideAttr('editFormData', '评级排名', false)
}
} else if (this.infoForm.levelType == 1) { } else if (this.infoForm.levelType == 1) {
this.showOrHideAttr("editFormData", "评级积分", false) this.showOrHideAttr("editFormData", "评级积分", false)
} }
...@@ -446,9 +449,12 @@ export default { ...@@ -446,9 +449,12 @@ export default {
if (value == 1) { if (value == 1) {
this.showOrHideAttr("editFormData", "评级积分", false) this.showOrHideAttr("editFormData", "评级积分", false)
this.showOrHideAttr("editFormData", "评级排名", true) this.showOrHideAttr("editFormData", "评级排名", true)
} else { } else if (value == 2) {
this.showOrHideAttr("editFormData", "评级积分", true) this.showOrHideAttr("editFormData", "评级积分", true)
this.showOrHideAttr("editFormData", "评级排名", false) this.showOrHideAttr("editFormData", "评级排名", false)
} else if (value == 3) {
this.showOrHideAttr("editFormData", "评级积分", true)
this.showOrHideAttr("editFormData", "评级排名", true)
} }
}, },
......
...@@ -6,12 +6,15 @@ ...@@ -6,12 +6,15 @@
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="积分记录" <el-tab-pane label="积分记录"
name="pointsRecord" /> name="pointsRecord" />
<el-tab-pane label="月度统计记录"
name="monthlyStatistics" />
<el-tab-pane label="积分配置管理" <el-tab-pane label="积分配置管理"
name="pointsConfig" /> name="pointsConfig" />
</el-tabs> </el-tabs>
<div> <div>
<points-record v-if="activeName === 'pointsRecord'" /> <points-record v-if="activeName === 'pointsRecord'" />
<points-config v-if="activeName === 'pointsConfig'" /> <points-config v-if="activeName === 'pointsConfig'" />
<monthly-statistics v-if="activeName === 'monthlyStatistics'" />
</div> </div>
</div> </div>
</div> </div>
...@@ -20,6 +23,7 @@ ...@@ -20,6 +23,7 @@
<script> <script>
import pointsRecord from './pointsRecord' import pointsRecord from './pointsRecord'
import pointsConfig from './pointsConfig' import pointsConfig from './pointsConfig'
import monthlyStatistics from './monthlyStatistics'
// import { deepClone } from '@/common/util' // import { deepClone } from '@/common/util'
export default { export default {
name: 'StaffIndex', name: 'StaffIndex',
...@@ -33,7 +37,8 @@ export default { ...@@ -33,7 +37,8 @@ export default {
components: { components: {
pointsRecord, pointsRecord,
pointsConfig pointsConfig,
monthlyStatistics
}, },
mounted() { mounted() {
......
<!-- 月度统计记录 -->
<template>
<d2-container class="points-config">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button @click="handleExport">导出 </el-button>
</d2-table-header>
<d2-table ref="detailListTable"
:search-form="searchData"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</d2-container>
</template>
<script>
import { Util, deepClone, downLoadFile } from '@/common/util'
import { brandList, yqMerchantList, query4SRefByYqShop, monthlyStatistisc, monthlyStatistiscExport} from '@api/inStorePoints'
export default {
name: 'PointsConfig',
props: {
},
data() {
return {
searchForm: {
grantTime: ''
},
searchData: {},
showFormData: [
{
label: '员工姓名',
name: 'staffName',
type: 'input',
isClear: true,
},
{
label: '电话号码',
name: 'staffPhone',
type: 'input',
isClear: true,
},
{
label: '服务门店',
name: 'serviceMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'serviceMerchantList'
},
{
label: '门店品牌',
name: 'brandId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'id',
optionLabel: 'label',
optionsName: 'brandList'
},
{
label: '归属商户',
name: 'yqMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'id',
optionLabel: 'merchantName',
optionsName: 'merchantList'
},
{
label: "发放时间",
name: "grantTime",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions"
}],
getListApi: monthlyStatistisc,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
// tableOption: { width: '150px' },
tableColumns: [
{
label: '员工姓名',
prop: 'staffName'
}, {
label: '电话号码',
prop: 'staffPhone'
}, {
label: '服务门店',
prop: "serviceMerchantName"
}, {
label: '门店品牌',
prop: 'merchantBrand'
}, {
label: '角色',
prop: 'roleName'
}, {
label: '归属商户',
prop: 'yqMerchantName'
}, {
label: '培训类',
prop: 'trainingScore'
}, {
label: '学习类',
prop: 'studyScore'
}, {
label: '行为类',
prop: 'studyScore'
}, {
label: '总积分',
prop: 'totalScore'
}, {
label: '发放时间',
prop: 'grantTimeRange',
width: '150',
// formatter: (cellValue) => {
// return Util.dateFormate(cellValue.grantTimeRange, 'YYYY-MM-DD HH:mm:ss')
// }
}
]
},
baseData: {
serviceMerchantList: [],
brandList: [],
merchantList: []
},
}
},
created() {
this.searchForm.grantTime = [new Date(), new Date()]
},
mounted() {
this.getBaseData()
},
methods: {
async getBaseData() {
this.findAllServiceMerchant()
this.findAllBrandList()
this.findAllMerchantList()
},
beforeSearchFn() {
return new Promise(resolve => {
console.log('this.searchForm', this.searchForm)
this.searchData = deepClone(this.searchForm)
if(this.searchData.brandId) {
this.searchData.brandIdList = [this.searchForm.brandId]
delete this.searchData.brandId
}
if (this.searchData.grantTime) {
this.searchData.grantTimeStart = Util.dateFormate(this.searchData.grantTime[0], 'YYYY-MM-DD') + ' 00:00:00'
this.searchData.grantTimeEnd = Util.dateFormate(this.searchData.grantTime[1], 'YYYY-MM-DD') + ' 23:59:59'
delete this.searchData.grantTime
}
resolve()
})
},
findAllServiceMerchant() {
query4SRefByYqShop().then((res) => {
this.baseData.serviceMerchantList = res
this.getOptionsList()
})
},
findAllBrandList(id) {
brandList().then((res) => {
this.baseData.brandList = res || []
this.getOptionsList()
})
},
findAllMerchantList() {
yqMerchantList().then(res => {
this.baseData.merchantList = res || []
this.getOptionsList()
})
},
handleReset() {
this.searchForm = {
grantTime: [new Date(), new Date()]
}
this.searchData = {}
this.$refs.detailListTable.refreshTable()
},
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]
)
}
})
},
handleExport() {
var params = this.searchForm
monthlyStatistiscExport(params).then((res) => {
res && downLoadFile(res)
})
}
}
}
</script>
<style lang="scss" scoped>
.points-config {
margin-top: 40px;
.m-l-md {
margin-left: 20px;
}
}
</style>
<template>
<d2-dialog
title="预警设置"
:is-visible="warningVisible"
class="warningDailog"
width="750px"
btn-ok-label="确定"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm"
>
<p class="title">延保</p>
<glsx-combi-form
label-width="150px"
default-width="400px"
:form-obj="warningForm"
:form-data="warningFormData"
></glsx-combi-form>
<p class="title">权益</p>
<glsx-combi-form
label-width="150px"
default-width="400px"
:form-obj="warningForm"
:form-data="warningFormData2"
></glsx-combi-form>
<div class="explain">
说明:设置业务兜底指标,按每月进行实时监测,一旦低于设置的指标+3%时,系统自动进行预警。
</div>
</d2-dialog>
</template>
<script>
import { limitPrice } from "@/common/format"
import {
saveOrUpdateWarningConfig,
findWarningConfig
} from "@/api/shopConfig.js"
export default {
data() {
return {
warningForm: {
id: "",
merchantNo: "",
ewConRate: "", //延保转化率
ewAxbConRate: "", //延保安心包转化率
ewLtConRate: "", //延保轮胎转化率
riConRate: "" //权益转化率
},
oldVal: {
ewConRate: "", //延保转化率
ewAxbConRate: "", //延保安心包转化率
ewLtConRate: "", //延保轮胎转化率
riConRate: "" //权益转化率
},
warningFormData: [
{
label: "转化率",
name: "ewConRate",
type: "input",
append: "%",
listeners: {
blur: () => {
this.handleInput(this.warningForm.ewConRate, "ewConRate")
}
}
},
{
label: "安心包转化率",
name: "ewAxbConRate",
type: "input",
append: "%",
listeners: {
blur: () => {
this.handleInput(this.warningForm.ewAxbConRate, "ewAxbConRate")
}
}
},
{
label: "轮胎转化率",
name: "ewLtConRate",
type: "input",
append: "%",
listeners: {
blur: (e) => {
this.handleInput(this.warningForm.ewLtConRate, "ewLtConRate")
}
}
}
],
warningFormData2: [
{
label: "转化率",
name: "riConRate",
type: "input",
append: "%",
listeners: {
blur: (e) => {
this.handleInput(this.warningForm.riConRate, "riConRate")
}
}
}
]
}
},
props: {
warningVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: ()=>{}
}
},
watch: {
warningVisible(val) {
if (val) {
this.getData()
}
}
},
mounted() {
this.getData()
},
methods: {
async getData() {
console.log(this.info)
const details =await findWarningConfig({
merchantNo: this.info.merchantId
})
console.log(details,'999')
if (details) {
this.warningForm = details
}
},
handleInput(newVal, name) {
newVal = newVal.replace(/[^\d.]/g, "") // 清除“数字”和“.”以外的字符
this.warningForm[name] = limitPrice(
newVal,
this.oldVal[name],
3,
2,
0,
100
)
this.oldVal[name] = this.warningForm[name]
},
async handleAddConfirm() {
try {
let params = {
id: this.warningForm.id,
merchantNo: this.warningForm.merchantNo,
ewConRate: this.warningForm.ewConRate,
ewAxbConRate: this.warningForm.ewAxbConRate,
ewLtConRate: this.warningForm.ewLtConRate,
riConRate: this.warningForm.riConRate
}
const res = await saveOrUpdateWarningConfig(params)
if (res) {
this.$message.success("保存成功")
this.warningVisible = false
this.$emit("confirmWarnDialog")
}
} catch (error) {
this.$message.error(error)
}
},
handleClose() {
this.$emit("closeWarnDialog")
}
}
}
</script>
<style scoped lang="scss">
.warningDailog {
.title {
color: #292d33;
font-size: 15px;
font-weight: bold;
}
.explain {
color: #999ea8;
font-size: 14px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -33,41 +33,46 @@ ...@@ -33,41 +33,46 @@
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" <auth-button slot="auth-button"
slot-scope="scope" slot-scope="scope"
:show-btn-ids="['9061903', '9061904', '9061906', '9061908', '9061910', '9061912', '9061914']" :show-btn-ids="['9061903', '9061904', '9061906', '9061908', '9061910', '9061912', '9061914','9061927']"
:data="scope.scope" /> :data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
<!-- 导入门店设置 --> <!-- 导入门店设置 -->
<d2-dialog :title="'上传文件'" <d2-dialog
:title="'上传文件'"
:is-visible="fileVisible" :is-visible="fileVisible"
@closeDialog="handleImport" @closeDialog="handleImport"
@confirmDialog="handleConfirmImport" @confirmDialog="handleConfirmImport"
width="600px"> width="600px"
>
<slot> <slot>
<div> <div>
<el-form :model="fileForm" <el-form
:model="fileForm"
:rules="fileRules" :rules="fileRules"
ref="fileRuleForm" ref="fileRuleForm"
label-width="120px"> label-width="120px"
<el-form-item label="导入文件:" >
prop="fileName"> <el-form-item label="导入文件:" prop="fileName">
<el-col :span="16"> <el-col :span="16">
<el-input readonly <el-input readonly v-model="fileForm.fileName" />
v-model="fileForm.fileName" />
</el-col> </el-col>
<el-col :span="4" <el-col :span="4" class="m-l-md">
class="m-l-md">
<el-button class="import-btn"> <el-button class="import-btn">
导入文件 导入文件
<input type="file" <input
type="file"
id="fileUpload" id="fileUpload"
class="import-input" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" /> @change="importFile($event)"
<el-link type="primary" />
<el-link
type="primary"
class="import-template" class="import-template"
@click="downLoadTemplate" @click="downLoadTemplate"
icon="el-icon-link"> icon="el-icon-link"
>
文件下载 文件下载
</el-link> </el-link>
</el-button> </el-button>
...@@ -96,34 +101,50 @@ ...@@ -96,34 +101,50 @@
</d2-dialog> </d2-dialog>
<!-- 收款码 --> <!-- 收款码 -->
<qrcode-dialog :q-rcode-visible="qRcodeVisible" <qrcode-dialog
:q-rcode-visible="qRcodeVisible"
:info="recordInfo" :info="recordInfo"
v-if="qRcodeVisible" v-if="qRcodeVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose"
<employee-dialog :employee-visible="employeeVisible" />
<employee-dialog
:employee-visible="employeeVisible"
:info="recordInfo" :info="recordInfo"
v-if="employeeVisible" v-if="employeeVisible"
@dialogClose="employeeDialogClose" /> @dialogClose="employeeDialogClose"
/>
<!-- 门店标签 --> <!-- 门店标签 -->
<flag-dialog :flag-visible="flagVisible" <flag-dialog
:flag-visible="flagVisible"
:info="recordInfo" :info="recordInfo"
v-if="flagVisible" v-if="flagVisible"
@dialogClose="flagDialogClose" /> @dialogClose="flagDialogClose"
/>
<d2-dialog title="阳光激励配置" <d2-dialog
title="阳光激励配置"
v-if="signVisible" v-if="signVisible"
:is-visible="signVisible" :is-visible="signVisible"
@closeDialog="handleSignClose" @closeDialog="handleSignClose"
@confirmDialog="handleConfirmSign"> @confirmDialog="handleConfirmSign"
<glsx-combi-form :is-block="true" >
<glsx-combi-form
:isBlock="true"
class="edit-form-container" class="edit-form-container"
ref="editFormRef" ref="editFormRef"
label-width="220px" label-width="220px"
default-width="400px" default-width="400px"
:form-obj="integralForm" :form-obj="integralForm"
:form-data="integralFormData"> :form-data="integralFormData"
>
</glsx-combi-form> </glsx-combi-form>
</d2-dialog> </d2-dialog>
<!-- 预警设置 -->
<warning-set
:warning-visible="warningVisible"
:info="recordInfo"
@closeWarnDialog="closeWarnDialog"
@confirmWarnDialog="confirmWarnDialog"
></warning-set>
</d2-container> </d2-container>
<!-- </div> --> <!-- </div> -->
</template> </template>
...@@ -149,12 +170,14 @@ import { businessNature, storeType } from "@/common/constants.js" ...@@ -149,12 +170,14 @@ import { businessNature, storeType } from "@/common/constants.js"
import qrcodeDialog from "./components/qRcodeDialog" import qrcodeDialog from "./components/qRcodeDialog"
import employeeDialog from "./components/employeeDialog" import employeeDialog from "./components/employeeDialog"
import flagDialog from "./components/flagDialog" import flagDialog from "./components/flagDialog"
import warningSet from "./components/warningSet"
export default { export default {
name: "ShopConfigIndex", name: "ShopConfigIndex",
components: { components: {
qrcodeDialog, qrcodeDialog,
flagDialog, flagDialog,
employeeDialog employeeDialog,
warningSet
}, },
data() { data() {
return { return {
...@@ -234,7 +257,7 @@ export default { ...@@ -234,7 +257,7 @@ export default {
optionId: "id", optionId: "id",
optionLabel: "label", optionLabel: "label",
optionsName: "brandList", optionsName: "brandList",
changeAttr: (value, targetItem) => { } changeAttr: (value, targetItem) => {}
} }
], ],
getListApi: shopSettingList, getListApi: shopSettingList,
...@@ -283,7 +306,7 @@ export default { ...@@ -283,7 +306,7 @@ export default {
prop: "areaSupervisionList", prop: "areaSupervisionList",
width: "200px", width: "200px",
formatter: (cellValue) => { formatter: (cellValue) => {
const areaSuper = let areaSuper =
cellValue.areaSupervisionList && cellValue.areaSupervisionList &&
cellValue.areaSupervisionList.length cellValue.areaSupervisionList.length
? cellValue.areaSupervisionList ? cellValue.areaSupervisionList
...@@ -349,6 +372,7 @@ export default { ...@@ -349,6 +372,7 @@ export default {
fileVisible: false, fileVisible: false,
signVisible: false, signVisible: false,
showNum: false, showNum: false,
warningVisible: false,
importNum: { importNum: {
succNum: 0, succNum: 0,
failNum: 0 failNum: 0
...@@ -382,8 +406,7 @@ export default { ...@@ -382,8 +406,7 @@ export default {
{ confId: "Y", confName: "开" }, { confId: "Y", confName: "开" },
{ confId: "N", confName: "关" } { confId: "N", confName: "关" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
}, },
{ {
label: "门店积分归属", label: "门店积分归属",
...@@ -396,9 +419,7 @@ export default { ...@@ -396,9 +419,7 @@ export default {
{ confId: 0, confName: "门店员工" }, { confId: 0, confName: "门店员工" },
{ confId: 1, confName: "驻店员工" } { confId: 1, confName: "驻店员工" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
}, },
{ {
label: "门店积分支持微信提现功能", label: "门店积分支持微信提现功能",
...@@ -411,9 +432,7 @@ export default { ...@@ -411,9 +432,7 @@ export default {
{ confId: "Y", confName: "开" }, { confId: "Y", confName: "开" },
{ confId: "N", confName: "关" } { confId: "N", confName: "关" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
}, },
{ {
label: "门店订单审批功能", label: "门店订单审批功能",
...@@ -426,9 +445,7 @@ export default { ...@@ -426,9 +445,7 @@ export default {
{ confId: "Y", confName: "开" }, { confId: "Y", confName: "开" },
{ confId: "N", confName: "关" } { confId: "N", confName: "关" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
} }
] ]
} }
...@@ -464,12 +481,12 @@ export default { ...@@ -464,12 +481,12 @@ export default {
async getBaseData() { async getBaseData() {
this.getOptionsList() this.getOptionsList()
}, },
// 员工注册码 //员工注册码
employeeRegistrationCode(row) { employeeRegistrationCode(row) {
this.recordInfo = row this.recordInfo = row
this.employeeVisible = !this.employeeVisible this.employeeVisible = !this.employeeVisible
}, },
// 获取店铺阳光激励积分配置 //获取店铺阳光激励积分配置
markRefundHandle(row) { markRefundHandle(row) {
try { try {
getShopMerchantConfig({ merchantId: row.merchantId }).then((res) => { getShopMerchantConfig({ merchantId: row.merchantId }).then((res) => {
...@@ -495,6 +512,19 @@ export default { ...@@ -495,6 +512,19 @@ export default {
return new Error(err) return new Error(err)
} }
}, },
//预警设置
warningHandle(row) {
console.log(row)
this.recordInfo = row
this.warningVisible = true
},
confirmWarnDialog() {
this.warningVisible = false
this.handleSearch()
},
closeWarnDialog() {
this.warningVisible = false
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -515,7 +545,7 @@ export default { ...@@ -515,7 +545,7 @@ export default {
// 积分归属 // 积分归属
setPointsAttribution(row) { setPointsAttribution(row) {
const params = { merchantId: row.merchantId } let params = { merchantId: row.merchantId }
this.pointSetObj.merchantId = row.merchantId this.pointSetObj.merchantId = row.merchantId
getIntegralBelongApi(params).then((res) => { getIntegralBelongApi(params).then((res) => {
this.pointSetObj.type = res?.scoreSource || 0 this.pointSetObj.type = res?.scoreSource || 0
...@@ -526,8 +556,8 @@ export default { ...@@ -526,8 +556,8 @@ export default {
this.setPointsVisible = false this.setPointsVisible = false
}, },
handleConfirmSet() { handleConfirmSet() {
const { type, merchantId } = this.pointSetObj let { type, merchantId } = this.pointSetObj
const params = { let params = {
scoreSource: type, scoreSource: type,
merchantId merchantId
} }
...@@ -537,12 +567,12 @@ export default { ...@@ -537,12 +567,12 @@ export default {
}) })
}, },
showSuccessMsgbox() { showSuccessMsgbox() {
const text = "门店积分归属已配置成功" let text = "门店积分归属已配置成功"
this.$confirm(text, "提示", { this.$confirm(text, "提示", {
confirmButtonText: "知道了", confirmButtonText: "知道了",
showCancelButton: false, showCancelButton: false,
type: "success" type: "success"
}).then(() => { }) }).then(() => {})
}, },
getOptionsList() { getOptionsList() {
...@@ -811,7 +841,7 @@ export default { ...@@ -811,7 +841,7 @@ export default {
} }
}, },
// 导出标签 //导出标签
handleExportLabel() { handleExportLabel() {
var params = this.searchFormSearch var params = this.searchFormSearch
// 去除为null的值 // 去除为null的值
...@@ -864,33 +894,27 @@ export default { ...@@ -864,33 +894,27 @@ export default {
.el-table .cell { .el-table .cell {
padding: 0 10px; padding: 0 10px;
} }
// padding-right: 3px; // padding-right: 3px;
.el-table__body-wrapper { .el-table__body-wrapper {
.el-table__row td:nth-child(1) { .el-table__row td:nth-child(1) {
border-left: 1px solid #ebeef5; border-left: 1px solid #ebeef5;
} }
.el-table__row td:nth-last-child(1) { .el-table__row td:nth-last-child(1) {
border-right: 1px solid #ebeef5; border-right: 1px solid #ebeef5;
} }
} }
.select { .select {
.el-tag { .el-tag {
width: auto; width: auto;
} }
} }
} }
.upload-wrap { .upload-wrap {
display: flex; display: flex;
} }
.import-btn { .import-btn {
position: relative; position: relative;
} }
.import-input { .import-input {
opacity: 0; opacity: 0;
position: absolute; position: absolute;
...@@ -901,36 +925,30 @@ export default { ...@@ -901,36 +925,30 @@ export default {
cursor: pointer; cursor: pointer;
font-size: 0; font-size: 0;
} }
.import-template { .import-template {
position: absolute; position: absolute;
height: 20px; height: 20px;
top: 50px; top: 50px;
left: 0; left: 0;
} }
.m-l-md { .m-l-md {
margin-left: 20px; margin-left: 20px;
} }
.upload-statistics { .upload-statistics {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 30px 70px; margin: 30px 70px;
.quantity { .quantity {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
text-align: center; text-align: center;
.success { .success {
font-size: 26px; font-size: 26px;
color: #2cca74; color: #2cca74;
text-align: center; text-align: center;
margin-bottom: 4px; margin-bottom: 4px;
} }
.err { .err {
font-size: 26px; font-size: 26px;
color: #eb4e4e; color: #eb4e4e;
...@@ -938,7 +956,6 @@ export default { ...@@ -938,7 +956,6 @@ export default {
margin-bottom: 4px; margin-bottom: 4px;
} }
} }
.line { .line {
width: 1px; width: 1px;
height: 56px; height: 56px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!