Commit 09fca1a7 by 王志慧

标记退款功能

1 parent 987faaa3
......@@ -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,3 +114,13 @@ export function employeeRegister(data) {
data.method = `${path}staff.register`
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
......@@ -787,6 +787,12 @@ export const routerName = {
label: "员工注册码",
handle: "employeeRegistrationCode"
},
{
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",
......@@ -388,7 +397,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"
......@@ -396,8 +408,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"
......@@ -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() {
this.searchForm = {
staffName: "",
......@@ -477,7 +510,7 @@ export default {
sceneType: "",
orderCode: ""
}
this.activeName='4'
this.activeName = "4"
this.searchFormSearch = {}
this.$refs.pointTable.refreshTable(true, true)
},
......
......@@ -120,6 +120,23 @@
v-if="flagVisible"
@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>
</template>
......@@ -127,7 +144,13 @@
import { Util, deepClone, downLoadFile } from "@/common/util"
import { mapActions, mapState, mapMutations } from "vuex"
import dayjs from "dayjs"
import { shopSettingList, listYqRef, getBrandList } from "@/api/shopConfig.js"
import {
shopSettingList,
listYqRef,
getBrandList,
getShopMerchantConfig,
switchPointSign
} from "@/api/shopConfig.js"
import {
merchantOutputValueTargetExport,
merchantOutputValueTargetImport
......@@ -332,8 +355,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,
......@@ -384,6 +416,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)
......@@ -601,7 +649,6 @@ export default {
// 收款二维码按钮
collectionQRcode(row) {
console.log(row)
this.recordInfo = row
this.qRcodeVisible = !this.qRcodeVisible
},
......@@ -611,7 +658,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" })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!