huangbin vor 4 Jahren
Ursprung
Commit
c04c11297c

+ 9 - 4
src/views/manage/business-review/list/settlement/index.vue

@@ -30,13 +30,13 @@
     </contextMenu>
     <!-- 点价记录详情 -->
     <SettlementDetail :selectedRow="selectedRow"
-                      @refresh="queryTable" />
+                      @refresh="getTableData" />
     <!-- 交收审核 -->
     <SettlementAudit :selectedRow="selectedRow"
-                     @refresh="queryTable" />
+                     @refresh="getTableData" />
     <!-- 撤销点价登记 -->
     <SettlementCancel :selectedRow="selectedRow"
-                      @refresh="queryTable" />
+                      @refresh="getTableData" />
   </div>
 </template>
 
@@ -70,7 +70,7 @@ export default defineComponent({
         const { commonBtn, forDataBtn } = getBtnList('business_review_settlement', true);
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList({});
-        initData(() => {
+        function getTableData() {
             // 获取列表数据
             queryTable().then(() => {
                 tableList.value.forEach((el) => {
@@ -83,6 +83,10 @@ export default defineComponent({
                     }
                 });
             });
+        }
+        initData(() => {
+            // 获取列表数据
+            getTableData();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_business_aduit_js', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
                 if (e.columnfield === 'buyusernameOrsellusername') {
@@ -122,6 +126,7 @@ export default defineComponent({
             getContractTypeName,
             getApplyStatusName,
             invoiceStatusName,
+            getTableData,
         };
     },
 });

+ 9 - 4
src/views/manage/business-review/list/someprice/index.vue

@@ -41,13 +41,13 @@
     </contextMenu>
     <!-- 点价记录详情 -->
     <SomepriceDetail :selectedRow="selectedRow"
-                     @refresh="queryTable" />
+                     @refresh="getTableData" />
     <!-- 点价审核 -->
     <SomepriceAudit :selectedRow="selectedRow"
-                    @refresh="queryTable" />
+                    @refresh="getTableData" />
     <!-- 撤销点价登记 -->
     <SomepriceCancel :selectedRow="selectedRow"
-                     @refresh="queryTable" />
+                     @refresh="getTableData" />
   </div>
 </template>
 
@@ -92,7 +92,7 @@ export default defineComponent({
             }
             return forDataBtn;
         }
-        initData(() => {
+        function getTableData() {
             // 获取列表数据
             queryTable().then(() => {
                 tableList.value.forEach((el) => {
@@ -105,6 +105,10 @@ export default defineComponent({
                     }
                 });
             });
+        }
+        initData(() => {
+            // 获取列表数据
+            getTableData();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_business_aduit_dj', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
                 if (e.columnfield === 'buyusernameOrsellusername') {
@@ -146,6 +150,7 @@ export default defineComponent({
             getContractTypeName,
             getContractStatusName,
             getAnalogueName,
+            getTableData,
         };
     },
 });

+ 139 - 133
src/views/manage/finance-review/list/funds/index.vue

@@ -1,152 +1,158 @@
 <template>
-    <!-- 管理 - 财务审核 - 款项 -->
-    <div class="business-review-js"
-         :loading="loading">
-        <Filter @search="search">
-            <BtnList :btnList="commonBtn"/>
-        </Filter>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- 现货合同类型 -->
-                <template #contractstatus="{ record }">
-                    <a>{{ getApplyStatusName(record.applystatus) }}</a>
-                </template>
-                <!-- 合同类型-->
-                <template #contracttype="{ record }">
-                    <a>{{ getContractTypeName(record.contracttype) }}</a>
-                </template>
-                <!-- 状态 -->
-                <template #applystatus="{ text }">
-                    <a>{{ getApplyStatusName(text) }}</a>
-                </template>
-                <!-- 点价类型 -->
-                <template #operateapplytype="{ text }">
-                    <a>{{ operateApplyTypeName(text) }}</a>
-                </template>
-                <!-- 款项类型 -->
-                <template #kxtype="{ record }">
-                    <a>{{ stateName(record.deductamount, record.contracttype) }}</a>
-                </template>
-                <!-- 对手方 -->
-                <template #buyusernameOrsellusername="{ record }">
-                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-                </template>
+  <!-- 管理 - 财务审核 - 款项 -->
+  <div class="business-review-js"
+       :loading="loading">
+    <Filter @search="search">
+      <BtnList :btnList="commonBtn" />
+    </Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{ record }">
+          <BtnList :btnList="record.btnList" />
+        </template>
+        <!-- 现货合同类型 -->
+        <template #contractstatus="{ record }">
+          <a>{{ getApplyStatusName(record.applystatus) }}</a>
+        </template>
+        <!-- 合同类型-->
+        <template #contracttype="{ record }">
+          <a>{{ getContractTypeName(record.contracttype) }}</a>
+        </template>
+        <!-- 状态 -->
+        <template #applystatus="{ text }">
+          <a>{{ getApplyStatusName(text) }}</a>
+        </template>
+        <!-- 点价类型 -->
+        <template #operateapplytype="{ text }">
+          <a>{{ operateApplyTypeName(text) }}</a>
+        </template>
+        <!-- 款项类型 -->
+        <template #kxtype="{ record }">
+          <a>{{ stateName(record.deductamount, record.contracttype) }}</a>
+        </template>
+        <!-- 对手方 -->
+        <template #buyusernameOrsellusername="{ record }">
+          <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+        </template>
 
-
-            </a-table>
-        </contextMenu>
-        <!-- 点价记录详情 -->
-        <FundsDetail :selectedRow="selectedRow"
-                     @refresh="queryTable"/>
-        <!-- 交收审核 -->
-        <FundsAudit :selectedRow="selectedRow"
-                    @refresh="queryTable"/>
-        <!-- 撤销点价登记 -->
-        <FundsCancel :selectedRow="selectedRow"
-                     @refresh="queryTable"/>
-    </div>
+      </a-table>
+    </contextMenu>
+    <!-- 点价记录详情 -->
+    <FundsDetail :selectedRow="selectedRow"
+                 @refresh="getTableData" />
+    <!-- 交收审核 -->
+    <FundsAudit :selectedRow="selectedRow"
+                @refresh="getTableData" />
+    <!-- 撤销点价登记 -->
+    <FundsCancel :selectedRow="selectedRow"
+                 @refresh="getTableData" />
+  </div>
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList
-    } from '@/common/export/table';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 
-    import {Filter, FundsAudit, FundsCancel, FundsDetail} from '../../components';
+import { Filter, FundsAudit, FundsCancel, FundsDetail } from '../../components';
 
-    import {queryTableList, QryBussinessKxRsp} from './setup';
-    import {invoiceStatusName, kxtypeName, operateApplyTypeName, stateName} from '@/views/manage/finance-review/setup';
-    import {getApplyStatusName} from '@/views/manage/business-review/setup';
-    import {getContractTypeName} from '@/views/information/spot-contract/setup';
-    import {Column, ColumnType} from '@/common/setup/table';
+import { queryTableList, QryBussinessKxRsp } from './setup';
+import { invoiceStatusName, kxtypeName, operateApplyTypeName, stateName } from '@/views/manage/finance-review/setup';
+import { getApplyStatusName } from '@/views/manage/business-review/setup';
+import { getContractTypeName } from '@/views/information/spot-contract/setup';
+import { Column, ColumnType } from '@/common/setup/table';
 
-    export default defineComponent({
-        name: 'business-review-js',
-        components: {
-            contextMenu,
-            Filter,
-            BtnList,
-            FundsDetail,
-            FundsAudit,
-            FundsCancel,
-        },
-        setup() {
-            // 表头数据
-            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
-            // 表格事件
-            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<QryBussinessKxRsp>({});
-            // 表格操作按钮列表
-            const {commonBtn, forDataBtn} = getBtnList('finance_review_funds', true);
-            // 表格列表数据
-            const {loading, tableList, queryTable} = queryTableList({});
-            initData(() => {
-                // 获取列表数据
-                queryTable();
-                // 注册表头信息 过滤
-                registerColumn('table_pcweb_fincial_aduit_kx', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
-                    if (e.columnfield === 'buyusernameOrsellusername') {
-                        item.onFilter = (value: string, record: QryBussinessKxRsp) => {
-                            const {contracttype, buyusername, sellusername} = record;
-                            if (contracttype === 1) {
-                                // 采购
-                                return sellusername.includes(value);
-                            } else {
-                                return buyusername.includes(value);
-                            }
-                        };
-                        item.filteredValue = filtered.buyusernameOrsellusername || null;
+export default defineComponent({
+    name: 'business-review-js',
+    components: {
+        contextMenu,
+        Filter,
+        BtnList,
+        FundsDetail,
+        FundsAudit,
+        FundsCancel,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QryBussinessKxRsp>({});
+        // 表格操作按钮列表
+        const { commonBtn, forDataBtn } = getBtnList('finance_review_funds', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList({});
+        function getTableData() {
+            // 获取列表数据
+            queryTable().then(() => {
+                tableList.value.forEach((el) => {
+                    if (el.applystatus === 1) {
+                        // 1:待审核
+                        Object.assign(el, { btnList: forDataBtn.value });
+                    } else {
+                        const item = forDataBtn.value.find((e) => e.lable === '详情');
+                        item && Object.assign(el, { btnList: [item] });
                     }
                 });
             });
+        }
+        initData(() => {
+            // 获取列表数据
+            getTableData();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_fincial_aduit_kx', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
+                if (e.columnfield === 'buyusernameOrsellusername') {
+                    item.onFilter = (value: string, record: QryBussinessKxRsp) => {
+                        const { contracttype, buyusername, sellusername } = record;
+                        if (contracttype === 1) {
+                            // 采购
+                            return sellusername.includes(value);
+                        } else {
+                            return buyusername.includes(value);
+                        }
+                    };
+                    item.filteredValue = filtered.buyusernameOrsellusername || null;
+                }
+            });
+        });
 
-            // 查询
-            function search(value: any) {
-                filteredInfo.value = value;
-                // 更新表信息
-                updateColumn();
-            }
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
 
-            return {
-                columns,
-                filteredInfo,
-                expandedRowKeys,
-                selectedRow,
-                Rowclick,
-                commonBtn,
-                forDataBtn,
-                loading,
-                tableList,
-                search,
-                invoiceStatusName,
-                getApplyStatusName,
-                operateApplyTypeName,
-                getContractTypeName,
-                kxtypeName,
-                stateName,
-            };
-        },
-    });
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            commonBtn,
+            forDataBtn,
+            loading,
+            tableList,
+            search,
+            invoiceStatusName,
+            getApplyStatusName,
+            operateApplyTypeName,
+            getContractTypeName,
+            kxtypeName,
+            stateName,
+            getTableData,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .business-review-js {
-    }
+.business-review-js {
+}
 </style
 >;
 

+ 1 - 1
src/views/manage/finance-review/list/funds/setup.ts

@@ -14,7 +14,7 @@ export function queryTableList(type: QueryBusinessKxReq) {
     // 表格数据
     const tableList = ref<QryBussinessKxRsp[]>([]);
     function queryTable() {
-        QueryBusinessKx(type)
+        return QueryBusinessKx(type)
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };

+ 134 - 128
src/views/manage/finance-review/list/invoice/index.vue

@@ -1,147 +1,153 @@
 <template>
-    <!-- 管理 - 财务审核 - 发票 -->
-    <div class="finance_review_invoice"
-         :loading="loading">
-        <Filter @search="search">
-            <BtnList :btnList="commonBtn"/>
-        </Filter>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- 现货合同类型 -->
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-                <!-- 发票类型-->
-                <template #invoicetype="{ record }">
-                    <a>{{ invoiceStatusName(record.contracttype) }}</a>
-                </template>
-                <!-- 状态 -->
-                <template #applystatus="{ text }">
-                    <a>{{ getApplyStatusName(text) }}</a>
-                </template>
-                <!-- 点价类型 -->
-                <template #operateapplytype="{ text }">
-                    <a>{{ operateApplyTypeName(text) }}</a>
-                </template>
-                <!-- 对手方 -->
-                <template #buyusernameOrsellusername="{ record }">
-                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <!-- 点价记录详情 -->
-        <InvoiceDetail :selectedRow="selectedRow"
-                       @refresh="queryTable"/>
-        <!-- 交收审核 -->
-        <InvoiceAudit :selectedRow="selectedRow"
-                      @refresh="queryTable"/>
-        <!-- 撤销点价登记 -->
-        <InvoiceCancel :selectedRow="selectedRow"
-                       @refresh="queryTable"/>
-    </div>
+  <!-- 管理 - 财务审核 - 发票 -->
+  <div class="finance_review_invoice"
+       :loading="loading">
+    <Filter @search="search">
+      <BtnList :btnList="commonBtn" />
+    </Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{ record }">
+          <BtnList :btnList="record.btnList" />
+        </template>
+        <!-- 现货合同类型 -->
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+        <!-- 发票类型-->
+        <template #invoicetype="{ record }">
+          <a>{{ invoiceStatusName(record.contracttype) }}</a>
+        </template>
+        <!-- 状态 -->
+        <template #applystatus="{ text }">
+          <a>{{ getApplyStatusName(text) }}</a>
+        </template>
+        <!-- 点价类型 -->
+        <template #operateapplytype="{ text }">
+          <a>{{ operateApplyTypeName(text) }}</a>
+        </template>
+        <!-- 对手方 -->
+        <template #buyusernameOrsellusername="{ record }">
+          <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 点价记录详情 -->
+    <InvoiceDetail :selectedRow="selectedRow"
+                   @refresh="getTableData" />
+    <!-- 交收审核 -->
+    <InvoiceAudit :selectedRow="selectedRow"
+                  @refresh="getTableData" />
+    <!-- 撤销点价登记 -->
+    <InvoiceCancel :selectedRow="selectedRow"
+                   @refresh="getTableData" />
+  </div>
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList
-    } from '@/common/export/table';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 
-    import {InvoiceAudit, InvoiceCancel, InvoiceDetail, Filter} from '../../components';
+import { InvoiceAudit, InvoiceCancel, InvoiceDetail, Filter } from '../../components';
 
-    import {queryTableList, QryBussinessFpRsp} from './setup';
-    import {getContractTypeName} from '@/views/information/spot-contract/setup';
-    import {invoiceStatusName, kxtypeName, operateApplyTypeName} from '@/views/manage/finance-review/setup';
-    import {getApplyStatusName} from '@/views/manage/business-review/setup';
-    import {Column, ColumnType} from '@/common/setup/table';
+import { queryTableList, QryBussinessFpRsp } from './setup';
+import { getContractTypeName } from '@/views/information/spot-contract/setup';
+import { invoiceStatusName, kxtypeName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
+import { getApplyStatusName } from '@/views/manage/business-review/setup';
+import { Column, ColumnType } from '@/common/setup/table';
 
-    export default defineComponent({
-        name: 'finance_review_invoice',
-        components: {
-            contextMenu,
-            Filter,
-            BtnList,
-            InvoiceDetail,
-            InvoiceAudit,
-            InvoiceCancel,
-        },
-        setup() {
-            // 表头数据
-            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
-            // 表格事件
-            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<QryBussinessFpRsp>({});
-            // 表格操作按钮列表
-            const {commonBtn, forDataBtn} = getBtnList('finance_review_invoice', true);
-            // 表格列表数据
-            const {loading, tableList, queryTable} = queryTableList({});
-            initData(() => {
-                // 获取列表数据
-                queryTable();
-                // 注册表头信息 过滤
-                registerColumn('table_pcweb_fincial_aduit_fp', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
-                    if (e.columnfield === 'buyusernameOrsellusername') {
-                        item.onFilter = (value: string, record: QryBussinessFpRsp) => {
-                            const {contracttype, buyusername, sellusername} = record;
-                            if (contracttype === 1) {
-                                // 采购
-                                return sellusername.includes(value);
-                            } else {
-                                return buyusername.includes(value);
-                            }
-                        };
-                        item.filteredValue = filtered.buyusernameOrsellusername || null;
+export default defineComponent({
+    name: 'finance_review_invoice',
+    components: {
+        contextMenu,
+        Filter,
+        BtnList,
+        InvoiceDetail,
+        InvoiceAudit,
+        InvoiceCancel,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QryBussinessFpRsp>({});
+        // 表格操作按钮列表
+        const { commonBtn, forDataBtn } = getBtnList('finance_review_invoice', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList({});
+        function getTableData() {
+            // 获取列表数据
+            queryTable().then(() => {
+                tableList.value.forEach((el) => {
+                    if (el.applystatus === 1) {
+                        // 1:待审核
+                        Object.assign(el, { btnList: forDataBtn.value });
+                    } else {
+                        const item = forDataBtn.value.find((e) => e.lable === '详情');
+                        item && Object.assign(el, { btnList: [item] });
                     }
                 });
             });
+        }
+        initData(() => {
+            getTableData();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_fincial_aduit_fp', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
+                if (e.columnfield === 'buyusernameOrsellusername') {
+                    item.onFilter = (value: string, record: QryBussinessFpRsp) => {
+                        const { contracttype, buyusername, sellusername } = record;
+                        if (contracttype === 1) {
+                            // 采购
+                            return sellusername.includes(value);
+                        } else {
+                            return buyusername.includes(value);
+                        }
+                    };
+                    item.filteredValue = filtered.buyusernameOrsellusername || null;
+                }
+            });
+        });
 
-            // 查询
-            function search(value: any) {
-                console.log('value', value);
+        // 查询
+        function search(value: any) {
+            console.log('value', value);
 
-                filteredInfo.value = value;
-                // 更新表信息
-                updateColumn();
-            }
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
 
-            return {
-                columns,
-                filteredInfo,
-                expandedRowKeys,
-                selectedRow,
-                Rowclick,
-                commonBtn,
-                forDataBtn,
-                loading,
-                tableList,
-                search,
-                getContractTypeName,
-                invoiceStatusName,
-                getApplyStatusName,
-                operateApplyTypeName,
-                kxtypeName,
-            };
-        },
-    });
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            commonBtn,
+            forDataBtn,
+            loading,
+            tableList,
+            search,
+            getContractTypeName,
+            invoiceStatusName,
+            getApplyStatusName,
+            operateApplyTypeName,
+            kxtypeName,
+            getTableData,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .finance_review_invoice {
-    }
+.finance_review_invoice {
+}
 </style
 >;
 

+ 1 - 1
src/views/manage/finance-review/list/invoice/setup.ts

@@ -15,7 +15,7 @@ export function queryTableList(type: QueryBusinessFpReq) {
     // 表格数据
     const tableList = ref<QryBussinessFpRsp[]>([]);
     function queryTable() {
-        QueryBusinessFp(type)
+        return QueryBusinessFp(type)
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };

+ 21 - 7
src/views/manage/inventory-review/list/checkin/index.vue

@@ -15,8 +15,8 @@
                rowKey="key"
                :data-source="tableList">
         <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
+        <template #expandedRowRender="{ record }">
+          <BtnList :btnList="record.btnList" />
         </template>
         <!-- 状态 -->
         <template #applystatus="{ text }">
@@ -39,13 +39,13 @@
     </contextMenu>
     <!-- 审核-->
     <CheckinAudit :selectedRow="selectedRow"
-                  @refresh="queryTable" />
+                  @refresh="getTableData" />
     <!-- 撤销 -->
     <CheckinCancel :selectedRow="selectedRow"
-                   @refresh="queryTable" />
+                   @refresh="getTableData" />
     <!-- 详情 -->
     <CheckinDetail :selectedRow="selectedRow"
-                   @refresh="queryTable" />
+                   @refresh="getTableData" />
   </div>
 </template>
 
@@ -80,9 +80,23 @@ export default defineComponent({
         const { commonBtn, forDataBtn } = getBtnList('inventory_review_checkin', true);
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList({ inouttype: '1,3' });
+        function getTableData() {
+            // 获取列表数据
+            queryTable().then(() => {
+                tableList.value.forEach((el) => {
+                    if (el.applystatus === 1) {
+                        // 1:待审核
+                        Object.assign(el, { btnList: forDataBtn.value });
+                    } else {
+                        const item = forDataBtn.value.find((e) => e.lable === '详情');
+                        item && Object.assign(el, { btnList: [item] });
+                    }
+                });
+            });
+        }
         initData(() => {
             // 获取列表数据
-            queryTable();
+            getTableData();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_stock_aduit_in', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
                 if (e.columnfield === 'buyusernameOrsellusername') {
@@ -125,7 +139,7 @@ export default defineComponent({
             operateApplyTypeName,
             getPriceTypeName,
             InOutTypeName,
-            queryTable,
+            getTableData,
         };
     },
 });

+ 21 - 7
src/views/manage/inventory-review/list/checkout/index.vue

@@ -15,8 +15,8 @@
                rowKey="key"
                :data-source="tableList">
         <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
+        <template #expandedRowRender="{ record }">
+          <BtnList :btnList="record.btnList" />
         </template>
         <!-- 状态 -->
         <template #applystatus="{ text }">
@@ -38,13 +38,13 @@
     </contextMenu>
     <!-- 详情 -->
     <CheckoutDetail :selectedRow="selectedRow"
-                    @refresh="queryTable" />
+                    @refresh="getTableData" />
     <!-- 审核 -->
     <CheckoutAudit :selectedRow="selectedRow"
-                   @refresh="queryTable" />
+                   @refresh="getTableData" />
     <!-- 撤销 -->
     <CheckoutCancel :selectedRow="selectedRow"
-                    @refresh="queryTable" />
+                    @refresh="getTableData" />
   </div>
 </template>
 
@@ -79,9 +79,23 @@ export default defineComponent({
         const { commonBtn, forDataBtn } = getBtnList('inventory_review_checkout', true);
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList({ inouttype: '2,4' });
+        function getTableData() {
+            // 获取列表数据
+            queryTable().then(() => {
+                tableList.value.forEach((el) => {
+                    if (el.applystatus === 1) {
+                        // 1:待审核
+                        Object.assign(el, { btnList: forDataBtn.value });
+                    } else {
+                        const item = forDataBtn.value.find((e) => e.lable === '详情');
+                        item && Object.assign(el, { btnList: [item] });
+                    }
+                });
+            });
+        }
         initData(() => {
             // 获取列表数据
-            queryTable();
+            getTableData();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_stock_aduit_out', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
                 if (e.columnfield === 'buyusernameOrsellusername') {
@@ -122,7 +136,7 @@ export default defineComponent({
             operateApplyTypeName,
             getPriceTypeName,
             InOutTypeName,
-            queryTable,
+            getTableData,
         };
     },
 });

+ 1 - 1
src/views/manage/inventory-review/list/setup.ts

@@ -13,7 +13,7 @@ export function queryTableList(type: QueryAreaStockApplyReq) {
     // 表格数据
     const tableList = ref<Ermcp3AreaStockApply[]>([]);
     function queryTable() {
-        QueryAreaStockApply(type)
+        return QueryAreaStockApply(type)
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };