Pārlūkot izejas kodu

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

marymelisa 4 gadi atpakaļ
vecāks
revīzija
c5cc6a7455
44 mainītis faili ar 1530 papildinājumiem un 638 dzēšanām
  1. 2 2
      src/common/components/firstMenu/index.vue
  2. 13 1
      src/common/constants/buttonType.ts
  3. 2 0
      src/common/methods/table/interface.ts
  4. 9 1
      src/common/setup/buttonPermission/interface.ts
  5. 4 0
      src/common/setup/contextMenu/index.ts
  6. 64 24
      src/layout/components/main.vue
  7. 1 1
      src/layout/components/menu.vue
  8. 21 14
      src/layout/components/top.vue
  9. 29 0
      src/services/go/ermcp/business-review/index.ts
  10. 102 0
      src/services/go/ermcp/business-review/interface.ts
  11. 14 2
      src/services/go/ermcp/goodsInfo/index.ts
  12. 34 0
      src/services/go/ermcp/goodsInfo/interface.ts
  13. 9 4
      src/services/go/ermcp/purchase/index.ts
  14. 59 60
      src/services/go/ermcp/purchase/interface.ts
  15. 10 5
      src/services/go/ermcp/sell/index.ts
  16. 6 5
      src/services/go/ermcp/warehouse-info/index.ts
  17. 46 0
      src/views/business/purchase/components/detail/index.vue
  18. 131 0
      src/views/business/purchase/components/filterTable/index.vue
  19. 46 0
      src/views/business/purchase/components/funds/index.vue
  20. 46 0
      src/views/business/purchase/components/invoice/index.vue
  21. 46 0
      src/views/business/purchase/components/settlement/index.vue
  22. 46 0
      src/views/business/purchase/components/someprice/index.vue
  23. 46 0
      src/views/business/purchase/components/storage/index.vue
  24. 82 72
      src/views/business/purchase/list/all/index.vue
  25. 69 19
      src/views/business/purchase/list/pending/index.vue
  26. 78 72
      src/views/business/purchase/list/performance/index.vue
  27. 77 0
      src/views/business/purchase/list/setup.ts
  28. 0 79
      src/views/business/purchase/setup.ts
  29. 2 2
      src/views/information/custom/compoments/recover/index.vue
  30. 2 9
      src/views/information/custom/list/normal-use/index.vue
  31. 9 26
      src/views/information/custom/list/stop-use/index.vue
  32. 8 21
      src/views/information/spot-contract/list/checkpending/index.vue
  33. 7 12
      src/views/information/spot-contract/list/finished/index.vue
  34. 8 19
      src/views/information/spot-contract/list/performance/index.vue
  35. 8 19
      src/views/information/spot-contract/list/unsubmitted/index.vue
  36. 2 2
      src/views/information/warehouse-info/compoments/add/index.vue
  37. 46 0
      src/views/information/warehouse-info/compoments/detail/index.vue
  38. 2 2
      src/views/information/warehouse-info/compoments/disable/index.vue
  39. 8 7
      src/views/information/warehouse-info/compoments/filterTable/index.vue
  40. 48 0
      src/views/information/warehouse-info/compoments/modify/index.vue
  41. 48 0
      src/views/information/warehouse-info/compoments/recover/index.vue
  42. 58 85
      src/views/information/warehouse-info/list/normal-use/index.vue
  43. 114 0
      src/views/information/warehouse-info/list/setup.ts
  44. 68 73
      src/views/information/warehouse-info/list/stop-use/index.vue

