|
@@ -1,32 +1,36 @@
|
|
|
import {QueryDeleteUserInfoApply, QueryModifyUserInfo, UpdateUserAccountStatus} from "@/services/go/ermcp/customInfo";
|
|
import {QueryDeleteUserInfoApply, QueryModifyUserInfo, UpdateUserAccountStatus} from "@/services/go/ermcp/customInfo";
|
|
|
-import { ModifyUserInfoReq} from "@/services/go/ermcp/customInfo/interface";
|
|
|
|
|
|
|
+import {ModifyUserInfoReq} from "@/services/go/ermcp/customInfo/interface";
|
|
|
import {ref} from "vue";
|
|
import {ref} from "vue";
|
|
|
-import { message } from 'ant-design-vue';
|
|
|
|
|
|
|
+import {message} from 'ant-design-vue';
|
|
|
import {userInfoCheck} from "@/services/proto/accountinfo";
|
|
import {userInfoCheck} from "@/services/proto/accountinfo";
|
|
|
import {UserInfoCheckMangeReq} from "@/services/proto/accountinfo/interface";
|
|
import {UserInfoCheckMangeReq} from "@/services/proto/accountinfo/interface";
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 撤销客户资料 撤销后的数据会进入草稿(未提交)
|
|
* 撤销客户资料 撤销后的数据会进入草稿(未提交)
|
|
|
*/
|
|
*/
|
|
|
-export function cancelCustomInfo(){
|
|
|
|
|
|
|
+export function cancelCustomInfo() {
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
+
|
|
|
// 这里调用的是修改客户申请接口
|
|
// 这里调用的是修改客户申请接口
|
|
|
- function ModifyUserInfo(req: ModifyUserInfoReq, callback: Function){
|
|
|
|
|
|
|
+ function ModifyUserInfo(req: ModifyUserInfoReq, callback: Function) {
|
|
|
QueryModifyUserInfo(req)
|
|
QueryModifyUserInfo(req)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- if(res.result){
|
|
|
|
|
|
|
+ if (res.result) {
|
|
|
message.success("撤销成功")
|
|
message.success("撤销成功")
|
|
|
console.log('撤销客户资料成功');
|
|
console.log('撤销客户资料成功');
|
|
|
callback()
|
|
callback()
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
message.error("撤销失败:" + res.message)
|
|
message.error("撤销失败:" + res.message)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {cancelCustomInfo
|
|
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ cancelCustomInfo
|
|
|
message.error("撤销失败")
|
|
message.error("撤销失败")
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
- loading.value = false
|
|
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return {loading, ModifyUserInfo}
|
|
return {loading, ModifyUserInfo}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -34,51 +38,55 @@ export function cancelCustomInfo(){
|
|
|
* 更新用户状态 用在停用或是启用
|
|
* 更新用户状态 用在停用或是启用
|
|
|
* 4:正常 6:注销(停用)
|
|
* 4:正常 6:注销(停用)
|
|
|
*/
|
|
*/
|
|
|
-export function updateUserAccount(){
|
|
|
|
|
|
|
+export function updateUserAccount() {
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
+
|
|
|
// 这里调用的是修改客户申请接口
|
|
// 这里调用的是修改客户申请接口
|
|
|
- function ModifyUserInfo(userID: number, accountStatus: number, callback: Function){
|
|
|
|
|
|
|
+ function ModifyUserInfo(userID: number, accountStatus: number, callback: Function) {
|
|
|
UpdateUserAccountStatus(userID, accountStatus)
|
|
UpdateUserAccountStatus(userID, accountStatus)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- if(res.result){
|
|
|
|
|
- if(accountStatus === 4){
|
|
|
|
|
|
|
+ if (res.result) {
|
|
|
|
|
+ if (accountStatus === 4) {
|
|
|
message.success("恢复成功")
|
|
message.success("恢复成功")
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
message.success("停用成功")
|
|
message.success("停用成功")
|
|
|
}
|
|
}
|
|
|
console.log('更新用户资料成功 accountStatus = ' + accountStatus);
|
|
console.log('更新用户资料成功 accountStatus = ' + accountStatus);
|
|
|
callback()
|
|
callback()
|
|
|
- }else{
|
|
|
|
|
- if(accountStatus === 4){
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (accountStatus === 4) {
|
|
|
message.error("恢复失败:" + res.message)
|
|
message.error("恢复失败:" + res.message)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
message.error("停用失败:" + res.message)
|
|
message.error("停用失败:" + res.message)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {cancelCustomInfo
|
|
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ cancelCustomInfo
|
|
|
message.error("请求失败")
|
|
message.error("请求失败")
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return {loading, ModifyUserInfo}
|
|
return {loading, ModifyUserInfo}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 审核客户资料 这里是走proto接口
|
|
* 审核客户资料 这里是走proto接口
|
|
|
*/
|
|
*/
|
|
|
-export function checkCustomInfo(){
|
|
|
|
|
|
|
+export function checkCustomInfo() {
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
+
|
|
|
// 这里调用的是修改客户申请接口
|
|
// 这里调用的是修改客户申请接口
|
|
|
- function checkCustomerInfo(req: UserInfoCheckMangeReq, callback: Function){
|
|
|
|
|
|
|
+ function checkCustomerInfo(req: UserInfoCheckMangeReq, callback: Function) {
|
|
|
userInfoCheck(req)
|
|
userInfoCheck(req)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- if(res.RetCode == 200){
|
|
|
|
|
|
|
+ if (res.RetCode == 200) {
|
|
|
debugger
|
|
debugger
|
|
|
message.success("审核成功")
|
|
message.success("审核成功")
|
|
|
console.log('审核客户资料成功');
|
|
console.log('审核客户资料成功');
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
message.success("审核成功:" + res.RetDesc)
|
|
message.success("审核成功:" + res.RetDesc)
|
|
|
}
|
|
}
|
|
|
callback()
|
|
callback()
|
|
@@ -89,32 +97,36 @@ export function checkCustomInfo(){
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return {loading, checkCustomerInfo}
|
|
return {loading, checkCustomerInfo}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 删除客户资料
|
|
* 删除客户资料
|
|
|
*/
|
|
*/
|
|
|
-export function deleteUserInfo(){
|
|
|
|
|
|
|
+export function deleteUserInfo() {
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
+
|
|
|
// 这里调用的是修改客户申请接口
|
|
// 这里调用的是修改客户申请接口
|
|
|
- function deleteCustomerInfo(userId: number, callback: Function){
|
|
|
|
|
- QueryDeleteUserInfoApply(userId)
|
|
|
|
|
|
|
+ function deleteCustomerInfo(userID: number, callback: Function) {
|
|
|
|
|
+ QueryDeleteUserInfoApply(userID)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- if(res.result){
|
|
|
|
|
|
|
+ if (res === 'OK') {
|
|
|
message.success("删除成功")
|
|
message.success("删除成功")
|
|
|
console.log('撤销客户资料成功');
|
|
console.log('撤销客户资料成功');
|
|
|
callback()
|
|
callback()
|
|
|
- }else{
|
|
|
|
|
- message.error("删除失败:" + res.message)
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ message.error("删除失败:" + res)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {cancelCustomInfo
|
|
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ cancelCustomInfo
|
|
|
message.error("删除失败")
|
|
message.error("删除失败")
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return {loading, deleteCustomerInfo}
|
|
return {loading, deleteCustomerInfo}
|
|
|
}
|
|
}
|
|
|
|
|
|