feat(KYC身份审核页): 对接接口
This commit is contained in:
parent
3099255681
commit
90db4287d1
@ -604,11 +604,12 @@ export function getUserIdentity(userId) {
|
||||
// 用户认证身份信息
|
||||
export function getUserBankIdentityInfo(params) {
|
||||
return request({
|
||||
url: "/user/bank-identity-info/page",
|
||||
url: "/user/withdraw-info/page",
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 用户认证身份信息审核
|
||||
export function auditUserBankIdentityInfo(data) {
|
||||
return request({
|
||||
@ -618,6 +619,24 @@ export function auditUserBankIdentityInfo(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 用户认证身份信息审核(通过)
|
||||
export function withdrawInfoPass(data) {
|
||||
return request({
|
||||
url: "/user/withdraw-info/pass",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 用户认证身份信息审核(驳回)
|
||||
export function withdrawInfoNotPass(data) {
|
||||
return request({
|
||||
url: "/user/withdraw-info/not-pass",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 用户认证身份信息-导出
|
||||
export function exportUserBankIdentityInfo(params, excelName) {
|
||||
return httpGetExport("/user/bank-identity-info/export", params, excelName);
|
||||
@ -640,3 +659,12 @@ export function pageUserDiamondBalance(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 更新货运代理账户信息(支持的国家和联系方式)
|
||||
export function updateInfoCP(data) {
|
||||
return request({
|
||||
url: "/freight/update-info",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@ -14,12 +14,18 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<span style="float: left;"> <sys-origin-icon :icon="item.value" :desc="item.value" /></span>
|
||||
<span style="float: left;">
|
||||
<sys-origin-icon :icon="item.value" :desc="item.value"
|
||||
/></span>
|
||||
<span style="float: left;margin-left:10px">{{ item.label }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="filter-item">
|
||||
<account-input v-model="listQuery.userId" :sys-origin="listQuery.sysOrigin" placeholder="用户ID" />
|
||||
<account-input
|
||||
v-model="listQuery.userId"
|
||||
:sys-origin="listQuery.sysOrigin"
|
||||
placeholder="用户ID"
|
||||
/>
|
||||
</div>
|
||||
<el-select
|
||||
v-model="listQuery.status"
|
||||
@ -62,24 +68,46 @@
|
||||
>
|
||||
<el-table-column prop="sysOrigin" label="系统" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<sys-origin-icon :icon="scope.row.sysOrigin" :desc="scope.row.sysOrigin" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用户" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<user-table-exhibit :user-profile="scope.row.userProfile" :query-details="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份图片" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
style="width: 50px; height: 50px"
|
||||
:src="scope.row.identityCover"
|
||||
:preview-src-list="[scope.row.identityCover]"
|
||||
<sys-origin-icon
|
||||
:icon="scope.row.sysOrigin"
|
||||
:desc="scope.row.sysOrigin"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contact" label="手机号" align="center" min-width="100" />
|
||||
<el-table-column label="用户" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<user-table-exhibit
|
||||
:user-profile="scope.row.userProfile"
|
||||
:query-details="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份图片" align="center" min-width="190">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="Array.isArray(scope.row.passportFrontUrl)">
|
||||
<el-image
|
||||
v-for="(url, index) in scope.row.passportFrontUrl"
|
||||
:key="index"
|
||||
style="width: 50px; height: 50px; margin-right: 5px;"
|
||||
:src="url"
|
||||
:preview-src-list="scope.row.passportFrontUrl"
|
||||
:initial-index="index"
|
||||
/>
|
||||
</div>
|
||||
<el-image
|
||||
v-else
|
||||
style="width: 50px; height: 50px"
|
||||
:src="scope.row.passportFrontUrl"
|
||||
:preview-src-list="[scope.row.passportFrontUrl]"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contactNumber"
|
||||
label="手机号"
|
||||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column label="状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
@ -90,17 +118,65 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" label="描述" align="center" min-width="200" />
|
||||
<el-table-column prop="auditDescription" label="审核描述" align="center" min-width="200" />
|
||||
<el-table-column prop="createTime" label="创建时间" align="center" width="160">
|
||||
<el-table-column
|
||||
prop="otherDescription"
|
||||
label="描述"
|
||||
align="center"
|
||||
min-width="200"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
prop="auditDescription"
|
||||
label="审核描述"
|
||||
align="center"
|
||||
min-width="200"
|
||||
/> -->
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
align="center"
|
||||
width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | dateFormat }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateTime" label="修改时间" align="center" width="160" />
|
||||
<el-table-column
|
||||
prop="updateTime"
|
||||
label="修改时间"
|
||||
align="center"
|
||||
width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.updateTime | dateFormat }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" :disabled="scope.row.status !== 'NONE' && scope.row.status !== 'PENDING'" @click="auditStatus(scope.row, false)">审核</el-button>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
:disabled="
|
||||
scope.row.status !== 'NONE' && scope.row.status !== 'PENDING'
|
||||
"
|
||||
@click="auditStatus(scope.row, false)"
|
||||
>审核</el-button
|
||||
> -->
|
||||
<el-button
|
||||
type="text"
|
||||
:disabled="
|
||||
scope.row.status !== 'NONE' && scope.row.status !== 'PENDING'
|
||||
"
|
||||
@click="auditHandle(scope.row.id, 'PASS')"
|
||||
>通过</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: red;"
|
||||
:disabled="
|
||||
scope.row.status !== 'NONE' && scope.row.status !== 'PENDING'
|
||||
"
|
||||
@click="auditHandle(scope.row.id, 'NOT_PASS')"
|
||||
>驳回</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -113,11 +189,7 @@
|
||||
/>
|
||||
|
||||
<div class="gold-input-box">
|
||||
<el-dialog
|
||||
:title="'审核'"
|
||||
:visible="inputBoxVisible"
|
||||
width="400px"
|
||||
>
|
||||
<el-dialog :title="'审核'" :visible="inputBoxVisible" width="400px">
|
||||
<el-form
|
||||
ref="form"
|
||||
:rules="formRules"
|
||||
@ -146,7 +218,6 @@
|
||||
:rows="3"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="hideInputBox()">
|
||||
@ -182,7 +253,6 @@
|
||||
label-position="left"
|
||||
label-width="70px"
|
||||
>
|
||||
|
||||
<el-form-item label="系统" prop="sysOrigin">
|
||||
<el-select
|
||||
v-model="exportQuery.sysOrigin"
|
||||
@ -197,8 +267,12 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<span style="float: left;"> <sys-origin-icon :icon="item.value" :desc="item.value" /></span>
|
||||
<span style="float: left;margin-left:10px">{{ item.label }}</span>
|
||||
<span style="float: left;">
|
||||
<sys-origin-icon :icon="item.value" :desc="item.value"
|
||||
/></span>
|
||||
<span style="float: left;margin-left:10px">{{
|
||||
item.label
|
||||
}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -228,32 +302,42 @@
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="drawer-footer">
|
||||
<el-button @click="exportConditionClose()">关闭</el-button>
|
||||
<el-button type="primary" :disabled="exportLoading" :loading="exportLoading" @click="exportConditionSubmit()">导出</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="exportLoading"
|
||||
:loading="exportLoading"
|
||||
@click="exportConditionSubmit()"
|
||||
>导出</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserBankIdentityInfo, auditUserBankIdentityInfo, exportUserBankIdentityInfo } from '@/api/app-user'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { pickerOptions } from '@/constant/el-const'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {
|
||||
getUserBankIdentityInfo,
|
||||
auditUserBankIdentityInfo,
|
||||
withdrawInfoPass, // 用户认证身份信息审核(通过)
|
||||
withdrawInfoNotPass, // 用户认证身份信息审核(驳回)
|
||||
exportUserBankIdentityInfo
|
||||
} from "@/api/app-user";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { pickerOptions } from "@/constant/el-const";
|
||||
import { mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'UserPropsTable',
|
||||
name: "UserPropsTable",
|
||||
components: { Pagination },
|
||||
data() {
|
||||
const commonRules = [
|
||||
{ required: true, message: '必填字段', trigger: 'blur' }
|
||||
]
|
||||
{ required: true, message: "必填字段", trigger: "blur" }
|
||||
];
|
||||
|
||||
return {
|
||||
runningWaterVisible: false,
|
||||
@ -263,16 +347,16 @@ export default {
|
||||
searchDisabled: false,
|
||||
inputBoxVisible: false,
|
||||
exportConditionVisible: false,
|
||||
thatSelectedUserId: '',
|
||||
thatSelectedUserId: "",
|
||||
list: [],
|
||||
total: 0,
|
||||
exportLoading: false,
|
||||
pickerOptions,
|
||||
exportQuery: {
|
||||
startCreateDate: '',
|
||||
endCreateDate: '',
|
||||
startCreateDate: "",
|
||||
endCreateDate: "",
|
||||
status,
|
||||
sysOrigin: ''
|
||||
sysOrigin: ""
|
||||
},
|
||||
exportQueryRules: {
|
||||
startCreateDate: commonRules,
|
||||
@ -282,24 +366,24 @@ export default {
|
||||
listQuery: {
|
||||
cursor: 1,
|
||||
limit: 20,
|
||||
userId: '',
|
||||
status: '',
|
||||
sysOrigin: 'HALAR'
|
||||
userId: "",
|
||||
status: "PENDING",
|
||||
sysOrigin: "LIKEI"
|
||||
},
|
||||
formData: {
|
||||
id: '',
|
||||
status: '',
|
||||
auditDescription: ''
|
||||
id: "",
|
||||
status: "",
|
||||
auditDescription: ""
|
||||
},
|
||||
formRules: {
|
||||
status: commonRules
|
||||
},
|
||||
listLoading: true,
|
||||
formEditVisable: false
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissionsSysOriginPlatforms'])
|
||||
...mapGetters(["permissionsSysOriginPlatforms"])
|
||||
},
|
||||
watch: {
|
||||
rangeDate: {
|
||||
@ -307,110 +391,169 @@ export default {
|
||||
deep: true,
|
||||
handler(newVal) {
|
||||
if (newVal && newVal.length > 0) {
|
||||
this.exportQuery.startCreateDate = newVal[0]
|
||||
this.exportQuery.endCreateDate = newVal[1]
|
||||
return
|
||||
this.exportQuery.startCreateDate = newVal[0];
|
||||
this.exportQuery.endCreateDate = newVal[1];
|
||||
return;
|
||||
}
|
||||
this.exportQuery.startCreateDate = ''
|
||||
this.exportQuery.endCreateDate = ''
|
||||
this.exportQuery.startCreateDate = "";
|
||||
this.exportQuery.endCreateDate = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const that = this
|
||||
const querySystem = this.permissionsSysOriginPlatforms[0]
|
||||
const that = this;
|
||||
const querySystem = this.permissionsSysOriginPlatforms[0];
|
||||
if (!querySystem) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
that.listQuery.sysOrigin = querySystem.value
|
||||
that.renderData()
|
||||
that.listQuery.sysOrigin = querySystem.value;
|
||||
that.renderData();
|
||||
},
|
||||
methods: {
|
||||
renderData(isReset) {
|
||||
const that = this
|
||||
const that = this;
|
||||
if (isReset === true) {
|
||||
that.listQuery.cursor = 1
|
||||
that.listQuery.cursor = 1;
|
||||
}
|
||||
that.listLoading = true
|
||||
getUserBankIdentityInfo(that.listQuery).then(res => {
|
||||
const { body } = res
|
||||
that.total = body.total || 0
|
||||
that.list = body.records
|
||||
that.listLoading = false
|
||||
}).catch(er => {
|
||||
that.listLoading = false
|
||||
})
|
||||
that.listLoading = true;
|
||||
getUserBankIdentityInfo(that.listQuery)
|
||||
.then(res => {
|
||||
const { body } = res;
|
||||
that.total = body.total || 0;
|
||||
|
||||
that.list = body.records.map(record => {
|
||||
try {
|
||||
// 假设 passportFrontUrl 是 JSON 字符串,需要解析
|
||||
return {
|
||||
...record,
|
||||
passportFrontUrl: record.passportFrontUrl
|
||||
? JSON.parse(record.passportFrontUrl)
|
||||
: null
|
||||
};
|
||||
} catch (error) {
|
||||
// 如果解析失败,保留原值或设置默认值
|
||||
console.warn(
|
||||
"Failed to parse passportFrontUrl for record:",
|
||||
record
|
||||
);
|
||||
return record;
|
||||
}
|
||||
});
|
||||
that.listLoading = false;
|
||||
})
|
||||
.catch(er => {
|
||||
that.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleSearch() {
|
||||
this.renderData(true)
|
||||
this.renderData(true);
|
||||
},
|
||||
handleMouseEnter(row) {
|
||||
this.thatRow = row
|
||||
this.thatRow = row;
|
||||
},
|
||||
formEditSuccess() {
|
||||
this.formEditVisable = false
|
||||
this.renderData()
|
||||
this.formEditVisable = false;
|
||||
this.renderData();
|
||||
},
|
||||
auditStatus(row, type) {
|
||||
const that = this
|
||||
const that = this;
|
||||
that.formData = {
|
||||
id: row.id,
|
||||
auditDescription: ''
|
||||
}
|
||||
that.inputBoxVisible = true
|
||||
auditDescription: ""
|
||||
};
|
||||
that.inputBoxVisible = true;
|
||||
},
|
||||
hideInputBox() {
|
||||
const that = this
|
||||
that.inputBoxVisible = false
|
||||
const that = this;
|
||||
that.inputBoxVisible = false;
|
||||
},
|
||||
auditSubmit() {
|
||||
const that = this
|
||||
const that = this;
|
||||
that.$refs.form.validate(valid => {
|
||||
if (!valid) {
|
||||
console.error('error submit!!')
|
||||
return
|
||||
console.error("error submit!!");
|
||||
return;
|
||||
}
|
||||
that.listLoading = true
|
||||
auditUserBankIdentityInfo(that.formData).then(res => {
|
||||
that.$message.success('操作成功')
|
||||
that.inputBoxVisible = false
|
||||
that.listLoading = false
|
||||
that.renderData()
|
||||
}).catch(er => {
|
||||
that.listLoading = false
|
||||
that.$message.error('操作失败')
|
||||
console.error(er)
|
||||
})
|
||||
})
|
||||
that.listLoading = true;
|
||||
auditUserBankIdentityInfo(that.formData)
|
||||
.then(res => {
|
||||
that.$message.success("操作成功");
|
||||
that.inputBoxVisible = false;
|
||||
that.listLoading = false;
|
||||
that.renderData();
|
||||
})
|
||||
.catch(er => {
|
||||
that.listLoading = false;
|
||||
that.$message.error("操作失败");
|
||||
console.error(er);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 审核操作
|
||||
auditHandle(id, status) {
|
||||
const that = this;
|
||||
let data = [id];
|
||||
that.listLoading = true;
|
||||
if (status == "PASS") {
|
||||
withdrawInfoPass(data)
|
||||
.then(res => {
|
||||
that.$message.success("操作成功");
|
||||
that.listLoading = false;
|
||||
that.renderData();
|
||||
})
|
||||
.catch(er => {
|
||||
that.listLoading = false;
|
||||
that.$message.error("操作失败");
|
||||
console.error(er);
|
||||
});
|
||||
} else if (status == "NOT_PASS") {
|
||||
withdrawInfoNotPass(data)
|
||||
.then(res => {
|
||||
that.$message.success("操作成功");
|
||||
that.listLoading = false;
|
||||
that.renderData();
|
||||
})
|
||||
.catch(er => {
|
||||
that.listLoading = false;
|
||||
that.$message.error("操作失败");
|
||||
console.error(er);
|
||||
});
|
||||
}
|
||||
},
|
||||
exportConditionClose() {
|
||||
if (this.exportLoading) {
|
||||
this.$message.warning('正在执行导出, 请稍等~')
|
||||
return
|
||||
this.$message.warning("正在执行导出, 请稍等~");
|
||||
return;
|
||||
}
|
||||
this.exportConditionVisible = false
|
||||
this.exportConditionVisible = false;
|
||||
},
|
||||
exprotUserBankIdentityInfo() {
|
||||
this.exportQuery.sysOrigin = this.listQuery.sysOrigin
|
||||
this.exportConditionVisible = true
|
||||
this.exportQuery.sysOrigin = this.listQuery.sysOrigin;
|
||||
this.exportConditionVisible = true;
|
||||
},
|
||||
exportConditionSubmit() {
|
||||
const that = this
|
||||
const that = this;
|
||||
that.$refs.exportQuery.validate(valid => {
|
||||
if (!valid) {
|
||||
console.error('error submit!!')
|
||||
return false
|
||||
console.error("error submit!!");
|
||||
return false;
|
||||
}
|
||||
that.exportLoading = true
|
||||
exportUserBankIdentityInfo(that.exportQuery, 'Export UserBankIdentityInfo').then(res => {
|
||||
that.exportLoading = false
|
||||
that.exportConditionVisible = false
|
||||
}).catch(er => {
|
||||
that.exportLoading = false
|
||||
this.$message.error('下载失败!')
|
||||
})
|
||||
})
|
||||
that.exportLoading = true;
|
||||
exportUserBankIdentityInfo(
|
||||
that.exportQuery,
|
||||
"Export UserBankIdentityInfo"
|
||||
)
|
||||
.then(res => {
|
||||
that.exportLoading = false;
|
||||
that.exportConditionVisible = false;
|
||||
})
|
||||
.catch(er => {
|
||||
that.exportLoading = false;
|
||||
this.$message.error("下载失败!");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user