e92d0a31 by 张猛

ztx个人审核

1 parent 132ee8c8
...@@ -416,6 +416,16 @@ export function audit(data) { ...@@ -416,6 +416,16 @@ export function audit(data) {
416 }) 416 })
417 } 417 }
418 418
419 // 个人会员新版本审核
420 export function auditApi(data) {
421 return request({
422 url: `/person/paymentRangeNew/audit/${data.ids}?reason=${data.reason}&flag=${data.flag}`,
423 method: 'post',
424 params: data
425 })
426 }
427
428
419 // 审核详情 429 // 审核详情
420 export function getHistoryByRelateId(rId) { 430 export function getHistoryByRelateId(rId) {
421 return request({ 431 return request({
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
66 <view>{{ (item.price * 1).toFixed(2) }}</view> 66 <view>{{ (item.price * 1).toFixed(2) }}</view>
67 </view> 67 </view>
68 </view> 68 </view>
69 <view v-if="item.auditStatus==0" class="func"> 69 <view v-if="item.auditStatus==1" class="func">
70 <button @click="audit(item.recordId,'0')">拒绝</button> 70 <button @click="audit(item,'2')">拒绝</button>
71 <button @click="audit(item.recordId,'1')">同意</button> 71 <button @click="audit(item,'1')">同意</button>
72 </view> 72 </view>
73 <!-- <view v-if="item.auditStatus==1 && item.isView == 1" class="func">--> 73 <!-- <view v-if="item.auditStatus==1 && item.isView == 1" class="func">-->
74 <!-- <button @click="handleDelete(item)">撤回</button>--> 74 <!-- <button @click="handleDelete(item)">撤回</button>-->
...@@ -90,14 +90,8 @@ ...@@ -90,14 +90,8 @@
90 <script setup> 90 <script setup>
91 import * as api from '@/common/api.js' 91 import * as api from '@/common/api.js'
92 import config from '@/config.js' 92 import config from '@/config.js'
93 import { 93 import {ref} from 'vue'
94 onMounted, 94 import {onShow} from '@dcloudio/uni-app'
95 ref
96 } from 'vue'
97 import {
98 onShow
99 } from '@dcloudio/uni-app'
100 import {auditList} from "@/common/api.js";
101 95
102 const app = getApp(); 96 const app = getApp();
103 const queryParams = ref({ 97 const queryParams = ref({
...@@ -185,8 +179,8 @@ function handleDelete(row) { ...@@ -185,8 +179,8 @@ function handleDelete(row) {
185 }) 179 })
186 } 180 }
187 181
188 function audit(recordId, flag) { 182 function audit(item, flag) {
189 if (flag == '0') { 183 if (flag == '2') {
190 // 拒绝 184 // 拒绝
191 // 弹出框填写理由 185 // 弹出框填写理由
192 uni.showModal({ 186 uni.showModal({
...@@ -194,25 +188,27 @@ function audit(recordId, flag) { ...@@ -194,25 +188,27 @@ function audit(recordId, flag) {
194 editable: true, 188 editable: true,
195 success: function (res) { 189 success: function (res) {
196 if (res.confirm) { 190 if (res.confirm) {
197 if (!res) { 191 if (!res.content) {
198 uni.showToast({ 192 uni.showToast({
199 title: '请输入拒绝理由', 193 title: '请输入拒绝理由',
200 icon: 'none' 194 icon: 'none'
201 }) 195 })
196 return
202 } else { 197 } else {
203 doApproval(recordId, flag, res) 198 doApproval(item.rangId, flag, res.content)
204 } 199 }
205 } 200 }
206 } 201 }
207 }) 202 })
208 } else if (flag == '1') { 203 }
204 if (flag == '1') {
209 // 二次确认 205 // 二次确认
210 uni.showModal({ 206 uni.showModal({
211 title: '提示', 207 title: '提示',
212 content: `确定审批通过吗`, 208 content: `确定审批通过吗`,
213 success: function (res) { 209 success: function (res) {
214 if (res.confirm) { 210 if (res.confirm) {
215 doApproval(recordId, flag) 211 doApproval(item.rangId, flag)
216 } 212 }
217 } 213 }
218 }) 214 })
...@@ -220,18 +216,18 @@ function audit(recordId, flag) { ...@@ -220,18 +216,18 @@ function audit(recordId, flag) {
220 } 216 }
221 217
222 function doApproval(recordId, flag, reason) { 218 function doApproval(recordId, flag, reason) {
223 var obj = { 219 let obj = {
224 flag: flag, 220 flag: flag,
225 reason: reason || '', 221 reason: reason || '',
226 recordIds: [] 222 ids: []
227 } 223 }
228 obj.recordIds.push(recordId) 224 obj.ids.push(recordId)
229 console.log(obj) 225 console.log(obj)
230 uni.showLoading({ 226 uni.showLoading({
231 title: '加载中', 227 title: '加载中',
232 mask: true 228 mask: true
233 }) 229 })
234 api.audit(obj).then((res) => { 230 api.auditApi(obj).then((res) => {
235 uni.hideLoading() 231 uni.hideLoading()
236 uni.showToast({ 232 uni.showToast({
237 title: '操作成功', 233 title: '操作成功',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!