+ 2 - 2
src/common/components/firstMenu/index.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, computed, ref } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 
 interface Key {
     [propName: string]: string;
@@ -43,7 +43,7 @@ export default defineComponent({
     components: {},
     setup(props, context) {
         const current = ref<string[]>(['0']);
-        computed(() => {
+        watchEffect(() => {
             current.value = props.selectedKey;
         });
         function menuClick(value: any) {

+ 13 - 1
src/common/constants/buttonType.ts

@@ -1,6 +1,5 @@
 export interface ButtonType {
     detail: string; // 详情
-    add: string; // 新增
 
     custom_info_btn_add: string; // 客户资料 添加
     custom_info_btn_modify: string; // 客户资料 修改
@@ -15,4 +14,17 @@ export interface ButtonType {
     spot_contract_btn_finish: string; // 现货合同 正常完结
     spot_contract_btn_check: string; // 现货合同 审核
     spot_contract_btn_cancel: string; // 现货合同 撤销
+
+    warehouse_info_btn_add: string; // 仓库信息 新增
+    warehouse_info_btn_modify: string; // 现货合同 修改
+    warehouse_info_btn_disable: string; // 现货合同 停用
+    warehouse_info_btn_recover: string; // 现货合同 恢复
+
+    purchase_pending_someprice: string; // 采购 点价登记
+    purchase_pending_settlement: string; // 采购 交收登记
+    purchase_pending_funds: string; // 采购 款项登记
+    purchase_pending_invoice: string; // 采购 发票登记
+    purchase_pending_storage: string; // 采购 入库登记
+
+
 }

+ 2 - 0
src/common/methods/table/interface.ts

@@ -17,4 +17,6 @@ export interface TableKey {
     table_pcweb_userinfo: string; // 客户资料
     table_pcweb_warehouse: string; // 仓库信息
     table_pcweb_purchase: string; // 采购合同
+    table_pcweb_sell: string; // 销售合同
+    table_pcweb_exposure: string; // 实时敞口
 }

+ 9 - 1
src/common/setup/buttonPermission/interface.ts

@@ -1,11 +1,19 @@
 export interface MenuType {
     custom_info_normal: string; // 客户资料 正常
     custom_info_disabled: string; // 客户资料 停用
-    purchase_pending: string;
+
     spot_contract_unsubmitted: string; // 现货合同 未提交
     spot_contract_checkpending: string; // 现货合同 待审核
     spot_contract_performance: string; // 现货合同 履约中
     spot_contract_finished: string; // 现货合同 已完成
+
+    warehouse_info_normal: string; // 仓库信息 正常
+    warehouse_info_disabled: string; // 仓库信息 停用
+
+    purchase_pending: string;   // 采购 待点价
+    purchase_performance: string;   // 采购 履约交收
+    purchase_all: string;   // 采购 全部
+
 }
 
 export interface BtnType {

+ 4 - 0
src/common/setup/contextMenu/index.ts

@@ -35,6 +35,10 @@ export function getBtnList(menuType: keyof MenuType) {
     } else {
         console.warn(`menuType: ${menuType}未找到`)
     }
+    // 详情(所有页面都可以看到,没有权限之分)
+    const { openAction } = openModal('detail')
+    forDataBtn.value.push({ lable: '详情', callback: openAction })
+
     onUnmounted(() => {
         sessionStorageUtil.removeItem(name)
     });

+ 64 - 24
src/layout/components/main.vue

@@ -1,42 +1,41 @@
 <template>
   <div class="exposure">
-    <firstMenu :list="list"
-               :value="'title'"
-               :selectedKey="selectedKey"
-               @selectMenu="selectMenu" />
+    <div class="first-menu">
+      <a-menu class="a-menu_container"
+              theme="dark"
+              v-model:selectedKeys="selectedKey"
+              @click="selectMenu"
+              mode="horizontal">
+        <a-menu-item :key="String(index)"
+                     v-for="(item, index) in list">
+          {{ item.title}}
+        </a-menu-item>
+      </a-menu>
+      <div class="menu_right">
+        <!-- <slot></slot> -->
+      </div>
+    </div>
     <router-view />
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, inject, ref, Ref, watchEffect } from 'vue';
-import firstMenu from '@/common/components/firstMenu/index.vue';
+import { defineComponent, inject, Ref } from 'vue';
 import { useRouter } from 'vue-router';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 
 export default defineComponent({
     name: 'main',
-    components: {
-        firstMenu,
-    },
+    components: {},
     setup() {
         const router = useRouter();
         const list = inject('thirdMenuList') as Ref<OperationTabMenu[]>;
-        const selectedKey = ref<string[]>(['0']);
-        // watchEffect(() => {
-        //     list.value.forEach((e, i) => {
-        //         if (router.currentRoute.value.fullPath.includes(e.code)) {
-        //             console.log('i', i);
-
-        //             selectedKey.value = [`${i}`];
-        //         }
-        //     });
-        // });
+        const selectedKey = inject('index');
         // 切换路由
-        function selectMenu(item: OperationTabMenu) {
-            router.push({ name: item.code });
+        function selectMenu(value: any) {
+            const index = +value.key;
+            router.push({ name: list.value[index].code });
         }
-
         return { selectMenu, list, selectedKey };
     },
 });
@@ -45,5 +44,46 @@ export default defineComponent({
 <style lang="less">
 .sexposure {
 }
-</style
->;
+.noBorderBottom {
+    border-bottom: none;
+}
+.first-menu {
+    width: 100%;
+    height: 40px;
+    border-bottom: 1px solid @m-blue0 !important;
+    background-color: @m-black1;
+    .a-menu_container {
+        padding-top: 5px;
+        .flex();
+        height: 34px;
+        line-height: 34px;
+        .ant-menu-item {
+            min-width: 120px;
+            height: 34px;
+            line-height: 34px;
+            background: linear-gradient(0deg, #343d46 0%, #38444f 100%);
+            margin-left: 3px;
+            font-size: 16px;
+            columns: @m-grey2;
+            border-radius: 5px 5px 0px 0px;
+            cursor: pointer;
+            font-family: Adobe Heiti Std;
+            font-weight: normal;
+            &:hover {
+                .noBorderBottom;
+            }
+        }
+        .ant-menu-item-active {
+            .noBorderBottom;
+        }
+        .ant-menu-item-selected {
+            .noBorderBottom;
+            color: @m-white;
+            background: linear-gradient(0deg, #3270d2 0%, #3a87f7 100%);
+            &:hover {
+                color: @m-white;
+            }
+        }
+    }
+}
+</style>;

+ 1 - 1
src/layout/components/menu.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script lang="ts">
-import { computed, defineComponent, ref, SetupContext, unref, watchEffect } from 'vue';
+import { defineComponent, ref, SetupContext, unref, watchEffect } from 'vue';
 import APP from '@/services';
 import { initData } from '@/common/methods';
 import { OperationTabMenu } from '@/services/go/commonService/interface';

+ 21 - 14
src/layout/components/top.vue

@@ -22,13 +22,10 @@
   </a-layout>
 </template>
 <script lang="ts">
-import { UserOutlined } from '@ant-design/icons-vue';
-import { defineComponent, ref, provide, unref } from 'vue';
+import { defineComponent, ref, provide } from 'vue';
 import Setting from '@/views/setting/index.vue';
 import CapitalInfo from '@/common/components/capitalInfo/index.vue';
 import SecondMenu from '@/common/components/secondeMenu/index.vue';
-import APP from '@/services';
-import { initData } from '@/common/methods';
 import { useRouter } from 'vue-router';
 import Drawer from '@/common/components/drawer/index.vue';
 import Header from './header.vue';
@@ -36,18 +33,10 @@ import Menu from './menu.vue';
 import Main from './main.vue';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 
-//     // 配置是否显示下半部分
-//     function setShowBottomPart(code: string): boolean {
-//         // 显示下半部分 这里保存的是市场对应的 code
-//         const show: string[] = [''];
-//         return show.includes(code);
-//     }
-
 export default defineComponent({
     name: 'layout-top',
     components: {
         Setting,
-        UserOutlined,
         CapitalInfo,
         SecondMenu,
         Drawer,
@@ -57,7 +46,8 @@ export default defineComponent({
     },
     setup(props, context) {
         const router = useRouter();
-        const list = ref<OperationTabMenu[]>([]);
+        const list = ref<OperationTabMenu[]>([]); // 右边tab栏 需要的列表数据
+        const index = ref<string[]>(['0']); // 右边tab栏 具体选中的哪一个数据 默认第一个
         // 配置是否显示下半部分
         function setShowBottomPart(code: string) {
             // 显示下半部分 这里保存的是市场对应的 code
@@ -66,12 +56,29 @@ export default defineComponent({
         }
         // 选中菜单
         function chooseMenu(value: OperationTabMenu) {
+            const temp = router.currentRoute.value.name;
+            let name = temp;
+            if (temp === 'home') {
+                // 第一次进入项目
+                name = value.code;
+            } else {
+                // 这里处理页面刷新,还原 导航栏数据
+                const i = value.children.findIndex((e) => e.code === temp);
+                if (i === -1) {
+                    // 切换左边菜单栏
+                    name = value.code;
+                } else {
+                    // 切换右边上面tab 栏
+                    index.value = [`${i}`];
+                }
+            }
             list.value = value.children;
             setShowBottomPart(value.code);
-            router.push({ name: value.code as string });
+            router.push({ name: name as string });
         }
         // 选中菜单的数据
         provide('thirdMenuList', list);
+        provide('index', index);
         // 控制菜单是否隐藏
         const collapsed = ref<boolean>(false);
         function collapse(show: boolean) {

+ 29 - 0
src/services/go/ermcp/business-review/index.ts

@@ -1,2 +1,31 @@
 /** ================================= 业务审核 ================================**/
+import {
+    QryBusinessDjRsp,
+    QryBussinessJsRsp,
+    QueryBusinessDjReq,
+    QueryBusinessJsReq
+} from "@/services/go/ermcp/business-review/interface";
+import {commonSearch_go} from "@/services/go";
+
+/**
+ * 查询业务管理(结算)(对应菜单:业务管理/结算) /Ermcp/QueryBusinessJs
+ * @param req.UserId 用户ID (必填)
+ * @constructor
+ */
+export function QueryBusinessJs(req: QueryBusinessJsReq): Promise<QryBussinessJsRsp[]> {
+    return commonSearch_go('/Ermcp/QueryBusinessJs', req).catch((err) => {
+        throw new Error(`业务管理 - 结算: ${err.message}`);
+    });
+}
+
+/**
+ * 查询业务管理(点价)(对应菜单:业务管理/点价) /Ermcp/QueryBusinessDj
+ * @param req.UserId 用户ID (必填)
+ * @constructor
+ */
+export function QueryBusinessDj(req: QueryBusinessDjReq): Promise<QryBusinessDjRsp[]> {
+    return commonSearch_go('/Ermcp/QueryBusinessDj', req).catch((err) => {
+        throw new Error(`业务管理 - 点价: ${err.message}`);
+    });
+}
 

+ 102 - 0
src/services/go/ermcp/business-review/interface.ts

@@ -0,0 +1,102 @@
+/**
+ * 查询业务管理 业务管理 - 结算  请求
+ */
+export interface QueryBusinessJsReq{
+    UserId: number
+    relatedid?: string  // 现货合同ID, 不填则查所有
+    operateapplyid?: string  // 操作申请id
+    applystatus?: string  // 申请状态(逗号隔开) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+}
+
+/**
+ * 查询业务管理 业务管理 - 结算 返回
+ */
+export interface QryBussinessJsRsp{
+    addmargin	:number;//追加保证金(非必填)
+    applyid	:string;//申请人
+    applyname	:string;//申请人名称
+    applystatus	:number;//申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+    applytime	:string;//申请时间
+    attachurl	:string;//附件
+    auditid	:string;//审核人ID
+    auditname	:string;//审核人名称
+    audittime	:string;//审核时间
+    buyusername	:string;//采购方名称
+    contractno	:string;//合同编号
+    contractstatus	:number;//合同状态- number;
+//:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+    contracttype	:number;//现货合同类型 - 1:采购 -1:销售
+    decmargin	:number;//减少保证金(非必填)
+    deliverygoodscode	:string;//现货品种代码
+    deliverygoodsid	:number;//现货商品ID
+    deliverygoodsname	:string;//现货品种名称
+    enumdicname	:string;//单位名称
+    goodscode	:string;//点价合约
+    goodsname	:string;//商品名称
+    operateapplyid	:string;//操作申请ID(6number;
+//3+Unix秒时间戳(1number;
+//位)+xxxxxx)
+    operateapplytype	:number;//操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
+    pricemove	:number;//升贴水
+    pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
+    reckonadjustamount	:number;//结算调整金额(非必填)
+    reckonosamount	:number;//结算溢短金额(非必填)
+    reckonotheramount	:number;//结算其他费用(非必填)
+    reckonrealqty	:number;//结算实际数量(非必填)
+    relatedid	:string;//现货合同ID
+    sellusername	:string;//销售方名字
+    userid	:number;//用户ID
+    wrstandardcode	:string;//品类代码
+    wrstandardid	:number;//品类id
+    wrstandardname	:string;//品类名称
+}
+
+/**
+ * 查询业务管理(点价)(对应菜单:业务管理/点价) 请求
+ */
+export interface QueryBusinessDjReq{
+    UserId: number
+    relatedid?: string  // 现货合同ID, 不填则查所有
+    applystatus?: string  // 申请状态(逗号隔开) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+}
+
+/**
+ * 查询业务管理(点价)(对应菜单:业务管理/点价)
+ */
+export interface QryBusinessDjRsp{
+    amount	:number;//点价金额=(点价价格+升贴水)点价数量
+    applyid	:string;//申请人
+    applyname	:string;//申请人名称
+    applystatus	:number;//申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+    applytime	:string;//申请时间
+    attachurl	:string;//附件
+    auditid	:string;//审核人ID
+    auditname	:string;//审核人名称
+    audittime	:string;//审核时间
+    buyusername	:string;//采购方名称
+    contractno	:string;//合同编号
+    contractstatus	:number;//合同状态- number;
+//:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+    contracttype	:number;//现货合同类型 - 1:采购 -1:销售
+    deliverygoodscode	:string;//现货品种代码
+    deliverygoodsid	:number;//现货商品ID
+    deliverygoodsname	:string;//现货品种名称
+    enumdicname	:string;//单位名称
+    goodscode	:string;//点价合约
+    goodsname	:string;//商品名称
+    operateapplyid	:string;//操作申请ID(6number;
+//3+Unix秒时间戳(1number;
+//位)+xxxxxx)
+    operateapplytype	:number;//操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
+    pricedPrice	:number;//点价价格(非必填)
+    pricedQty	:number;//点价数量(非必填)
+    pricemove	:number;//升贴水
+    pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
+    relatedid	:string;//现货合同ID
+    sellusername	:string;//销售方名字
+    userid	:number;//用户ID
+    wrstandardcode	:string;//品类代码
+    wrstandardid	:number;//品类id
+    wrstandardname	:string;//品类名称
+}
+

+ 14 - 2
src/services/go/ermcp/goodsInfo/index.ts

@@ -1,9 +1,9 @@
-/** ================================= 商品信息 ================================**/
+/** ================================= 现货商品信息 ================================**/
 
 import APP from '@/services';
 import { commonSearch_go } from '@/services/go/index';
 import {
-    Ermcp3Brand,
+    Ermcp3Brand, Ermcp3GoodsGroup,
     Ermcp3Wrstandard,
     ErmcpDeliveryGoodsDetailEx,
     ErmcpDeliveryGoodsReq,
@@ -57,4 +57,16 @@ export function QueryDeliveryGoodsDetail(deliverygoodsid : number): Promise<Ermc
     });
 }
 
+/**
+ * 查询期货商品组 /Ermcp3/QueryGoodsGroup
+ * @param excludecfg 排除套保品中已关联的商品组 1-排除
+ * @constructor
+ */
+export function QueryGoodsfGroup(excludecfg: number): Promise<Ermcp3GoodsGroup[]>{
+    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
+    return commonSearch_go('Ermcp3/QueryDeliveryGoodsDetail', { areauserid, excludecfg }).catch((err) => {
+        throw new Error(`查询期货商品组: ${err.message}`);
+    });
+}
+
 

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

@@ -154,4 +154,38 @@ export interface Ermcp3GoodsGroupEx{
     middlegoodsid	:number;//套保商品id
 }
 
+/**
+ *  期货商品组
+ */
+export interface Ermcp3GoodsGroup{
+    agreeunit	:number;//合约单位
+    areauserid	:number;//所属机构id(套保品是有areauserid的,当要排除已配置商品组时需要areauserid过滤)
+    canshort	:number;//是否允许做空[通道交易] - number;
+//:不能做空 1:可以做空
+    closepricemode	:number;//强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)
+    createtime	:string;//创建时间
+    creatorid	:number;//创建人
+    currencyid	:number;//报价货币ID
+    decimalplace	:number;//报价小数位
+    enumdicname	:string;//单位名称
+    excludecfg	:number;//排除套保品已配置期货分类下的商品组(但显示已配置商品组) 1-排除
+    exexchangeid	:number;//外部交易所ID[通道交易]
+    goodsgroupid	:number;//商品组ID(自增ID)
+    goodsgroupname	:string;//商品组名称
+    goodsgroupstatus	:number;//商品组状态 - 1:正常 2:注销
+    goodunitid	:number;//报价单位ID
+    groupcategroyid	:number;//品种分类ID
+    innerdealmode	:number;//内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今
+    marketid	:number;//所属市场ID
+    modifierid	:number;//修改人
+    modifytime	:string;//修改时间
+    outerdealmode	:number;//外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今
+    outergroupcode	:string;//外部商品组代码[通道交易]
+    quoteminunit	:number;//行情最小变动单位 [整数,报价小数位一起使用]
+    quotesourcegroupid	:number;//所属行情源分组ID[参考行情市场用\通道交易]
+    syncgoodsqty	:number;//同步合约数[通道交易-投资管理用] - number;
+//表示不限
+}
+
+
 

+ 9 - 4
src/services/go/ermcp/purchase/index.ts

@@ -1,19 +1,24 @@
+import APP from '@/services';
+import { getUserId } from '@/services/bus/account';
 import { commonSearch_go } from '@/services/go';
 import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/purchase/interface';
 
 /** ================================= 采购 ================================**/
 /**
  * 查询采购信息(这个接口和销售是同一个接口) /Ermcp3/QuerySpotContractBS
- * @param req.areauserid 所属机构ID (必填)
- * @param req.contracttype 合同类型 1-采购, -1-销售 (必填)
  * @param req.querytype 查询类型 1-全部 2-待点价 3-履约结算 4-已完成 (必填)
- * @param req.userid 用户id
  * @param req.usertype 用户类型 2-机构 7-企业成员
  * @param req.contractid 合同ID(SpotContractId)
  * @constructor
  */
 export function QueryPurchase(req: SellBuyContractReq): Promise<Ermcp3SellBuyContract[]> {
-    return commonSearch_go('/Ermcp3/QuerySpotContractBS', req).catch((err) => {
+    const param = {
+        userid: getUserId(),
+        areauserid: APP.get('userAccount').memberuserid, // 所属机构id
+        contracttype: 1, // 采购
+    }
+    Object.assign(param, req)
+    return commonSearch_go('/Ermcp3/QuerySpotContractBS', param).catch((err) => {
         throw new Error(`查询采购信息: ${err.message}`);
     });
 }

+ 59 - 60
src/services/go/ermcp/purchase/interface.ts

@@ -1,11 +1,10 @@
 /**
  * 查询合同请求
  */
-export interface SellBuyContractReq{
-    areauserid: number  //  所属机构ID
-    contracttype: number // 合同类型 1-采购, -1-销售
-    querytype: number // 查询类型 1-全部 2-待点价 3-履约结算 4-已完成
-    userid?: number // 用户ID
+
+export type Querytype = 1 | 2 | 3 | 4;
+export interface SellBuyContractReq {
+    querytype: Querytype // 查询类型 1-全部 2-待点价 3-履约结算 4-已完成
     usertype?: number // 用户类型 2-机构 7-企业成员
     contractid?: string // 合同ID(SpotContractId)
 }
@@ -13,59 +12,59 @@ export interface SellBuyContractReq{
 /**
  * 查询合同返回
  */
-export interface Ermcp3SellBuyContract{
-    accountname	:string;//账户名称
-    attachment	:string;//附件
-    audittime	:string;//审核时间
-    brandname	:string;//品牌名称
-    contracctstatus	:number;//合同状态- number;
-//:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
-    contractmargin	:number;//合同保证金
-    contractno	:string;//合同编号
-    contracttype	:number;//合同类型 1-采购, -1-销售
-    convertfactor	:number;//标仓系数(品类)
-    createtime	:string;//创建时间
-    daikaiamount	:number;//应收(开)票额
-    deliveryenddate	:string;//交割结束日
-    deliverygoodscode	:string;//现货品种代码
-    deliverygoodsid	:number;//现货商品ID
-    deliverygoodsname	:string;//现货品种名称
-    deliverystartdate	:string;//交割开始日
-    enddate	:string;//点价结束日
-    enumdicname	:string;//单位名称
-    goodscode	:string;//点价商品代码
-    goodsid	:number;//点价商品ID
-    goodsname	:string;//点价商品名称
-    invoiceamount	:number;//已开票额
-    loanamount	:number;//贷款总额=已定价额+调整金额
-    margin	:number;//保证金
-    nickname	:string;//账户昵称
-    payamount	:number;//已收付额(收款或付款)
-    preinvoiceamount	:number;//预收(开)票额
-    prepayamount	:number;//预收付额
-    price	:number;//价格
-    pricedamount	:number;//已定价额
-    pricedavg	:number;//已点均价
-    pricedqty	:number;//已定价量
-    pricemove	:number;//升贴水
-    pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
-    producttype	:number;//产品类型 - 1:标准仓单 2:等标 3:非标
-    qty	:number;//合同量
-    reckonadjustamount	:number;//调整金额
-    reckonedamount	:number;//实际已收付额(已确定额,已收付总额-已退款总额)
-    reckonotheramount	:number;//其它费用
-    reckonrealqty	:number;//已确定量
-    remark	:string;//备注
-    spotcontractid	:string;//合同ID
-    spotgoodsbrandid	:number;//现货品牌ID(DGFactoryItem表的ID)
-    spotgoodsdesc	:string;//商品型号(商品规格)
-    startdate	:string;//点价开始日
-    totalamount	:number;//合计总额
-    unpayamount	:number;//应收付款额(应支付或应收款)
-    unpricedqty	:number;//未定价量
-    unsureqty	:number;//未确定量
-    userid	:number;//机构ID
-    wrstandardcode	:string;//品类代码
-    wrstandardid	:number;//品类ID
-    wrstandardname	:string;//品类名称
+export interface Ermcp3SellBuyContract {
+    accountname: string;//账户名称
+    attachment: string;//附件
+    audittime: string;//审核时间
+    brandname: string;//品牌名称
+    contracctstatus: number;//合同状态- number;
+    //:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+    contractmargin: number;//合同保证金
+    contractno: string;//合同编号
+    contracttype: number;//合同类型 1-采购, -1-销售
+    convertfactor: number;//标仓系数(品类)
+    createtime: string;//创建时间
+    daikaiamount: number;//应收(开)票额
+    deliveryenddate: string;//交割结束日
+    deliverygoodscode: string;//现货品种代码
+    deliverygoodsid: number;//现货商品ID
+    deliverygoodsname: string;//现货品种名称
+    deliverystartdate: string;//交割开始日
+    enddate: string;//点价结束日
+    enumdicname: string;//单位名称
+    goodscode: string;//点价商品代码
+    goodsid: number;//点价商品ID
+    goodsname: string;//点价商品名称
+    invoiceamount: number;//已开票额
+    loanamount: number;//贷款总额=已定价额+调整金额
+    margin: number;//保证金
+    nickname: string;//账户昵称
+    payamount: number;//已收付额(收款或付款)
+    preinvoiceamount: number;//预收(开)票额
+    prepayamount: number;//预收付额
+    price: number;//价格
+    pricedamount: number;//已定价额
+    pricedavg: number;//已点均价
+    pricedqty: number;//已定价量
+    pricemove: number;//升贴水
+    pricetype: number;//定价类型 - 1:一口价 2:点价 3:暂定价
+    producttype: number;//产品类型 - 1:标准仓单 2:等标 3:非标
+    qty: number;//合同量
+    reckonadjustamount: number;//调整金额
+    reckonedamount: number;//实际已收付额(已确定额,已收付总额-已退款总额)
+    reckonotheramount: number;//其它费用
+    reckonrealqty: number;//已确定量
+    remark: string;//备注
+    spotcontractid: string;//合同ID
+    spotgoodsbrandid: number;//现货品牌ID(DGFactoryItem表的ID)
+    spotgoodsdesc: string;//商品型号(商品规格)
+    startdate: string;//点价开始日
+    totalamount: number;//合计总额
+    unpayamount: number;//应收付款额(应支付或应收款)
+    unpricedqty: number;//未定价量
+    unsureqty: number;//未确定量
+    userid: number;//机构ID
+    wrstandardcode: string;//品类代码
+    wrstandardid: number;//品类ID
+    wrstandardname: string;//品类名称
 }

+ 10 - 5
src/services/go/ermcp/sell/index.ts

@@ -1,19 +1,24 @@
 /** ================================= 销售 ================================**/
-import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/purchase/interface';
+import APP from '@/services';
+import { getUserId } from '@/services/bus/account';
 import { commonSearch_go } from '@/services/go';
+import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/purchase/interface';
 
 /**
  * 查询销售信息(这个接口和采购是同一个接口) /Ermcp3/QuerySpotContractBS
- * @param req.areauserid 所属机构ID (必填)
- * @param req.contracttype 合同类型 1-采购, -1-销售 (必填)
  * @param req.querytype 查询类型 1-全部 2-待点价 3-履约结算 4-已完成 (必填)
- * @param req.userid 用户id
  * @param req.usertype 用户类型 2-机构 7-企业成员
  * @param req.contractid 合同ID(SpotContractId)
  * @constructor
  */
 export function QueryWareHouse(req: SellBuyContractReq): Promise<Ermcp3SellBuyContract[]> {
-    return commonSearch_go('/Ermcp3/QuerySpotContractBS', req).catch((err) => {
+    const param = {
+        userid: getUserId(),
+        areauserid: APP.get('userAccount').memberuserid, // 所属机构id
+        contracttype: -1, // 销售
+    }
+    Object.assign(param, req)
+    return commonSearch_go('/Ermcp3/QuerySpotContractBS', param).catch((err) => {
         throw new Error(`查询销售信息: ${err.message}`);
     });
 }

+ 6 - 5
src/services/go/ermcp/warehouse-info/index.ts

@@ -1,15 +1,16 @@
 /** ================================= 仓库信息 ================================**/
+import { getUserId } from '@/services/bus/account';
 import { commonSearch_go } from '@/services/go';
-import { Ermcp3AreaStock, ErmcpWareHouseInfo, WareHouseInfoReq } from '@/services/go/ermcp/warehouse-info/interface';
+import { Ermcp3AreaStock, ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
 
 /**
  * 查询仓库信息 /Ermcp/QueryWarehouseInfo
- * @param req.userid 用户id(必填)
- * @param req.status 仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝
+ * @param status 仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝
  * @constructor
  */
-export function QueryWareHouse(req: WareHouseInfoReq): Promise<ErmcpWareHouseInfo[]> {
-    return commonSearch_go('/Ermcp/QueryWarehouseInfo', req).catch((err) => {
+export function QueryWareHouse(status: string): Promise<ErmcpWareHouseInfo[]> {
+    const userid = getUserId()
+    return commonSearch_go('/Ermcp/QueryWarehouseInfo', { userid, status }).catch((err) => {
         throw new Error(`查询仓库信息: ${err.message}`);
     });
 }

+ 46 - 0
src/views/business/purchase/components/detail/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 采购详情-->
+  <a-modal class="custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending-detail',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('detail');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 131 - 0
src/views/business/purchase/components/filterTable/index.vue

@@ -0,0 +1,131 @@
+<template>
+  <!-- 过滤客户资料表格 -->
+  <div class="filter-custom-table">
+    <a-input v-model:value="accountname"
+             class="tableConditionInput"
+             placeholder="模糊搜索销售方" />
+    <a-input v-model:value="contractno"
+             class="tableConditionInput"
+             placeholder="模糊搜索合同编号" />
+    <a-input v-model:value="deliverygoodsname"
+             class="tableConditionInput"
+             placeholder="模糊搜索现货品种" />
+    <a-input v-model:value="convertfactor"
+             class="tableConditionInput"
+             placeholder="模糊搜索品类" />
+    <a-input v-model:value="goodsname"
+             class="tableConditionInput"
+             placeholder="模糊搜索点价合约" />
+    <a-button class="selectBtn"
+              @click="search">查询</a-button>
+    <a-button class="selectBtn"
+              @click="reset">重置</a-button>
+    <slot></slot>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref, SetupContext } from 'vue';
+
+// 搜索
+function handleSearch(context: SetupContext) {
+    const accountname = ref<string>('');
+    const contractno = ref<string>('');
+    const deliverygoodsname = ref<string>('');
+    const convertfactor = ref<string>('');
+    const goodsname = ref<string>('');
+
+    function search() {
+        const result = {
+            accountname: [accountname.value],
+            contractno: [contractno.value],
+            deliverygoodsname: [deliverygoodsname.value],
+            convertfactor: [convertfactor.value],
+            goodsname: [goodsname.value],
+        };
+        context.emit('search', result);
+    }
+    function reset() {
+        accountname.value = '';
+        contractno.value = '';
+        deliverygoodsname.value = '';
+        convertfactor.value = '';
+        goodsname.value = '';
+        search();
+    }
+
+    return { accountname, contractno, convertfactor, goodsname, search, reset };
+}
+
+export default defineComponent({
+    name: 'purchase_pending-filter-table',
+    components: {},
+    setup(props, context) {
+        return {
+            ...handleSearch(context),
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.filter-custom-table {
+    width: 100%;
+    display: inline-flex;
+    padding-top: 9px;
+    padding-bottom: 6px;
+    .ant-select-single:not(.ant-select-customize-input) {
+        margin-right: 10px;
+        // background: #252D34;
+        // .rounded-corners(3px);
+        .ant-select-selector {
+            height: 30px;
+            padding: 0 8px;
+            background: @m-grey9;
+            border: none;
+            .rounded-corners(3px);
+            color: @m-grey10;
+            .ant-select-arrow {
+                right: 8px;
+                color: @m-grey1;
+            }
+        }
+        .ant-select-arrow {
+            color: @m-grey1;
+        }
+        .ant-select-selection-item {
+            color: @m-white1;
+        }
+    }
+    .conditionSelect + .conditionSelect {
+        margin-left: 10px;
+    }
+}
+.selectBtn.ant-btn {
+    margin-left: 10px;
+    width: 80px;
+    height: 30px;
+    line-height: 31px;
+    text-align: center;
+    background: linear-gradient(0deg, @m-grey15 0%, @m-grey16 98%);
+    border: 0;
+    color: @m-white0;
+    font-size: 14px;
+    .rounded-corners(3px);
+    &:hover,
+    &:focus {
+        background: linear-gradient(0deg, @m-grey15-hover 0%, @m-grey16-hover 98%);
+        color: rgba(@m-white0, 0.8);
+        border: 0;
+    }
+}
+.operBtn.ant-btn:extend(.selectBtn.ant-btn) {
+    background: linear-gradient(0deg, @m-blue6 0%, @m-blue7 99%);
+    &:hover,
+    &:focus {
+        background: linear-gradient(0deg, @m-blue6-hover 0%, @m-blue7-hover 99%);
+        color: rgba(@m-white0, 0.8);
+        border: 0;
+    }
+}
+</style>;

+ 46 - 0
src/views/business/purchase/components/funds/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 款项登记-->
+  <a-modal class="custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_funds',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_funds');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 46 - 0
src/views/business/purchase/components/invoice/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 发票登记-->
+  <a-modal class="custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_invoice',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_invoice');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 46 - 0
src/views/business/purchase/components/settlement/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 交收登记-->
+  <a-modal class="custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_settlement',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_settlement');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 46 - 0
src/views/business/purchase/components/someprice/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 采购点价登记-->
+  <a-modal class="custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_someprice',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_someprice');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 46 - 0
src/views/business/purchase/components/storage/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 入库登记-->
+  <a-modal class="custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_storage',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_storage');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 82 - 72
src/views/business/purchase/list/all/index.vue

@@ -1,83 +1,93 @@
 <template>
-    <!-- 采购: 实时敞口-->
-    <div class="purchase-real-time">
-        采购: 实时敞口
-    </div>
+  <!-- 采购: 履约交收-->
+  <div class="purchase-all"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template> -->
+      </a-table>
+    </contextMenu>
+    <!-- 详情 -->
+    <Detail />
+    <!-- 采购点价登记 -->
+    <SomePrice />
+    <!-- 交收登记 -->
+    <Settlement />
+    <!-- 款项登记 -->
+    <Funds />
+    <!-- 发票登记 -->
+    <Invoice />
+    <!-- 入库登记 -->
+    <Storage />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '../../components/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Detail from '../../components/detail/index.vue';
+import Settlement from '../../components/settlement/index.vue';
+import Funds from '../../components/funds/index.vue';
+import Invoice from '../../components/invoice/index.vue';
+import Storage from '../../components/storage/index.vue';
+import SomePrice from '../../components/someprice/index.vue';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+export default defineComponent({
+    name: 'purchase-all',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        Detail,
+        Settlement,
+        Funds,
+        Invoice,
+        Storage,
+        SomePrice,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('purchase_all');
 
-        return { customList, actionQuery };
-    }
+        initData(() => {
+            actionQuery(1);
+            getColumns();
+        });
 
-    export default defineComponent({
-        name: 'purchase-real-time',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
-            });
-            return { customList };
-        },
-    });
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .purchase-real-time {
-    }</style
+.purchase-history {
+}
+</style
 >;

+ 69 - 19
src/views/business/purchase/list/pending/index.vue

@@ -1,27 +1,77 @@
 <template>
-    <!-- 采购: 待点价-->
-    <div class="purchase-peddding" :loading="loading">
-        <!-- <filterCustomTable @search="search">
-            <a-button class="operBtn" v-if="hasPermission('custom_info_btn_add')" @click="addAction">新增</a-button>
-        </filterCustomTable> -->
-        <contextMenu :contextMenuList="contextMenuList" :tableList="customList">
-            <a-table :columns="columns" class="topTable" :pagination="false" rowKey="key" :data-source="customList"></a-table>
-        </contextMenu>
-    </div>
+  <!-- 采购: 待点价-->
+  <div class="purchase-peddding"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template> -->
+      </a-table>
+    </contextMenu>
+    <!-- 详情 -->
+    <Detail />
+    <!-- 采购点价登记 -->
+    <SomePrice />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { handlePurchase, btnAndComp } from '../../setup';
-    export default defineComponent({
-        name: 'purchase-peddding',
-        setup() {
-            return { ...handlePurchase(), ...btnAndComp() };
-        },
-    });
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '../../components/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Detail from '../../components/detail/index.vue';
+import SomePrice from '../../components/someprice/index.vue';
+
+export default defineComponent({
+    name: 'purchase-peddding',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        Detail,
+        SomePrice,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('purchase_pending');
+
+        initData(() => {
+            actionQuery(2);
+            getColumns();
+        });
+
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .spot-contract-peddding {
-    }</style
+.spot-contract-peddding {
+}
+</style
 >;

+ 78 - 72
src/views/business/purchase/list/performance/index.vue

@@ -1,83 +1,89 @@
 <template>
-    <!-- 采购: 历史敞口-->
-    <div class="purchase-history">
-        采购:历史敞口
-    </div>
+  <!-- 采购: 履约交收-->
+  <div class="purchase-performance"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template> -->
+      </a-table>
+    </contextMenu>
+    <!-- 详情 -->
+    <Detail />
+    <!-- 交收登记 -->
+    <Settlement />
+    <!-- 款项登记 -->
+    <Funds />
+    <!-- 发票登记 -->
+    <Invoice />
+    <!-- 入库登记 -->
+    <Storage />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '../../components/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Detail from '../../components/detail/index.vue';
+import Settlement from '../../components/settlement/index.vue';
+import Funds from '../../components/funds/index.vue';
+import Invoice from '../../components/invoice/index.vue';
+import Storage from '../../components/storage/index.vue';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+export default defineComponent({
+    name: 'purchase-performance',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        Detail,
+        Settlement,
+        Funds,
+        Invoice,
+        Storage,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('purchase_performance');
 
-        return { customList, actionQuery };
-    }
+        initData(() => {
+            actionQuery(3);
+            getColumns();
+        });
 
-    export default defineComponent({
-        name: 'purchase-history',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
-            });
-            return { customList };
-        },
-    });
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .purchase-history {
-    }</style
+.purchase-history {
+}
+</style
 >;

+ 77 - 0
src/views/business/purchase/list/setup.ts

@@ -0,0 +1,77 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { QueryPurchase } from '@/services/go/ermcp/purchase/index';
+import { Ermcp3SellBuyContract, Querytype } from '@/services/go/ermcp/purchase/interface';
+import { message } from 'ant-design-vue';
+import { ref } from 'vue';
+
+// 列表
+export function getTableList() {
+    // 表格数据
+    const tableList = ref<Ermcp3SellBuyContract[]>([]);
+    // 表头数据
+    const columns = ref<ColumnType[]>([]);
+    // 过滤项
+    const filteredInfo = ref();
+    const loading = ref<boolean>(false);
+    // 获取表头
+    function getColumns() {
+        const list = getTableHead('table_pcweb_purchase');
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield, // 表格数据对应的key
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            // // 以下添加过滤数据对应的方法
+            if (e.columnfield === 'accountname') {
+                item.onFilter = (value: string, record: Ermcp3SellBuyContract) => record.accountname.includes(value);
+                item.filteredValue = filtered.accountname || null;
+            }
+            if (e.columnfield === 'contractno') {
+                item.onFilter = (value: string, record: Ermcp3SellBuyContract) => record.contractno.includes(value);
+                item.filteredValue = filtered.contractno || null;
+            }
+            if (e.columnfield === 'deliverygoodsname') {
+                item.onFilter = (value: string, record: Ermcp3SellBuyContract) => record.deliverygoodsname.includes(value);
+                item.filteredValue = filtered.deliverygoodsname || null;
+            }
+            if (e.columnfield === 'convertfactor') {
+                item.onFilter = (value: string, record: Ermcp3SellBuyContract) => String(record.convertfactor).includes(value);
+                item.filteredValue = filtered.convertfactor || null;
+            }
+            if (e.columnfield === 'goodsname') {
+                item.onFilter = (value: string, record: Ermcp3SellBuyContract) => record.goodsname.includes(value);
+                item.filteredValue = filtered.goodsname || null;
+            }
+            columns.value.push(item);
+        });
+    }
+    // 查询列表
+    function actionQuery(querytype: Querytype) {
+        loading.value = true;
+        QueryPurchase({ querytype })
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 查询
+    function search(value: any) {
+        filteredInfo.value = value;
+        getColumns();
+    }
+
+    return { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading, };
+}

+ 0 - 79
src/views/business/purchase/setup.ts

@@ -1,79 +0,0 @@
-// import { QueryPurchase } from '@/services/go/ermcp/purchase';
-import { MenuItem } from '@/common/components/contextMenu/interface';
-import { initData } from '@/common/methods';
-import { ColumnType, getTableHead } from '@/common/methods/table';
-import { handlePermission } from '@/common/setup/buttonPermission/index';
-import APP from '@/services';
-import { getUserId } from '@/services/bus/account';
-import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/purchase/interface';
-import { ref } from '@vue/reactivity';
-import { watchEffect } from 'vue';
-// 采购数据获取和表头数据整理
-export function handlePurchase() {
-    // ========================loading========================
-    const loading = ref<boolean>(false);
-    // ========================获取列表数据========================
-    let customList = ref<Ermcp3SellBuyContract[] | []>([]);
-    function queryPurchase() {
-        const AreaUserID = APP.get('userAccount').memberuserid; // 所属机构id
-        const req: SellBuyContractReq = {
-            areauserid: AreaUserID, //  所属机构ID
-            contracttype: 1, // 合同类型 1-采购, -1-销售
-            querytype: 1, // 查询类型 1-全部 2-待点价 3-履约结算 4-已完成
-            userid: getUserId(), // 用户ID
-        };
-        // QueryPurchase(req).then((res) => {
-        //     customList.value = res;
-        // });
-    }
-
-    // ========================获取表头========================
-    const columns = ref<ColumnType[]>([]);
-    function getColumns() {
-        const list = getTableHead('table_pcweb_purchase');
-        columns.value.length = 0;
-        list.forEach((e, i) => {
-            const { columnfield, columntitle, aligntype } = e;
-            const item: ColumnType = {
-                key: String(i),
-                dataIndex: columnfield,
-                title: columntitle,
-                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
-                slots: { customRender: columnfield },
-            };
-            columns.value.push(item);
-        });
-    }
-
-    // ========================数据初始化========================
-    initData((): void => {
-        queryPurchase();
-        getColumns();
-    });
-    return { loading, customList, columns };
-}
-
-// 按钮权限与功能组件
-export function btnAndComp() {
-    // 传入父及的code 得到当前1234级的整个权限
-    const { hasPermission } = handlePermission('purchase_pending');
-    // 配置右键菜单列表
-    const contextMenuList = ref<MenuItem[]>([]);
-    // 打开新增页的弹窗 返回打开弹窗的方法
-    // const { openAction: addAction } = openModal('addCustomInfo');
-    // // 创建详情页并写入右键菜单列表(每个页面都有,写死)
-    // detailButton('customDetail', contextMenuList);
-    // // 通过code跟弹窗建立联系 返回写入右键的方法
-    // const { action: deleteAction } = permissionButton('purchase_pending_someprice', '点价登记', contextMenuList);
-
-    const stop = watchEffect(() => {
-        // 判断是否有权限 有就写入
-        // hasPermission('custom_info_btn_delete') && deleteAction();
-    });
-    return {
-        stop,
-        // addAction,
-        hasPermission,
-        contextMenuList,
-    };
-}

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

@@ -1,7 +1,7 @@
 <template>
-  <!-- 修改客户资料-->
+  <!-- 恢复客户资料-->
   <a-modal class="modify-custom"
-           title="修改客户资料"
+           title="恢复客户资料"
            v-model:visible="visible"
            @cancel="cancel"
            width="890px">

+ 2 - 9
src/views/information/custom/list/normal-use/index.vue

@@ -32,19 +32,15 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, onUnmounted, Ref, ref, watchEffect } from 'vue';
-
+import { defineComponent } from 'vue';
 import { initData } from '@/common/methods/index';
 import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
-import { MenuItem } from '@/common/components/contextMenu/interface';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { getCustomList } from '../setup';
-import { openModal } from '@/common/setup/modal/index';
 import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
 import ModifyCustom from '@/views/information/custom/compoments/modify/index.vue';
 import DisableCustom from '@/views/information/custom/compoments/disable/index.vue';
 import AddCustom from '@/views/information/custom/compoments/add/index.vue';
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
 import { getBtnList } from '@/common/setup/contextMenu/index';
 
 export default defineComponent({
@@ -59,16 +55,13 @@ export default defineComponent({
     },
     setup() {
         const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { hasPermission } = handlePermission('custom_info_normal');
         const { commonBtn, forDataBtn } = getBtnList('custom_info_normal');
 
-        // const { openAction: addAction } = openModal('custom_info_btn_add');
-
         initData(() => {
             actionQuery(3);
             getColumns();
         });
-        return { customList, columns, search, loading, commonBtn, forDataBtn, hasPermission };
+        return { customList, columns, search, loading, commonBtn, forDataBtn };
     },
 });
 </script>

+ 9 - 26
src/views/information/custom/list/stop-use/index.vue

@@ -4,8 +4,9 @@
        :loading="loading">
     <filterCustomTable @search="search">
       <a-button class="operBtn"
-                v-if="hasPermission('custom_info_btn_add')"
-                @click="addAction">新增</a-button>
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
     </filterCustomTable>
     <contextMenu :contextMenuList="contextMenuList"
                  :tableList="customList">
@@ -25,25 +26,22 @@
     <CustomDetail />
     <!-- 删除 -->
     <DeleteCustom />
-    <!-- 恢复客户资料 -->@/common/methods
+    <!-- 恢复客户资料 -->
     <RecoverCustom />
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, onUnmounted, Ref, ref, watchEffect } from 'vue';
-
+import { defineComponent } from 'vue';
 import { initData } from '@/common/methods/index';
 import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
-import { MenuItem } from '@/common/components/contextMenu/interface';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { getCustomList } from '../setup';
-import { openModal } from '@/common/setup/modal/index';
 import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
 import DeleteCustom from '@/views/information/custom/compoments/delete/index.vue';
 import RecoverCustom from '@/views/information/custom/compoments/recover/index.vue';
 import AddCustom from '@/views/information/custom/compoments/add/index.vue';
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
+import { getBtnList } from '@/common/setup/contextMenu/index';
 
 export default defineComponent({
     name: 'custom-normal',
@@ -57,27 +55,13 @@ export default defineComponent({
     },
     setup() {
         const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { hasPermission } = handlePermission('custom_info_normal');
-        const contextMenuList = ref<MenuItem[]>([]);
-
-        const { openAction: addAction } = openModal('custom_info_btn_add');
-
-        detailButton('detail', contextMenuList);
-        const { action: deleteAction } = permissionButton('custom_info_btn_delete', '删除', contextMenuList);
-        const { action: recoverAction } = permissionButton('custom_info_btn_recover', '恢复', contextMenuList);
+        const { commonBtn, forDataBtn } = getBtnList('custom_info_disabled');
 
-        const stop = watchEffect(() => {
-            hasPermission('custom_info_btn_recover') && recoverAction();
-            hasPermission('custom_info_btn_delete') && deleteAction();
-        });
-        onUnmounted(() => {
-            stop();
-        });
         initData(() => {
             actionQuery(4);
             getColumns();
         });
-        return { customList, columns, search, loading, contextMenuList, hasPermission, addAction };
+        return { customList, columns, search, loading, commonBtn, forDataBtn };
     },
 });
 </script>
@@ -85,5 +69,4 @@ export default defineComponent({
 <style lang="less">
 .custom-normal {
 }
-</style
->;
+</style>;

+ 8 - 21
src/views/information/spot-contract/list/checkpending/index.vue

@@ -4,10 +4,11 @@
        :loading="loading">
     <filterCustomTable @search="search">
       <a-button class="operBtn"
-                v-if="hasPermission('spot_contract_btn_add')"
-                @click="addAction">新增</a-button>
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
     </filterCustomTable>
-    <contextMenu :contextMenuList="contextMenuList"
+    <contextMenu :contextMenuList="forDataBtn"
                  :tableList="spotContractList">
       <a-table :columns="columns"
                class="topTable"
@@ -29,18 +30,17 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, onUnmounted, ref, watchEffect } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
 import { getCustomList } from '../setup';
-import { openModal } from '@/common/setup/modal/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { MenuItem } from '@/common/components/contextMenu/interface';
 import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
 import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
 import Check from '@/views/information/spot-contract/components/check/index.vue';
 import Cancel from '@/views/information/spot-contract/components/cancel/index.vue';
+import { getBtnList } from '@/common/setup/contextMenu/index';
 
 export default defineComponent({
     name: 'spot-contract-peddding',
@@ -55,26 +55,13 @@ export default defineComponent({
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { hasPermission } = handlePermission('spot_contract_checkpending');
-        function addAction() {}
-        // const { openAction: addAction } = openModal('addSpotContract');
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_checkpending');
 
-        // detailButton('spotContractDetail', contextMenuList);
-        // const { action: checkAction } = permissionButton('spotContractCheck', '审核', contextMenuList);
-        // const { action: cancelAction } = permissionButton('spotContractCancel', '撤销', contextMenuList);
-
-        // const stop = watchEffect(() => {
-        //     hasPermission('spot_contract_btn_check') && checkAction();
-        //     hasPermission('spot_contract_btn_cancel') && cancelAction();
-        // });
-        // onUnmounted(() => {
-        //     stop();
-        // });
         initData(() => {
             actionQuery(2);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
+        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
     },
 });
 </script>

+ 7 - 12
src/views/information/spot-contract/list/finished/index.vue

@@ -4,10 +4,11 @@
     <filterCustomTable @search="search"
                        :loading="loading">
       <a-button class="operBtn"
-                v-if="hasPermission('spot_contract_btn_add')"
-                @click="addAction">新增</a-button>
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
     </filterCustomTable>
-    <contextMenu :contextMenuList="contextMenuList"
+    <contextMenu :contextMenuList="forDataBtn"
                  :tableList="spotContractList">
       <a-table :columns="columns"
                class="topTable"
@@ -23,7 +24,6 @@
     <AddSpotContract />
     <!-- 现货合同: 详情 -->
     <SpotContractDeatil />
-
   </div>
 </template>
 
@@ -32,12 +32,11 @@ import { defineComponent, ref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
 import { getCustomList } from '../setup';
-import { openModal } from '@/common/setup/modal/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { MenuItem } from '@/common/components/contextMenu/interface';
 import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
-import { detailButton, handlePermission } from '@/common/setup/buttonPermission/index';
 import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
+import { getBtnList } from '@/common/setup/contextMenu/index';
 
 export default defineComponent({
     name: 'spot-contract-done',
@@ -50,17 +49,13 @@ export default defineComponent({
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { hasPermission } = handlePermission('spot_contract_finished');
-        function addAction() {}
-        // const { openAction: addAction } = openModal('addSpotContract');
-
-        // detailButton('spotContractDetail', contextMenuList);
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_finished');
 
         initData(() => {
             actionQuery(4);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
+        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
     },
 });
 </script>

+ 8 - 19
src/views/information/spot-contract/list/performance/index.vue

@@ -4,10 +4,11 @@
     <filterCustomTable @search="search"
                        :loading="loading">
       <a-button class="operBtn"
-                v-if="hasPermission('spot_contract_btn_add')"
-                @click="addAction">新增</a-button>
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
     </filterCustomTable>
-    <contextMenu :contextMenuList="contextMenuList"
+    <contextMenu :contextMenuList="forDataBtn"
                  :tableList="spotContractList">
       <a-table :columns="columns"
                class="topTable"
@@ -27,17 +28,16 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, onUnmounted, ref, watchEffect } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
 import { getCustomList } from '../setup';
-import { openModal } from '@/common/setup/modal/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { MenuItem } from '@/common/components/contextMenu/interface';
 import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
 import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
 import Finish from '@/views/information/spot-contract/components/finish/index.vue';
+import { getBtnList } from '@/common/setup/contextMenu/index';
 
 export default defineComponent({
     name: 'spot-contract-performance',
@@ -51,24 +51,13 @@ export default defineComponent({
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { hasPermission } = handlePermission('spot_contract_performance');
-        function addAction() {}
-        // const { openAction: addAction } = openModal('addSpotContract');
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_performance');
 
-        // detailButton('spotContractDetail', contextMenuList);
-        // const { action: checkAction } = permissionButton('spotContractFinish', '正常完结', contextMenuList);
-
-        // const stop = watchEffect(() => {
-        //     hasPermission('spot_contract_btn_finish') && checkAction();
-        // });
-        // onUnmounted(() => {
-        //     stop();
-        // });
         initData(() => {
             actionQuery(3);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
+        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
     },
 });
 </script>

+ 8 - 19
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -4,10 +4,11 @@
        :loading="loading">
     <filterCustomTable @search="search">
       <a-button class="operBtn"
-                v-if="hasPermission('spot_contract_btn_add')"
-                @click="addAction">新增</a-button>
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
     </filterCustomTable>
-    <contextMenu :contextMenuList="contextMenuList"
+    <contextMenu :contextMenuList="forDataBtn"
                  :tableList="spotContractList">
       <a-table :columns="columns"
                class="topTable"
@@ -33,20 +34,18 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, onUnmounted, ref, watchEffect } from 'vue';
+import { defineComponent, onUnmounted, ref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
 import { getCustomList } from '../setup';
-import { openModal } from '@/common/setup/modal/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { MenuItem } from '@/common/components/contextMenu/interface';
 import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
 import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
 import ModifySpotContract from '@/views/information/spot-contract/components/modify/index.vue';
 import DeleteSpotContract from '@/views/information/spot-contract/components/delete/index.vue';
 import ResubmitSpotContract from '@/views/information/spot-contract/components/resubmit/index.vue';
-
+import { getBtnList } from '@/common/setup/contextMenu/index';
 export default defineComponent({
     name: 'spot-contract-not-commit',
     components: {
@@ -61,18 +60,8 @@ export default defineComponent({
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { hasPermission } = handlePermission('spot_contract_unsubmitted');
-        const { openAction: addAction } = openModal('spot_contract_btn_add');
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted');
 
-        detailButton('detail', contextMenuList);
-        // const { action: modifyAction } = permissionButton('modifySpotContract', '修改', contextMenuList);
-        // const { action: deleteAction } = permissionButton('deleteSpotContract', '删除', contextMenuList);
-        // const { action: resubmitAction } = permissionButton('resubmitSpotContract', '重新提交', contextMenuList);
-        // const stop = watchEffect(() => {
-        //     hasPermission('spot_contract_btn_modify') && modifyAction();
-        //     hasPermission('spot_contract_btn_delete') && deleteAction();
-        //     hasPermission('spot_contract_btn_resubmit') && resubmitAction();
-        // });
         onUnmounted(() => {
             stop();
         });
@@ -80,7 +69,7 @@ export default defineComponent({
             actionQuery(1);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
+        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
     },
 });
 </script>

+ 2 - 2
src/views/information/warehouse-info/compoments/addWarehouse/index.vue → src/views/information/warehouse-info/compoments/add/index.vue

@@ -117,10 +117,10 @@ import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 
 export default defineComponent({
-    name: 'add-warehouse',
+    name: 'warehouse_info_btn_add',
     components: {},
     setup() {
-        const { visible, cancel } = closeModal('custom_info_btn_add');
+        const { visible, cancel } = closeModal('warehouse_info_btn_add');
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;

+ 46 - 0
src/views/information/warehouse-info/compoments/detail/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 仓库信息 详情-->
+  <a-modal class="add-custom custom-detail"
+           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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'warehouse_info_btn-detail',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('detail');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 2 - 2
src/views/information/warehouse-info/compoments/disableWarehouse/index.vue → src/views/information/warehouse-info/compoments/disable/index.vue

@@ -74,10 +74,10 @@ import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 
 export default defineComponent({
-    name: 'custom-disable',
+    name: 'warehouse_info_btn_disable',
     components: {},
     setup() {
-        const { visible, cancel } = closeModal('custom_info_btn_disable');
+        const { visible, cancel } = closeModal('warehouse_info_btn_disable');
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;

+ 8 - 7
src/views/information/warehouse-info/compoments/filterTable/index.vue

@@ -4,11 +4,12 @@
     <a-select label-in-value
               class="conditionSelect"
               style="width: 120px"
-              v-model:value="userinfotype"
+              v-model:value="warehousetype"
               placeholder="全部仓库类型"
               @change="handleChange">
-      <a-select-option value="1">仓库类型一</a-select-option>
-      <a-select-option value="2">仓库类型二</a-select-option>
+      <a-select-option value="1">厂库</a-select-option>
+      <a-select-option value="2">自有库</a-select-option>
+      <a-select-option value="3">合作库</a-select-option>
     </a-select>
     <a-input v-model:value="nickname"
              class="tableConditionInput"
@@ -36,24 +37,24 @@ function handleSearch(context: SetupContext) {
         value: string;
     }
     let useType = '';
-    const userinfotype = ref<number>(0);
+    const warehousetype = ref<number | undefined>(undefined);
     function handleChange(value: Value) {
         useType = value.value;
         search();
     }
     function search() {
-        const result = { nickname: [nickname.value], name: [name.value], userinfotype: [useType] };
+        const result = { warehousename: [nickname.value], address: [name.value], warehousetype: [useType] };
         context.emit('search', result);
     }
     function reset() {
         nickname.value = '';
         name.value = '';
-        userinfotype.value = 0;
+        warehousetype.value = undefined;
         useType = '';
         search();
     }
 
-    return { nickname, name, search, reset, userinfotype, handleChange };
+    return { nickname, name, search, reset, warehousetype, handleChange };
 }
 
 export default defineComponent({

+ 48 - 0
src/views/information/warehouse-info/compoments/modify/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 修改仓库信息-->
+  <a-modal class="modify-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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'warehouse_info_btn_modify',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('warehouse_info_btn_modify');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.modify-custom {
+}
+</style
+>;

+ 48 - 0
src/views/information/warehouse-info/compoments/recover/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 恢复仓库信息-->
+  <a-modal class="modify-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-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'warehouse_info_btn_recover',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('warehouse_info_btn_recover');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.modify-custom {
+}
+</style
+>;

+ 58 - 85
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -1,109 +1,81 @@
 <template>
   <!-- 仓库信息: 正常 -->
-  <div class="warehouse-info-normal">
+  <div class="warehouse-info-normal"
+       :loading="loading">
     <filterCustomTable @search="search">
       <a-button class="operBtn"
-                @click="openAction">新增</a-button>
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
     </filterCustomTable>
-    <a-table class="topTable"
-             :columns="columns"
-             :pagination="false"
-             rowKey="key"
-             :data-source="wareHouseInfos" />
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 新增仓库信息 -->
+    <Add />
+    <!-- 停用仓库信息 -->
+    <Disable />
+    <!-- 仓库信息详情 -->
+    <Detail />
+    <!-- 修改仓息库信 -->
+    <Modify />
   </div>
 </template>
 
 <script lang="ts">
-import { computed, defineComponent, ref } from 'vue';
-
+import { defineComponent } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '@/views/information/warehouse-info/compoments/filterTable/index.vue';
-import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
-import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
-import { message } from 'ant-design-vue';
-import { getTableHead } from '@/common/methods/table';
-import { getUserId } from '@/services/bus/account';
-
-// 查询客户资料列表
-function getWarehouseInfoList() {
-    interface ColumnType {
-        key: string;
-        dataIndex: string;
-        title: string;
-        onFilter?: Function;
-        sorter?: Function;
-    }
-
-    // 仓库数据
-    const wareHouseInfos = ref<ErmcpWareHouseInfo[]>([]);
-    // 列头
-    const columns = ref<ColumnType[]>([]);
-    // 过滤
-    const filteredInfo = ref();
-
-    // 获取表头
-    function getColumns() {
-        interface ColumnType {
-            key: string;
-            dataIndex: string;
-            title: string;
-            filteredValue?: string | null;
-            onFilter?: Function;
-            sorter?: Function;
-        }
-        const list = getTableHead('table_pcweb_warehouse');
-        console.log('list', list);
-
-        const filtered = filteredInfo.value || {};
-        columns.value.length = 0;
-        list.forEach((e, i) => {
-            const { columnfield, columntitle } = e;
-            const item: ColumnType = {
-                key: String(i),
-                dataIndex: columnfield,
-                title: columntitle,
-            };
-            columns.value.push(item);
-        });
-        console.log('columns', columns);
-    }
-
-    // 获取仓库信息
-    const wareHouseInfoList = ref<ErmcpWareHouseInfo[]>([]);
-    function actionQuery() {
-        const reqParam = { userid: getUserId(), status: '1' };
-        QueryWareHouse(reqParam)
-            .then((res) => {
-                wareHouseInfos.value = res.map((e, i) => {
-                    return { ...e, key: String(i) };
-                });
-                console.log('查询仓库列表', wareHouseInfos);
-            })
-            .catch((err) => message.error(err));
-    }
-    // 查询
-    function search(value: any) {}
-
-    return { wareHouseInfos, actionQuery, columns, getColumns, search };
-}
-
-// 新增
-function add() {
-    console.log('add');
-}
+import { getTableList, getWareHouseType, getWareHouseStatus } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Add from '../../compoments/add/index.vue';
+import Disable from '../../compoments/disable/index.vue';
+import Detail from '../../compoments/detail/index.vue';
+import Modify from '../../compoments/modify/index.vue';
 
 export default defineComponent({
     name: 'warehouse-info-normal',
     components: {
+        contextMenu,
         filterCustomTable,
+        Add,
+        Disable,
+        Detail,
+        Modify,
     },
     setup() {
-        const { wareHouseInfos, actionQuery, columns, getColumns, search } = getWarehouseInfoList();
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal');
+
         initData(() => {
-            actionQuery();
+            actionQuery('1');
             getColumns();
         });
-        return { wareHouseInfos, add, columns, search };
+
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+            getWareHouseStatus,
+            getWareHouseType,
+        };
     },
 });
 </script>
@@ -113,3 +85,4 @@ export default defineComponent({
 }
 </style
 >;
+

+ 114 - 0
src/views/information/warehouse-info/list/setup.ts

@@ -0,0 +1,114 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
+import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
+import { message } from 'ant-design-vue';
+import { ref } from 'vue';
+
+// 客户资料列表
+export function getTableList() {
+    // 表格数据
+    const tableList = ref<ErmcpWareHouseInfo[]>([]);
+    // 表头数据
+    const columns = ref<ColumnType[]>([]);
+    // 过滤项
+    const filteredInfo = ref();
+    const loading = ref<boolean>(false);
+    // 获取表头
+    function getColumns() {
+        const list = getTableHead('table_pcweb_warehouse');
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield, // 表格数据对应的key
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            // 以下添加过滤数据对应的方法
+            if (e.columnfield === 'warehousetype') {
+                item.onFilter = (value: string, record: ErmcpWareHouseInfo) => String(record.warehousetype).includes(String(value));
+                item.filteredValue = filtered.warehousetype || null;
+            }
+            if (e.columnfield === 'warehousename') {
+                item.onFilter = (value: string, record: ErmcpWareHouseInfo) => record.warehousename.includes(value);
+                item.filteredValue = filtered.warehousename || null;
+            }
+            if (e.columnfield === 'address') {
+                item.onFilter = (value: string, record: ErmcpWareHouseInfo) => record.address.includes(value);
+                item.filteredValue = filtered.address || null;
+            }
+            columns.value.push(item);
+        });
+    }
+    // 查询列表
+    function actionQuery(status: string) {
+        loading.value = true;
+        QueryWareHouse(status)
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 查询
+    function search(value: any) {
+        filteredInfo.value = value;
+        getColumns();
+    }
+
+    return { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading, };
+}
+
+/**
+ * 获取仓库类型
+ * @param type 
+ * @returns 
+ */
+export function getWareHouseType(type: number): string {
+    let result = '--';
+    switch (type) {
+        case 1:
+            result = '厂库'
+            break
+        case 2:
+            result = '自有库'
+            break
+        case 3:
+            result = '合作库'
+            break
+    }
+    return result;
+}
+
+/**
+ * 获取仓库状态
+ * @param status 
+ * @returns 
+ */
+export function getWareHouseStatus(status: number): string {
+    let result = '--';
+    switch (status) {
+        case 1:
+            result = '正常'
+            break
+        case 2:
+            result = '注销'
+            break
+        case 3:
+            result = '待审核'
+            break
+        case 4:
+            result = '审核拒绝'
+            break
+    }
+    return result;
+}

+ 68 - 73
src/views/information/warehouse-info/list/stop-use/index.vue

@@ -1,83 +1,78 @@
 <template>
-    <!-- 仓库信息: 停用 -->
-    <div class="warehouse-info-stop">
-        仓库信息: 停用
-    </div>
+  <!-- 仓库信息: 停用 -->
+  <div class="warehouse-info-stop">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 新增仓库信息 -->
+    <Add />
+    <!-- 恢复仓库信息 -->
+    <Recover />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '@/views/information/warehouse-info/compoments/filterTable/index.vue';
+import { getTableList, getWareHouseType, getWareHouseStatus } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Add from '../../compoments/add/index.vue';
+import Recover from '../../compoments/recover/index.vue';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+export default defineComponent({
+    name: 'warehouse-info-stop',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        Add,
+        Recover,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal');
+        console.log('forDataBtn', forDataBtn);
 
-        return { customList, actionQuery };
-    }
-
-    export default defineComponent({
-        name: 'warehouse-info-stop',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
-            });
-            return { customList };
-        },
-    });
+        initData(() => {
+            actionQuery('2');
+            getColumns();
+        });
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+            getWareHouseStatus,
+            getWareHouseType,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .warehouse-info-stop {
-    }</style
+.warehouse-info-stop {
+}
+</style
 >;