Explorar o código

恢复客户资料

huangbin %!s(int64=4) %!d(string=hai) anos
pai
achega
3562ed20e0

+ 0 - 18
src/views/information/custom/compoments/setup.ts

@@ -1,18 +0,0 @@
-import {
-    QueryModifyUserInfoApply,
-} from "@/services/go/ermcp/customInfo";
-import {ModifyUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
-import {Ref} from "vue";
-import {commonResultInfo, getRequestResultInfo} from "@/common/methods/request";
-import {ChangeCustomInfoSign} from "@/views/information/custom/setup";
-
-/**
- * 修改用户申请
- * @param type: 2新 增, type: 1保存草稿
- */
-export function modifyUserInfo(type: number, userInfoApply: ModifyUserInfoApplyReq, loading: Ref<boolean>): Promise<string>{
-    loading.value = true;
-    const sign = getRequestResultInfo(ChangeCustomInfoSign, type)  // 接口请求后的返回提示 这里统一进行管理
-    const result = QueryModifyUserInfoApply(userInfoApply)
-    return commonResultInfo(result, sign, loading)
-}

+ 123 - 123
src/views/information/goods/components/recover/index.vue

@@ -1,126 +1,126 @@
 <template>
-    <!-- 恢复客户资料-->
-    <a-modal class="modify-custom"
-             title="恢复客户资料"
-             v-model:visible="visible"
-             @cancel="cancel"
-             centered
-             width="890px">
-        <template #footer>
-            <a-button key="submit"
-                      class="cancelBtn"
-                      @click="cancel">取消
-            </a-button>
-            <a-button key="submit"
-                      type="primary"
-                      :loading="loading"
-                      @click="recover">完成
-            </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="营业执照">
-                        <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="modify-custom"
+           title="恢复客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="recover">完成
+      </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="营业执照">
+            <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 {QueryCustomInfoType, UpdateUserAccountReq} from "@/services/go/ermcp/customInfo/interface";
-import {formatValue} from "@/common/methods";
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType, UpdateUserAccountReq } from '@/services/go/ermcp/customInfo/interface';
+import { formatValue } from '@/common/methods';
 import { getStatusName } from '@/common/constants/enumsName';
-import {Modal} from "ant-design-vue";
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
-import {UpdateUserAccountStatus} from "@/services/go/ermcp/customInfo";
+import { Modal } from 'ant-design-vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { UpdateUserAccountStatus } from '@/services/go/ermcp/customInfo';
 
 export default defineComponent({
     name: 'modify-custom',
@@ -132,10 +132,10 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const {visible, cancel} = closeModal('custom_info_btn_recover');
-        const {loading, ModifyUserInfo} = updateUserAccount();
+        const { visible, cancel } = closeModal('custom_info_btn_recover');
+        const loading = ref<boolean>(false);
         // 恢复方法
-        function recover(){
+        function recover() {
             Modal.confirm({
                 title: '是否确认恢复客户资料',
                 okText: '确认恢复',
@@ -143,8 +143,8 @@ export default defineComponent({
                 onOk() {
                     let reqParams: UpdateUserAccountReq = {
                         userID: props.selectedRow.userid,
-                        accountStatus: 4
-                    }
+                        accountStatus: 4,
+                    };
                     requestResultLoadingAndInfo(UpdateUserAccountStatus, reqParams, loading, ['恢复成功', '恢复失败:']).then(() => {
                         cancel();
                         context.emit('refresh');