Commit c6c38dbb by 王志慧

Merge branch 'SAAS+V4.44.3-0920' into SAAS+V4.45.0-0926

2 parents 08e4dafe 81662038
...@@ -47,15 +47,20 @@ export function getDetailList(data) { ...@@ -47,15 +47,20 @@ export function getDetailList(data) {
// 积分管理-积分明细收益列表导出 // 积分管理-积分明细收益列表导出
export function exportDetailScore(data) { export function exportDetailScore(data) {
data.method = `${path2}staff.score.detail.list.export` data.method = `${path2}staff.score.detail.list.export`
return request(data) return request(data)
} }
// 积分管理-积分明细收益记录详情 // 积分管理-积分明细收益记录详情
export function getScoreDetail(data) { export function getScoreDetail(data) {
data.method = `${path2}staff.score.detail` data.method = `${path2}staff.score.detail`
return request(data) return request(data)
} }
export function getShopMerchantList(data) { export function getShopMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, "post")
}
//订单阳光激励标记退款
export function markAsRefunded(data) {
data.method = `dj.api.smartcarlife.goodsOrder.points.markAsRefunded`
return request(data)
}
...@@ -114,7 +114,6 @@ export function employeeRegister(data) { ...@@ -114,7 +114,6 @@ export function employeeRegister(data) {
data.method = `${path}staff.register` data.method = `${path}staff.register`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 设置积分归属 // 设置积分归属
export function setIntegralBelongApi(data) { export function setIntegralBelongApi(data) {
data.method = `${path}merchant.score.conf.update` data.method = `${path}merchant.score.conf.update`
...@@ -132,3 +131,13 @@ export function updateLightModifyOrderConfig(data) { ...@@ -132,3 +131,13 @@ export function updateLightModifyOrderConfig(data) {
data.method = `${path}serviceMerchant.updateTrafficExpireFlag` data.method = `${path}serviceMerchant.updateTrafficExpireFlag`
return request(data, "post") return request(data, "post")
} }
//获取店铺阳光激励积分标记退款开关状态
export function getShopMerchantConfig(data) {
data.method = `dj.api.smartcarlife.shopMerchantConfig.get`
return request(data)
}
//设置店铺阳光激励积分标记退款开关
export function switchPointSign(data) {
data.method = `dj.api.smartcarlife.shopMerchantConfig.pointsRefundAvailable.switch`
return request(data)
}
...@@ -793,6 +793,13 @@ export const routerName = { ...@@ -793,6 +793,13 @@ export const routerName = {
label: "积分归属", label: "积分归属",
handle: "setPointsAttribution" handle: "setPointsAttribution"
}, },
{
authId: "9061914",
parentId: "90619",
label: "标记退款",
handle: "markRefundHandle"
},
], ],
component: _import("systemConfig/ShopConfig/index") component: _import("systemConfig/ShopConfig/index")
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 王志慧 wangzh@didihu.com.cn * @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-08-13 14:35:06 * @Date: 2024-08-13 14:35:06
* @LastEditors: 王志慧 wangzh@didihu.com.cn * @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-08-19 15:21:02 * @LastEditTime: 2024-09-12 14:12:46
* @FilePath: \dj-car-life-system\src\router\modules\914_pointManagement.js * @FilePath: \dj-car-life-system\src\router\modules\914_pointManagement.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -35,6 +35,12 @@ export const routerName = { ...@@ -35,6 +35,12 @@ export const routerName = {
handle: "handleCheck" handle: "handleCheck"
}, },
{ {
authId: "9140104",
parentId: "91401",
label: "标记退款",
handle: "handleRefund"
},
{
authId: "9140102", authId: "9140102",
parentId: "91401", parentId: "91401",
label: "查看", label: "查看",
......
...@@ -56,7 +56,16 @@ ...@@ -56,7 +56,16 @@
</span> </span>
<!-- 审核 --> <!-- 审核 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9140101']" v-if="scope.scope.status == 0&&scope.scope.supervisorAudit == 1" /> <auth-button
:data="scope.scope"
:show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/>
<auth-button
:data="scope.scope"
:show-btn-ids="['9140104']"
v-if="scope.scope.status == 1&&scope.scope.pointsRefundAvailable=='Y'"
/>
</span> </span>
</div> </div>
</d2-table> </d2-table>
...@@ -80,7 +89,7 @@ import { ...@@ -80,7 +89,7 @@ import {
getShopMerchantList, getShopMerchantList,
pointCheck, pointCheck,
exportFile, exportFile,
exportHeadTemplate markAsRefunded
} from "@api/point" } from "@api/point"
export default { export default {
name: "PointList", name: "PointList",
...@@ -396,7 +405,10 @@ export default { ...@@ -396,7 +405,10 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.payTime&&this.searchFormSearch.payTime.length) { if (
this.searchFormSearch.payTime &&
this.searchFormSearch.payTime.length
) {
this.searchFormSearch.payTimeBegin = this.searchFormSearch.payTimeBegin =
Util.dateFormate(this.searchFormSearch.payTime[0], "YYYY-MM-DD") + Util.dateFormate(this.searchFormSearch.payTime[0], "YYYY-MM-DD") +
" 00:00:00" " 00:00:00"
...@@ -404,8 +416,11 @@ export default { ...@@ -404,8 +416,11 @@ export default {
Util.dateFormate(this.searchFormSearch.payTime[1], "YYYY-MM-DD") + Util.dateFormate(this.searchFormSearch.payTime[1], "YYYY-MM-DD") +
" 23:59:59" " 23:59:59"
} }
if (this.searchFormSearch.orderTime&&this.searchFormSearch.orderTime.length) { if (
this.searchFormSearch.orderTime &&
this.searchFormSearch.orderTime.length
) {
this.searchFormSearch.orderTimeBegin = this.searchFormSearch.orderTimeBegin =
Util.dateFormate(this.searchFormSearch.orderTime[0], "YYYY-MM-DD") + Util.dateFormate(this.searchFormSearch.orderTime[0], "YYYY-MM-DD") +
" 00:00:00" " 00:00:00"
...@@ -473,7 +488,25 @@ export default { ...@@ -473,7 +488,25 @@ export default {
// }) // })
}) })
}, },
handleRefund(data) {
this.$confirm("确定将此订单标记为已退款", "", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
if (action == "confirm") {
markAsRefunded({
orderCode : data.orderCode
}).then((res) => {
if (res) {
this.$message.success("操作成功")
this.handleSearch()
}
})
}
}
})
},
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
referrerName: "", referrerName: "",
...@@ -485,7 +518,7 @@ export default { ...@@ -485,7 +518,7 @@ export default {
sceneType: "", sceneType: "",
orderCode: "" orderCode: ""
} }
this.activeName='4' this.activeName = "4"
this.searchFormSearch = {} this.searchFormSearch = {}
this.$refs.pointTable.refreshTable(true, true) this.$refs.pointTable.refreshTable(true, true)
}, },
......
...@@ -121,22 +121,40 @@ ...@@ -121,22 +121,40 @@
@dialogClose="flagDialogClose" @dialogClose="flagDialogClose"
/> />
<!-- 积分归属 --> <!-- 积分归属 -->
<d2-dialog <d2-dialog
:title="'提示'" :title="'提示'"
:is-visible="setPointsVisible" :is-visible="setPointsVisible"
@closeDialog="handleCancel" @closeDialog="handleCancel"
@confirmDialog="handleConfirmSet" @confirmDialog="handleConfirmSet"
width="576px"> width="576px"
>
<el-form :model="pointSetObj" ref="ruleForm" class="points-set-form"> <el-form :model="pointSetObj" ref="ruleForm" class="points-set-form">
<el-form-item label-width="120px" label="门店积分归属:" prop="type"> <el-form-item label-width="120px" label="门店积分归属:" prop="type">
<el-radio-group <el-radio-group v-model="pointSetObj.type">
v-model="pointSetObj.type">
<el-radio :label="0">门店员工</el-radio> <el-radio :label="0">门店员工</el-radio>
<el-radio :label="1">驻店员工</el-radio> <el-radio :label="1">驻店员工</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </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>
</div> </div>
</template> </template>
...@@ -144,7 +162,15 @@ ...@@ -144,7 +162,15 @@
import { Util, deepClone, downLoadFile } from "@/common/util" import { Util, deepClone, downLoadFile } from "@/common/util"
import { mapActions, mapState, mapMutations } from "vuex" import { mapActions, mapState, mapMutations } from "vuex"
import dayjs from "dayjs" import dayjs from "dayjs"
import { shopSettingList, listYqRef, getBrandList, setIntegralBelongApi, getIntegralBelongApi } from "@/api/shopConfig.js" import {
shopSettingList,
listYqRef,
getBrandList,
setIntegralBelongApi,
getIntegralBelongApi,
getShopMerchantConfig,
switchPointSign
} from "@/api/shopConfig.js"
import { import {
merchantOutputValueTargetExport, merchantOutputValueTargetExport,
merchantOutputValueTargetImport merchantOutputValueTargetImport
...@@ -349,8 +375,17 @@ export default { ...@@ -349,8 +375,17 @@ export default {
], ],
brandList: [] brandList: []
}, },
refundForm: {
merchantId: "",
pointsRefundAvailable: "Y",
rList: [
{ confId: "Y", confLabel: "开" },
{ confId: "N", confLabel: "关" }
]
},
recordInfo: null, recordInfo: null,
fileVisible: false, fileVisible: false,
signVisible: false,
showNum: false, showNum: false,
importNum: { importNum: {
succNum: 0, succNum: 0,
...@@ -405,6 +440,22 @@ export default { ...@@ -405,6 +440,22 @@ export default {
this.recordInfo = row this.recordInfo = row
this.employeeVisible = !this.employeeVisible this.employeeVisible = !this.employeeVisible
}, },
//标记退款
markRefundHandle(row) {
try {
getShopMerchantConfig({ merchantId: row.merchantId }).then((res) => {
if (res) {
this.refundForm.pointsRefundAvailable = res.pointsRefundAvailable
} else {
this.refundForm.pointsRefundAvailable = "N"
}
this.refundForm.merchantId = row.merchantId
this.signVisible = true
})
} catch (err) {
return new Error(err)
}
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -427,7 +478,7 @@ export default { ...@@ -427,7 +478,7 @@ export default {
setPointsAttribution(row) { setPointsAttribution(row) {
let 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
this.setPointsVisible = true this.setPointsVisible = true
}) })
...@@ -441,19 +492,18 @@ export default { ...@@ -441,19 +492,18 @@ export default {
scoreSource: type, scoreSource: type,
merchantId merchantId
} }
setIntegralBelongApi(params).then(res => { setIntegralBelongApi(params).then((res) => {
this.handleCancel() this.handleCancel()
this.showSuccessMsgbox() this.showSuccessMsgbox()
}) })
}, },
showSuccessMsgbox() { showSuccessMsgbox() {
let text = '门店积分归属已配置成功' let text = "门店积分归属已配置成功"
this.$confirm(text, '提示', { this.$confirm(text, "提示", {
confirmButtonText: '知道了', confirmButtonText: "知道了",
showCancelButton: false, showCancelButton: false,
type: 'success' type: "success"
}).then(() => { }).then(() => {})
})
}, },
getOptionsList() { getOptionsList() {
...@@ -655,7 +705,6 @@ export default { ...@@ -655,7 +705,6 @@ export default {
// 收款二维码按钮 // 收款二维码按钮
collectionQRcode(row) { collectionQRcode(row) {
console.log(row)
this.recordInfo = row this.recordInfo = row
this.qRcodeVisible = !this.qRcodeVisible this.qRcodeVisible = !this.qRcodeVisible
}, },
...@@ -665,7 +714,24 @@ export default { ...@@ -665,7 +714,24 @@ export default {
employeeDialogClose() { employeeDialogClose() {
this.employeeVisible = !this.employeeVisible this.employeeVisible = !this.employeeVisible
}, },
handleSignClose() {
this.signVisible = false
},
handleConfirmSign() {
switchPointSign({
merchantId: this.refundForm.merchantId,
pointsRefundAvailable: this.refundForm.pointsRefundAvailable
})
.then((result) => {
if (result) {
this.signVisible = false
this.$message.success("该门店标记退款功能已配置成功")
}
})
.catch((err) => {
new Error(err)
})
},
// 工单配置 // 工单配置
handleSet(row) { handleSet(row) {
this.close({ tagName: "/shopConfig" }) this.close({ tagName: "/shopConfig" })
...@@ -842,7 +908,7 @@ export default { ...@@ -842,7 +908,7 @@ export default {
background: #e8e8ea; background: #e8e8ea;
} }
} }
.points-set-form{ .points-set-form {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!