|
|
@@ -282,22 +282,26 @@
|
|
|
|
|
|
<el-tab-pane label="服务订单" name="orders">
|
|
|
<div class="tab-content-wrapper">
|
|
|
- <el-table :data="[]" stripe style="width: 100%" :header-cell-style="{background:'#f5f7fa', color:'#606266'}">
|
|
|
- <el-table-column prop="orderNo" label="订单号" width="160" show-overflow-tooltip />
|
|
|
- <el-table-column prop="serviceName" label="服务项目" show-overflow-tooltip />
|
|
|
- <el-table-column prop="serviceFee" label="收入" width="100">
|
|
|
+ <el-table v-loading="logLoading" :data="serviceOrderData" stripe style="width: 100%" :header-cell-style="{background:'#f5f7fa', color:'#606266'}">
|
|
|
+ <el-table-column prop="code" label="订单号" width="160" show-overflow-tooltip />
|
|
|
+ <el-table-column label="服务项目" show-overflow-tooltip>
|
|
|
<template #default="{ row }">
|
|
|
- <span style="color: #67c23a; font-weight: bold; font-size: 15px;">+{{ row.serviceFee }}</span>
|
|
|
+ {{ getServiceName(row.service) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="time" label="时间" width="160" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="price" label="收入" width="100">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span style="color: #67c23a; font-weight: bold; font-size: 15px;">+{{ (row.price / 100).toFixed(2) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="serviceTime" label="时间" width="160" show-overflow-tooltip />
|
|
|
<el-table-column prop="status" label="状态" width="90">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag v-if="row.status==='completed'" type="success" size="small">完成</el-tag>
|
|
|
- <el-tag v-else type="info" size="small">取消</el-tag>
|
|
|
+ <el-tag :type="getSubOrderStatusType(row.status)" size="small">
|
|
|
+ {{ getSubOrderStatusName(row.status) }}
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
@@ -308,13 +312,13 @@
|
|
|
<el-table-column prop="createTime" label="变动时间" width="180" />
|
|
|
<el-table-column prop="bizType" label="业务类型" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag :type="getBizTypeTag(row.bizType)" size="small" effect="plain">{{ getBizTypeName(row.bizType) }}</el-tag>
|
|
|
+ <el-tag :type="getPointsBizTypeTag(row.bizType)" size="small" effect="plain">{{ getPointsBizTypeName(row.bizType) }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="amount" label="变动数值" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <span :style="{ color: row.amount > 0 ? '#67c23a' : '#f56c6c', fontWeight: 'bold', fontSize: '15px' }">
|
|
|
- {{ row.amount > 0 ? '+' : '' }}{{ row.amount }}
|
|
|
+ <span :style="{ color: ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '#67c23a' : '#f56c6c', fontWeight: 'bold', fontSize: '15px' }">
|
|
|
+ {{ ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '+' : '-' }}{{ row.amount }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -330,13 +334,13 @@
|
|
|
<el-table-column prop="createTime" label="变动时间" width="180" show-overflow-tooltip />
|
|
|
<el-table-column prop="subType" label="资金类型" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag :type="getBizTypeTag(row.subType)" size="small" effect="plain">{{ getSubTypeName(row.subType) }}</el-tag>
|
|
|
+ <el-tag :type="getBalanceBizTypeTag(row.subType)" size="small" effect="plain">{{ getBalanceBizTypeName(row.bizType) }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="amount" label="变动金额" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <span :style="{ color: row.amount > 0 ? '#67c23a' : '#f56c6c', fontWeight: 'bold', fontSize: '15px' }">
|
|
|
- {{ row.amount > 0 ? '+' : '' }}{{ (row.amount / 100).toFixed(2) }}
|
|
|
+ <span :style="{ color: ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '#67c23a' : '#f56c6c', fontWeight: 'bold', fontSize: '15px' }">
|
|
|
+ {{ ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '+' : '-' }}{{ (row.amount / 100).toFixed(2) }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -355,11 +359,18 @@
|
|
|
<div class="tab-content-wrapper">
|
|
|
<el-table v-loading="logLoading" :data="rewardLogData" stripe style="width: 100%" :header-cell-style="{background:'#f5f7fa', color:'#606266'}">
|
|
|
<el-table-column prop="createTime" label="操作时间" width="180" />
|
|
|
- <el-table-column prop="type" label="奖惩类型" width="100">
|
|
|
+ <el-table-column prop="bizType" label="奖惩类型" width="100">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag :type="row.type==='reward' ? 'success' : 'danger'" size="small">{{ row.type === 'reward' ? '奖励' : '惩罚' }}</el-tag>
|
|
|
+ <el-tag :type="fulfillerEnums.RewardBizType[row.bizType]?.tagType || 'info'" size="small" effect="plain">
|
|
|
+ {{ getRewardBizTypeName(row.bizType) }}
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- <el-table-column prop="type" label="操作" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? 'success' : 'danger'" size="small">{{ ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '增加' : '减少' }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column prop="target" label="关联项目" width="100">
|
|
|
<template #default="{ row }">
|
|
|
<el-tag type="info" size="small" effect="plain">{{ row.target === 'points' ? '积分' : '余额' }}</el-tag>
|
|
|
@@ -367,8 +378,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="amount" label="涉及数值" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <span :style="{ color: row.type==='reward' ? '#67c23a' : '#f56c6c', fontWeight: 'bold' }">
|
|
|
- {{ row.type === 'reward' ? '+' : '-' }}{{ row.target === 'balance' ? (row.amount / 100).toFixed(2) : row.amount }} {{ row.target === 'points' ? '分' : '元' }}
|
|
|
+ <span :style="{ color: ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '#67c23a' : '#f56c6c', fontWeight: 'bold' }">
|
|
|
+ {{ ['reward', fulfillerEnums.ActionType.ADD].includes(row.type) ? '+' : '-' }}{{ row.target === 'balance' ? (row.amount / 100).toFixed(2) : row.amount }} {{ row.target === 'points' ? '分' : '元' }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -457,6 +468,11 @@
|
|
|
<el-checkbox v-for="t in allTags" :key="t.id" :label="t.id" :value="t.id">{{ t.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="服务类型">
|
|
|
+ <el-select v-model="editDialog.serviceTypesArray" multiple placeholder="请选择服务类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in serviceOptions" :key="item.id" :label="item.name" :value="String(item.id)" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
@@ -474,8 +490,8 @@
|
|
|
<el-form :model="rewardDialog.form" label-width="80px" style="margin-top: 20px;">
|
|
|
<el-form-item label="操作类型">
|
|
|
<el-radio-group v-model="rewardDialog.form.type">
|
|
|
- <el-radio label="reward">奖励 (增加)</el-radio>
|
|
|
- <el-radio label="punish">惩罚 (扣除)</el-radio>
|
|
|
+ <el-radio :label="fulfillerEnums.ActionType.ADD">增加</el-radio>
|
|
|
+ <el-radio :label="fulfillerEnums.ActionType.REDUCE">减少</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="调整项目">
|
|
|
@@ -525,6 +541,11 @@
|
|
|
<el-option v-for="station in createDialog.stationOptions" :key="station.id" :label="station.name" :value="station.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="服务类型">
|
|
|
+ <el-select v-model="createDialog.serviceTypesArray" multiple placeholder="请选择服务类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in serviceOptions" :key="item.id" :label="item.name" :value="String(item.id)" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<el-button @click="createDialog.visible = false">取消</el-button>
|
|
|
@@ -540,8 +561,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="调整方式">
|
|
|
<el-radio-group v-model="pointsDialog.form.type">
|
|
|
- <el-radio label="add">增加</el-radio>
|
|
|
- <el-radio label="reduce">扣除</el-radio>
|
|
|
+ <el-radio :label="fulfillerEnums.ActionType.ADD">增加</el-radio>
|
|
|
+ <el-radio :label="fulfillerEnums.ActionType.REDUCE">扣除</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="调整数值" required>
|
|
|
@@ -564,21 +585,21 @@
|
|
|
<span style="color: #f56c6c; font-weight: bold">¥{{ (balanceDialog.currentRow?.balance / 100).toFixed(2) }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="扣减类型">
|
|
|
- <el-radio-group v-model="balanceDialog.form.type" @change="balanceDialog.form.subType = balanceDialog.form.type === 'add' ? 'reward' : 'punish'">
|
|
|
- <el-radio label="add">增加</el-radio>
|
|
|
- <el-radio label="reduce">减少</el-radio>
|
|
|
+ <el-radio-group v-model="balanceDialog.form.type" @change="balanceDialog.form.subType = balanceDialog.form.type === fulfillerEnums.ActionType.ADD ? 'admin_reward' : 'admin_punish'">
|
|
|
+ <el-radio :label="fulfillerEnums.ActionType.ADD">增加</el-radio>
|
|
|
+ <el-radio :label="fulfillerEnums.ActionType.REDUCE">减少</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="调整类型">
|
|
|
<el-radio-group v-model="balanceDialog.form.subType">
|
|
|
- <template v-if="balanceDialog.form.type === 'add'">
|
|
|
- <el-radio label="reward">奖励</el-radio>
|
|
|
- <el-radio label="other">其他</el-radio>
|
|
|
+ <template v-if="balanceDialog.form.type === fulfillerEnums.ActionType.ADD">
|
|
|
+ <el-radio label="admin_reward">奖励</el-radio>
|
|
|
+ <el-radio label="admin_ajust">其他 (后台调整)</el-radio>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <el-radio label="punish">惩罚</el-radio>
|
|
|
+ <el-radio label="admin_punish">惩罚</el-radio>
|
|
|
<el-radio label="salary">工资发放</el-radio>
|
|
|
- <el-radio label="other">其他</el-radio>
|
|
|
+ <el-radio label="admin_ajust">其他 (后台调整)</el-radio>
|
|
|
</template>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
@@ -605,6 +626,8 @@ import {
|
|
|
changeStatus, resetPwd, reward, adjustPoints, adjustBalance,
|
|
|
listPointsLog, listBalanceLog, listRewardLog
|
|
|
} from '@/api/fulfiller/pool'
|
|
|
+import { listSubOrderOnFulfiller } from '@/api/order/subOrder/index'
|
|
|
+import { listOnStore as listServiceOnStore } from '@/api/service/list/index'
|
|
|
import type {
|
|
|
FlfFulfillerVO, FlfFulfillerForm, FlfFulfillerQuery,
|
|
|
FlfRewardForm, FlfAdjustPointsForm, FlfAdjustBalanceForm,
|
|
|
@@ -614,6 +637,7 @@ import { listAllTag } from '@/api/fulfiller/tag'
|
|
|
import type { FlfTagVO } from '@/api/fulfiller/tag/types'
|
|
|
import { listOnStore } from '@/api/system/areaStation'
|
|
|
import type { SysAreaStationOnStoreVo } from '@/api/system/areaStation/types'
|
|
|
+import fulfillerEnums from '@/enums/fulfiller.json'
|
|
|
|
|
|
const loading = ref(false)
|
|
|
const searchKey = ref('')
|
|
|
@@ -646,6 +670,8 @@ const qualImageUrlList = computed(() => {
|
|
|
const pointsLogData = ref<FlfPointsLogVO[]>([])
|
|
|
const balanceLogData = ref<FlfBalanceLogVO[]>([])
|
|
|
const rewardLogData = ref<FlfRewardLogVO[]>([])
|
|
|
+const serviceOrderData = ref<any[]>([])
|
|
|
+const serviceOptions = ref<any[]>([])
|
|
|
const logLoading = ref(false)
|
|
|
|
|
|
/** 查询列表 */
|
|
|
@@ -722,58 +748,66 @@ const handleSizeChange = (val: number) => { queryParams.pageSize = val; getList(
|
|
|
const handleCurrentChange = (val: number) => { queryParams.pageNum = val; getList() }
|
|
|
|
|
|
/** 积分业务类型标签颜色 */
|
|
|
-const getBizTypeTag = (type: string) => {
|
|
|
- const map: Record<string, string> = {
|
|
|
- order: '', reward: 'success', admin_reward: 'success',
|
|
|
- punish: 'danger', admin_punish: 'danger',
|
|
|
- adjust: 'info', admin_adjust: 'info'
|
|
|
- }
|
|
|
- return map[type] || 'info'
|
|
|
+const getPointsBizTypeTag = (type: string) => {
|
|
|
+ return fulfillerEnums.PointsBizType[type]?.tagType || 'info'
|
|
|
}
|
|
|
|
|
|
/** 积分业务类型中文名称 */
|
|
|
-const getBizTypeName = (type: string) => {
|
|
|
- const map: Record<string, string> = {
|
|
|
- order: '订单',
|
|
|
- reward: '奖励',
|
|
|
- punish: '惩罚',
|
|
|
- adjust: '手动调整',
|
|
|
- admin_adjust: '后台调整',
|
|
|
- admin_reward: '后台奖励',
|
|
|
- admin_punish: '后台惩罚'
|
|
|
- }
|
|
|
- return map[type] || type
|
|
|
+const getPointsBizTypeName = (type: string) => {
|
|
|
+ return fulfillerEnums.PointsBizType[type]?.label || type
|
|
|
+}
|
|
|
+
|
|
|
+/** 余额资金类型颜色 */
|
|
|
+const getBalanceBizTypeTag = (type: string) => {
|
|
|
+ return fulfillerEnums.BalanceBizType[type]?.tagType || 'info'
|
|
|
}
|
|
|
|
|
|
/** 余额资金类型中文名称 */
|
|
|
-const getSubTypeName = (type: string) => {
|
|
|
- const map: Record<string, string> = {
|
|
|
- reward: '奖励',
|
|
|
- punish: '惩罚',
|
|
|
- salary: '工资发放',
|
|
|
- withdraw: '提现',
|
|
|
- settle: '结算',
|
|
|
- other: '其他',
|
|
|
- admin_adjust: '后台调整',
|
|
|
- admin_reward: '后台奖励',
|
|
|
- admin_punish: '后台惩罚',
|
|
|
- order: '订单完成'
|
|
|
- }
|
|
|
- return map[type] || type
|
|
|
+const getBalanceBizTypeName = (type: string) => {
|
|
|
+ return fulfillerEnums.BalanceBizType[type]?.label || type
|
|
|
+}
|
|
|
+
|
|
|
+/** 奖惩业务类型名称 */
|
|
|
+const getRewardBizTypeName = (type: string) => {
|
|
|
+ return fulfillerEnums.RewardBizType[type]?.label || type
|
|
|
+}
|
|
|
+
|
|
|
+/** 加载服务项目列表用于名称映射 */
|
|
|
+const loadServiceOptions = async () => {
|
|
|
+ try {
|
|
|
+ const res = await listServiceOnStore()
|
|
|
+ serviceOptions.value = res.data || []
|
|
|
+ } catch { /* ignore */ }
|
|
|
+}
|
|
|
+
|
|
|
+const getServiceName = (serviceId: number | string) => {
|
|
|
+ const item = serviceOptions.value.find(i => i.id === serviceId)
|
|
|
+ return item ? item.name : '未知服务'
|
|
|
+}
|
|
|
+
|
|
|
+const getSubOrderStatusName = (status: number) => {
|
|
|
+ const map: Record<number, string> = { 0: '待派单', 1: '待接单', 2: '待服务', 3: '服务中', 4: '已完成', 5: '已取消' }
|
|
|
+ return map[status] || '未知'
|
|
|
+}
|
|
|
+
|
|
|
+const getSubOrderStatusType = (status: number) => {
|
|
|
+ const map: Record<number, string> = { 0: 'info', 1: 'warning', 2: 'primary', 3: 'success', 4: 'success', 5: 'danger' }
|
|
|
+ return map[status] || 'info'
|
|
|
}
|
|
|
|
|
|
const rewardDialog = reactive({
|
|
|
visible: false,
|
|
|
userName: '',
|
|
|
fulfillerId: 0 as number | string,
|
|
|
- form: { type: 'reward', target: 'points', amount: 10, reason: '' }
|
|
|
+ form: { type: fulfillerEnums.ActionType.ADD, target: 'points', amount: 10, reason: '' }
|
|
|
})
|
|
|
|
|
|
const editDialog = reactive({
|
|
|
visible: false,
|
|
|
form: {} as FlfFulfillerForm,
|
|
|
cascaderValue: [] as any[],
|
|
|
- stationOptions: [] as SysAreaStationOnStoreVo[]
|
|
|
+ stationOptions: [] as SysAreaStationOnStoreVo[],
|
|
|
+ serviceTypesArray: [] as string[]
|
|
|
})
|
|
|
|
|
|
const createDialog = reactive({
|
|
|
@@ -782,19 +816,20 @@ const createDialog = reactive({
|
|
|
name: '', phone: '', password: '', cityCode: '', cityName: '', stationId: undefined as any, gender: '0', workType: 'full_time'
|
|
|
},
|
|
|
cascaderValue: [] as any[],
|
|
|
- stationOptions: [] as SysAreaStationOnStoreVo[]
|
|
|
+ stationOptions: [] as SysAreaStationOnStoreVo[],
|
|
|
+ serviceTypesArray: [] as string[]
|
|
|
})
|
|
|
|
|
|
const pointsDialog = reactive({
|
|
|
visible: false,
|
|
|
currentRow: null as FlfFulfillerVO | null,
|
|
|
- form: { type: 'add', amount: 0, reason: '' }
|
|
|
+ form: { type: fulfillerEnums.ActionType.ADD, amount: 0, reason: '' }
|
|
|
})
|
|
|
|
|
|
const balanceDialog = reactive({
|
|
|
visible: false,
|
|
|
currentRow: null as FlfFulfillerVO | null,
|
|
|
- form: { type: 'add', subType: 'reward', amount: 0, reason: '' }
|
|
|
+ form: { type: fulfillerEnums.ActionType.ADD, subType: 'admin_reward', amount: 0, reason: '' }
|
|
|
})
|
|
|
|
|
|
const getStatusText = (status: string) => {
|
|
|
@@ -824,14 +859,16 @@ const handleTabClick = (tab: any) => {
|
|
|
const loadLogs = async (fulfillerId: string | number) => {
|
|
|
logLoading.value = true
|
|
|
try {
|
|
|
- const [pRes, bRes, rRes] = await Promise.all([
|
|
|
+ const [pRes, bRes, rRes, sRes] = await Promise.all([
|
|
|
listPointsLog(fulfillerId, { pageNum: 1, pageSize: 20 }),
|
|
|
listBalanceLog(fulfillerId, { pageNum: 1, pageSize: 20 }),
|
|
|
- listRewardLog(fulfillerId, { pageNum: 1, pageSize: 20 })
|
|
|
+ listRewardLog(fulfillerId, { pageNum: 1, pageSize: 20 }),
|
|
|
+ listSubOrderOnFulfiller(fulfillerId)
|
|
|
])
|
|
|
pointsLogData.value = pRes.rows || []
|
|
|
balanceLogData.value = bRes.rows || []
|
|
|
rewardLogData.value = rRes.rows || []
|
|
|
+ serviceOrderData.value = sRes.data || []
|
|
|
} catch { /* ignore */ } finally {
|
|
|
logLoading.value = false
|
|
|
}
|
|
|
@@ -863,8 +900,10 @@ const handleEdit = (row: FlfFulfillerVO) => {
|
|
|
status: row.status,
|
|
|
authId: row.authId,
|
|
|
authQual: row.authQual,
|
|
|
- tagIds: row.tags ? row.tags.map(t => t.id) : []
|
|
|
+ tagIds: row.tags ? row.tags.map(t => t.id) : [],
|
|
|
+ serviceTypes: row.serviceTypes
|
|
|
}
|
|
|
+ editDialog.serviceTypesArray = row.serviceTypes ? row.serviceTypes.split(',') : []
|
|
|
// 根据cityCode构建级联选择器的值
|
|
|
editDialog.cascaderValue = []
|
|
|
editDialog.stationOptions = []
|
|
|
@@ -889,6 +928,7 @@ const handleCreate = () => {
|
|
|
createDialog.form = { name: '', phone: '', password: '', cityCode: '', cityName: '', stationId: undefined, gender: '0', workType: 'full_time' }
|
|
|
createDialog.cascaderValue = []
|
|
|
createDialog.stationOptions = []
|
|
|
+ createDialog.serviceTypesArray = []
|
|
|
createDialog.visible = true
|
|
|
}
|
|
|
|
|
|
@@ -898,7 +938,8 @@ const submitCreate = async () => {
|
|
|
return
|
|
|
}
|
|
|
try {
|
|
|
- await addFulfiller(createDialog.form as FlfFulfillerForm)
|
|
|
+ const submitForm = { ...createDialog.form, serviceTypes: createDialog.serviceTypesArray.join(',') };
|
|
|
+ await addFulfiller(submitForm as FlfFulfillerForm)
|
|
|
createDialog.visible = false
|
|
|
ElMessage.success('创建成功')
|
|
|
getList()
|
|
|
@@ -907,7 +948,8 @@ const submitCreate = async () => {
|
|
|
|
|
|
const saveEdit = async () => {
|
|
|
try {
|
|
|
- await updateFulfiller(editDialog.form)
|
|
|
+ const submitForm = { ...editDialog.form, serviceTypes: editDialog.serviceTypesArray.join(',') };
|
|
|
+ await updateFulfiller(submitForm)
|
|
|
ElMessage.success('更新成功')
|
|
|
editDialog.visible = false
|
|
|
getList()
|
|
|
@@ -917,7 +959,7 @@ const saveEdit = async () => {
|
|
|
const handleReward = (row: FlfFulfillerVO) => {
|
|
|
rewardDialog.userName = row.name
|
|
|
rewardDialog.fulfillerId = row.id
|
|
|
- rewardDialog.form = { type: 'reward', target: 'points', amount: 10, reason: '' }
|
|
|
+ rewardDialog.form = { type: fulfillerEnums.ActionType.ADD, target: 'points', amount: 10, reason: '' }
|
|
|
rewardDialog.visible = true
|
|
|
}
|
|
|
|
|
|
@@ -932,8 +974,9 @@ const submitReward = async () => {
|
|
|
type: rewardDialog.form.type,
|
|
|
target: rewardDialog.form.target,
|
|
|
amount: amount,
|
|
|
- reason: rewardDialog.form.reason
|
|
|
- })
|
|
|
+ reason: rewardDialog.form.reason,
|
|
|
+ bizType: rewardDialog.form.type === fulfillerEnums.ActionType.ADD ? 'admin_reward' : 'admin_punish'
|
|
|
+ } as any)
|
|
|
ElMessage.success('操作成功')
|
|
|
rewardDialog.visible = false
|
|
|
getList()
|
|
|
@@ -943,11 +986,11 @@ const submitReward = async () => {
|
|
|
const handleCommand = async (cmd: string, row: FlfFulfillerVO) => {
|
|
|
if (cmd === 'adjustPoints') {
|
|
|
pointsDialog.currentRow = row
|
|
|
- pointsDialog.form = { type: 'add', amount: 0, reason: '' }
|
|
|
+ pointsDialog.form = { type: fulfillerEnums.ActionType.ADD, amount: 0, reason: '' }
|
|
|
pointsDialog.visible = true
|
|
|
} else if (cmd === 'adjustBalance') {
|
|
|
balanceDialog.currentRow = row
|
|
|
- balanceDialog.form = { type: 'add', subType: 'reward', amount: 0, reason: '' }
|
|
|
+ balanceDialog.form = { type: fulfillerEnums.ActionType.ADD, subType: 'admin_reward', amount: 0, reason: '' }
|
|
|
balanceDialog.visible = true
|
|
|
} else if (cmd === 'disable') {
|
|
|
await ElMessageBox.confirm(`确定禁用履约者【${row.name}】吗?禁用后将无法接单。`, '提示', { type: 'warning' })
|
|
|
@@ -979,8 +1022,9 @@ const submitPointsAdjust = async () => {
|
|
|
fulfillerId: pointsDialog.currentRow.id,
|
|
|
type: pointsDialog.form.type,
|
|
|
amount: pointsDialog.form.amount,
|
|
|
- reason: pointsDialog.form.reason
|
|
|
- })
|
|
|
+ reason: pointsDialog.form.reason,
|
|
|
+ bizType: pointsDialog.form.type === fulfillerEnums.ActionType.ADD ? 'admin_reward' : 'admin_punish'
|
|
|
+ } as any)
|
|
|
ElMessage.success('积分调整成功')
|
|
|
pointsDialog.visible = false
|
|
|
getList()
|
|
|
@@ -1056,6 +1100,7 @@ onMounted(() => {
|
|
|
getList()
|
|
|
loadAllTags()
|
|
|
loadAreaStations()
|
|
|
+ loadServiceOptions()
|
|
|
})
|
|
|
</script>
|
|
|
|