Commit 102225ab by wangzhihui

预警 积分 渗透率需求开发

1 parent 4196a89a
...@@ -141,3 +141,13 @@ export function switchPointSign(data) { ...@@ -141,3 +141,13 @@ export function switchPointSign(data) {
data.method = `dj.api.smartcarlife.shopMerchantConfig.pointsRefundAvailable.switch` data.method = `dj.api.smartcarlife.shopMerchantConfig.pointsRefundAvailable.switch`
return request(data) return request(data)
} }
//新增或者修改预警设置
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)
}
\ No newline at end of file \ No newline at end of file
...@@ -982,7 +982,10 @@ export const filterOpt = [ ...@@ -982,7 +982,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: "启用" },
......
...@@ -804,6 +804,12 @@ export const routerName = { ...@@ -804,6 +804,12 @@ export const routerName = {
parentId: "90619", parentId: "90619",
label: "阳光激励配置", label: "阳光激励配置",
handle: "markRefundHandle" handle: "markRefundHandle"
},
{
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: ''
......
...@@ -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("退款成功!")
......
<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
...@@ -120,42 +120,6 @@ ...@@ -120,42 +120,6 @@
v-if="flagVisible" v-if="flagVisible"
@dialogClose="flagDialogClose" @dialogClose="flagDialogClose"
/> />
<!-- 积分归属 -->
<!-- <d2-dialog
:title="'提示'"
:is-visible="setPointsVisible"
@closeDialog="handleCancel"
@confirmDialog="handleConfirmSet"
width="576px"
>
<el-form :model="pointSetObj" ref="ruleForm" class="points-set-form">
<el-form-item label-width="120px" label="门店积分归属:" prop="type">
<el-radio-group v-model="pointSetObj.type">
<el-radio :label="0">门店员工</el-radio>
<el-radio :label="1">驻店员工</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</d2-dialog> -->
<!-- 标记退款 -->
<!-- <d2-dialog
:title="'请选择该门店标记退款功能是否打开'"
v-if="signVisible"
:is-visible="signVisible"
@closeDialog="handleSignClose"
@confirmDialog="handleConfirmSign"
>
<slot>
<el-radio-group v-model="refundForm.pointsRefundAvailable">
<template v-for="item in refundForm.rList">
<el-radio :label="item.confId" :key="item.confId">{{
item.confLabel
}}</el-radio>
</template>
</el-radio-group>
</slot>
</d2-dialog> -->
<d2-dialog <d2-dialog
title="阳光激励配置" title="阳光激励配置"
v-if="signVisible" v-if="signVisible"
...@@ -174,6 +138,13 @@ ...@@ -174,6 +138,13 @@
> >
</glsx-combi-form> </glsx-combi-form>
</d2-dialog> </d2-dialog>
<!-- 预警设置 -->
<warning-set
:warning-visible="warningVisible"
:info="recordInfo"
@closeWarnDialog="closeWarnDialog"
@confirmWarnDialog="confirmWarnDialog"
></warning-set>
</div> </div>
</template> </template>
...@@ -198,12 +169,14 @@ import { businessNature, storeType } from "@/common/constants.js" ...@@ -198,12 +169,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 {
...@@ -398,6 +371,7 @@ export default { ...@@ -398,6 +371,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
...@@ -431,8 +405,7 @@ export default { ...@@ -431,8 +405,7 @@ export default {
{ confId: "Y", confName: "开" }, { confId: "Y", confName: "开" },
{ confId: "N", confName: "关" } { confId: "N", confName: "关" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
}, },
{ {
label: "门店积分归属", label: "门店积分归属",
...@@ -445,9 +418,7 @@ export default { ...@@ -445,9 +418,7 @@ export default {
{ confId: 0, confName: "门店员工" }, { confId: 0, confName: "门店员工" },
{ confId: 1, confName: "驻店员工" } { confId: 1, confName: "驻店员工" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
}, },
{ {
label: "门店积分支持微信提现功能", label: "门店积分支持微信提现功能",
...@@ -460,9 +431,7 @@ export default { ...@@ -460,9 +431,7 @@ export default {
{ confId: "Y", confName: "开" }, { confId: "Y", confName: "开" },
{ confId: "N", confName: "关" } { confId: "N", confName: "关" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
}, },
{ {
label: "门店订单审批功能", label: "门店订单审批功能",
...@@ -475,9 +444,7 @@ export default { ...@@ -475,9 +444,7 @@ export default {
{ confId: "Y", confName: "开" }, { confId: "Y", confName: "开" },
{ confId: "N", confName: "关" } { confId: "N", confName: "关" }
], ],
handleRadioChange: (val) => { handleRadioChange: (val) => {}
}
} }
] ]
} }
...@@ -544,6 +511,19 @@ export default { ...@@ -544,6 +511,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)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!