Commit 09fca1a7 by 王志慧

标记退款功能

1 parent 987faaa3
...@@ -49,7 +49,7 @@ export function getDetailList(data) { ...@@ -49,7 +49,7 @@ 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`
...@@ -57,5 +57,10 @@ export function getScoreDetail(data) { ...@@ -57,5 +57,10 @@ export function getScoreDetail(data) {
} }
export function getShopMerchantList(data) { export function getShopMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list` data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
return request(data, "post")
}
//订单阳光激励标记退款
export function markAsRefunded(data) {
data.method = `dj.api.smartcarlife.goodsOrder.points.markAsRefunded`
return request(data)
}
...@@ -114,3 +114,13 @@ export function employeeRegister(data) { ...@@ -114,3 +114,13 @@ 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 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)
}
\ No newline at end of file \ No newline at end of file
...@@ -787,6 +787,12 @@ export const routerName = { ...@@ -787,6 +787,12 @@ export const routerName = {
label: "员工注册码", label: "员工注册码",
handle: "employeeRegistrationCode" handle: "employeeRegistrationCode"
}, },
{
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",
...@@ -388,7 +397,10 @@ export default { ...@@ -388,7 +397,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"
...@@ -397,7 +409,10 @@ export default { ...@@ -397,7 +409,10 @@ export default {
" 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"
...@@ -465,7 +480,25 @@ export default { ...@@ -465,7 +480,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 = {
staffName: "", staffName: "",
...@@ -477,7 +510,7 @@ export default { ...@@ -477,7 +510,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)
}, },
......
...@@ -120,6 +120,23 @@ ...@@ -120,6 +120,23 @@
v-if="flagVisible" v-if="flagVisible"
@dialogClose="flagDialogClose" @dialogClose="flagDialogClose"
/> />
<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>
...@@ -127,7 +144,13 @@ ...@@ -127,7 +144,13 @@
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 } from "@/api/shopConfig.js" import {
shopSettingList,
listYqRef,
getBrandList,
getShopMerchantConfig,
switchPointSign
} from "@/api/shopConfig.js"
import { import {
merchantOutputValueTargetExport, merchantOutputValueTargetExport,
merchantOutputValueTargetImport merchantOutputValueTargetImport
...@@ -332,8 +355,17 @@ export default { ...@@ -332,8 +355,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,
...@@ -384,6 +416,22 @@ export default { ...@@ -384,6 +416,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)
...@@ -601,7 +649,6 @@ export default { ...@@ -601,7 +649,6 @@ export default {
// 收款二维码按钮 // 收款二维码按钮
collectionQRcode(row) { collectionQRcode(row) {
console.log(row)
this.recordInfo = row this.recordInfo = row
this.qRcodeVisible = !this.qRcodeVisible this.qRcodeVisible = !this.qRcodeVisible
}, },
...@@ -611,7 +658,24 @@ export default { ...@@ -611,7 +658,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" })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!