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) {
// 积分管理-积分明细收益列表导出
export function exportDetailScore(data) {
data.method = `${path2}staff.score.detail.list.export`
return request(data)
}
data.method = `${path2}staff.score.detail.list.export`
return request(data)
}
// 积分管理-积分明细收益记录详情
export function getScoreDetail(data) {
data.method = `${path2}staff.score.detail`
return request(data)
}
export function getShopMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, 'post')
}
\ 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) {
data.method = `${path}staff.register`
return request(data, RequestMethods.POST)
}
// 设置积分归属
export function setIntegralBelongApi(data) {
data.method = `${path}merchant.score.conf.update`
......@@ -132,3 +131,13 @@ export function updateLightModifyOrderConfig(data) {
data.method = `${path}serviceMerchant.updateTrafficExpireFlag`
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 = {
label: "积分归属",
handle: "setPointsAttribution"
},
{
authId: "9061914",
parentId: "90619",
label: "标记退款",
handle: "markRefundHandle"
},
],
component: _import("systemConfig/ShopConfig/index")
},
......
......@@ -2,7 +2,7 @@
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-08-13 14:35:06
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -35,6 +35,12 @@ export const routerName = {
handle: "handleCheck"
},
{
authId: "9140104",
parentId: "91401",
label: "标记退款",
handle: "handleRefund"
},
{
authId: "9140102",
parentId: "91401",
label: "查看",
......
......@@ -56,7 +56,16 @@
</span>
<!-- 审核 -->
<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>
</div>
</d2-table>
......@@ -80,7 +89,7 @@ import {
getShopMerchantList,
pointCheck,
exportFile,
exportHeadTemplate
markAsRefunded
} from "@api/point"
export default {
name: "PointList",
......@@ -396,7 +405,10 @@ export default {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.payTime&&this.searchFormSearch.payTime.length) {
if (
this.searchFormSearch.payTime &&
this.searchFormSearch.payTime.length
) {
this.searchFormSearch.payTimeBegin =
Util.dateFormate(this.searchFormSearch.payTime[0], "YYYY-MM-DD") +
" 00:00:00"
......@@ -404,8 +416,11 @@ export default {
Util.dateFormate(this.searchFormSearch.payTime[1], "YYYY-MM-DD") +
" 23:59:59"
}
if (this.searchFormSearch.orderTime&&this.searchFormSearch.orderTime.length) {
if (
this.searchFormSearch.orderTime &&
this.searchFormSearch.orderTime.length
) {
this.searchFormSearch.orderTimeBegin =
Util.dateFormate(this.searchFormSearch.orderTime[0], "YYYY-MM-DD") +
" 00:00:00"
......@@ -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() {
this.searchForm = {
referrerName: "",
......@@ -485,7 +518,7 @@ export default {
sceneType: "",
orderCode: ""
}
this.activeName='4'
this.activeName = "4"
this.searchFormSearch = {}
this.$refs.pointTable.refreshTable(true, true)
},
......
......@@ -121,22 +121,40 @@
@dialogClose="flagDialogClose"
/>
<!-- 积分归属 -->
<d2-dialog
<d2-dialog
:title="'提示'"
:is-visible="setPointsVisible"
@closeDialog="handleCancel"
@confirmDialog="handleConfirmSet"
width="576px">
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-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>
</div>
</template>
......@@ -144,7 +162,15 @@
import { Util, deepClone, downLoadFile } from "@/common/util"
import { mapActions, mapState, mapMutations } from "vuex"
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 {
merchantOutputValueTargetExport,
merchantOutputValueTargetImport
......@@ -349,8 +375,17 @@ export default {
],
brandList: []
},
refundForm: {
merchantId: "",
pointsRefundAvailable: "Y",
rList: [
{ confId: "Y", confLabel: "开" },
{ confId: "N", confLabel: "关" }
]
},
recordInfo: null,
fileVisible: false,
signVisible: false,
showNum: false,
importNum: {
succNum: 0,
......@@ -405,6 +440,22 @@ export default {
this.recordInfo = row
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() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -427,7 +478,7 @@ export default {
setPointsAttribution(row) {
let params = { merchantId: row.merchantId }
this.pointSetObj.merchantId = row.merchantId
getIntegralBelongApi(params).then(res => {
getIntegralBelongApi(params).then((res) => {
this.pointSetObj.type = res?.scoreSource || 0
this.setPointsVisible = true
})
......@@ -441,19 +492,18 @@ export default {
scoreSource: type,
merchantId
}
setIntegralBelongApi(params).then(res => {
setIntegralBelongApi(params).then((res) => {
this.handleCancel()
this.showSuccessMsgbox()
})
},
showSuccessMsgbox() {
let text = '门店积分归属已配置成功'
this.$confirm(text, '提示', {
confirmButtonText: '知道了',
let text = "门店积分归属已配置成功"
this.$confirm(text, "提示", {
confirmButtonText: "知道了",
showCancelButton: false,
type: 'success'
}).then(() => {
})
type: "success"
}).then(() => {})
},
getOptionsList() {
......@@ -655,7 +705,6 @@ export default {
// 收款二维码按钮
collectionQRcode(row) {
console.log(row)
this.recordInfo = row
this.qRcodeVisible = !this.qRcodeVisible
},
......@@ -665,7 +714,24 @@ export default {
employeeDialogClose() {
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) {
this.close({ tagName: "/shopConfig" })
......@@ -842,7 +908,7 @@ export default {
background: #e8e8ea;
}
}
.points-set-form{
.points-set-form {
display: flex;
align-items: 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!