e92d0a31 by 张猛

ztx个人审核

1 parent 132ee8c8
......@@ -416,6 +416,16 @@ export function audit(data) {
})
}
// 个人会员新版本审核
export function auditApi(data) {
return request({
url: `/person/paymentRangeNew/audit/${data.ids}?reason=${data.reason}&flag=${data.flag}`,
method: 'post',
params: data
})
}
// 审核详情
export function getHistoryByRelateId(rId) {
return request({
......
......@@ -66,9 +66,9 @@
<view>{{ (item.price * 1).toFixed(2) }}</view>
</view>
</view>
<view v-if="item.auditStatus==0" class="func">
<button @click="audit(item.recordId,'0')">拒绝</button>
<button @click="audit(item.recordId,'1')">同意</button>
<view v-if="item.auditStatus==1" class="func">
<button @click="audit(item,'2')">拒绝</button>
<button @click="audit(item,'1')">同意</button>
</view>
<!-- <view v-if="item.auditStatus==1 && item.isView == 1" class="func">-->
<!-- <button @click="handleDelete(item)">撤回</button>-->
......@@ -90,14 +90,8 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import {
onMounted,
ref
} from 'vue'
import {
onShow
} from '@dcloudio/uni-app'
import {auditList} from "@/common/api.js";
import {ref} from 'vue'
import {onShow} from '@dcloudio/uni-app'
const app = getApp();
const queryParams = ref({
......@@ -185,8 +179,8 @@ function handleDelete(row) {
})
}
function audit(recordId, flag) {
if (flag == '0') {
function audit(item, flag) {
if (flag == '2') {
// 拒绝
// 弹出框填写理由
uni.showModal({
......@@ -194,25 +188,27 @@ function audit(recordId, flag) {
editable: true,
success: function (res) {
if (res.confirm) {
if (!res) {
if (!res.content) {
uni.showToast({
title: '请输入拒绝理由',
icon: 'none'
})
return
} else {
doApproval(recordId, flag, res)
doApproval(item.rangId, flag, res.content)
}
}
}
})
} else if (flag == '1') {
}
if (flag == '1') {
// 二次确认
uni.showModal({
title: '提示',
content: `确定审批通过吗`,
success: function (res) {
if (res.confirm) {
doApproval(recordId, flag)
doApproval(item.rangId, flag)
}
}
})
......@@ -220,18 +216,18 @@ function audit(recordId, flag) {
}
function doApproval(recordId, flag, reason) {
var obj = {
let obj = {
flag: flag,
reason: reason || '',
recordIds: []
ids: []
}
obj.recordIds.push(recordId)
obj.ids.push(recordId)
console.log(obj)
uni.showLoading({
title: '加载中',
mask: true
})
api.audit(obj).then((res) => {
api.auditApi(obj).then((res) => {
uni.hideLoading()
uni.showToast({
title: '操作成功',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!