Parcourir la source

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

marymelisa il y a 4 ans
Parent
commit
568351b300
31 fichiers modifiés avec 500 ajouts et 169 suppressions
  1. 27 0
      src/common/components/buttonList/index.vue
  2. 6 0
      src/common/components/buttonList/interface.ts
  3. 7 3
      src/common/components/contextMenu/index.vue
  4. 28 8
      src/common/setup/contextMenu/index.ts
  5. 22 0
      src/common/setup/event/index.ts
  6. 1 1
      src/common/setup/modal/modal.ts
  7. 31 1
      src/services/go/ermcp/finance-review/index.ts
  8. 96 0
      src/services/go/ermcp/finance-review/interface.ts
  9. 14 1
      src/services/go/ermcp/search-inventory/index.ts
  10. 29 0
      src/services/go/ermcp/search-inventory/interface.ts
  11. 2 6
      src/services/proto/contract/index.ts
  12. 1 1
      src/services/proto/delivery/index.ts
  13. 2 5
      src/services/proto/spotcontract/index.ts
  14. 1 1
      src/services/proto/warehouse/index.ts
  15. 19 8
      src/views/business/exposure/list/realTime/index.vue
  16. 3 3
      src/views/business/exposure/list/setup.ts
  17. 13 7
      src/views/business/purchase/list/all/index.vue
  18. 13 7
      src/views/business/purchase/list/pending/index.vue
  19. 13 7
      src/views/business/purchase/list/performance/index.vue
  20. 12 7
      src/views/business/sell/list/all/index.vue
  21. 14 8
      src/views/business/sell/list/pending/index.vue
  22. 13 7
      src/views/business/sell/list/performance/index.vue
  23. 31 24
      src/views/information/custom/compoments/modify/index.vue
  24. 13 9
      src/views/information/custom/list/normal-use/index.vue
  25. 12 8
      src/views/information/custom/list/stop-use/index.vue
  26. 12 8
      src/views/information/spot-contract/list/checkpending/index.vue
  27. 12 8
      src/views/information/spot-contract/list/finished/index.vue
  28. 13 8
      src/views/information/spot-contract/list/performance/index.vue
  29. 14 8
      src/views/information/spot-contract/list/unsubmitted/index.vue
  30. 13 7
      src/views/information/warehouse-info/list/normal-use/index.vue
  31. 13 8
      src/views/information/warehouse-info/list/stop-use/index.vue

+ 27 - 0
src/common/components/buttonList/index.vue

@@ -0,0 +1,27 @@
+<template>
+  <div class="btn-list">
+    <a-button :class="item.className"
+              v-for="item in btnList"
+              :key="item.lable"
+              @click="item.callback">
+      {{item.lable}}
+    </a-button>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType } from 'vue';
+import { BtnList } from './interface';
+
+export default defineComponent({
+    props: {
+        btnList: {
+            default: [],
+            type: Array as PropType<BtnList[]>,
+        },
+    },
+});
+</script>
+
+<style lang="scss">
+</style>

+ 6 - 0
src/common/components/buttonList/interface.ts

@@ -0,0 +1,6 @@
+export type BtnClassName = 'btnDeafault' | 'btnPrimary' | 'btnDanger'
+export interface BtnList {
+    lable: string;  // 按钮名字
+    callback: Function;
+    className: BtnClassName    // 按钮 class 名字
+}

+ 7 - 3
src/common/components/contextMenu/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 右键 -->
   <div class="context-menu-container"
-        @click="updateContextMenu(false)"
+       @click="updateContextMenu(false)"
        @contextmenu.prevent="onContextMenu">
     <slot></slot>
     <contextMenu :contextMenu="menuContext"
