소스 검색

commit 提交客户资料相关操作(除了修改和新增) 重新整理

xkwg 4 년 전
부모
커밋
38c0de9f7e

+ 13 - 5
src/views/information/custom/compoments/cancel/index.vue

@@ -112,12 +112,11 @@
 <script lang="ts">
 import {defineComponent, PropType, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { Modal } from 'ant-design-vue';
-import {ModifyUserInfoApplyReq, ModifyUserInfoReq, QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
+import {message, Modal} from 'ant-design-vue';
+import { ModifyUserInfoReq, QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
 import {formatValue} from "@/common/methods";
 import {getCardTypeName, getStatusName} from "@/views/information/custom/setup";
 import {cancelCustomInfo} from "@/views/information/custom/compoments/setup";
-import {getUserId} from "@/services/bus/account";
 
 export default defineComponent({
     name: 'custom_info_btn_cancel',
@@ -128,7 +127,7 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props) {
+    setup(props,context) {
         const { visible, cancel } = closeModal('custom_info_btn_cancel');
         const {loading, ModifyUserInfo} = cancelCustomInfo()
         function submit() {
@@ -144,7 +143,16 @@ export default defineComponent({
                         userid: props.selectedRow.userid,//用户ID
                         userstate: 1,       //开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 (必填)
                     }
-                    ModifyUserInfo(req, cancel)
+                    // 撤销申请 将状态设置为未提交
+                    ModifyUserInfo(req)
+                        .then(res => {
+                            message.success(res)
+                            // 通知上层  刷新数据
+                            context.emit('refresh');
+                            cancel();
+                        }).catch(err => {
+                            message.error(err)
+                        })
                 },
                 onCancel() {
                     console.log('Cancel');

+ 148 - 126
src/views/information/custom/compoments/check/index.vue

@@ -1,128 +1,131 @@
 <template>
-  <!-- 审核客户资料-->
-  <a-modal class="custom_info_btn_check"
-           title="审核客户资料"
-           v-model:visible="visible"
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                type="primary"
-                @click="cancel">取消</a-button>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">审核通过</a-button>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="refuseSubmit">审核拒绝</a-button>
-    </template>
-    <a-form class="inlineForm"
-            :form="form"
-            @submit="handleSearch">
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="客户类型">
-            <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="企业名称">
-            <span class="white">{{ formatValue(selectedRow.customername)}}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="企业简称">
-            <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件类型">
-            <span class="white">{{ getCardTypeName(selectedRow.cardtype) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="法定代表人">
-            <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件号码">
-            <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="纳税人识别号">
-            <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="营业执照">
-            <div class="upload">
-              <div class="look">查看附件</div>
-            </div>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人手机号">
-            <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="状态">
-            <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="通讯地址">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="备注">
-            <span class="white">{{ formatValue(selectedRow.remark) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </a-form>
-  </a-modal>
+    <!-- 审核客户资料-->
+    <a-modal class="custom_info_btn_check"
+             title="审核客户资料"
+             v-model:visible="visible"
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="submit"
+                      type="primary"
+                      @click="cancel">取消
+            </a-button>
+            <a-button key="submit"
+                      type="primary"
+                      :loading="loading"
+                      @click="submit">审核通过
+            </a-button>
+            <a-button key="submit"
+                      type="primary"
+                      :loading="loading"
+                      @click="refuseSubmit">审核拒绝
+            </a-button>
+        </template>
+        <a-form class="inlineForm"
+                :form="form"
+                @submit="handleSearch">
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="客户类型">
+                        <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="企业名称">
+                        <span class="white">{{ formatValue(selectedRow.customername) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="企业简称">
+                        <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="证件类型">
+                        <span class="white">{{ getCardTypeName(selectedRow.cardtype) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="法定代表人">
+                        <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="证件号码">
+                        <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="纳税人识别号">
+                        <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="营业执照">
+                        <div class="upload">
+                            <div class="look">查看附件</div>
+                        </div>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="联系人">
+                        <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="联系人手机号">
+                        <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="联系电话">
+                        <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="状态">
+                        <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="24">
+                    <a-form-item label="通讯地址">
+                        <span class="white">{{ formatValue(selectedRow.address) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="24">
+                    <a-form-item label="备注">
+                        <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import { ModifyUserInfoReq, QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { formatValue } from '@/common/methods';
-import { getCardTypeName, getStatusName } from '@/views/information/custom/setup';
-import { cancelCustomInfo, checkCustomInfo } from '@/views/information/custom/compoments/setup';
-import { UserInfoCheckMangeReq } from '@/services/proto/accountinfo/interface';
-import { getSelectedAccountId, getUserId } from '@/services/bus/account';
-import {Modal} from "ant-design-vue";
+import {defineComponent, PropType, ref} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {ModifyUserInfoReq, QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
+import {formatValue} from '@/common/methods';
+import {getCardTypeName, getStatusName} from '@/views/information/custom/setup';
+import {cancelCustomInfo, checkCustomInfo} from '@/views/information/custom/compoments/setup';
+import {UserInfoCheckMangeReq} from '@/services/proto/accountinfo/interface';
+import {getSelectedAccountId, getUserId} from '@/services/bus/account';
+import {message, Modal} from "ant-design-vue";
 
 export default defineComponent({
     name: 'custom_info_btn_check',
@@ -133,15 +136,16 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props) {
-        const { loading, checkCustomerInfo } = checkCustomInfo();
-        const { visible, cancel } = closeModal('custom_info_btn_check');
+    setup(props, context) {
+        const {loading, checkCustomerInfo} = checkCustomInfo();
+        const {visible, cancel} = closeModal('custom_info_btn_check');
         const req: UserInfoCheckMangeReq = {
             audituserid: getUserId(),
             userid: props.selectedRow.userid,
             auditflag: 1,
             remark: '',
         };
+
         // 审核通过
         function submit() {
             Modal.confirm({
@@ -152,13 +156,22 @@ export default defineComponent({
                     console.log('OK');
                     req.auditflag = 1;
                     req.userid = props.selectedRow.userid;
-                    checkCustomerInfo(req, cancel);
+                    checkCustomerInfo(req)
+                        .then(res => {
+                            message.success(res)
+                            context.emit('refresh');
+                            cancel();
+                        })
+                        .catch(err => {
+                            message.error(err)
+                        })
                 },
                 onCancel() {
                     console.log('Cancel');
                 },
             });
         }
+
         // 审核拒绝
         function refuseSubmit() {
             Modal.confirm({
@@ -169,13 +182,22 @@ export default defineComponent({
                     console.log('OK');
                     req.auditflag = 2;
                     req.userid = props.selectedRow.userid;
-                    checkCustomerInfo(req, cancel);
+                    checkCustomerInfo(req)
+                        .then(res => {
+                            message.success(res)
+                            context.emit('refresh');
+                            cancel();
+                        })
+                        .catch(err => {
+                            message.error(err)
+                        })
                 },
                 onCancel() {
                     console.log('Cancel');
                 },
             });
         }
+
         return {
             visible,
             cancel,

+ 124 - 116
src/views/information/custom/compoments/delete/index.vue

@@ -1,117 +1,118 @@
 <template>
-  <!-- 删除客户资料-->
-  <a-modal class="recover-custom"
-           title="删除客户资料"
-           v-model:visible="visible"
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">删除客户资料</a-button>
-    </template>
-    <a-form class="inlineForm"
-            :form="form"
-            @submit="handleSearch">
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="客户类型">
-            <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="企业名称">
-            <span class="white">{{ formatValue(selectedRow.customername) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="企业简称">
-            <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件类型">
-            <span class="white">{{ formatValue(selectedRow.cardtypename) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="法定代表人">
-            <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件号码">
-            <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="纳税人识别号">
-            <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="营业执照">
-            <a class="blue">查看附件</a>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人手机号">
-            <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="状态">
-            <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="通讯地址">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="备注">
-            <span class="white">{{ formatValue(selectedRow.remark) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </a-form>
-  </a-modal>
+    <!-- 删除客户资料-->
+    <a-modal class="recover-custom"
+             title="删除客户资料"
+             v-model:visible="visible"
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="submit"
+                      type="primary"
+                      :loading="loading"
+                      @click="submit">删除客户资料
+            </a-button>
+        </template>
+        <a-form class="inlineForm"
+                :form="form"
+                @submit="handleSearch">
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="客户类型">
+                        <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="企业名称">
+                        <span class="white">{{ formatValue(selectedRow.customername) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="企业简称">
+                        <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="证件类型">
+                        <span class="white">{{ formatValue(selectedRow.cardtypename) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="法定代表人">
+                        <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="证件号码">
+                        <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="纳税人识别号">
+                        <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="营业执照">
+                        <a class="blue">查看附件</a>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="联系人">
+                        <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="联系人手机号">
+                        <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="联系电话">
+                        <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="状态">
+                        <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="24">
+                    <a-form-item label="通讯地址">
+                        <span class="white">{{ formatValue(selectedRow.address) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="24">
+                    <a-form-item label="备注">
+                        <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import { deleteUserInfo } from '@/views/information/custom/compoments/setup';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { formatValue } from '@/common/methods';
-import { getStatusName } from '@/views/information/custom/setup';
-import { Modal } from 'ant-design-vue';
+import {defineComponent, PropType, ref} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {deleteUserInfo} from '@/views/information/custom/compoments/setup';
+import {QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
+import {formatValue} from '@/common/methods';
+import {getStatusName} from '@/views/information/custom/setup';
+import {message, Modal} from 'ant-design-vue';
 
 export default defineComponent({
     name: 'recover-custom',
@@ -123,18 +124,24 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('custom_info_btn_delete');
-        const { loading, deleteCustomerInfo } = deleteUserInfo();
+        const {visible, cancel} = closeModal('custom_info_btn_delete');
+        const {loading, deleteCustomerInfo} = deleteUserInfo();
+
         function submit() {
             Modal.confirm({
                 title: '是否确认删除客户资料',
                 okText: '确认删除',
                 cancelText: '取消',
                 onOk() {
-                    deleteCustomerInfo(props.selectedRow.userid).then(() => {
-                        cancel();
-                        // 通知上层  刷新数据
-                        context.emit('refresh');
+                    // 删除客户资料
+                    deleteCustomerInfo(props.selectedRow.userid)
+                        .then(res => {
+                            message.success(res);
+                            // 通知上层  刷新数据
+                            context.emit('refresh');
+                            cancel();
+                        }).catch(err => {
+                        message.error(err);
                     });
                 },
                 onCancel() {
@@ -142,6 +149,7 @@ export default defineComponent({
                 },
             });
         }
+
         return {
             visible,
             cancel,

+ 11 - 3
src/views/information/custom/compoments/disable/index.vue

@@ -116,7 +116,7 @@ import {updateUserAccount} from "@/views/information/custom/compoments/setup";
 import {QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
 import {formatValue} from "@/common/methods";
 import {getStatusName} from "@/views/information/custom/setup";
-import {Modal} from "ant-design-vue";
+import {message, Modal} from "ant-design-vue";
 
 export default defineComponent({
     name: 'custom-disable',
@@ -127,7 +127,7 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('custom_info_btn_disable');
         const maskClosableFlag = ref<boolean>(false);
         const  {loading, ModifyUserInfo} = updateUserAccount();
@@ -137,7 +137,15 @@ export default defineComponent({
                 okText: '确认停用',
                 cancelText: '取消',
                 onOk() {
-                    ModifyUserInfo(props.selectedRow.userid, 6, cancel);
+                    ModifyUserInfo(props.selectedRow.userid, 6)
+                        .then(res => {
+                            message.success(res)
+                            context.emit('refresh')
+                            cancel()
+                        })
+                        .catch(err => {
+                            message.error(err)
+                        })
                 },
                 onCancel() {
                     console.log('Cancel');

+ 11 - 3
src/views/information/custom/compoments/recover/index.vue

@@ -118,7 +118,7 @@ import {QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
 import {formatValue} from "@/common/methods";
 import {getStatusName} from "@/views/information/custom/setup";
 import {updateUserAccount} from "@/views/information/custom/compoments/setup";
-import {Modal} from "ant-design-vue";
+import {message, Modal} from "ant-design-vue";
 
 export default defineComponent({
     name: 'modify-custom',
@@ -129,7 +129,7 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const {visible, cancel} = closeModal('custom_info_btn_recover');
         const {loading, ModifyUserInfo} = updateUserAccount();
         // 恢复方法
@@ -139,7 +139,15 @@ export default defineComponent({
                 okText: '确认恢复',
                 cancelText: '取消',
                 onOk() {
-                    ModifyUserInfo(props.selectedRow.userid, 4, cancel);
+                    ModifyUserInfo(props.selectedRow.userid, 4)
+                        .then(res => {
+                            message.success(res)
+                            context.emit('refresh')
+                            cancel()
+                        })
+                        .catch(err => {
+                            message.error(err)
+                        })
                 },
                 onCancel() {
                     console.log('Cancel');

+ 33 - 54
src/views/information/custom/compoments/setup.ts

@@ -1,9 +1,10 @@
-import { QueryDeleteUserInfoApply, QueryModifyUserInfo, UpdateUserAccountStatus } from "@/services/go/ermcp/customInfo";
-import { ModifyUserInfoReq } from "@/services/go/ermcp/customInfo/interface";
-import { userInfoCheck } from "@/services/proto/accountinfo";
-import { UserInfoCheckMangeReq } from "@/services/proto/accountinfo/interface";
-import { message } from 'ant-design-vue';
-import { ref } from "vue";
+import {QueryDeleteUserInfoApply, QueryModifyUserInfo, UpdateUserAccountStatus} from "@/services/go/ermcp/customInfo";
+import {ModifyUserInfoReq} from "@/services/go/ermcp/customInfo/interface";
+import {userInfoCheck} from "@/services/proto/accountinfo";
+import {UserInfoCheckMangeReq} from "@/services/proto/accountinfo/interface";
+import {message} from 'ant-design-vue';
+import {ref} from "vue";
+import {BaseResponse} from "@/services/go";
 
 /**
  *  撤销客户资料 撤销后的数据会进入草稿(未提交)
@@ -12,26 +13,19 @@ export function cancelCustomInfo() {
     const loading = ref<boolean>(false);
 
     // 这里调用的是修改客户申请接口
-    function ModifyUserInfo(req: ModifyUserInfoReq, callback: Function) {
-        QueryModifyUserInfo(req)
+    function ModifyUserInfo(req: ModifyUserInfoReq): Promise<string> {
+        return QueryModifyUserInfo(req)
             .then((res) => {
-                if (res.result) {
-                    message.success("撤销成功")
-                    console.log('撤销客户资料成功');
-                    callback()
-                } else {
-                    message.error("撤销失败:" + res.message)
-                }
+                return Promise.resolve("撤销成功")
             })
             .catch((err) => {
-                cancelCustomInfo
-                message.error("撤销失败")
+                return Promise.reject("撤销失败:" + err)
             }).finally(() => {
                 loading.value = false
             })
     }
 
-    return { loading, ModifyUserInfo }
+    return {loading, ModifyUserInfo}
 }
 
 /**
@@ -42,34 +36,28 @@ export function updateUserAccount() {
     const loading = ref<boolean>(false);
 
     // 这里调用的是修改客户申请接口
-    function ModifyUserInfo(userID: number, accountStatus: number, callback: Function) {
-        UpdateUserAccountStatus(userID, accountStatus)
+    function ModifyUserInfo(userID: number, accountStatus: number): Promise<string> {
+        return UpdateUserAccountStatus(userID, accountStatus)
             .then((res) => {
-                if (res.result) {
-                    if (accountStatus === 4) {
-                        message.success("恢复成功")
-                    } else {
-                        message.success("停用成功")
-                    }
-                    console.log('更新用户资料成功 accountStatus = ' + accountStatus);
-                    callback()
+                console.log('更新用户资料成功 accountStatus = ' + accountStatus);
+                if (accountStatus === 4) {
+                    return Promise.resolve("恢复成功")
                 } else {
-                    if (accountStatus === 4) {
-                        message.error("恢复失败:" + res.message)
-                    } else {
-                        message.error("停用失败:" + res.message)
-                    }
+                    return Promise.resolve("停用成功")
                 }
             })
             .catch((err) => {
-                cancelCustomInfo
-                message.error("请求失败")
+                if (accountStatus === 4) {
+                    return Promise.reject("恢复失败:" + err.message)
+                } else {
+                    return Promise.reject("停用失败:" + err.message)
+                }
             }).finally(() => {
                 loading.value = false
             })
     }
 
-    return { loading, ModifyUserInfo }
+    return {loading, ModifyUserInfo}
 }
 
 /**
@@ -79,26 +67,19 @@ export function checkCustomInfo() {
     const loading = ref<boolean>(false);
 
     // 这里调用的是修改客户申请接口
-    function checkCustomerInfo(req: UserInfoCheckMangeReq, callback: Function) {
-        userInfoCheck(req)
+    function checkCustomerInfo(req: UserInfoCheckMangeReq): Promise<string> {
+        return userInfoCheck(req)
             .then((res) => {
-                if (res.RetCode == 200) {
-                    debugger
-                    message.success("审核成功")
-                    console.log('审核客户资料成功');
-                } else {
-                    message.success("审核成功:" + res.RetDesc)
-                }
-                callback()
+                return Promise.resolve("审核成功")
             })
             .catch((err) => {
-                message.error("提交失败")
+                return Promise.resolve("审核失败:" + err)
             }).finally(() => {
                 loading.value = false
             })
     }
 
-    return { loading, checkCustomerInfo }
+    return {loading, checkCustomerInfo}
 }
 
 /**
@@ -108,21 +89,19 @@ export function deleteUserInfo() {
     const loading = ref<boolean>(false);
 
     // 这里调用的是修改客户申请接口
-    function deleteCustomerInfo(userID: number) {
+    function deleteCustomerInfo(userID: number): Promise<string> {
         return QueryDeleteUserInfoApply(userID)
             .then((res) => {
-                message.success("删除成功")
-                Promise.resolve('ok')
+                return Promise.resolve("删除成功")
             })
             .catch((err) => {
-                cancelCustomInfo
-                message.error("删除失败")
+                return Promise.reject("删除失败:" + err)
             }).finally(() => {
                 loading.value = false
             })
     }
 
-    return { loading, deleteCustomerInfo }
+    return {loading, deleteCustomerInfo}
 }
 
 

+ 4 - 3
src/views/information/custom/list/checkpending/index.vue

@@ -33,13 +33,13 @@
         <!-- 详情 -->
         <CustomDetail :selectedRow="selectedRow"/>
         <!-- 修改 -->
-        <ModifyCustom :selectedRow="selectedRow"/>
+        <ModifyCustom :selectedRow="selectedRow" @refresh="queryTable"/>
         <!-- 停用 -->
         <DisableCustom/>
         <!-- 撤销 -->
-        <Cancel :selectedRow="selectedRow"/>
+        <Cancel :selectedRow="selectedRow"  @refresh="queryTable" />
         <!-- 审核客户资料 -->
-        <Check :selectedRow="selectedRow"/>
+        <Check :selectedRow="selectedRow" @refresh="queryTable"/>
     </div>
 </template>
 
@@ -107,6 +107,7 @@ export default defineComponent({
             search,
             getStatusName,
             getCardTypeName,
+            queryTable,
         };
     },
 });

+ 6 - 5
src/views/information/custom/list/normal-use/index.vue

@@ -29,13 +29,13 @@
             </a-table>
         </contextMenu>
         <!-- 新增 -->
-        <AddCustom/>
+        <AddCustom @refresh="queryTable"/>
         <!-- 详情 -->
-        <CustomDetail :selectedRow="selectedRow"/>
-        <!-- 修改 -->
-        <ModifyCustom :selectedRow="selectedRow"/>
+        <CustomDetail :selectedRow="selectedRow" @refresh="queryTable"/>
+<!--        &lt;!&ndash; 修改 &ndash;&gt;-->
+<!--        <ModifyCustom :selectedRow="selectedRow" @refresh="queryTable"/>-->
         <!-- 停用 -->
-        <DisableCustom :selectedRow="selectedRow"/>
+        <DisableCustom :selectedRow="selectedRow" @refresh="queryTable"/>
     </div>
 </template>
 
@@ -101,6 +101,7 @@ export default defineComponent({
             search,
             getStatusName,
             getCardTypeName,
+            queryTable
         };
     },
 });

+ 4 - 2
src/views/information/custom/list/stop-use/index.vue

@@ -31,12 +31,14 @@
     <!-- 新增 -->
     <AddCustom />
     <!-- 详情 -->
-    <CustomDetail :selectedRow="selectedRow" />
+    <CustomDetail :selectedRow="selectedRow"
+                  @refresh="queryTable"/>
     <!-- 删除 -->
     <DeleteCustom :selectedRow="selectedRow"
                   @refresh="queryTable" />
     <!-- 恢复客户资料 -->
-    <RecoverCustom :selectedRow="selectedRow" />
+    <RecoverCustom :selectedRow="selectedRow"
+                   @refresh="queryTable"/>
   </div>
 </template>
 

+ 7 - 3
src/views/information/custom/list/unsubmit/index.vue

@@ -31,11 +31,14 @@
         <!-- 新增 -->
         <AddCustom/>
         <!-- 详情 -->
-        <CustomDetail :selectedRow="selectedRow"/>
+        <CustomDetail :selectedRow="selectedRow"
+                      @refresh="queryTable"/>
         <!-- 修改 -->
-        <ModifyCustom :selectedRow="selectedRow"/>
+        <ModifyCustom :selectedRow="selectedRow"
+                      @refresh="queryTable"/>
         <!-- 删除 -->
-        <DeleteCustom :selectedRow="selectedRow"/>
+        <DeleteCustom :selectedRow="selectedRow"
+                      @refresh="queryTable"/>
 
     </div>
 </template>
@@ -104,6 +107,7 @@ export default defineComponent({
             DeleteCustom,
             getStatusName,
             getCardTypeName,
+            queryTable,
         };
     },
 });