|
@@ -131,7 +131,22 @@
|
|
|
<el-table-column label="操作" align="center" fixed="right" min-width="140">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" @click="handleDetail(scope.row)">详情</el-button>
|
|
|
- <el-button link type="primary" @click="handlePay(scope.row)" v-if="!scope.row.payStatus && scope.row.cancelType !== '10'" v-hasPermi="['menduner:system:trade-order:update']">
|
|
|
+ <el-button
|
|
|
+ v-if="!scope.row.payStatus && ['1', '2'].includes(scope.row.type)"
|
|
|
+ link
|
|
|
+ type="success"
|
|
|
+ @click="handleUpdateOrder(scope.row)"
|
|
|
+ v-hasPermi="['menduner:system:job-advertised:manual:submit']"
|
|
|
+ >
|
|
|
+ 职位发布
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handlePay(scope.row)"
|
|
|
+ v-if="!scope.row.payStatus && scope.row.cancelType !== '10'"
|
|
|
+ v-hasPermi="['menduner:system:trade-order:update']"
|
|
|
+ >
|
|
|
前往支付
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -230,10 +245,10 @@ const resetQuery = () => {
|
|
|
}
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
-const formRef = ref()
|
|
|
-const openForm = (type: string, id?: number) => {
|
|
|
- formRef.value.open(type, id)
|
|
|
-}
|
|
|
+// const formRef = ref()
|
|
|
+// const openForm = (type: string, id?: number) => {
|
|
|
+// formRef.value.open(type, id)
|
|
|
+// }
|
|
|
|
|
|
// 订单详情
|
|
|
const detailRef = ref()
|
|
@@ -249,6 +264,16 @@ const handleToDetail = (row: object) => {
|
|
|
else push({ name: 'PersonDetail', query: { id: row?.person?.id, userId: row?.userId } })
|
|
|
}
|
|
|
|
|
|
+// 职位发布
|
|
|
+const handleUpdateOrder = async ({ spuId }) => {
|
|
|
+ try {
|
|
|
+ await message.confirm('是否确认发布此职位?')
|
|
|
+ await TradeOrderApi.updateOrderStatusToPublish(spuId)
|
|
|
+ await getList()
|
|
|
+ message.success('职位发布成功!')
|
|
|
+ } catch {}
|
|
|
+}
|
|
|
+
|
|
|
/** 支付按钮操作 */
|
|
|
const handlePay = (row: any) => {
|
|
|
router.push({
|