Selaa lähdekoodia

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin 4 vuotta sitten
vanhempi
commit
082fec4d0d
28 muutettua tiedostoa jossa 758 lisäystä ja 571 poistoa
  1. 10 0
      public/proto/mtp.proto
  2. 2 2
      src/services/funcode/index.ts
  3. 18 14
      src/services/go/ermcp/exposure/index.ts
  4. 21 13
      src/services/go/ermcp/goodsInfo/index.ts
  5. 9 0
      src/services/go/ermcp/goodsInfo/interface.ts
  6. 1 2
      src/services/go/ermcp/sell/index.ts
  7. 3 2
      src/services/go/ermcp/spot-contract/index.ts
  8. 0 1
      src/services/go/ermcp/spot-contract/interface.ts
  9. 3 4
      src/services/proto/delivery/index.ts
  10. 0 3
      src/services/proto/delivery/interface.ts
  11. 3 3
      src/services/proto/warehouse/index.ts
  12. 0 1
      src/services/socket/account/index.ts
  13. 13 5
      src/views/information/custom/compoments/cancel/index.vue
  14. 148 126
      src/views/information/custom/compoments/check/index.vue
  15. 124 116
      src/views/information/custom/compoments/delete/index.vue
  16. 11 3
      src/views/information/custom/compoments/disable/index.vue
  17. 11 3
      src/views/information/custom/compoments/recover/index.vue
  18. 33 54
      src/views/information/custom/compoments/setup.ts
  19. 4 3
      src/views/information/custom/list/checkpending/index.vue
  20. 6 5
      src/views/information/custom/list/normal-use/index.vue
  21. 4 2
      src/views/information/custom/list/stop-use/index.vue
  22. 7 3
      src/views/information/custom/list/unsubmit/index.vue
  23. 1 0
      src/views/information/goods/components/add/index.vue
  24. 35 5
      src/views/information/goods/components/add/setup.ts
  25. 114 79
      src/views/information/warehouse-info/compoments/disable/index.vue
  26. 113 79
      src/views/information/warehouse-info/compoments/recover/index.vue
  27. 61 42
      src/views/information/warehouse-info/list/normal-use/index.vue
  28. 3 1
      src/views/information/warehouse-info/list/stop-use/index.vue

+ 10 - 0
public/proto/mtp.proto

@@ -725,6 +725,16 @@ message DeliveryGoodsApplyReq {
 	repeated GLDDGFactoryItemEx glddgfactoryItems = 12; // GLDDGFactoryItemEx 现货商品品牌数据
 	repeated WRSConvertDetailEx wrsconvertdetails = 13; // WRSConvertDetailEx 现货商品折算配置明细数据
 }
+
+// 现货品种申请响应 0 29 128
+message DeliveryGoodsApplyRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+	optional uint64 wrstandardid = 4; // uint64 现货商品ID
+	optional uint64 deliverygoodsid = 5; // uint64 现货品种ID
+}
+
 // 现货商品型号数据 0 29 172
 message GLDWRStandardEx {
 		optional uint64 wrstandardid = 1; // uint64 型号ID(修改时有值)

+ 2 - 2
src/services/funcode/index.ts

@@ -71,8 +71,8 @@ export const funCode: Code = {
     // 仓库信息
     WareHouseApplyReq: 1900685,     /// 仓库申请请求
     WareHouseApplyRsp: 1900686,    /// 仓库申请响应
-    WareHouseStateChangeReq: 1900687,    /// 仓库状态修改请求
-    WareHouseStateChangeRsp: 1900688,    /// 仓库状态修改响应
+    WarehouseStateChangeReq: 1900687,    /// 仓库状态修改请求
+    WarehouseStateChangeRsp: 1900688,    /// 仓库状态修改响应
 
     // 现货合同 -- 新增现货合同
     GldErmcpSpotContractOperateReq: 1900711,    /// 现货合同操作请求(1179653)

+ 18 - 14
src/services/go/ermcp/exposure/index.ts

@@ -1,6 +1,7 @@
 import APP from '@/services';
 import { commonSearch_go } from '@/services/go';
 import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail, Ermcp3AreaSpotDetailReq, Ermcp3ExposureDetail, Ermcp3ExposureReq, ErmcpExposurePostion, ErmcpExposurePostionReq, ErmcpHedgePosition, ErmcpHedgePositionDetail, ErmcpHedgePositionDetailReq, ErmcpRealExposureModel } from '@/services/go/ermcp/exposure/interface';
+import {getUserId} from "@/services/bus/account";
 
 /** ================================= 业务 - 敞口 ================================**/
 
@@ -9,8 +10,8 @@ import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail, Ermcp3AreaSpotDetailReq, Ermcp3Ex
  * @constructor
  */
 export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
-    const AreaUserID = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp/QueryRealtimeExposure', { AreaUserID }).catch((err) => {
+    const userid = getUserId(); // 所属机构id
+    return commonSearch_go('/Ermcp/QueryRealtimeExposure', { userid }).catch((err) => {
         throw new Error(`查询敞口 -> 实时敞口: ${err.message}`);
     });
 }