@@ -25,6 +25,10 @@ export default defineComponent({
             default: [],
             type: Array as PropType<any[]>,
         },
+        selectedRow: {
+            default: null,
+            type: Object,
+        },
     },
     components: {
         contextMenu,
@@ -34,7 +38,7 @@ export default defineComponent({
             position: { clientX: 0, clientY: 0 },
             show: false,
             menuList: props.contextMenuList,
-            selectedData: null,
+            selectedData: props.selectedRow,
         });
 
         function onContextMenu(value: MouseEvent) {
@@ -46,7 +50,7 @@ export default defineComponent({
                 const { clientX, clientY } = value;
                 Object.assign(menuContext.position, { clientX, clientY });
                 menuContext.show = true;
-                menuContext.selectedData = props.tableList[index - 1];
+                // menuContext.selectedData = props.tableList[index - 1];
             }
         }
         // 关闭右键弹窗

+ 28 - 8
src/common/setup/contextMenu/index.ts

@@ -1,4 +1,4 @@
-import { MenuItem } from "@/common/components/contextMenu/interface";
+import { BtnClassName, BtnList } from '@/common/components/buttonList/interface';
 import { ModalName } from '@/common/constants/modalName';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 import { sessionStorageUtil } from "@/utils/storage";
@@ -6,7 +6,24 @@ import { inject, onUnmounted, Ref, ref } from "vue";
 import { MenuType } from "../buttonPermission/interface";
 import { openModal } from "../modal";
 
-export function getBtnList(menuType: keyof MenuType) {
+/**
+ * 获取class 名
+ * @param val 
+ * @returns 
+ */
+function getClassName(val: string): BtnClassName {
+    let result: BtnClassName = 'btnDeafault'
+    if (val.includes('disable') || val.includes('cancle') || val.includes('delete')) {
+        result = 'btnDanger'
+    } else if (val === '') {
+        result = 'btnDeafault'
+    } else {
+        result = 'btnPrimary'
+    }
+    return result
+}
+
+export function getBtnList(menuType: keyof MenuType, hasDetail: boolean) {
     // 获取 数据
     const permissionData = inject('thirdMenuList') as Ref<OperationTabMenu[]>;
     const name = 'permissionData'
@@ -14,8 +31,8 @@ export function getBtnList(menuType: keyof MenuType) {
     const data: OperationTabMenu[] = permissionData.value.length ? permissionData.value : sessionStorageUtil.getItem(name)
     sessionStorageUtil.setItem(name, permissionData.value)
 
-    const commonBtn = ref<MenuItem[]>([]); // 通用按钮列表,不用选中数据才显示
-    const forDataBtn = ref<MenuItem[]>([]); // 针对数据按钮列表,选中某条数据才显示
+    const commonBtn = ref<BtnList[]>([]); // 通用按钮列表,不用选中数据才显示
+    const forDataBtn = ref<BtnList[]>([]); // 针对数据按钮列表,选中某条数据才显示
 
     const list = data.find((e) => e.code === menuType);
     if (list && list.children) {
@@ -23,7 +40,7 @@ export function getBtnList(menuType: keyof MenuType) {
             const { code, type, title } = e;
             if (type === 2) { // 按钮类型
                 const { openAction } = openModal(code as keyof ModalName);
-                const item = { lable: title, callback: openAction }
+                const item = { lable: title, callback: openAction, className: getClassName(code) }
                 const commonName = ['新增'] // 目前通用的按钮只要新增,需要添加其它的时候需要往这里添加
                 if (commonName.includes(title)) { // 
                     commonBtn.value.push(item)
@@ -35,9 +52,12 @@ export function getBtnList(menuType: keyof MenuType) {
     } else {
         console.warn(`menuType: ${menuType}未找到`)
     }
-    // 详情(所有页面都可以看到,没有权限之分)
-    const { openAction } = openModal('detail')
-    forDataBtn.value.push({ lable: '详情', callback: openAction })
+    // 详情
+    if (hasDetail) {
+        const { openAction } = openModal('detail')
+        forDataBtn.value.push({ lable: '详情', callback: openAction, className: getClassName('') })
+    }
+
 
     onUnmounted(() => {
         sessionStorageUtil.removeItem(name)

+ 22 - 0
src/common/setup/event/index.ts

@@ -0,0 +1,22 @@
+import { ref } from 'vue';
+
+export function handleTableEvent<T>() {
+    const expandedRowKeys = ref<string[]>([]); // 表格展开行
+    const selectedRow = ref<T>()
+    function Rowclick(record: T, index: number) {
+        return {
+            onClick: () => {  // 表格点击
+                selectedRow.value = record;
+                const value = expandedRowKeys.value;
+                expandedRowKeys.value = value.length ? [] : [`${index}`];
+            },
+            // onDblclick: () => { // 双击
+            //     console.log('onDblclick');
+            // },
+            onContextmenu: () => {  // 表格右键
+                selectedRow.value = record;
+            },
+        };
+    }
+    return { expandedRowKeys, selectedRow, Rowclick }
+}

+ 1 - 1
src/common/setup/modal/modal.ts

@@ -31,7 +31,7 @@ export function closeModal(modelName: keyof ModalName) {
  * @param modelName 相对应的弹窗组件名
  * @returns openAction 打开弹窗方法
  */
-export function openModal(modelName: keyof ModalName) {
+export function openModal(modelName: keyof ModalName, data?: any) {
     const name = ref<boolean>(false)
     provide(modelName, name);
     /**

+ 31 - 1
src/services/go/ermcp/finance-review/index.ts

@@ -1 +1,31 @@
-/** ================================= 财务审核 ================================**/
+/** ================================= 财务审核 ================================**/
+import {
+    QryBussinessFpRsp,
+    QryBussinessKxRsp,
+    QueryBusinessFpReq,
+    QueryBusinessKxReq
+} from "@/services/go/ermcp/finance-review/interface";
+import {commonSearch_go} from "@/services/go";
+import {QryBusinessDjRsp} from "@/services/go/ermcp/business-review/interface";
+
+/**
+ * 查询财务管理(款项)(对应菜单:财务管理/款项) /Ermcp/QueryBusinessKx
+ * @param req.UserId  // 用户ID (必填)
+ * @constructor
+ */
+export function QueryBusinessKx(req: QueryBusinessKxReq): Promise<QryBussinessKxRsp[]> {
+    return commonSearch_go('/Ermcp/QueryBusinessKx', req).catch((err) => {
+        throw new Error(`财务管理-款项: ${err.message}`);
+    });
+}
+
+/**
+ * 查询财务管理(发票)(对应菜单:财务管理/发票) /Ermcp/QueryBusinessFp
+ * @param req.UserId  // 用户ID (必填)
+ * @constructor
+ */
+export function QueryBusinessFp(req: QueryBusinessFpReq): Promise<QryBussinessFpRsp[]> {
+    return commonSearch_go('/Ermcp/QueryBusinessFp', req).catch((err) => {
+        throw new Error(`财务管理-发票: ${err.message}`);
+    });
+}

+ 96 - 0
src/services/go/ermcp/finance-review/interface.ts

@@ -0,0 +1,96 @@
+/**
+ *  查询财务管理 - 款项 请求
+ */
+export interface QueryBusinessKxReq{
+    UserId: number  // 用户ID
+    relatedid?: string // 现货合同ID, 不填则查所有
+    applystatus?: string  // 申请状态(逗号隔开) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+}
+
+/**
+ *  查询财务管理 - 款项 返回
+ */
+export interface QryBussinessKxRsp{
+    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:销售
+    deductamount	:number;//退款(非必填)
+    deliverygoodscode	:string;//现货品种代码
+    deliverygoodsid	:number;//现货商品ID
+    deliverygoodsname	:string;//现货品种名称
+    enumdicname	:string;//单位名称
+    goodscode	:string;//点价合约
+    goodsname	:string;//商品名称
+    kxtype	:number;//款项类型 1-收付款(PayAmount字段有值) 2-退款(DeductAmount字段有值) 3-收付款/退款(2个字段都有)
+    operateapplyid	:string;//操作申请ID(6number;
+//3+Unix秒时间戳(1number;
+//位)+xxxxxx)
+    operateapplytype	:number;//操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
+    payamount	:number;//收付款(非必填)
+    pricemove	:number;//升贴水
+    pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
+    relatedid	:string;//现货合同ID
+    sellusername	:string;//销售方名字
+    userid	:number;//用户ID
+    wrstandardcode	:string;//品类代码
+    wrstandardid	:number;//品类id
+    wrstandardname	:string;//品类名称
+}
+
+/**
+ * 财务管理/发票 请求
+ */
+export interface QueryBusinessFpReq{
+    UserId: number  // 用户ID
+    relatedid?: string // 现货合同ID, 不填则查所有
+    applystatus?: string  // 申请状态(逗号隔开) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+}
+
+/**
+ * 财务管理/发票 返回
+ */
+export interface QryBussinessFpRsp{
+    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;//商品名称
+    invoiceAmount	:number;//已开收票金额(销售为开票,采购为收票)
+    operateapplyid	:string;//操作申请ID(6number;
+//3+Unix秒时间戳(1number;
+//位)+xxxxxx)
+    operateapplytype	:number;//操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
+    pricemove	:number;//升贴水
+    pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
+    relatedid	:string;//现货合同ID
+    sellusername	:string;//销售方名字
+    userid	:number;//用户ID
+    wrstandardcode	:string;//品类代码
+    wrstandardid	:number;//品类id
+    wrstandardname	:string;//品类名称
+}
+

+ 14 - 1
src/services/go/ermcp/search-inventory/index.ts

@@ -1 +1,14 @@
-/** ================================= 库存查询 ================================**/
+import {commonSearch_go} from "@/services/go";
+import {Ermcp3AreaStock} from "@/services/go/ermcp/search-inventory/interface";
+
+/** ================================= 库存查询 ================================**/
+/**
+ * 查询机构库存(库存管理/当前库存) /Ermcp3/QueryAreaStock
+ * @param userid
+ * @constructor
+ */
+export function QueryAreaStock(userid: number): Promise<Ermcp3AreaStock[]>{
+    return commonSearch_go('/Ermcp3/QuerySpotContractBS', {userid}).catch((err) => {
+        throw new Error(`查询机构库存(库存管理/当前库存): ${err.message}`);
+    });
+}

+ 29 - 0
src/services/go/ermcp/search-inventory/interface.ts

@@ -0,0 +1,29 @@
+
+
+// 查询机构库存(库存管理/当前库存)
+export interface Ermcp3AreaStock{
+    brandname	:string;//品牌名称
+    curstock	:number;//期末库存量(今日量)
+    deliverygoodscode	:string;//现货品种代码
+    deliverygoodsid	:number;//现货品种id
+    deliverygoodsname	:string;//现货品种名称
+    enumdicname	:string;//单位名称
+    goodsunitid	:number;//现货商品单位id
+    oristock	:number;//期初库存量(昨日量)
+    spotgoodsbrandid	:number;//现货品牌ID
+    todaybuyinqty	:number;//今日采购入库量
+    todayproduceinqty	:number;//今日生产入库量
+    todayproduceoutqty	:number;//今日生产出库量
+    todayselloutqty	:number;//今日销售出库量
+    unitid	:number;//单位id
+    updatetime	:string;//更新时间
+    userid	:number;//机构ID
+    username	:string;//机构名称
+    warehousecode	:string;//仓库代码
+    warehouseinfoid	:string;//仓库ID
+    warehousename	:string;//仓库名称
+    warehousetype	:number;//仓库类型 - 1 厂库 2 自有库 3 合作库
+    wrstandardcode	:string;//品类代码
+    wrstandardid	:string;//品类ID
+    wrstandardname	:string;//品类名称
+}

+ 2 - 6
src/services/proto/contract/index.ts

@@ -1,15 +1,11 @@
-import {DeliveryGoodsApplyReq} from "@/protoService/delivery/interface";
 import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";
-import {ErmcpContractOperateApplyReq} from "@/protoService/contract/interface";
+import {ErmcpContractOperateApplyReq} from "@/services/proto/contract/interface";
 
 /**
  * 合同
- * @param info ContractOperateApplyInfo 操作信息
- * @param operateType Int 操作类型-1:登记2:确认3:拒绝4:撤销
- * @param remark String 备注
- * @param operateApplyID Long 暂时传0 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)//不知道是啥玩意
+ * @param param
  */
 export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
     return new Promise((resolve, reject) => {

+ 1 - 1
src/services/proto/delivery/index.ts

@@ -1,7 +1,7 @@
-import {DeliveryGoodsApplyReq} from "@/protoService/delivery/interface";
 import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";
+import {DeliveryGoodsApplyReq} from "@/services/proto/delivery/interface";
 
 /**
  * 现货品种申请请求

+ 2 - 5
src/services/proto/spotcontract/index.ts

@@ -1,15 +1,12 @@
 import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";
-import {GldErmcpSpotContractOperateReq} from "@/protoService/spotcontract/interface";
+import {GldErmcpSpotContractOperateReq} from "@/services/proto/spotcontract/interface";
 
 /**(重点提醒 这里属于管理端接口,仅用于新增)以上来自android代码  回头需要确认
  * 获取新增采购合同报文
- * @param contractInfo SpotContractInfo 新增合同信息
- * @param OperateType String 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
- * @param Remark String 备注
- * @param SpotContractID String 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
  * @param
+ * @param param
  */
 export const orderContract = (param: GldErmcpSpotContractOperateReq): Promise<any> => {
     return new Promise((resolve, reject) => {

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

@@ -1,7 +1,7 @@
 import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";
-import {WarehouseApplyReq, WarehouseStateChangeReq} from "@/protoService/warehouse/interface";
+import {WarehouseApplyReq, WarehouseStateChangeReq} from "@/services/proto/warehouse/interface";
 
 /**
  * 新增 / 修改 仓库信息请求  修改需要传仓库id

+ 19 - 8
src/views/business/exposure/list/realTime/index.vue

@@ -2,15 +2,13 @@
   <!-- 实时敞口-->
   <div class="purchase-real-time">
     <filterCustomTable @search="search">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
     <contextMenu :contextMenuList="forDataBtn"
                  :tableList="tableList">
       <a-table :columns="columns"
                class="topTable"
+               :customRow="Rowclick"
                :pagination="false"
                rowKey="key"
                :data-source="tableList">
@@ -27,8 +25,6 @@
 
 <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 { initData } from '@/common/methods';
 import filterCustomTable from '../../components/filterTable/index.vue';
 import { getBtnList } from '@/common/setup/contextMenu/index';
@@ -60,6 +56,14 @@ function getExposure() {
     return { loading, tableList, queryList };
 }
 
+function Rowclick(record: any, index: number) {
+    return {
+        click: () => {
+            console.log('click');
+        },
+    };
+}
+
 export default defineComponent({
     name: 'purchase-real-time',
     components: {
@@ -67,12 +71,19 @@ export default defineComponent({
         filterCustomTable,
     },
     setup() {
+        const { columns, search, getColumns } = getColumsAndSearch('table_pcweb_exposure', true);
         const { loading, tableList, queryList } = getExposure();
-        const { commonBtn, forDataBtn } = getBtnList('exposure_realtime');
+        const { commonBtn, forDataBtn } = getBtnList('exposure_realtime', false);
+
+        function tableClick(e: Event) {
+            console.log(e);
+        }
+
         initData(() => {
             queryList();
+            getColumns();
         });
-        return { commonBtn, forDataBtn, loading, tableList };
+        return { commonBtn, forDataBtn, loading, tableList, columns, search, Rowclick };
     },
 });
 </script>

+ 3 - 3
src/views/business/exposure/list/setup.ts

@@ -13,7 +13,7 @@ import { ref } from 'vue';
 export function getColumsAndSearch(tableKey: keyof TableKey, hasFilter: boolean) {
     const columns = ref<ColumnType[]>([]);
     const filteredInfo = ref();
-    function getColumns(tableKey: keyof TableKey, hasFilter: boolean) {
+    function getColumns() {
         const list = getTableHead(tableKey);
         // 过滤项
         const filtered = filteredInfo.value || {};
@@ -41,9 +41,9 @@ export function getColumsAndSearch(tableKey: keyof TableKey, hasFilter: boolean)
     // 查询
     function search(value: any) {
         filteredInfo.value = value;
-        getColumns(tableKey, hasFilter);
+        getColumns();
     }
-    return { columns, search }
+    return { columns, search, getColumns }
 }
 
 

+ 13 - 7
src/views/business/purchase/list/all/index.vue

@@ -3,18 +3,20 @@
   <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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -51,6 +53,8 @@ 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';
+import BtnList from '@/common/components/buttonList/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
 
 export default defineComponent({
     name: 'purchase-all',
@@ -63,10 +67,11 @@ export default defineComponent({
         Invoice,
         Storage,
         SomePrice,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList('table_pcweb_purchase_all');
-        const { commonBtn, forDataBtn } = getBtnList('purchase_all');
+        const { commonBtn, forDataBtn } = getBtnList('purchase_all', true);
 
         initData(() => {
             actionQuery(1);
@@ -81,6 +86,7 @@ export default defineComponent({
             loading,
             commonBtn,
             forDataBtn,
+            ...handleTableEvent(),
         };
     },
 });

+ 13 - 7
src/views/business/purchase/list/pending/index.vue

@@ -3,18 +3,20 @@
   <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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -39,6 +41,8 @@ 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';
+import BtnList from '@/common/components/buttonList/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
 
 export default defineComponent({
     name: 'purchase-peddding',
@@ -47,10 +51,11 @@ export default defineComponent({
         filterCustomTable,
         Detail,
         SomePrice,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList('table_pcweb_purchase_pointprice');
-        const { commonBtn, forDataBtn } = getBtnList('purchase_pending');
+        const { commonBtn, forDataBtn } = getBtnList('purchase_pending', true);
 
         initData(() => {
             actionQuery(2);
@@ -65,6 +70,7 @@ export default defineComponent({
             loading,
             commonBtn,
             forDataBtn,
+            ...handleTableEvent(),
         };
     },
 });

+ 13 - 7
src/views/business/purchase/list/performance/index.vue

@@ -3,18 +3,20 @@
   <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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -48,6 +50,8 @@ 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 BtnList from '@/common/components/buttonList/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
 
 export default defineComponent({
     name: 'purchase-performance',
@@ -59,10 +63,11 @@ export default defineComponent({
         Funds,
         Invoice,
         Storage,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList('table_pcweb_purchase_settle');
-        const { commonBtn, forDataBtn } = getBtnList('purchase_performance');
+        const { commonBtn, forDataBtn } = getBtnList('purchase_performance', true);
 
         initData(() => {
             actionQuery(3);
@@ -77,6 +82,7 @@ export default defineComponent({
             loading,
             commonBtn,
             forDataBtn,
+            ...handleTableEvent(),
         };
     },
 });

+ 12 - 7
src/views/business/sell/list/all/index.vue

@@ -3,18 +3,19 @@
   <div class="sell-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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -51,6 +52,8 @@ 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';
+import BtnList from '@/common/components/buttonList/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
 
 export default defineComponent({
     name: 'sell-all',
@@ -63,10 +66,11 @@ export default defineComponent({
         Invoice,
         Storage,
         SomePrice,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList('table_pcweb_sales_all');
-        const { commonBtn, forDataBtn } = getBtnList('sell_all');
+        const { commonBtn, forDataBtn } = getBtnList('sell_all', true);
 
         initData(() => {
             actionQuery(1);
@@ -81,6 +85,7 @@ export default defineComponent({
             loading,
             commonBtn,
             forDataBtn,
+            ...handleTableEvent(),
         };
     },
 });

+ 14 - 8
src/views/business/sell/list/pending/index.vue

@@ -3,18 +3,20 @@
   <div class="sell-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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -31,7 +33,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '../../components/filterTable/index.vue';
 import { getTableList } from '../setup';
@@ -39,6 +41,8 @@ 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';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'sell-peddding',
@@ -47,10 +51,11 @@ export default defineComponent({
         filterCustomTable,
         Detail,
         SomePrice,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList('table_pcweb_sales_pointprice');
-        const { commonBtn, forDataBtn } = getBtnList('sell_pending');
+        const { commonBtn, forDataBtn } = getBtnList('sell_pending', true);
 
         initData(() => {
             actionQuery(2);
@@ -65,6 +70,7 @@ export default defineComponent({
             loading,
             commonBtn,
             forDataBtn,
+            ...handleTableEvent(),
         };
     },
 });

+ 13 - 7
src/views/business/sell/list/performance/index.vue

@@ -3,18 +3,20 @@
   <div class="sell_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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                :pagination="false"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -48,6 +50,8 @@ 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 { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'sell_performance',
@@ -59,10 +63,11 @@ export default defineComponent({
         Funds,
         Invoice,
         Storage,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList('table_pcweb_sales_settle');
-        const { commonBtn, forDataBtn } = getBtnList('sell_performance');
+        const { commonBtn, forDataBtn } = getBtnList('sell_performance', true);
 
         initData(() => {
             actionQuery(3);
@@ -77,6 +82,7 @@ export default defineComponent({
             loading,
             commonBtn,
             forDataBtn,
+            ...handleTableEvent(),
         };
     },
 });

+ 31 - 24
src/views/information/custom/compoments/modify/index.vue

@@ -2,6 +2,7 @@
   <!-- 修改客户资料 -->
   <a-modal class="commonModal modify-custom"
            title="修改客户资料"
+           v-if="visible"
            v-model:visible="visible"
            @cancel="cancel"
            width="890px">
@@ -192,9 +193,15 @@ import { initData } from '@/common/methods/index';
 export default defineComponent({
     name: 'modify-custom',
     components: {},
+    props: {
+        // selectedRow: {
+        //   type:
+        // }
+    },
     setup() {
         // const { visible, cancel } = closeModal('modifyCustomInfo');
         const { visible, cancel } = closeModal('custom_info_btn_modify');
+
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;
@@ -216,30 +223,30 @@ export default defineComponent({
 
 <style lang="less">
 .modify-custom {
-  .upload {
-      display: inline-flex;
-      .ant-btn.uploadBtn {
-          width: 60px;
-          height: 30px;
-          background: @m-blue0;
-          border: 0;
-          padding: 0;
-          text-align: center;
-          font-size: 14px;
-          color: @m-white0;
-          .rounded-corners(3px);
-          &:hover {
-              background: rgba(@m-blue0, 0);
-              color: rgba(@m-white0, 0.8);
-          }
-      }
-      .look {
-          color: @m-blue0;
-          font-size: 14px;
-          margin-left: 10px;
-          cursor: pointer;
-      }
-  }
+    .upload {
+        display: inline-flex;
+        .ant-btn.uploadBtn {
+            width: 60px;
+            height: 30px;
+            background: @m-blue0;
+            border: 0;
+            padding: 0;
+            text-align: center;
+            font-size: 14px;
+            color: @m-white0;
+            .rounded-corners(3px);
+            &:hover {
+                background: rgba(@m-blue0, 0);
+                color: rgba(@m-white0, 0.8);
+            }
+        }
+        .look {
+            color: @m-blue0;
+            font-size: 14px;
+            margin-left: 10px;
+            cursor: pointer;
+        }
+    }
 }
 </style
 >;

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

@@ -3,18 +3,20 @@
   <div class="custom-normal"
        :loading="loading">
     <filterCustomTable @search="search">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="customList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="customList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人' }}</a>
         </template>
@@ -25,7 +27,7 @@
     <!-- 详情 -->
     <CustomDetail />
     <!-- 修改 -->
-    <ModifyCustom />
+    <ModifyCustom :selectedRow="selectedRow" />
     <!-- 停用 -->
     <DisableCustom />
   </div>
@@ -42,6 +44,8 @@ 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 { getBtnList } from '@/common/setup/contextMenu/index';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'custom-normal',
@@ -52,16 +56,16 @@ export default defineComponent({
         ModifyCustom,
         DisableCustom,
         AddCustom,
+        BtnList,
     },
     setup() {
         const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_normal');
 
         initData(() => {
             actionQuery(3);
             getColumns();
         });
-        return { customList, columns, search, loading, commonBtn, forDataBtn };
+        return { customList, columns, search, loading, ...getBtnList('custom_info_normal', true), ...handleTableEvent() };
     },
 });
 </script>

+ 12 - 8
src/views/information/custom/list/stop-use/index.vue

@@ -3,18 +3,20 @@
   <div class="custom-normal"
        :loading="loading">
     <filterCustomTable @search="search">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="contextMenuList"
-                 :tableList="customList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                :pagination="false"
                rowKey="key"
                :data-source="customList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人' }}</a>
         </template>
@@ -42,6 +44,8 @@ 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 { getBtnList } from '@/common/setup/contextMenu/index';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'custom-normal',
@@ -52,16 +56,16 @@ export default defineComponent({
         DeleteCustom,
         RecoverCustom,
         AddCustom,
+        BtnList,
     },
     setup() {
         const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_disabled');
 
         initData(() => {
             actionQuery(4);
             getColumns();
         });
-        return { customList, columns, search, loading, commonBtn, forDataBtn };
+        return { customList, columns, search, loading, ...getBtnList('custom_info_disabled', true), ...handleTableEvent() };
     },
 });
 </script>

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

@@ -3,18 +3,20 @@
   <div class="spot-contract-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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="spotContractList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
                rowKey="key"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                :data-source="spotContractList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人'}}</a>
         </template> -->
@@ -41,6 +43,8 @@ import SpotContractDeatil from '@/views/information/spot-contract/components/det
 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';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'spot-contract-peddding',
@@ -51,17 +55,17 @@ export default defineComponent({
         SpotContractDeatil,
         Check,
         Cancel,
+        BtnList,
     },
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_checkpending');
 
         initData(() => {
             actionQuery(2);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
+        return { spotContractList, columns, search, contextMenuList, ...getBtnList('spot_contract_checkpending', true), loading, ...handleTableEvent() };
     },
 });
 </script>

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

@@ -3,18 +3,20 @@
   <div class="spot-contract-done">
     <filterCustomTable @search="search"
                        :loading="loading">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="spotContractList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="spotContractList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人'}}</a>
         </template> -->
@@ -37,6 +39,8 @@ import { MenuItem } from '@/common/components/contextMenu/interface';
 import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
 import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
 import { getBtnList } from '@/common/setup/contextMenu/index';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'spot-contract-done',
@@ -45,17 +49,17 @@ export default defineComponent({
         contextMenu,
         AddSpotContract,
         SpotContractDeatil,
+        BtnList,
     },
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_finished');
 
         initData(() => {
             actionQuery(4);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
+        return { spotContractList, columns, search, contextMenuList, ...getBtnList('spot_contract_finished', true), loading, ...handleTableEvent() };
     },
 });
 </script>

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

@@ -3,18 +3,20 @@
   <div class="spot-contract-performance">
     <filterCustomTable @search="search"
                        :loading="loading">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="spotContractList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="spotContractList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人'}}</a>
         </template> -->
@@ -38,6 +40,8 @@ import AddSpotContract from '@/views/information/spot-contract/components/add/in
 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';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'spot-contract-performance',
@@ -47,17 +51,18 @@ export default defineComponent({
         AddSpotContract,
         SpotContractDeatil,
         Finish,
+        BtnList,
     },
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_performance');
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_performance', true);
 
         initData(() => {
             actionQuery(3);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
+        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading, ...handleTableEvent() };
     },
 });
 </script>

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

@@ -3,18 +3,20 @@
   <div class="spot-contract-not-commit"
        :loading="loading">
     <filterCustomTable @search="search">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="spotContractList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="spotContractList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <!-- <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人'}}</a>
         </template> -->
@@ -46,6 +48,9 @@ import ModifySpotContract from '@/views/information/spot-contract/components/mod
 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';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
+
 export default defineComponent({
     name: 'spot-contract-not-commit',
     components: {
@@ -56,11 +61,12 @@ export default defineComponent({
         ModifySpotContract,
         DeleteSpotContract,
         ResubmitSpotContract,
+        BtnList,
     },
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);
         const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted');
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted', true);
 
         onUnmounted(() => {
             stop();
@@ -69,7 +75,7 @@ export default defineComponent({
             actionQuery(1);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
+        return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading, ...handleTableEvent() };
     },
 });
 </script>

+ 13 - 7
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -3,18 +3,20 @@
   <div class="warehouse-info-normal"
        :loading="loading">
     <filterCustomTable @search="search">
-      <a-button class="operBtn"
-                v-for="item in commonBtn"
-                :key="item.lable"
-                @click="item.callback">{{item.lable}}</a-button>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -45,6 +47,8 @@ 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';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
 export default defineComponent({
     name: 'warehouse-info-normal',
@@ -55,10 +59,11 @@ export default defineComponent({
         Disable,
         Detail,
         Modify,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
-        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal');
+        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
 
         initData(() => {
             actionQuery('1');
@@ -75,6 +80,7 @@ export default defineComponent({
             forDataBtn,
             getWareHouseStatus,
             getWareHouseType,
+            ...handleTableEvent(),
         };
     },
 });

+ 13 - 8
src/views/information/warehouse-info/list/stop-use/index.vue

@@ -2,18 +2,20 @@
   <!-- 仓库信息: 停用 -->
   <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>
+      <BtnList :btnList="commonBtn" />
     </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn"
-                 :tableList="tableList">
+    <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable"
                :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
                rowKey="key"
                :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
         <template #warehousetype="{ text }">
           <span>{{ getWareHouseType(text) }}</span>
         </template>
@@ -38,6 +40,8 @@ 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';
+import BtnList from '@/common/components/buttonList/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
 
 export default defineComponent({
     name: 'warehouse-info-stop',
@@ -46,11 +50,11 @@ export default defineComponent({
         filterCustomTable,
         Add,
         Recover,
+        BtnList,
     },
     setup() {
         const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
-        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal');
-        console.log('forDataBtn', forDataBtn);
+        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
 
         initData(() => {
             actionQuery('2');
@@ -66,6 +70,7 @@ export default defineComponent({
             forDataBtn,
             getWareHouseStatus,
             getWareHouseType,
+            ...handleTableEvent(),
         };
     },
 });