|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="detail">
|
|
|
- <div class="state" v-if="dataDetail?.status == 4">
|
|
|
+ <div class="state" v-if="dataDetail?.status == 5">
|
|
|
<el-icon :size="20" style="color: red; margin: 3px 10px 0 0;">
|
|
|
<CircleClose />
|
|
|
</el-icon>
|
|
|
@@ -15,7 +15,7 @@
|
|
|
<template #title>
|
|
|
<el-row :gutter="20" flex justify="space-between">
|
|
|
<el-col :span="12" style="display: flex; align-items: center;">
|
|
|
- <span class="firstName">{{ dataDetail?.name }}</span>
|
|
|
+ <span class="firstName">{{ initName(dataDetail?.name) }}</span>
|
|
|
<span class="allName">{{ dataDetail?.name }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="12" style="display: flex; justify-content: flex-end">
|
|
|
@@ -79,7 +79,11 @@
|
|
|
{{ scope.row.auditStatus == '0'?'未审核':scope.row.auditStatus == '1'?'审核通过':scope.row.auditStatus == '2'?'审核驳回':''}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" label="身份证件照"></el-table-column>
|
|
|
+ <el-table-column prop="" label="身份证件照">
|
|
|
+ <template #default="scope">
|
|
|
+ <img class="cardImage" :src="dataDetail?.fileList?.[0].fileUrl">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="cardFile" label="银行卡照">
|
|
|
<template #default="scope">
|
|
|
<img class="cardImage" :src="scope.row.cardFile">
|
|
|
@@ -142,7 +146,7 @@
|
|
|
title="编辑"
|
|
|
width="1000"
|
|
|
>
|
|
|
- <addOperation></addOperation>
|
|
|
+ <addOperation ref="AddOperationRef" @closeDialog="closeAddOperation"></addOperation>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
v-model="allocationShow"
|
|
|
@@ -155,10 +159,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref } from 'vue'
|
|
|
+import {nextTick, ref} from 'vue'
|
|
|
import addOperation from './modules/addOperation.vue'
|
|
|
import addCard from './modules/addCard.vue'
|
|
|
import allocation from './modules/allocation.vue'
|
|
|
+import pinyin from "js-pinyin";
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import Allocation from "@/views/operationManagement/modules/allocation.vue";
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
@@ -166,6 +171,8 @@ import api from '@/api'
|
|
|
import {OperationIsEnable} from "@/api/modules/operation.ts";
|
|
|
import router from "@/router";
|
|
|
|
|
|
+let AddOperationRef = ref(null)
|
|
|
+
|
|
|
let myRouter = useRouter()
|
|
|
const myRoute = useRoute()
|
|
|
|
|
|
@@ -201,7 +208,8 @@ const handleCommand = (e) => {
|
|
|
if(action === 'confirm') {
|
|
|
let data = {
|
|
|
ids: [myRoute.query.id],
|
|
|
- isEnable: 1
|
|
|
+ isEnable: 1,
|
|
|
+ getAll: 0
|
|
|
}
|
|
|
operationIsEnable(data)
|
|
|
}
|
|
|
@@ -221,7 +229,8 @@ const handleCommand = (e) => {
|
|
|
if(action === 'confirm'){
|
|
|
let data = {
|
|
|
ids: [myRoute.query.id],
|
|
|
- isEnable: 0
|
|
|
+ isEnable: 0,
|
|
|
+ getAll: 0
|
|
|
}
|
|
|
operationIsEnable(data)
|
|
|
}
|
|
|
@@ -282,14 +291,17 @@ const closeAddBankCard = (type: string) => {
|
|
|
|
|
|
// 删除
|
|
|
const operationDel = (id: string[]) => {
|
|
|
- api.operationApi.operationDelete({ id: id }).then(res => {
|
|
|
+ api.operationApi.operationDelete({
|
|
|
+ ids: id,
|
|
|
+ getAll: 0
|
|
|
+ }).then(res => {
|
|
|
if(res?.code == 200) {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
|
type: 'success'
|
|
|
})
|
|
|
myRouter.push({
|
|
|
- path: '/operation',
|
|
|
+ path: 'operationManagement/operation',
|
|
|
})
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
@@ -319,9 +331,18 @@ const operationIsEnable = (data: OperationIsEnable) => {
|
|
|
|
|
|
// 审核通过
|
|
|
const checkPass = () => {
|
|
|
- ElMessage({
|
|
|
- message: '审核通过!',
|
|
|
- type: 'success',
|
|
|
+ api.operationApi.salesmanAuthSuccess({ userInfoId: dataDetail.value.id }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
// 审核不通过
|
|
|
@@ -334,8 +355,25 @@ const checkNotPass = () => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
-
|
|
|
+ }).then(({ value, action } ) => {
|
|
|
+ if(action == 'confirm') {
|
|
|
+ api.operationApi.salesmanAuthFailed({
|
|
|
+ userInfoId: dataDetail.value.id,
|
|
|
+ approvalOpinion: value
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}).catch(( action ) => {
|
|
|
|
|
|
})
|
|
|
@@ -345,6 +383,15 @@ const checkNotPass = () => {
|
|
|
let dialogShow = ref(false)
|
|
|
const editDetail = () => {
|
|
|
dialogShow.value = true
|
|
|
+ nextTick(() => {
|
|
|
+ AddOperationRef.value.initEditData(dataDetail.value.id)
|
|
|
+ })
|
|
|
+}
|
|
|
+const closeAddOperation = (text: string) => {
|
|
|
+ if(text == '确定') {
|
|
|
+ initDetail()
|
|
|
+ }
|
|
|
+ dialogShow.value = false
|
|
|
}
|
|
|
|
|
|
// 详情
|
|
|
@@ -385,6 +432,11 @@ const bankCardChange = (list, code) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 名字转换首字母
|
|
|
+const initName = (name) => {
|
|
|
+ return name?pinyin.getFullChars(name).substring(0, 1):''
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
initDetail()
|
|
|
initBankCard()
|