@@ -21,8 +22,9 @@ export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
  * @constructor
  */
 export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp3ExposureDetail[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryExposureDetail', { areauserid, ...req }).catch((err) => {
+    const userid = getUserId(); // 用户id
+    const usertype = 2;  // 用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryExposureDetail', { userid, usertype, ...req }).catch((err) => {
         throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err.message}`);
     });
 }
@@ -33,8 +35,8 @@ export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp
  * @constructor
  */
 export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promise<ErmcpExposurePostion[]> {
-    const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', { areaUserId, ...req }).catch((err) => {
+    const userid = getUserId(); // 所属机构id
+    return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', { userid, ...req }).catch((err) => {
         throw new Error(`查询敞口 ->实时敞口 -> 期货明细: ${err.message}`);
     });
 }
@@ -44,8 +46,9 @@ export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promi
  * @constructor
  */
 export function QuerySpotPosition(): Promise<Ermcp3AreaSpot[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryExposureSpot', { areauserid }).catch((err) => {
+    const userid = getUserId(); // 用户id
+    const usertype = 2;  // 用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryExposureSpot', { userid, usertype }).catch((err) => {
         throw new Error(`查询敞口 -> 现货头寸: ${err.message}`);
     });
 }
@@ -56,8 +59,9 @@ export function QuerySpotPosition(): Promise<Ermcp3AreaSpot[]> {
  * @constructor
  */
 export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<Ermcp3AreaSpotDetail[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', { areauserid, ...req }).catch((err) => {
+    const userid = getUserId(); // 用户id
+    const usertype = 2;  // 用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', { userid, usertype, ...req }).catch((err) => {
         throw new Error(`查询敞口 -> 现货头寸 -> 现货明细: ${err.message}`);
     });
 }
@@ -67,8 +71,8 @@ export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<E
  * @constructor
  */
 export function QueryExposureHedgePosition(): Promise<ErmcpHedgePosition[]> {
-    const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp/QueryExposureHedgePosition', { areaUserId }).catch((err) => {
+    const userid = getUserId(); // 所属机构id
+    return commonSearch_go('/Ermcp/QueryExposureHedgePosition', { userid }).catch((err) => {
         throw new Error(`查询敞口 -> 期货头寸: ${err.message}`);
     });
 }
@@ -79,8 +83,8 @@ export function QueryExposureHedgePosition(): Promise<ErmcpHedgePosition[]> {
  * @constructor
  */
 export function QueryExposureHedgePositionDetail(req: ErmcpHedgePositionDetailReq): Promise<ErmcpHedgePositionDetail[]> {
-    const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', { areaUserId, ...req }).catch((err) => {
+    const userid = getUserId(); // 所属机构id
+    return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', { userid, ...req }).catch((err) => {
         throw new Error(`查询敞口->期货头寸->期货明细: ${err.message}`);
     });
 }

+ 21 - 13
src/services/go/ermcp/goodsInfo/index.ts

@@ -4,6 +4,7 @@ import APP from '@/services';
 import { getUserId } from "@/services/bus/account";
 import { commonSearch_go } from '@/services/go/index';
 import {
+    DeliveryGoodsDetailReq,
     Ermcp3Brand, Ermcp3GoodsGroup, Ermcp3MiddleGoodsDetailEx,
     Ermcp3Wrstandard,
     ErmcpDeliveryGoodsDetailEx,
@@ -17,8 +18,9 @@ import {
  * @constructor
  */
 export function QueryDeliveryGoods(req: ErmcpDeliveryGoodsReq): Promise<ErmcpDeliveryGoodsRsp[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryDeliveryGoods', { areauserid, ...req }).catch((err) => {
+    const userid = getUserId(); // 所属机构id
+    const usertype = 2;  //  用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryDeliveryGoods', { usertype, userid, ...req }).catch((err) => {
         throw new Error(`查询现货商品: ${err.message}`);
     });
 }
@@ -29,8 +31,9 @@ export function QueryDeliveryGoods(req: ErmcpDeliveryGoodsReq): Promise<ErmcpDel
  * @constructor
  */
 export function QueryGoodsWrstandard(deliverygoodsid: number): Promise<Ermcp3Wrstandard[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryGoodsWrstandard', { areauserid, deliverygoodsid }).catch((err) => {
+    const userid = getUserId(); // 所属机构id
+    const usertype = 2; //  用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryGoodsWrstandard', { userid, usertype, deliverygoodsid }).catch((err) => {
         throw new Error(`查询商品品类: ${err.message}`);
     });
 }
@@ -40,8 +43,9 @@ export function QueryGoodsWrstandard(deliverygoodsid: number): Promise<Ermcp3Wrs
  * @constructor
  */
 export function QueryGoodsbrand(): Promise<Ermcp3Brand[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryGoodsbrand', { areauserid }).catch((err) => {
+    const userid = getUserId(); // 用户id
+    const usertype = 2;  // 用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryGoodsbrand', { userid, usertype }).catch((err) => {
         throw new Error(`查询商品品牌: ${err.message}`);
     });
 }
@@ -52,9 +56,11 @@ export function QueryGoodsbrand(): Promise<Ermcp3Brand[]> {
  * @constructor
  */
 export function QueryDeliveryGoodsDetail(deliverygoodsid?: number): Promise<ErmcpDeliveryGoodsDetailEx[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    const param = deliverygoodsid ? { areauserid, deliverygoodsid } : { areauserid }
-    return commonSearch_go('/Ermcp3/QueryDeliveryGoodsDetail', param).catch((err) => {
+    const req :DeliveryGoodsDetailReq = {
+        deliverygoodsid: deliverygoodsid,
+        userid: getUserId()
+    }
+    return commonSearch_go('/Ermcp3/QueryDeliveryGoodsDetail', req).catch((err) => {
         throw new Error(`查询现货商品详情: ${err.message}`);
     });
 }
@@ -65,8 +71,9 @@ export function QueryDeliveryGoodsDetail(deliverygoodsid?: number): Promise<Ermc
  * @constructor
  */
 export function QueryGoodsfGroup(excludecfg?: number): Promise<Ermcp3GoodsGroup[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    const param = excludecfg ? { areauserid, excludecfg } : { areauserid }
+    const userid = getUserId(); // 用户id
+    const usertype = 2; // 用户类型 2-机构 7-企业成员
+    const param = excludecfg ? { userid, excludecfg, usertype } : { userid, usertype }
     return commonSearch_go('/Ermcp3/QueryGoodsGroup', param).catch((err) => {
         throw new Error(`查询期货商品组: ${err.message}`);
     });
@@ -91,8 +98,9 @@ export function QueryMiddleGoods(status: number): Promise<ErmcpMiddleGoodsModel[
  * @constructor
  */
 export function QueryMiddleGoodsDetail(middlegoodsid: number): Promise<Ermcp3MiddleGoodsDetailEx[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryMiddleGoodsDetail', { areauserid, middlegoodsid }).catch((err) => {
+    const userid = getUserId(); // 用户id
+    const usertype = 2  // 用户类型 2-机构 7-企业成员
+    return commonSearch_go('/Ermcp3/QueryMiddleGoodsDetail', { userid, usertype, middlegoodsid }).catch((err) => {
         throw new Error(`查询套保品种详情(套保品种/商品详情): ${err.message}`);
     });
 }

+ 9 - 0
src/services/go/ermcp/goodsInfo/interface.ts

@@ -65,6 +65,15 @@ export interface Ermcp3Brand {
 }
 
 /**
+ * 查询现货商品请求
+ */
+export interface DeliveryGoodsDetailReq {
+    userid: number;            // 用户id
+    usertype?: number;         // 用户类型 2-机构 7-企业成员
+    deliverygoodsid?: number;  // 现货商品id
+}
+
+/**
  * 查询新货商品详情
  */
 export interface ErmcpDeliveryGoodsDetailEx {

+ 1 - 2
src/services/go/ermcp/sell/index.ts

@@ -14,8 +14,7 @@ import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/p
 export function QueryWareHouse(req: SellBuyContractReq): Promise<Ermcp3SellBuyContract[]> {
     const param = {
         userid: getUserId(),
-        areauserid: APP.get('userAccount').memberuserid, // 所属机构id
-        contracttype: -1, // 销售
+        contracttype: -1, // 销售 合同类型 1-采购, -1-销售
     }
     Object.assign(param, req)
     return commonSearch_go('/Ermcp3/QuerySpotContractBS', param).catch((err) => {

+ 3 - 2
src/services/go/ermcp/spot-contract/index.ts

@@ -2,6 +2,7 @@
 import APP from '@/services';
 import { commonSearch_go } from '@/services/go';
 import { Ermcp3ContractReq, Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
+import {getUserId} from "@/services/bus/account";
 
 /**
  * 查询现货合同 /Ermcp3/QuerySpotContract
@@ -12,9 +13,9 @@ import { Ermcp3ContractReq, Ermcp3ContractRsp } from '@/services/go/ermcp/spot-c
  * @constructor
  */
 export function QuerySpotContract(req: Ermcp3ContractReq): Promise<Ermcp3ContractRsp[]> {
-    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
+    const userid = getUserId(); // 所属机构id
     // const areauserid = 10000; // 所属机构id
-    return commonSearch_go('/Ermcp3/QuerySpotContract', { areauserid, ...req }).catch((err) => {
+    return commonSearch_go('/Ermcp3/QuerySpotContract', { userid, ...req }).catch((err) => {
         throw new Error(`查询现货合同: ${err.message}`);
     });
 }

+ 0 - 1
src/services/go/ermcp/spot-contract/interface.ts

@@ -3,7 +3,6 @@
  */
 export interface Ermcp3ContractReq {
     querytype: number    //  查询类型 1-未提交 2-待审核 3-履约中 4-已完成
-    userid?: number    //  用户ID
     usertype?: number    //  用户类型 2-机构 7-企业成员
     contractid?: string  //  合同ID(SpotContractId)
 }

+ 3 - 4
src/services/proto/delivery/index.ts

@@ -13,16 +13,15 @@ export const addDeliveryGoodsApply = (param: DeliveryGoodsApplyReq): Promise<any
     return new Promise((resolve, reject) => {
         const req = {
             version: "3.2",
-            accountid: getSelectedAccountId(),
             userid: getUserId(),
-            loginid: getLongTypeLoginID(),
+            loginid: getLongTypeLoginID() ,
         };
         const params = {
             protobufName: 'DeliveryGoodsApplyReq',
             funCodeName: 'DeliveryGoodsApplyReq',
             reqParams: Object.assign(req, param),
             msgHeadParams: {
-                AccountID: getSelectedAccountId(),
+                AccountID: getSelectedAccountId() === null ? 0 : getSelectedAccountId(),
                 MarketID: 18,   // 目前写死
                 GoodsID: 0, // 目前写死
             }
@@ -30,7 +29,7 @@ export const addDeliveryGoodsApply = (param: DeliveryGoodsApplyReq): Promise<any
         const package50 = buildProtoReq50(params);
         APP.sendTradingServer(package50, undefined, {
             onSuccess: (res) => {
-                const { isSuccess, result } = parseProtoRsp50(res, 'DelUserReceiveInfoRsp');
+                const { isSuccess, result } = parseProtoRsp50(res, 'DeliveryGoodsApplyRsp');
                 if (isSuccess) {
                     resolve(result);
                 } else {

+ 0 - 3
src/services/proto/delivery/interface.ts

@@ -1,8 +1,5 @@
 // 现货品种申请请求 0 29 124
 export interface DeliveryGoodsApplyReq {
-    // accountid: string  // header 需要用到
-    // userid: number // uint64 用户ID
-    // loginid: number // uint64 登录ID
     deliverygoodscode?: string // string 交割商品代码(新增时有值)
     deliverygoodsname?: string // string 交割商品名称(新增时有值)
     deliverygoodsid?: number// uint64 交割商品id(修改时有值)

+ 3 - 3
src/services/proto/warehouse/index.ts

@@ -45,8 +45,8 @@ export const addWarehouseApply = (param: WarehouseApplyReq): Promise<any> => {
 export const warehouseStateChangeReq = (param: WarehouseStateChangeReq): Promise<any> => {
     return new Promise((resolve, reject) => {
         const params = {
-            protobufName: 'WareHouseStateChangeReq',
-            funCodeName: 'WareHouseStateChangeReq',
+            protobufName: 'WarehouseStateChangeReq',
+            funCodeName: 'WarehouseStateChangeReq',
             reqParams: param,
             msgHeadParams: {
                 AccountID: param.accountid,
@@ -57,7 +57,7 @@ export const warehouseStateChangeReq = (param: WarehouseStateChangeReq): Promise
         const package50 = buildProtoReq50(params);
         APP.sendTradingServer(package50, undefined, {
             onSuccess: (res) => {
-                const { isSuccess, result } = parseProtoRsp50(res, 'WareHouseStateChangeRsp');
+                const { isSuccess, result } = parseProtoRsp50(res, 'WarehouseStateChangeRsp');
                 if (isSuccess) {
                     resolve(result);
                 } else {

+ 0 - 1
src/services/socket/account/index.ts

@@ -41,7 +41,6 @@ export const queryAccountInfo = (QueryItem: string | number): Promise<string> =>
                     const accountList = TAAccountList.map((el: any) => {
                         return el.TaAccountInfo;
                     });
-
                     // 数据中心存入资金账号列表
                     APP.set('accountList', accountList);
                     // 时间戳集合

+ 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,
         };
     },
 });

+ 1 - 0
src/views/information/goods/components/add/index.vue

@@ -527,6 +527,7 @@ export default defineComponent({
                 .validate()
                 .then(() => {
                     const param = toRaw(formState);
+                    addAction(param);
                     console.log('param', param);
                 })
                 .catch((error: ValidateErrorEntity<FormState>) => {

+ 35 - 5
src/views/information/goods/components/add/setup.ts

@@ -2,7 +2,7 @@ import { getItemEnum } from '@/services/bus/allEnum';
 import { QueryGoodsfGroup } from '@/services/go/ermcp/goodsInfo';
 import { Ermcp3GoodsGroup } from '@/services/go/ermcp/goodsInfo/interface';
 import { addDeliveryGoodsApply } from '@/services/proto/delivery';
-import { DeliveryGoodsApplyReq } from '@/services/proto/delivery/interface';
+import {DeliveryGoodsApplyReq, GLDWRStandardEx} from '@/services/proto/delivery/interface';
 import { message } from 'ant-design-vue';
 import { reactive, ref, UnwrapRef } from 'vue';
 import { FormState } from './interface';
@@ -13,9 +13,39 @@ import { FormState } from './interface';
  */
 export function handleAdd() {
     const loading = ref<boolean>(false);
-    function addAction(param: DeliveryGoodsApplyReq) {
+    function addAction(param: FormState) {
+        const unitid = param.unitid === undefined ? 0 : param.unitid
+        const reqParam :DeliveryGoodsApplyReq = {
+            deliverygoodscode: param.deliverygoodscode,
+            deliverygoodsname: param.deliverygoodsname,
+            deliverygoodsid:   param.deliverygoodsid,
+            unitid: unitid,
+            type: 1,
+            remark: param.remark,
+            gldwrstandards: param.gldwrstandards.map(value => {
+                let gldunitid = value.unitid === undefined ? 0 : value.unitid
+                let convertfactors: any = value.convertfactor === null ? 0 : value.convertfactor
+                return {
+                    wrstandardid: value.wrstandardid,
+                    wrstandardname: value.wrstandardname,
+                    unitid: gldunitid,
+                    convertfactor: (convertfactors as string) ? Number(convertfactors) : convertfactors
+                }
+            }),
+            glddgfactoryItems: param.glddgfactoryItems,
+            wrsconvertdetails: param.wrsconvertdetails.map(value => {
+                let middlegoodsid = value.middlegoodsid === undefined ? 0 : value.middlegoodsid
+                let convertratio: any = value.convertratio === null ? 0 : value.convertratio
+                let wrsunitid = value.unitid === null ? 0 : value.unitid
+                return {
+                    middlegoodsid: middlegoodsid,
+                    convertratio:  (convertratio as string) ? Number(convertratio) : convertratio,
+                    unitid: wrsunitid
+                }
+            })
+        }
         loading.value = true;
-        addDeliveryGoodsApply(param).then(() => {
+        addDeliveryGoodsApply(reqParam).then(() => {
             message.success('新增现货品种成功!')
         }).catch(err => {
             message.error(err.message)
@@ -31,7 +61,7 @@ export function handleAdd() {
 export function handleFromState() {
     const formState: UnwrapRef<FormState> = reactive({
         deliverygoodscode: '', // string 交割商品代码(新增时有值)
-        deliverygoodsname: '', // string 交割商品名称(新增时有值)
+        deliverygoodsname: '', // string 交割商品名称(新增时有值) // 可能没值  有值不能为中文
         deliverygoodsid: 0,// uint64 交割商品id(修改时有值)
         unitid: undefined, // uint64 单位ID
         type: 1,// int32 类型 1 新增 2 修改
@@ -96,4 +126,4 @@ export function handleGoodsGroup() {
 export function getGoodsUnit(unit: number): string {
     const obj = getItemEnum('goodsunit').find(e => e.enumitemname === unit);
     return obj ? obj.enumdicname : '--'
-}
+}

+ 114 - 79
src/views/information/warehouse-info/compoments/disable/index.vue

@@ -1,100 +1,135 @@
 <template>
-  <!-- 停用仓库信息-->
-  <a-modal class="commonModal warehouse-disable"
-           title="停用仓库信息"
-           v-model:visible="visible"
-           centered
-           :maskClosable="maskClosableFlag"
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                class="cancelBtn"
-                @click="cancel">取消</a-button>
-      <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">自有库</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="仓库名称">
-            <span class="white">深圳市南储公司2号库房</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="仓库简称">
-            <span class="white">南储深圳2号库</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">王平</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">13832676234</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="状态">
-            <span class="green">正常</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="所在地区">
-            <span class="white">广东省深圳市南山区</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="详细地址">
-            <span class="white">深南大道1290号仓库</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </a-form>
-  </a-modal>
+    <!-- 停用仓库信息-->
+    <a-modal class="commonModal warehouse-disable"
+             title="停用仓库信息"
+             v-model:visible="visible"
+             centered
+             :maskClosable="maskClosableFlag"
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="cancel"
+                      class="cancelBtn"
+                      @click="cancel">取消
+            </a-button>
+            <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">{{ getWareHouseTypeName(selectedRow.warehousetype) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="仓库名称">
+                        <span class="white">{{ formatValue(selectedRow.warehousename) }}</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.warehousecode) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="联系人">
+                        <span class="white">{{ formatValue(selectedRow.contactname) }}</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.contactnum) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="状态">
+                        <span class="white">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</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.address) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="详细地址">
+                        <span class="white">{{ formatValue(selectedRow.address) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
+import {defineComponent, PropType, ref} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {stopOrResumeWarehouse, wareType} from "@/views/information/warehouse-info/compoments/setup";
+import {ErmcpWareHouseInfo} from "@/services/go/ermcp/warehouse-info/interface";
+import {message, Modal} from "ant-design-vue";
+import {gerWareHouseStatusName, getWareHouseTypeName} from "@/views/information/warehouse-info/setup";
+import {formatValue} from "@/common/methods";
 
 export default defineComponent({
     name: 'warehouse_info_btn_disable',
     components: {},
-    setup() {
-        const { visible, cancel } = closeModal('warehouse_info_btn_disable');
-        const loading = ref<boolean>(false);
+    props: {
+        selectedRow: {
+            type: Object as PropType<ErmcpWareHouseInfo>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const {visible, cancel} = closeModal('warehouse_info_btn_disable');
         const maskClosableFlag = ref<boolean>(false);
+        const {loading, changeStatus} = stopOrResumeWarehouse(wareType.stop);
+
         function submit() {
             loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            Modal.confirm({
+                title: '是否确认停用仓库信息',
+                okText: '确认停用',
+                cancelText: '取消',
+                onOk() {
+                    console.log('OK');
+                    changeStatus(props.selectedRow.autoid)
+                        .then(res => {
+
+                            message.success(res)
+                            context.emit('refresh')
+                            cancel()
+                        })
+                        .catch(err => {
+                            message.error(err)
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
         }
+
         return {
             visible,
             cancel,
             submit,
             loading,
             maskClosableFlag,
+            gerWareHouseStatusName,
+            getWareHouseTypeName,
+            formatValue,
         };
     },
 });

+ 113 - 79
src/views/information/warehouse-info/compoments/recover/index.vue

@@ -1,100 +1,134 @@
 <template>
-  <!-- 恢复仓库信息-->
-  <a-modal class="modify-custom"
-           title="恢复仓库信息"
-           v-model:visible="visible"
-           centered
-           :maskClosable="maskClosableFlag"
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                class="cancelBtn"
-                @click="cancel">取消</a-button>
-      <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">{{ getWareHouseTypeName(selectedRow.warehousetype) }}</span>
-                  </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                  <a-form-item label="仓库名称">
-                      <span class="white">{{ formatValue(selectedRow.warehousename)}}</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.warehousecode) }}</span>
-                  </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                  <a-form-item label="联系人">
-                      <span class="white">{{ formatValue(selectedRow.contactname) }}</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.contactnum) }}</span>
-                  </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                  <a-form-item label="状态">
-                      <span class="red">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</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.address) }}</span>
-                  </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                  <a-form-item label="详细地址">
-                      <span class="white">{{ formatValue(selectedRow.address) }}</span>
-                  </a-form-item>
-              </a-col>
-          </a-row>
-      </a-form>
-  </a-modal>
+    <!-- 恢复仓库信息-->
+    <a-modal class="modify-custom"
+             title="恢复仓库信息"
+             v-model:visible="visible"
+             centered
+             :maskClosable="maskClosableFlag"
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="submit"
+                      class="cancelBtn"
+                      @click="cancel">取消
+            </a-button>
+            <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">{{ getWareHouseTypeName(selectedRow.warehousetype) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="仓库名称">
+                        <span class="white">{{ formatValue(selectedRow.warehousename) }}</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.warehousecode) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="联系人">
+                        <span class="white">{{ formatValue(selectedRow.contactname) }}</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.contactnum) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="状态">
+                        <span class="white">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</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.address) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="详细地址">
+                        <span class="white">{{ formatValue(selectedRow.address) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
+import {defineComponent, PropType, ref} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {ErmcpWareHouseInfo} from "@/services/go/ermcp/warehouse-info/interface";
+import {stopOrResumeWarehouse, wareType} from "@/views/information/warehouse-info/compoments/setup";
+import {message, Modal} from "ant-design-vue";
+import {gerWareHouseStatusName, getWareHouseTypeName} from "@/views/information/warehouse-info/setup";
+import {formatValue} from "@/common/methods";
 
 export default defineComponent({
     name: 'warehouse_info_btn_recover',
     components: {},
-    setup() {
-        const { visible, cancel } = closeModal('warehouse_info_btn_recover');
-        const loading = ref<boolean>(false);
+    props: {
+        selectedRow: {
+            type: Object as PropType<ErmcpWareHouseInfo>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const {visible, cancel} = closeModal('warehouse_info_btn_recover');
+        const {loading, changeStatus} = stopOrResumeWarehouse(wareType.normal);
         const maskClosableFlag = ref<boolean>(false);
+
         function submit() {
             loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            Modal.confirm({
+                title: '是否确认恢复仓库信息',
+                okText: '确认恢复',
+                cancelText: '取消',
+                onOk() {
+                    console.log('OK');
+                    changeStatus(props.selectedRow.autoid)
+                        .then(res => {
+                            message.success(res)
+                            context.emit('refresh')
+                            cancel()
+                        })
+                        .catch(err => {
+                            message.error(err)
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
         }
+
         return {
             visible,
             cancel,
             submit,
             loading,
             maskClosableFlag,
+            gerWareHouseStatusName,
+            getWareHouseTypeName,
+            formatValue,
         };
     },
 });

+ 61 - 42
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -1,45 +1,61 @@
 <template>
-  <!-- 仓库信息: 正常 -->
-  <div class="warehouse-info-normal"
-       :loading="loading">
-    <filterCustomTable @search="search">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <template #warehousetype="{ text }">
-          <span>{{ getWareHouseTypeName(text) }}</span>
-        </template>
-        <template #warehousestatus="{ text }">
-          <span>{{ gerWareHouseStatusName(text) }}</span>
-        </template>
-      </a-table>
-    </contextMenu>
-    <!-- 新增仓库信息 -->
-    <Add />
-    <!-- 停用仓库信息 -->
-    <Disable />
-    <!-- 仓库信息详情 -->
-    <Detail :selectedRow="selectedRow" />
-    <!-- 修改仓息库信 -->
-    <Modify />
-  </div>
+    <!-- 仓库信息: 正常 -->
+    <div class="warehouse-info-normal"
+         :loading="loading">
+        <filterCustomTable @search="search">
+            <BtnList :btnList="commonBtn"/>
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable"
+                     :pagination="false"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     rowKey="key"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <template #warehousetype="{ text }">
+                    <span>{{ getWareHouseTypeName(text) }}</span>
+                </template>
+                <template #warehousestatus="{ text }">
+                    <span>{{ gerWareHouseStatusName(text) }}</span>
+                </template>
+            </a-table>
+        </contextMenu>
+        <!-- 新增仓库信息 -->
+        <Add/>
+        <!-- 停用仓库信息 -->
+        <Disable :selectedRow="selectedRow"
+                 @refresh="queryTable"/>
+        <!-- 仓库信息详情 -->
+        <Detail :selectedRow="selectedRow"
+                @refresh="queryTable"/>
+        <!-- 修改仓息库信 -->
+        <Modify/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { filterCustomTable, Add, Disable, Detail, Modify } from '../../compoments';
-import { gerWareHouseStatusName, getWareHouseTypeName, queryTableList, getFilterTableCB, ErmcpWareHouseInfo } from '../index';
+import {
+    defineComponent,
+    initData,
+    getTableColumns,
+    getTableEvent,
+    getBtnList,
+    contextMenu,
+    BtnList
+} from '@/common/export/table';
+import {filterCustomTable, Add, Disable, Detail, Modify} from '../../compoments';
+import {
+    gerWareHouseStatusName,
+    getWareHouseTypeName,
+    queryTableList,
+    getFilterTableCB,
+    ErmcpWareHouseInfo
+} from '../index';
 
 export default defineComponent({
     name: 'warehouse-info-normal',
@@ -54,25 +70,27 @@ export default defineComponent({
     },
     setup() {
         // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
         // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<ErmcpWareHouseInfo>({});
+        const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<ErmcpWareHouseInfo>({});
         // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
+        const {commonBtn, forDataBtn} = getBtnList('warehouse_info_normal', true);
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList('1');
+        const {loading, tableList, queryTable} = queryTableList('1');
         initData(() => {
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_warehouse', getFilterTableCB);
         });
+
         // 查询
         function search(value: any) {
             filteredInfo.value = value;
             // 更新表信息
             updateColumn();
         }
+
         return {
             columns,
             filteredInfo,
@@ -86,6 +104,7 @@ export default defineComponent({
             search,
             getWareHouseTypeName,
             gerWareHouseStatusName,
+            queryTable,
         };
     },
 });

+ 3 - 1
src/views/information/warehouse-info/list/stop-use/index.vue

@@ -27,7 +27,8 @@
     <!-- 新增仓库信息 -->
     <Add />
     <!-- 恢复仓库信息 -->
-    <Recover />
+    <Recover :selectedRow="selectedRow"
+             @refresh="queryTable"/>
   </div>
 </template>
 
@@ -79,6 +80,7 @@ export default defineComponent({
             search,
             getWareHouseTypeName,
             gerWareHouseStatusName,
+            queryTable,
         };
     },
 });