From 956a7114f86e2cd2caf713a9b286109b8b6e97ab Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期五, 15 八月 2025 14:12:13 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master

---
 ui/admin-ui3/src/api/cwgl/estimatedReceivableBill.ts            |   47 +
 ui/admin-ui3/src/api/cwgl/pendingSettlementBusiness.ts          |   42 
 ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts                |   28 
 ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue             |  117 +-
 ui/admin-ui3/src/main.ts                                        |    4 
 ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue |  746 +++++++++++-----
 ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue       |  692 ++++++++++++---
 ui/admin-ui3/src/components/flowLog/index.vue                   |  177 ++++
 ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue   |  671 ++++++++++++---
 ui/admin-ui3/src/layout/components/AppMain.vue                  |    2 
 10 files changed, 1,906 insertions(+), 620 deletions(-)

diff --git a/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts b/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts
index f5949d4..27a5b5f 100644
--- a/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts
+++ b/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts
@@ -65,3 +65,31 @@
         download('/cwgl/estimatedReceivable/export',query);
     })
 }
+
+/**
+ * 纭
+ */
+export const getEstimatedReceivableConfirm:requestType = (id) => {
+    return request({
+        url: '/cwgl/estimatedReceivable/confirm/' + id,
+        method:'get'
+    })
+}
+/**
+ * 鍙栨秷
+ */
+export const getCwglEstimatedReceivableCancel:requestType = (id) => {
+    return request({
+        url: '/cwgl/estimatedReceivable/cancel/' + id,
+        method:'get'
+    })
+}
+/**
+ * 浣滃簾
+ */
+export const getEstimatedReceivableInvalid:requestType = (id) => {
+    return request({
+        url: '/cwgl/estimatedReceivable/invalid/' + id,
+        method:'get'
+    })
+}
\ No newline at end of file
diff --git a/ui/admin-ui3/src/api/cwgl/estimatedReceivableBill.ts b/ui/admin-ui3/src/api/cwgl/estimatedReceivableBill.ts
index f2129b7..e49d553 100644
--- a/ui/admin-ui3/src/api/cwgl/estimatedReceivableBill.ts
+++ b/ui/admin-ui3/src/api/cwgl/estimatedReceivableBill.ts
@@ -45,6 +45,13 @@
         data
     })
 }
+export const updateEstimatedReceivableBillNmae:requestType = (data) => {
+    return request({
+        url: '/cwgl/estimatedReceivableBill/name',
+        method: 'put',
+        data
+    })
+}
 
 /**
  * 鍒犻櫎棰勪及搴旀敹璐﹀崟
@@ -55,7 +62,13 @@
         method: 'delete'
     })
 }
-
+/* 鍙栨秷鍏宠仈 */
+export const cancelRelevancy:requestType = (id) => {
+    return request({
+        url: '/cwgl/estimatedReceivableBill/cancel/relevancy/' + id,
+        method: 'get'
+    })
+}
 
 /**
  * 瀵煎嚭棰勪及搴旀敹璐﹀崟
@@ -65,3 +78,35 @@
         download('/cwgl/estimatedReceivableBill/export',query);
     })
 }
+
+
+/**
+ * 
+ */
+export const estimatedReceivableBillSettlement:requestType = (data) => {
+    return request({
+        url: '/cwgl/estimatedReceivableBill/settlement',
+        method: 'post',
+        data
+    })
+}
+/**
+ * 鏂板棰勪及搴旀敹绠$悊鏃ュ織
+ */
+export const addEstimatedReceivableLog:requestType = (data) => {
+    return request({
+        url: '/cwgl/estimatedReceivableLog',
+        method: 'post',
+        data
+    })
+}
+/**
+ * 鏌ヨ棰勪及搴旀敹璐﹀崟鏃ュ織鍒楄〃
+ */
+export const listEstimatedReceivableBillLog:requestType = (query) => {
+    return request({
+        url: '/cwgl/estimatedReceivableBillLog/list',
+        method:'get',
+        params:query
+    })
+}
\ No newline at end of file
diff --git a/ui/admin-ui3/src/api/cwgl/pendingSettlementBusiness.ts b/ui/admin-ui3/src/api/cwgl/pendingSettlementBusiness.ts
index 4942d23..6c1ae6c 100644
--- a/ui/admin-ui3/src/api/cwgl/pendingSettlementBusiness.ts
+++ b/ui/admin-ui3/src/api/cwgl/pendingSettlementBusiness.ts
@@ -23,7 +23,49 @@
         method:'get'
     })
 }
+/* 寰呭叆璐︿笟鍔¤处鍗� */
+export const getCwglPendingSettlementBusinessBillList:requestType = (query) => {
+    return request({
+        url: '/cwgl/pendingSettlementBusiness/bill/list',
+        method:'get',
+         params:query
+    })
+}
+/* 纭鏈嬀閫夎处鍗� */
+export const pendingSettlementBusinessCreateBillList:requestType = (query) => {
+    return request({
+        url: '/cwgl/pendingSettlementBusiness/create/bill/list',
+        method:'get',
+         params:query
+    })
+}
+/* 纭鍕鹃�夎处鍗� */
+export const cwglPendingSettlementBusinessCreateBill:requestType = (data,id) => {
+    return request({
+        url: '/cwgl/pendingSettlementBusiness/create/bill/'+ id,
+        method: 'post',
+        data
+    })
+}
+ 
+/* 瀹㈡埛鍚嶇О */
+export const getSelectCustomNam:requestType = () => {
+    return request({
+        url: '/cwgl/pendingSettlementBusiness/select/customName',
+        method:'get'
+    })
+}
 
+ 
+/**
+ * 鑾峰彇鐢熸垚璐﹀崟
+ */
+export const getPendingSettlementBusinessBill:requestType = (id) => {
+    return request({
+        url: '/cwgl/pendingSettlementBusiness/bill/' + id,
+        method:'get'
+    })
+}
 /**
  * 鏂板寰呭叆璐︿笟鍔�
  */
diff --git a/ui/admin-ui3/src/components/flowLog/index.vue b/ui/admin-ui3/src/components/flowLog/index.vue
new file mode 100644
index 0000000..d345756
--- /dev/null
+++ b/ui/admin-ui3/src/components/flowLog/index.vue
@@ -0,0 +1,177 @@
+<script lang="ts" setup>
+import { reactive, ref, toRefs, watch, nextTick } from "vue";
+import { BaseEntityInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { getToken } from "@/utils/auth";
+
+// import { listDzInoutOrder } from "@/api/dz/dzInoutOrder";
+import useCurrentInstance from "@/utils/useCurrentInstance"; import { ElTable, ElTableColumn } from 'element-plus'
+const { proxy } = useCurrentInstance();
+
+interface DzInoutOrderI extends BaseEntityInterface {
+    id?: number,
+    no?: string,
+    sasStockNo?: string,
+    entryNo?: string,
+    bondInvtId?: number,
+    bondInvtNo?: string,
+    releaseId?: number,
+    releaseNo?: string,
+    areainOriactNo?: string,
+    areainEtpsNo?: string,
+    areainEtpsNm?: string,
+    areainEtpsSccd?: string,
+    masterCuscd?: string,
+    stockTypecd?: string,
+    businessTypecd?: string,
+    rltSasStockNo?: string,
+    dclEr?: string,
+    dclEtpsNo?: string,
+    dclEtpsNm?: string,
+    dclEtpsSccd?: string,
+    inputCode?: string,
+    inputSccd?: string,
+    inputName?: string,
+    etpsPreentNo?: string,
+    packageQty?: string,
+    grossWt?: string,
+    netWt?: string,
+    packType?: string,
+    eportReplaceMark?: number,
+    mtpckEndprdType?: string,
+    enterpriseName?: string,
+    stockDate?: string,
+    tradeType?: number,
+    conveyanceId?: number,
+    conveyanceNo?: string,
+    conveyanceName?: string,
+    enterId?: number,
+    deleted?: number,
+}
+const props = defineProps({
+    flowParams: Array,
+    flowParamsShow: {
+        type: Boolean,
+        default: false
+    },
+    fileNameIshow: {
+        type: Boolean,
+        default: false
+    },
+})
+console.log(props);
+
+const { } =
+    proxy.useDict();
+
+
+const stockTypecdFormat = (row: any) => {
+    return proxy.selectDictLabel(sy_dz_account_book_status.value, row.stockTypecd);
+}
+
+const data = reactive({
+    orderSelection: <DzInoutOrderI[]>[],
+    queryParams: <DzInoutOrderI & PageQueryInterface>{ pageNum: 1, pageSize: 10 },
+    rules: {},
+})
+const { queryParams, rules, orderSelection } = toRefs(data);
+const currentRow = ref()
+const emit = defineEmits(['affirm'])
+const {
+    pageF, tableData, getList,
+    handleQuery, resetQuery,
+} = usePagePlus({
+    title: '娴佺▼鏃ュ織',
+    queryParams: queryParams.value,
+    // getListApi: listDzInoutOrder,
+    resetQueryFunc: () => {
+    },
+
+})
+
+
+const multipleTableRef = ref<InstanceType<typeof ElTable>>()
+/**
+ * 纭畾
+ */
+const affirmQuery = () => {
+
+}
+let newArray = ref<any>()
+const openModel = () => {
+    pageF.drawerOpen = true;
+}
+
+
+const closeModel = () => {
+    pageF.drawerOpen = false;
+}
+
+
+// getList()
+const download_qr_code = (row: string) => {
+   downloadFile(row.fileName);
+}
+const baseURL = import.meta.env.VITE_APP_BASE_API
+
+// 鍒涘缓涓�涓偣鍑讳簨浠惰Е鍙戜笅杞�
+function downloadFile(row: any) {
+    // 鏂囦欢涓嬭浇鍦板潃
+    const fileUrl = baseURL + "/common/download/resource?resource=" + encodeURI(row);
+    // 璁剧疆璇锋眰澶�
+    const headers = new Headers();
+    headers.append('Authorization', 'Bearer ' + getToken()); // 璁剧疆鎺堟潈澶达紝鏇挎崲YourAccessToken涓哄疄闄呯殑璁块棶浠ょ墝
+    // 鍙戣捣 Fetch 璇锋眰
+    fetch(fileUrl, {
+        method: 'GET',
+        headers: headers,
+    })
+        .then(response => response.blob())
+        .then(blob => {
+            // 鍒涘缓涓�涓櫄鎷熺殑閾炬帴鍏冪礌锛屾ā鎷熺偣鍑讳笅杞�
+            const link = document.createElement('a');
+            link.href = window.URL.createObjectURL(blob);
+            link.download = row; // 璁剧疆涓嬭浇鏂囦欢鍚嶏紝鏇挎崲filename.ext涓哄疄闄呯殑鏂囦欢鍚嶅拰鎵╁睍鍚�
+            document.body.appendChild(link);
+            // 妯℃嫙鐐瑰嚮
+            link.click();
+
+            // 绉婚櫎铏氭嫙閾炬帴鍏冪礌
+            document.body.removeChild(link);
+        })
+        .catch(error => console.error('涓嬭浇澶辫触锛�', error));
+}
+defineExpose({
+    openModel,
+})
+</script>
+<template>
+    <el-dialog v-model="pageF.drawerOpen" title="娴佺▼鏃ュ織" append-to-body width="1000px">
+        <div class="app-container" style="padding-top: 0;">
+            <el-table ref="multipleTableRef" :data="props.flowParams">
+                <el-table-column align="center" label="澶勭悊鏃堕棿" prop="createTime" />
+                <el-table-column align="center" label="澶勭悊浜哄憳" prop="createBy" />
+                <el-table-column align="center" label="闄勪欢涓嬭浇" prop="fileName">
+                    <template #default="scope">
+                        <el-link v-if="scope.row.fileName" type="primary" :underline="false"
+                            @click="download_qr_code(scope.row)">
+                            {{scope.row.fileName}}
+                        </el-link>
+                        <span v-else>鏃犻檮浠�</span>
+                    </template>
+                </el-table-column>
+                <el-table-column align="center" label="鑺傜偣鎻忚堪" prop="operation" show-overflow-tooltip="true" />
+            </el-table>
+            <!-- <pagination style="position: relative;" v-show="pageF.total > 0" v-model:limit="queryParams.pageSize"
+                v-model:page="queryParams.pageNum" :total="pageF.total" @pagination="getList" /> -->
+        </div>
+
+        <div class="dialog-footer" style="text-align: right">
+            <el-button @click="closeModel">鍏抽棴</el-button>
+        </div>
+    </el-dialog>
+</template>
+
+
+
+<style scoped></style>
diff --git a/ui/admin-ui3/src/layout/components/AppMain.vue b/ui/admin-ui3/src/layout/components/AppMain.vue
index 8e40e5c..5084572 100644
--- a/ui/admin-ui3/src/layout/components/AppMain.vue
+++ b/ui/admin-ui3/src/layout/components/AppMain.vue
@@ -1,7 +1,7 @@
 <template>
   <section class="app-main">
     <router-view v-slot="{ Component, route }">
-      <transition name="fade-transform" mode="out-in">
+      <transition >
         <keep-alive :include="cachedViews">
           <component :is="Component" :key="route.path" />
         </keep-alive>
diff --git a/ui/admin-ui3/src/main.ts b/ui/admin-ui3/src/main.ts
index 24cd8eb..1fe33ee 100644
--- a/ui/admin-ui3/src/main.ts
+++ b/ui/admin-ui3/src/main.ts
@@ -27,11 +27,15 @@
 import DictTag from "/src/components/DictTag/index.vue";
 import FileUpload from "/src/components/FileUpload/index.vue";
 import basicContainer from '/src/components/basic-container/main.vue';
+import flowLog from './components/flowLog/index.vue';
+
 import SvgIcon from "/src/components/SvgIcon/index.vue";
 
 app.component("DictTag", DictTag);
 app.component('FileUpload', FileUpload);
 app.component('basicContainer', basicContainer)
+app.component('flowLog', flowLog)
+
 
 app.component('svg-icon', SvgIcon)
 
diff --git a/ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue b/ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue
index 3c62f0a..4e4b111 100644
--- a/ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue
@@ -111,6 +111,8 @@
   delBtn: false,
   viewBtn: false,
   selection: false,
+  searchSpan: 5,
+  searchLabelWidth: 100,
   column: {
     dispatchNo: {
       fixed: 'left',
@@ -146,63 +148,63 @@
     vehiclePlateId: {
       label: '杞︽澘鍙�', width: 120,
     },
-    mainDriverName: {
-      label: '涓婚┚椹跺憳', width: 120,
-    },
-    assistantDriverName: {
-      label: '鍓┚椹跺憳', width: 120,
-    },
-    pointNum: {
-      label: '鎻愰�佽揣鐐规暟', width: 120,
-    },
-    quantity: {
-      label: '浠舵暟', width: 120,
-    },
-    actualDepartureTime: {
-      label: '瀹為檯鍑哄彂鏃堕棿', width: 180,
-    },
-    actualDepartureTimeRange: {
-      label: '瀹為檯鍑哄彂鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
-      format: 'YYYY-MM-DD', hide: true, searchSpan: 6, searchLabelWidth: 110,
-      valueFormat: 'YYYY-MM-DD',
-    },
-    requiredArrivalTime: {
-      label: '瑕佹眰鍒拌揪鏃堕棿', width: 180,
-    },
-    requiredArrivalTimeRange: {
-      label: '瑕佹眰鍒拌揪鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
-      format: 'YYYY-MM-DD', hide: true, searchSpan: 6, searchLabelWidth: 110,
-      valueFormat: 'YYYY-MM-DD',
-    },
-    actualArrivalTime: {
-      label: '瀹為檯鍒拌揪鏃堕棿', width: 180,
-    },
-    actualArrivalTimeRange: {
-      label: '瑕佹眰鍒拌揪鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
-      format: 'YYYY-MM-DD', hide: true, searchSpan: 6, searchLabelWidth: 110,
-      valueFormat: 'YYYY-MM-DD',
-    },
-    beReturn: {
-      label: '鏄惁鍥炵▼', dataType: 'string', width: 100,
-      type: 'select', dicUrl: '/system/dict/data/type/dispatch_order_status',
-    },
-    dispatchQuantity: {
-      label: '瀹炲彂浠舵暟', width: 100,
-    },
-    dispatchWeight: {
-      label: '瀹炲彂閲嶉噺', width: 100,
-    },
-    dispatchVolume: {
-      label: '瀹炲彂浣撶Н(绔嬫柟锛�', width: 160,
-    },
-    status: {
-      label: '鐘舵��', search: true, dataType: 'string', width: 100,
-      type: 'select', dicUrl: '/system/dict/data/type/dispatch_order_status',
-    },
-    remark: {
-      label: '澶囨敞', width: 120,
-      type: 'textarea', minRows: 3, maxRows: 5,
-    },
+    // mainDriverName: {
+    //   label: '涓婚┚椹跺憳', width: 120,
+    // },
+    // assistantDriverName: {
+    //   label: '鍓┚椹跺憳', width: 120,
+    // },
+    // pointNum: {
+    //   label: '鎻愰�佽揣鐐规暟', width: 120,
+    // },
+    // quantity: {
+    //   label: '浠舵暟', width: 120,
+    // },
+    // actualDepartureTime: {
+    //   label: '瀹為檯鍑哄彂鏃堕棿', width: 180,
+    // },
+    // actualDepartureTimeRange: {
+    //   label: '瀹為檯鍑哄彂鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+    //   format: 'YYYY-MM-DD', hide: true, searchSpan: 5, searchLabelWidth: 120,
+    //   valueFormat: 'YYYY-MM-DD',
+    // },
+    // requiredArrivalTime: {
+    //   label: '瑕佹眰鍒拌揪鏃堕棿', width: 180,
+    // },
+    // requiredArrivalTimeRange: {
+    //   label: '瑕佹眰鍒拌揪鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+    //   format: 'YYYY-MM-DD', hide: true, searchSpan: 5, searchLabelWidth: 120,
+    //   valueFormat: 'YYYY-MM-DD',
+    // },
+    // actualArrivalTime: {
+    //   label: '瀹為檯鍒拌揪鏃堕棿', width: 180,
+    // },
+    // actualArrivalTimeRange: {
+    //   label: '瑕佹眰鍒拌揪鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+    //   format: 'YYYY-MM-DD', hide: true, searchSpan: 5, searchLabelWidth: 120,
+    //   valueFormat: 'YYYY-MM-DD',
+    // },
+    // beReturn: {
+    //   label: '鏄惁鍥炵▼', dataType: 'string', width: 100,
+    //   type: 'select', dicUrl: '/system/dict/data/type/dispatch_order_status',
+    // },
+    // dispatchQuantity: {
+    //   label: '瀹炲彂浠舵暟', width: 100,
+    // },
+    // dispatchWeight: {
+    //   label: '瀹炲彂閲嶉噺', width: 100,
+    // },
+    // dispatchVolume: {
+    //   label: '瀹炲彂浣撶Н(绔嬫柟锛�', width: 160,
+    // },
+    // status: {
+    //   label: '鐘舵��', search: true, dataType: 'string', width: 100,
+    //   type: 'select', dicUrl: '/system/dict/data/type/dispatch_order_status',
+    // },
+    // remark: {
+    //   label: '澶囨敞', width: 120,
+    //   type: 'textarea', minRows: 3, maxRows: 5,
+    // },
     // createBy: {
     //   label: '鍒涘缓浜�',
     // },
@@ -288,6 +290,7 @@
       type: 'select',
       dicUrl: '/system/dict/data/type/sys_whether_type',
     },
+   
   }
 })
 
diff --git a/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue b/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue
index dee3b92..e910b87 100644
--- a/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue
@@ -1,189 +1,551 @@
 <template>
-  <basicContainer >
-    <avue-crud
-        :option="option"
-        :table-loading="pageF.loading"
-        :data="tableData"
-        :page="page"
-        :permission="permissionList"
-        :before-open="beforeOpen"
-        v-model="form"
-        ref="crudRef"
-        @row-update="rowUpdate"
-        @row-save="rowSave"
-        @refresh-change="refreshChange"
-        @row-del="rowDel"
-        @search-change="searchChange"
-        @search-reset="searchReset"
-        @selection-change="selectionChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @on-load="onLoad"
-    >
+  <basicContainer>
+    <avue-crud :option="option" v-model:search="queryParams" :table-loading="pageF.loading" :data="tableData"
+      :page="page" :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef"
+      @row-update="rowUpdate" @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+      @current-change="currentChange" @size-change="sizeChange" @on-load="onLoad">
+
+      <template #dispatchNo-form="{ row, size, }">
+        <div style="cursor: pointer;">
+          <el-input v-model="form.dispatchNo" @click="handleFormSearch" readonly placeholder="璇疯緭鍏ヨ皟搴﹀崟鍙�">
+            <template #append>
+              <el-button icon="Search" style="cursor: pointer;" @click="handleFormSearch"></el-button>
+            </template>
+          </el-input>
+        </div>
+      </template>
+
+
+
       <template #menu-left>
-        <el-button
-            type="success"
-            icon="Edit"
-            :disabled="pageF.single"
-            v-hasPermi="['cwgl:estimatedReceivable:edit']"
-            @click="handleUpdate">淇敼
+        <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:estimatedReceivable:edit']"
+          @click="handleUpdate">淇敼
         </el-button>
-        <el-button
-            type="danger"
-            icon="Delete"
-            :disabled="pageF.multiple"
-            @click="handleDelete"
-            v-hasPermi="['cwgl:estimatedReceivable:remove']"
-        >鍒犻櫎
+        <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+          v-hasPermi="['cwgl:estimatedReceivable:remove']">鍒犻櫎
         </el-button>
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['cwgl:estimatedReceivable:export']"
-        >瀵煎嚭
+        <el-button type="warning" plain icon="Download" @click="handleExport"
+          v-hasPermi="['cwgl:estimatedReceivable:export']">瀵煎嚭
         </el-button>
+      </template>
+
+
+      <template #menu="{ size, row, index }">
+        <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" :underline="false" plain :size="size"
+          @click="handleCancel(row)" v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 鍙栨秷纭
+        </el-link>
+        <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 0" :underline="false" plain
+          @click="handleAffirm(row)" v-hasPermi="['cwgl:estimatedReceivable:confirm']"> 纭
+        </el-link>
+        <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" :underline="false" plain
+          @click="handleInvalid(row)" v-hasPermi="['cwgl:estimatedReceivable:invalid']"> 浣滃簾
+        </el-link>
+        <el-link class="link-btn" type="primary" :underline="false" plain @click="handleFlow(row)"
+          v-hasPermi="['cwgl:estimatedReceivable:flog']"> 鏃ュ織
+        </el-link>
       </template>
     </avue-crud>
   </basicContainer>
+
+  <el-dialog v-model="dialog.visible" :title="dialog.title" width="1200px">
+    <!-- <el-form ref="storagesTransferRef" :model="newForm" :rules="rules" label-width="120px">
+      <el-row :gutter="20">
+        <el-col :span="8">
+          <el-form-item label="璋冨害鍗曞彿" prop="dispatchNo">
+            <el-input v-model="newForm.dispatchNo" placeholder="璇疯緭鍏ヨ皟搴﹀崟鍙�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="瀹㈡埛鍚嶇О" prop="customerName">
+            <el-input v-model="newForm.customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="椤圭洰鍚嶇О" prop="projectName">
+            <el-input v-model="newForm.projectName" placeholder="璇疯緭鍏ラ」鐩悕绉�" />
+
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="涓嬪崟鏃ユ湡" prop="createdTime">
+            <el-date-picker v-model="newForm.createdTime" type="date"  valueFormat="YYYY-MM-DD"  placeholder="璇烽�夋嫨涓嬪崟鏃ユ湡"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item>
+            <el-button type="primary" icon="Search" @click="newGetList">鎼滅储</el-button>
+            <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+
+    </el-form>
+
+    <el-table :data="newTableData" @selection-change="handleSelectionChange" border ref="newTableRef"
+      @row-click="handleRowClick">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column fixed label="璋冨害鍗曞彿" align="center" prop="dispatchNo" show-overflow-tooltip />
+      <el-table-column label="瀹㈡埛鍚嶇О" align="center" prop="customerName" show-overflow-tooltip />
+      <el-table-column label="椤圭洰鍚嶇О" align="center" prop="projectName" show-overflow-tooltip />
+      <el-table-column label="涓嬪崟鏃ユ湡" align="center" prop="createdTime" show-overflow-tooltip />
+    </el-table> -->
+
+    <avue-crud :option="newOption" :data="newTableData" v-model:search="newForm" :page="newPageF"
+      :table-loading="itemTableLoading2" @search-change="newSearchChange" ref="newTableRef"
+      @selection-change="newSelectionChange" @search-reset="newRsetChange"
+      @current-change="handleAttachmentCurrentChange" @size-change="handleAttachmentSizeChange" @on-load="newOnLoad">
+    </avue-crud>
+
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+        <el-button @click="cancel">鍙� 娑�</el-button>
+      </div>
+    </template>
+
+  </el-dialog>
+
+  <flowLog ref="flowLogIshow" :flowParams="flowParams" ></flowLog>
 </template>
 
 <script setup name="estimatedReceivable" lang="ts">
-  import {EstimatedReceivableI,addEstimatedReceivable, delEstimatedReceivable, exportEstimatedReceivable, getEstimatedReceivable, listEstimatedReceivable, updateEstimatedReceivable} from "@/api/cwgl/estimatedReceivable";
-  import useCurrentInstance from "@/utils/useCurrentInstance";
-  import {computed,reactive, ref, toRefs} from "vue";
-  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
-  import {usePagePlus} from "@/hooks/usePagePlus";
-  import {hasPermission} from "@/utils/permissionUtils";
+import {
+  EstimatedReceivableI, addEstimatedReceivable, delEstimatedReceivable, exportEstimatedReceivable, getEstimatedReceivable, listEstimatedReceivable, updateEstimatedReceivable,
+  getEstimatedReceivableConfirm, getCwglEstimatedReceivableCancel, getEstimatedReceivableInvalid
+} from "@/api/cwgl/estimatedReceivable";
+  import { listEstimatedReceivableLog} from "@/api/cwgl/estimatedReceivableLog";
+  import {listEstimatedReceivableBillLog} from "@/api/cwgl/estimatedReceivableBillLog";
+import {
+  listPendingSettlementBusiness,
+} from "@/api/cwgl/pendingSettlementBusiness";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import { ElMessage, ElMessageBox } from "element-plus";
 
-  const { proxy } = useCurrentInstance();
-  const crudRef = ref();
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
 
-  const permissionList = computed(()=>{
-    return {
-      addBtn: hasPermission(["cwgl:estimatedReceivable:add"]),
-      delBtn: hasPermission(["cwgl:estimatedReceivable:remove"]),
-      editBtn: hasPermission(["cwgl:estimatedReceivable:edit"]),
-      viewBtn: hasPermission(["cwgl:estimatedReceivable:query"]),
-    }
-  })
+const permissionList = computed(() => {
+  return {
+    addBtn: hasPermission(["cwgl:estimatedReceivable:add"]),
+    delBtn: hasPermission(["cwgl:estimatedReceivable:remove"]),
+    editBtn: hasPermission(["cwgl:estimatedReceivable:edit"]),
+    viewBtn: hasPermission(["cwgl:estimatedReceivable:query"]),
+  }
+})
 
-  const data = reactive({
-    form:<EstimatedReceivableI>{},
-    queryParams:<EstimatedReceivableI&PageQueryInterface>{},
-    page: <PagesInterface>{
-      pageSize: 10,
-      total: 0,
-      currentPage: 1,
+const data = reactive({
+  form: <EstimatedReceivableI>{},
+  newTableData: [],
+  newForm: <EstimatedReceivableI>{
+    pageNum: 1,
+    pageSize: 10
+  },
+  queryParams: <EstimatedReceivableI & PageQueryInterface>{},
+  page: <PagesInterface>{
+    pageSize: 10,
+    total: 0,
+    currentPage: 1,
+  },
+  selectionList: [],
+  newSelectionList: [],
+  itemTableLoading1: false,
+  itemTableLoading2: false,
+})
+const { queryParams, form, page, selectionList, newForm, newTableData, newSelectionList, itemTableLoading1, itemTableLoading2 } = toRefs(data);
+const option = ref({
+  pageKey: 'EstimatedReceivable',
+  rowKey: 'id',
+  searchSpan: 5,
+  editDisplay: false,
+
+  addBtn: true,
+  editBtn: true,
+  delBtn: false,
+  viewBtn: false,
+
+  searchLabelWidth: 100,
+  labelWidth: 120,
+  column: {
+    // id: {
+    //   label: 'ID',
+    // },
+    feeSystemNo: {
+      label: '璐圭敤绯荤粺缂栧彿',
+      rules: [
+        {
+          required: true,
+          message: "璐圭敤绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+      search: true,
+      addDisplay: false,
+      editDisplay: false,
     },
-    selectionList:[],
-  })
-  const {queryParams,form,page,selectionList} = toRefs(data);
-  const option = ref({
-    pageKey: 'EstimatedReceivable',
-    rowKey: 'id',
-    column: {
-                                id: {
-          label: 'ID',
-                            },
-                                feeSystemNo: {
-          label: '璐圭敤绯荤粺缂栧彿',
-                                rules: [
-              {
-                required: true,
-                message: "璐圭敤绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                dispatchNo: {
-          label: '璋冨害鍗曞彿',
-                                rules: [
-              {
-                required: true,
-                message: "璋冨害鍗曞彿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                customerName: {
-          label: '瀹㈡埛鍚嶇О',
-                                rules: [
-              {
-                required: true,
-                message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                projectName: {
-          label: '椤圭洰鍚嶇О',
-                            },
-                                orderDate: {
-          label: '涓嬪崟鏃ユ湡',
-                            },
-                                feeName: {
-          label: '璐圭敤鍚嶇О',
-                                rules: [
-              {
-                required: true,
-                message: "璐圭敤鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                estimatedAmount: {
-          label: '棰勪及璐圭敤閲戦',
-                            },
-                                currency: {
-          label: '甯佸埗',
-                            },
-                                relatedBillName: {
-          label: '鍏宠仈璐﹀崟鍚嶇О',
-                            },
-                                relatedBillStatus: {
-          label: '鍏宠仈璐﹀崟鐘舵��',
-                            },
-                                isConfirmed: {
-          label: '鏄惁纭(0:鏈‘璁�;1:宸茬‘璁�)',
-                            },
-                                confirmBy: {
-          label: '纭浜�',
-                            },
-                                confirmTime: {
-          label: '纭鏃堕棿',
-                            },
-                                remark: {
-          label: '澶囨敞',
-                      type: 'textarea', minRows: 3, maxRows: 5,
-                            },
-                                createBy: {
-          label: '鍒涘缓浜�',
-                            },
-                                updateBy: {
-          label: '鏇存柊浜�',
-                            },
-                                createTime: {
-          label: '鍒涘缓鏃堕棿',
-                            },
-                                updateTime: {
-          label: '鏇存柊鏃堕棿',
-                            },
-                                deleted: {
-          label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
-                            },
-          }
-  })
+    dispatchNo: {
+      label: '璋冨害鍗曞彿',
+      rules: [
+        {
+          required: true,
+          message: "璋冨害鍗曞彿涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+      search: true,
+    },
+    customerName: {
+      label: '瀹㈡埛鍚嶇О',
+      rules: [
+        {
+          required: true,
+          message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+      search: true,
+      disabled: true,
+    },
+    projectName: {
+      label: '椤圭洰鍚嶇О',
+      search: true,
+      disabled: true,
+    },
+    orderDate: {
+      label: '涓嬪崟鏃ユ湡',
+      search: true,
+      type: 'datetime',  // 鏀逛负 datetime 绫诲瀷
+      format: 'YYYY-MM-DD HH:mm:ss',
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
+    },
+    feeName: {
+      label: '璐圭敤鍚嶇О',
+      rules: [
+        {
+          required: true,
+          message: "璐圭敤鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+      search: true,
+    },
 
-  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
-    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
-    form:form,
-    option:option,
-    queryParams:queryParams,
-    idKey:'id',
-    page:page.value,
-    getListApi:listEstimatedReceivable,
-    getDetailApi:getEstimatedReceivable,
-    exportApi:exportEstimatedReceivable,
-    deleteApi:delEstimatedReceivable,
-    addApi:addEstimatedReceivable,
-    updateApi:updateEstimatedReceivable,
-    handleUpdateFunc:()=>{
+    estimatedAmount: {
+      label: '璐圭敤閲戦',
+      rules: [
+        {
+          required: true,
+          message: "璐圭敤閲戦涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+    },
+    currency: {
+      label: '甯佸埗',
+      disabled: true,
+    },
+    relatedBillName: {
+      label: '鍏宠仈璐﹀崟鍚嶇О',
+    },
+    relatedBillStatus: {
+      label: '鍏宠仈璐﹀崟鐘舵��',
+      search: true,
+      dataType: 'string',
+      type: 'select',
+
+      dicUrl: '/system/dict/data/type/sys_related_status',
+      //    formatter: (row, value) => {
+      // // 鑷畾涔夋牸寮忓寲閫昏緫锛堝鏋滈渶瑕侊級
+      //   return value;
+      //  }
+    },
+    isConfirmed: {
+      label: '鏄惁纭',
+      dataType: 'string',
+
+      search: true,
+      type: 'select',
+      dicUrl: '/system/dict/data/type/sys_affirm_status',
+    },
+    remark: {
+      label: '澶囨敞',
+      type: 'textarea', minRows: 3, maxRows: 5,
+    },
+
+
+
+    // confirmBy: {
+    //   label: '纭浜�',
+    // },
+    // confirmTime: {
+    //   label: '纭鏃堕棿',
+    // },
+
+    // createBy: {
+    //   label: '鍒涘缓浜�',
+    // },
+    // updateBy: {
+    //   label: '鏇存柊浜�',
+    // },
+    // createTime: {
+    //   label: '鍒涘缓鏃堕棿',
+    // },
+    // updateTime: {
+    //   label: '鏇存柊鏃堕棿',
+    // },
+    // deleted: {
+    //   label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
+    // },
+  }
+})
+
+const newOption = ref({
+  pageKey: 'PendingSettlementBusiness',
+  rowKey: 'id',
+  searchSpan: 5,
+  selectionType: 'single',
+  selectType: 'radio',
+  editDisplay: false,
+  addBtn: false,
+  editBtn: false,
+  menu: false,
+  delBtn: false,
+  viewBtn: false,
+  searchLabelWidth: 100,
+  labelWidth: 120,
+  indexLabel: '搴忓彿',
+  column: {
+    dispatchNo: {
+      label: '璋冨害鍗曞彿',
+      search: true,
+    },
+    customerName: {
+      label: '瀹㈡埛鍚嶇О',
+      search: true,
+    },
+    projectName: {
+      label: '椤圭洰鍚嶇О',
+      search: true,
+    },
+    createdTime: {
+      label: '涓嬪崟鏃ユ湡',
+      search: true,
+      type: 'date',
+      format: 'YYYY-MM-DD',
+      valueFormat: 'YYYY-MM-DD',
+    }
+  }
+})
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+  searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+    form: form,
+    option: option,
+    queryParams: queryParams,
+    idKey: 'id',
+    page: page.value,
+    getListApi: listEstimatedReceivable,
+    getDetailApi: getEstimatedReceivable,
+    exportApi: exportEstimatedReceivable,
+    deleteApi: delEstimatedReceivable,
+    addApi: addEstimatedReceivable,
+    updateApi: updateEstimatedReceivable,
+    handleUpdateFunc: () => {
       crudRef.value.rowEdit(selectionList.value[0]);
     },
-    handleSelectionChangeFunc:(selection:any)=>{
+    handleSelectionChangeFunc: (selection: any) => {
       selectionList.value = selection;
     }
   })
+const dialog = reactive({
+  visible: false,
+  title: '',
+})
+const newPageF = ref<PagesInterface>({
+  total: 0,
+  pageSize: 10
+})
+const storagesTransferRef = ref<FormInstance>()
+const handleFormSearch = () => {
+  listPendingSettlementBusiness(newForm.value).then((res) => {
+    if (res.code === 200) {
+      dialog.visible = true;
+      dialog.title = '閫夋嫨璋冨害鍗曞彿';
+      newTableData.value = res.rows || [];
+      newPageF.value.total = res.total || 0;
+      console.log(newPageF.value.totale);
+
+    }
+  })
+}
+const newGetList = () => {
+  console.log(newForm.value);
+
+  listPendingSettlementBusiness(newForm.value).then((res) => {
+    if (res.code === 200) {
+      newTableData.value = res.rows || [];
+      newPageF.value.total = res.total || 0;
+    }
+  })
+}
 
 
+
+const newTableRef = ref();
+const newSelectionChange = (selection: any) => {
+
+  // 鍙繚鐣欐渶鍚庝竴涓�変腑鐨勯」
+  if (selection.length > 1) {
+    const nowVal = selection.shift();
+    // newTableRef.value.clearSelection([]);
+    newTableRef.value.toggleRowSelection(nowVal, false);
+
+  } else {
+    console.log("newSelectionChange", selection);
+
+    newSelectionList.value = selection
+  }
+}
+
+const resetQuery = () => {
+  newForm.value = {
+    pageNum: 1,
+    pageSize: 10
+  }
+  listPendingSettlementBusiness(newForm.value).then((res) => {
+    if (res.code === 200) {
+      newTableData.value = res.rows || [];
+      newPageF.value.total = res.total || 0;
+    }
+  })
+}
+const submitForm = () => {
+  if (newSelectionList.value.length === 0) {
+    proxy.$modal.msgWarning("璇烽�夋嫨璋冨害鍗曞彿");
+    return;
+  }
+  const selectedDispatchNo = newSelectionList.value[0]
+  // option.value.column = selectedDispatchNo;
+  // 灏嗛�変腑琛岀殑鏁版嵁璧嬪�肩粰琛ㄥ崟
+  form.value.dispatchNo = selectedDispatchNo.dispatchNo;
+  form.value.customerName = selectedDispatchNo.customerName;
+  form.value.projectName = selectedDispatchNo.projectName;
+  form.value.currency = '浜烘皯甯�';
+  dialog.visible = false;
+}
+
+/*  */
+// 澶勭悊闄勪欢鍒嗛〉椤电爜鍙樺寲
+const handleAttachmentCurrentChange = (currentPage: number) => {
+  newForm.value.pageNum = currentPage;
+  getEstimatedReceivableCancel();
+}
+// 澶勭悊闄勪欢鍒嗛〉澶у皬鍙樺寲
+const handleAttachmentSizeChange = (pageSize: number) => {
+  newForm.value.pageSize = pageSize;
+  getEstimatedReceivableCancel();
+}
+const newOnLoad = () => {
+  getEstimatedReceivableCancel()
+}
+// 鍔犺浇闄勪欢鏁版嵁鐨勫嚱鏁�
+const loadAttachmentData = () => {
+  itemTableLoading2.value = true;
+  listPendingSettlementBusiness(newForm.value).then((res) => {
+    if (res.code === 200) {
+      dialog.visible = true;
+      dialog.title = '閫夋嫨璋冨害鍗曞彿';
+      newTableData.value = res.rows || [];
+      newPageF.value.total = res.total || 0;
+    }
+    itemTableLoading2.value = false;
+  })
+
+}
+const getEstimatedReceivableCancel = () => {
+  itemTableLoading2.value = true;
+  listPendingSettlementBusiness(newForm.value).then((res) => {
+    if (res.code === 200) {
+      newTableData.value = res.rows || [];
+      newPageF.value.total = res.total || 0;
+    }
+    itemTableLoading2.value = false;
+  })
+}
+const newSearchChange = (params, done) => {
+  itemTableLoading2.value = true;
+  listPendingSettlementBusiness(newForm.value).then((res) => {
+    if (res.code === 200) {
+      done()
+      newTableData.value = res.rows || [];
+      newPageF.value.total = res.total || 0;
+    }
+    itemTableLoading2.value = false;
+  })
+}
+const newRsetChange = (done) => {
+  getEstimatedReceivableCancel()
+}
+// 闄勪欢琛ㄦ牸鍔犺浇浜嬩欢
+const attachmentChange = () => {
+  // loadAttachmentData();
+}
+/*  */
+const cancel = () => {
+  dialog.visible = false;
+  newForm.value = {
+    pageNum: 1,
+    pageSize: 10
+  }
+  newTableData.value = [];
+}
+const handleCancel = (row: any) => {
+
+  proxy.$modal.confirm(`鏄惁鍙栨秷纭璇ヨ皟搴﹀崟鍙� 锛�${row.dispatchNo}?`).then(function () {
+    return getCwglEstimatedReceivableCancel(row.id);
+  }).then((res) => {
+    if (res.code == 200) {
+      console.log(res);
+
+      onLoad(page.value);
+      proxy.$modal.msgSuccess(res.msg);
+    }
+  })
+}
+const handleAffirm = (row: any) => {
+  proxy.$modal.confirm(`鏄惁纭璇ヨ皟搴﹀崟鍙� 锛�${row.dispatchNo}?`).then(function () {
+    return getEstimatedReceivableConfirm(row.id);
+  }).then((res) => {
+    onLoad(page.value);
+
+    proxy.$modal.msgSuccess(res.msg);
+  })
+
+}
+
+const handleInvalid = (row: any) => {
+  proxy.$modal.confirm(`鏄惁浣滃簾璇ヨ皟搴﹀崟鍙� 锛�${row.dispatchNo}?`).then(function () {
+    return getEstimatedReceivableInvalid(row.id);
+  }).then((res) => {
+    onLoad(page.value);
+
+    proxy.$modal.msgSuccess(res.msg);
+  })
+
+}
+
+
+
+const flowLogIshow = ref()
+const flowParams = ref([])
+
+const handleFlow = (row: string) => {
+  let data = {
+    estimatedId: row.id,
+  }
+  listEstimatedReceivableLog(data).then((res) => {
+    flowParams.value = res.rows
+    flowLogIshow.value.openModel()
+
+  })
+}
 </script>
diff --git a/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue b/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
index 3fd7356..50225bc 100644
--- a/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
@@ -1,174 +1,541 @@
 <template>
-  <basicContainer >
-    <avue-crud
-        :option="option"
-        :table-loading="pageF.loading"
-        :data="tableData"
-        :page="page"
-        :permission="permissionList"
-        :before-open="beforeOpen"
-        v-model="form"
-        ref="crudRef"
-        @row-update="rowUpdate"
-        @row-save="rowSave"
-        @refresh-change="refreshChange"
-        @row-del="rowDel"
-        @search-change="searchChange"
-        @search-reset="searchReset"
-        @selection-change="selectionChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @on-load="onLoad"
-    >
+  <basicContainer>
+    <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+      :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+      @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+      @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+      @size-change="sizeChange" @on-load="onLoad">
       <template #menu-left>
-        <el-button
-            type="success"
-            icon="Edit"
-            :disabled="pageF.single"
-            v-hasPermi="['cwgl:estimatedReceivableBill:edit']"
-            @click="handleUpdate">淇敼
+        <!-- <el-button type="success" icon="Edit" :disabled="pageF.single"
+          v-hasPermi="['cwgl:estimatedReceivableBill:edit']" @click="handleUpdate">淇敼
+        </el-button> -->
+        <!-- <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+          v-hasPermi="['cwgl:estimatedReceivableBill:remove']">鍒犻櫎
         </el-button>
-        <el-button
-            type="danger"
-            icon="Delete"
-            :disabled="pageF.multiple"
-            @click="handleDelete"
-            v-hasPermi="['cwgl:estimatedReceivableBill:remove']"
-        >鍒犻櫎
-        </el-button>
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['cwgl:estimatedReceivableBill:export']"
-        >瀵煎嚭
-        </el-button>
+        <el-button type="warning" plain icon="Download" @click="handleExport"
+          v-hasPermi="['cwgl:estimatedReceivableBill:export']">瀵煎嚭
+        </el-button> -->
+      </template>
+      <template #billSystemNo="{ size, row, index }">
+
+        <el-link class="link-btn" type="primary" :underline="false" plain @click="handleBillSystemNo(row)">
+          {{ row.billSystemNo }}
+        </el-link>
+      </template>
+
+
+      <template #menu="{ size, row, index }">
+
+        <el-link class="link-btn" type="primary" v-if="[0, 1].includes(row.status)" :underline="false" plain
+          @click="handleclose(row)" v-hasPermi="['cwgl:estimatedReceivableBill:confirm']"> 缁撶畻
+        </el-link>
+        <el-link class="link-btn" type="primary" v-if="[0].includes(row.status)" :underline="false" plain
+          @click="handleAmend(row)" v-hasPermi="['cwgl:estimatedReceivableBill:invalid']"> 淇敼
+        </el-link>
+        <el-link class="link-btn" type="primary" :underline="false" plain @click="handleFlow(row)"
+          v-hasPermi="['cwgl:estimatedReceivableBill:flog']"> 鏃ュ織
+        </el-link>
       </template>
     </avue-crud>
   </basicContainer>
+
+
+  <el-dialog v-model="dialog.visible" :title="dialog.title" width="1200px">
+    <el-form ref="newFormRef" v-if="!dispIshow && noIshow" :model="newForm" :rules="rules" label-width="120px">
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="鏈缁撶畻閲戦" prop="settlementAmount">
+            <el-input v-model="newForm.settlementAmount" placeholder="璇疯緭鍏ユ湰娆$粨绠楅噾棰�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="澶囨敞" prop="remark">
+            <el-input v-model="newForm.remark" :rows="2" type="textarea" placeholder="璇疯緭鍏ュ娉�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="闄勪欢" prop="attachment">
+            <FileUpload v-model="newForm.attachment" :isShowTip="false"
+              :fileType="['pdf', 'bmp', 'gif', 'jpg', 'jpeg', 'png']"></FileUpload>
+            &nbsp;鏀寔鏂囦欢绫诲瀷锛� pdf锛宐mp锛実if锛宩pg锛宩peg锛宲ng'
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+
+    </el-form>
+
+    <div v-if="!dispIshow && noIshow" style="text-align: center;margin-top: 20px;">
+      <el-button @click="cancel">鍙� 娑�</el-button>
+      <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+    </div>
+
+
+    <h2 style="margin: 15px;font-size: 15px;">
+      璐﹀崟鍩烘湰淇℃伅
+    </h2>
+    <el-form ref="storagesTransferRef" :model="newObjForm" label-width="120px">
+      <el-descriptions class="margin-top" title="" :column="3" border>
+        <el-descriptions-item label="璐﹀崟绯荤粺缂栧彿" align="center">
+          {{ importForm.billSystemNo }}
+        </el-descriptions-item>
+        <el-descriptions-item label="璐﹀崟鍚嶇О" align="center">
+          <el-input v-if="dispIshow" v-model="importForm.billName" placeholder="璇疯緭鍏ヨ处鍗曞悕绉�" />
+          <span v-if="!dispIshow"> {{ importForm.billName }}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="瀹㈡埛鍚嶇О" align="center">
+          {{ importForm.customerName }}
+        </el-descriptions-item>
+
+        <el-descriptions-item label="搴旂粨绠楅噾棰�" align="center">
+          {{ importForm.totalAmount }}
+        </el-descriptions-item>
+
+        <el-descriptions-item v-if="!dispIshow" label="宸茬粨绠楅噾棰�" align="center">
+          {{ importForm.settledAmount }}
+        </el-descriptions-item>
+
+        <el-descriptions-item v-if="!dispIshow" label="寰呯粨绠楅噾棰�" align="center">
+          <span v-if="importForm.totalAmount == 0">0</span>
+          <span v-else>{{ (importForm.totalAmount - importForm.settledAmount).toFixed(2) }}</span>
+        </el-descriptions-item>
+
+        <el-descriptions-item v-if="dispIshow" label="" align="center">
+        </el-descriptions-item>
+
+        <el-descriptions-item v-if="dispIshow" label="" align="center">
+        </el-descriptions-item>
+
+      </el-descriptions>
+    </el-form>
+
+    <div v-if="dispIshow" style="text-align: center;margin-top: 20px;">
+      <el-button @click="cancel">鍙� 娑�</el-button>
+      <el-button type="primary" @click="submitFormTow">纭� 瀹�</el-button>
+    </div>
+    <h2 style="margin: 15px;font-size: 15px;">
+      鍏宠仈鏄庣粏
+    </h2>
+    <avue-crud :option="newOption" :data="newTableData" v-model:search="newFormData" :page="newPageF"
+      :table-loading="itemTableLoading2" @search-change="newSearchChange" ref="newTableRef"
+      @search-reset="newRsetChange" @current-change="handleAttachmentCurrentChange"
+      @size-change="handleAttachmentSizeChange" @on-load="newOnLoad">
+
+      <template #menu="{ size, row, index }">
+        <el-link class="link-btn" type="primary" :underline="false" plain @click="handleRelevance(row)"
+          v-hasPermi="['cwgl:estimatedReceivableBill:relevancy']"> 鍙栨秷鍏宠仈
+        </el-link>
+      </template>
+
+    </avue-crud>
+
+
+    <div v-if="!noIshow" style="text-align: right;margin-top: 20px;">
+      <el-button @click="cancel">鍙� 娑�</el-button>
+    </div>
+
+  </el-dialog>
+
+  <flowLog ref="flowLogIshow" :fileNameIshow="true" :flowParams="flowParams"></flowLog>
+
+
 </template>
 
 <script setup name="estimatedReceivableBill" lang="ts">
-  import {EstimatedReceivableBillI,addEstimatedReceivableBill, delEstimatedReceivableBill, exportEstimatedReceivableBill, getEstimatedReceivableBill, listEstimatedReceivableBill, updateEstimatedReceivableBill} from "@/api/cwgl/estimatedReceivableBill";
-  import useCurrentInstance from "@/utils/useCurrentInstance";
-  import {computed,reactive, ref, toRefs} from "vue";
-  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
-  import {usePagePlus} from "@/hooks/usePagePlus";
-  import {hasPermission} from "@/utils/permissionUtils";
+import {
+  EstimatedReceivableBillI, addEstimatedReceivableBill, delEstimatedReceivableBill, exportEstimatedReceivableBill, getEstimatedReceivableBill, listEstimatedReceivableBill, updateEstimatedReceivableBill,
+  estimatedReceivableBillSettlement, addEstimatedReceivableLog, cancelRelevancy, listEstimatedReceivableBillLog, updateEstimatedReceivableBillNmae
+} from "@/api/cwgl/estimatedReceivableBill";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import {
+  getPendingSettlementBusiness, listPendingSettlementBusiness
+} from "@/api/cwgl/pendingSettlementBusiness";
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
 
-  const { proxy } = useCurrentInstance();
-  const crudRef = ref();
+const permissionList = computed(() => {
+  return {
+    addBtn: hasPermission(["cwgl:estimatedReceivableBill:add"]),
+    delBtn: hasPermission(["cwgl:estimatedReceivableBill:remove"]),
+    editBtn: hasPermission(["cwgl:estimatedReceivableBill:edit"]),
+    viewBtn: hasPermission(["cwgl:estimatedReceivableBill:query"]),
+  }
+})
+const dispIshow = ref(false)
+const data = reactive({
+  form: <EstimatedReceivableBillI>{},
+  queryParams: <EstimatedReceivableBillI & PageQueryInterface>{},
+  page: <PagesInterface>{
+    pageSize: 10,
+    total: 0,
+    currentPage: 1,
+  },
+  selectionList: [],
+  newForm: <EstimatedReceivableI>{
+    pageNum: 1,
+    pageSize: 10
+  },
+  importForm: {},
+  newTableData: [],
+  newFormData: {
+    pageNum: 1,
+    pageSize: 10
+  },
+  itemTableLoading2: false,
+  rules: {
+    settlementAmount: [
+      { required: true, message: '璇疯緭鍏ユ湰娆$粨绠楅噾棰�', trigger: 'blur' }
+    ],
 
-  const permissionList = computed(()=>{
-    return {
-      addBtn: hasPermission(["cwgl:estimatedReceivableBill:add"]),
-      delBtn: hasPermission(["cwgl:estimatedReceivableBill:remove"]),
-      editBtn: hasPermission(["cwgl:estimatedReceivableBill:edit"]),
-      viewBtn: hasPermission(["cwgl:estimatedReceivableBill:query"]),
-    }
-  })
+  },
+})
+const { queryParams, form, page, selectionList, newForm, importForm, newTableData, itemTableLoading2, newFormData, rules } = toRefs(data);
+const option = ref({
+  pageKey: 'EstimatedReceivableBill',
+  rowKey: 'id',
 
-  const data = reactive({
-    form:<EstimatedReceivableBillI>{},
-    queryParams:<EstimatedReceivableBillI&PageQueryInterface>{},
-    page: <PagesInterface>{
-      pageSize: 10,
-      total: 0,
-      currentPage: 1,
+  searchSpan: 5,
+  editDisplay: false,
+
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+
+  searchLabelWidth: 100,
+  labelWidth: 120,
+
+  column: {
+    // id: {
+    //   label: 'ID',
+    // },
+    billSystemNo: {
+      label: '璐﹀崟绯荤粺缂栧彿',
+      search: true,
+      rules: [
+        {
+          required: true,
+          message: "璐﹀崟绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
     },
-    selectionList:[],
-  })
-  const {queryParams,form,page,selectionList} = toRefs(data);
-  const option = ref({
-    pageKey: 'EstimatedReceivableBill',
-    rowKey: 'id',
-    column: {
-                                id: {
-          label: 'ID',
-                            },
-                                billSystemNo: {
-          label: '璐﹀崟绯荤粺缂栧彿',
-                                rules: [
-              {
-                required: true,
-                message: "璐﹀崟绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                billName: {
-          label: '璐﹀崟鍚嶇О',
-                                rules: [
-              {
-                required: true,
-                message: "璐﹀崟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                customerName: {
-          label: '瀹㈡埛鍚嶇О',
-                                rules: [
-              {
-                required: true,
-                message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                dispatchCount: {
-          label: '璋冨害鍗曟暟閲�',
-                            },
-                                totalAmount: {
-          label: '搴旂粨绠楅噾棰�',
-                            },
-                                settledAmount: {
-          label: '宸茬粨绠楅噾棰�',
-                            },
-                                invoiceStatus: {
-          label: '寮�绁ㄧ姸鎬�',
-                            },
-                                attachment: {
-          label: '闄勪欢鍦板潃',
-                      type: 'textarea', minRows: 3, maxRows: 5,
-                            },
-                                status: {
-          label: '鐘舵��',
-                            },
-                                remark: {
-          label: '澶囨敞',
-                      type: 'textarea', minRows: 3, maxRows: 5,
-                            },
-                                createBy: {
-          label: '鍒涘缓浜�',
-                            },
-                                confirmTime: {
-          label: '纭鏃堕棿',
-                            },
-                                createTime: {
-          label: '鍒涘缓鏃堕棿',
-                            },
-                                updateTime: {
-          label: '鏇存柊鏃堕棿',
-                            },
-                                deleted: {
-          label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
-                            },
-          }
-  })
+    billName: {
+      label: '璐﹀崟鍚嶇О',
+      rules: [
+        {
+          required: true,
+          message: "璐﹀崟鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+    },
+    customerName: {
+      label: '瀹㈡埛鍚嶇О',
+      rules: [
+        {
+          required: true,
+          message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+      search: true,
+    },
 
-  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
-    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
-    form:form,
-    option:option,
-    queryParams:queryParams,
-    idKey:'id',
-    page:page.value,
-    getListApi:listEstimatedReceivableBill,
-    getDetailApi:getEstimatedReceivableBill,
-    exportApi:exportEstimatedReceivableBill,
-    deleteApi:delEstimatedReceivableBill,
-    addApi:addEstimatedReceivableBill,
-    updateApi:updateEstimatedReceivableBill,
-    handleUpdateFunc:()=>{
+    dispatchCount: {
+      label: '璋冨害鍗曟暟閲�',
+    },
+    totalAmount: {
+      label: '搴旂粨绠楅噾棰�',
+    },
+    settledAmount: {
+      label: '宸茬粨绠楅噾棰�',
+    },
+    invoiceStatus: {
+      label: '寮�绁ㄧ姸鎬�',
+      search: true,
+      dataType: 'string',
+      type: 'select',
+      dicUrl: '/system/dict/data/type/sys_ticket_status',
+    },
+    // attachment: {
+    //   label: '闄勪欢鍦板潃',
+    //   type: 'textarea', minRows: 3, maxRows: 5,
+    // },
+    status: {
+      label: '鐘舵��',
+      search: true,
+      dataType: 'string',
+      type: 'select',
+      dicUrl: '/system/dict/data/type/sys_final_statement_status',
+    },
+    // remark: {
+    //   label: '澶囨敞',
+    //   type: 'textarea', minRows: 3, maxRows: 5,
+    // },
+    // createBy: {
+    //   label: '鍒涘缓浜�',
+    // },
+    // confirmTime: {
+    //   label: '纭鏃堕棿',
+    // },
+    // createTime: {
+    //   label: '鍒涘缓鏃堕棿',
+    // },
+    // updateTime: {
+    //   label: '鏇存柊鏃堕棿',
+    // },
+    // deleted: {
+    //   label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
+    // },
+  }
+})
+
+const newOption = ref({
+  pageKey: 'PendingSettlementBusiness',
+  rowKey: 'id',
+  searchSpan: 5,
+  selectionType: 'single',
+  selectType: 'radio',
+  editDisplay: false,
+  addBtn: false,
+  editBtn: false,
+  selection: false,
+  delBtn: false,
+  menu: false,
+  viewBtn: false,
+  header: false,
+  // searchLabelWidth: 100,
+  // labelWidth: 120,
+  column: {
+    projectName: {
+      label: '椤圭洰鍚嶇О1',
+    },
+    dispatchNo: {
+      label: '璋冨害鍗曞彿',
+    },
+    createdTime: {
+      label: '涓嬪崟鏃堕棿',
+    },
+    estimatedTotalIncome: {
+      label: '棰勪及搴旀敹閲戦',
+    },
+    currency: {
+      label: '甯佸埗',
+    },
+    // customerName: {
+    //   label: '瀹㈡埛鍚嶇О',
+    //   search: true,
+    // },
+
+
+  }
+})
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+  searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+    form: form,
+    option: option,
+    queryParams: queryParams,
+    idKey: 'id',
+    page: page.value,
+    getListApi: listEstimatedReceivableBill,
+    getDetailApi: getEstimatedReceivableBill,
+    exportApi: exportEstimatedReceivableBill,
+    deleteApi: delEstimatedReceivableBill,
+    addApi: addEstimatedReceivableBill,
+    updateApi: updateEstimatedReceivableBill,
+    handleUpdateFunc: () => {
       crudRef.value.rowEdit(selectionList.value[0]);
     },
-    handleSelectionChangeFunc:(selection:any)=>{
+    handleSelectionChangeFunc: (selection: any) => {
       selectionList.value = selection;
     }
   })
+const dialog = reactive({
+  visible: false,
+  title: '',
+})
+const newTableRef = ref();
+const handleclose = (row) => {
+  newFormData.value.billId = row.id;
+  dispIshow.value = false;
+  newOption.value.menu = false;
+  noIshow.value = true;
+  listPendingSettlementBusiness({ billId: row.id }).then((res) => {
+    if (res.code === 200) {
+      newForm.value.id = row.id;
+      importForm.value = row;
+      dialog.visible = true;
+      newPageF.value.total = res.total || 0;
+      newTableData.value = res.rows || [];
+      newTableData.value.map(item => {
+        item.currency = '浜烘皯甯�';
+      });
+      newTableRef.value.refreshTable();
+      dialog.title = '搴旀敹璐﹀崟缁撶畻';
+    }
+  })
+
+  // crudRef.value.close();
+}
+
+const handleAmend = (row) => {
+  newFormData.value.billId = row.id;
+  dispIshow.value = true;
+  newOption.value.menu = true;
+  listPendingSettlementBusiness({ billId: row.id }).then((res) => {
+    if (res.code === 200) {
+      newForm.value.id = row.id;
+      importForm.value = row;
+      dialog.visible = true;
+      newPageF.value.total = res.total || 0;
+      newTableData.value = res.rows || [];
+      newTableData.value.map(item => {
+        item.currency = '浜烘皯甯�';
+      });
+      newTableRef.value.refreshTable();
+      dialog.title = '搴旀敹璐﹀崟淇敼';
+    }
+  })
+}
+const noIshow = ref(false)
+const handleBillSystemNo = (row) => {
+  newFormData.value.billId = row.id;
+  dispIshow.value = false;
+  noIshow.value = false;
+  newOption.value.menu = false;
+  listPendingSettlementBusiness({ billId: row.id }).then((res) => {
+    if (res.code === 200) {
+      importForm.value = row;
+      dialog.visible = true;
+      dialog.title = '璐﹀崟璇︽儏';
+      newPageF.value.total = res.total || 0;
+      newTableData.value = res.rows || [];
+      newTableData.value.map(item => {
+        item.currency = '浜烘皯甯�';
+      });
+      newTableRef.value.refreshTable();
+    }
+  })
+}
+const newFormRef = ref();
+const submitForm = () => {
+  newFormRef.value!.validate(valid => {
+    if (valid) {
+      let data = {
+        billId: newForm.value.id,
+        fileName: newForm.value.attachment
+      }
+      addEstimatedReceivableLog(data).then((res1) => {
+        if (res1.code === 200) {
+          estimatedReceivableBillSettlement(newForm.value).then((res) => {
+            if (res.code === 200) {
+              proxy.$message.success('鎿嶄綔鎴愬姛');
+              dialog.visible = false;
+              newForm.value = {};
+
+            }
+          })
+        }
+      })
+    }
+  });
 
 
+
+}
+
+const submitFormTow = () => {
+  proxy.$modal.confirm(`鏄惁纭淇敼璐﹀崟鍚嶇О?`).then(function () {
+    return updateEstimatedReceivableBillNmae(newForm.value);
+  }).then((res) => {
+    proxy.$modal.msgSuccess(res.msg);
+  })
+
+}
+const storagesTransferRef = ref();
+const cancel = () => {
+  newForm.value = {};
+  dialog.visible = false;
+  proxy.resetForm(storagesTransferRef.value)
+}
+
+
+const newPageF = ref<PagesInterface>({
+  total: 0,
+  pageSize: 10
+})
+
+const newSearchChange = (params, done) => {
+  // itemTableLoading2.value = true;
+  // listPendingSettlementBusiness(newForm.value).then((res) => {
+  //   if (res.code === 200) {
+  //     done()
+  //     newTableData.value = res.rows || [];
+  //     newPageF.value.total = res.total || 0;
+  //   }
+  //   itemTableLoading2.value = false;
+  // })
+}
+const newRsetChange = (done) => {
+  getEstimatedReceivableCancel()
+}
+// 澶勭悊闄勪欢鍒嗛〉椤电爜鍙樺寲
+const handleAttachmentCurrentChange = (currentPage: number) => {
+  newFormData.value.pageNum = currentPage;
+  getEstimatedReceivableCancel();
+}
+// 澶勭悊闄勪欢鍒嗛〉澶у皬鍙樺寲
+const handleAttachmentSizeChange = (pageSize: number) => {
+  newFormData.value.pageSize = pageSize;
+  getEstimatedReceivableCancel();
+}
+const newOnLoad = (newPageF) => {
+  getEstimatedReceivableCancel(newPageF);
+}
+const getEstimatedReceivableCancel = () => {
+  itemTableLoading2.value = true;
+  listPendingSettlementBusiness(newFormData.value).then((res) => {
+    if (res.code === 200) {
+      newTableData.value = res.rows || [];
+      newTableData.value.map(item => {
+        item.currency = '浜烘皯甯�';
+      });
+      newTableRef.value.refreshTable();
+      newPageF.value.total = res.total || 0;
+    }
+    itemTableLoading2.value = false;
+  })
+}
+
+const handleRelevance = (row) => {
+  proxy.$modal.confirm(`鏄惁鍙栨秷鍏宠仈鎴愬姛璇ヨ皟搴﹀彿 锛�${row.dispatchNo}?`).then(function () {
+    return cancelRelevancy(row.id);
+  }).then((res) => {
+    newOnLoad(newPageF.value);
+    proxy.$modal.msgSuccess(res.msg);
+  })
+
+}
+
+const flowLogIshow = ref()
+const flowParams = ref([])
+const handleFlow = (row: string) => {
+  let data = {
+    estimatedId: row.id,
+  }
+  listEstimatedReceivableBillLog(data).then((res) => {
+    flowParams.value = res.rows
+    flowLogIshow.value.openModel()
+
+  })
+}
 </script>
+<style scoped>
+::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
+  border: var(--el-descriptions-table-border);
+  padding: 8px 11px;
+  width: 200px;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue b/ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue
index 5951eda..973645f 100644
--- a/ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue
@@ -1,268 +1,526 @@
 <template>
-  <basicContainer >
-    <avue-crud
-        :option="option"
-        :table-loading="pageF.loading"
-        :data="tableData"
-        :page="page"
-        :permission="permissionList"
-        :before-open="beforeOpen"
-        v-model="form"
-        ref="crudRef"
-        @row-update="rowUpdate"
-        @row-save="rowSave"
-        @refresh-change="refreshChange"
-        @row-del="rowDel"
-        @search-change="searchChange"
-        @search-reset="searchReset"
-        @selection-change="selectionChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @on-load="onLoad"
-    >
+  <basicContainer>
+    <avue-crud :option="option" v-model:search="queryParams" :table-loading="pageF.loading" :data="tableData"
+      :page="page" :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef"
+      @row-update="rowUpdate" @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+      @current-change="currentChange" @size-change="sizeChange" @on-load="onLoad">
+
       <template #menu-left>
-        <el-button
-            type="success"
-            icon="Edit"
-            :disabled="pageF.single"
-            v-hasPermi="['cwgl:pendingSettlementBusiness:edit']"
-            @click="handleUpdate">淇敼
+        <el-button type="success" :disabled="generateDisabled" @click="handleGenerate"
+          v-hasPermi="['cwgl:pendingSettlementBusiness:add']">鐢熸垚璐﹀崟
         </el-button>
-        <el-button
-            type="danger"
-            icon="Delete"
-            :disabled="pageF.multiple"
-            @click="handleDelete"
-            v-hasPermi="['cwgl:pendingSettlementBusiness:remove']"
-        >鍒犻櫎
+        <!-- <el-button type="success" icon="Edit" :disabled="pageF.single"
+          v-hasPermi="['cwgl:pendingSettlementBusiness:edit']" @click="handleUpdate">淇敼
+        </el-button> -->
+        <!-- <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+          v-hasPermi="['cwgl:pendingSettlementBusiness:remove']">鍒犻櫎
+        </el-button> -->
+        <el-button type="warning" plain icon="Download" @click="handleExport"
+          v-hasPermi="['cwgl:pendingSettlementBusiness:export']">瀵煎嚭
         </el-button>
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['cwgl:pendingSettlementBusiness:export']"
-        >瀵煎嚭
-        </el-button>
+
+      </template>
+      <template #menu="{ size, row, index }">
+        <el-link class="link-btn" type="primary" :underline="false" plain :size="size" @click="handleFy(row)"
+          v-hasPermi="['cwgl:pendingSettlementBusiness:query']"> 璐圭敤鏄庣粏
+        </el-link>
       </template>
     </avue-crud>
+
+    <el-dialog v-model="dialog.visible" :title="dialog.title" width="1000px">
+      <el-form ref="storagesTransferRef" :model="form" :rules="rules" label-width="120px">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="璐﹀崟鍚嶇О" prop="billName">
+              <el-input v-model="form.billName" placeholder="璇疯緭鍏ヨ处鍗曞悕绉�" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="瀹㈡埛鍚嶇О" prop="customerName">
+              <el-input v-model="form.customerName" disabled placeholder="璇疯緭鍏ュ鎴峰悕绉�" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="璋冨害鍗曟暟閲�" prop="count">
+              <el-input-number v-model="form.count" disabled :min="0" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="缁撶畻閲戦" prop="price">
+              <el-input-number v-model="form.price" disabled :min="0" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+          <el-button @click="cancel">鍙� 娑�</el-button>
+        </div>
+      </template>
+
+    </el-dialog>
+
+
+    <el-dialog v-model="dialog.detail" :title="dialog.title" width="1000px">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="鎴愭湰" name="first"></el-tab-pane>
+        <el-tab-pane label="鏀跺叆" name="second"></el-tab-pane>
+      </el-tabs>
+      <el-table :data="tableDataList" show-summary :summary-method="getSummaries" style="width: 100%">
+        <el-table-column prop="feeName" label="璐圭敤鍚嶇О" />
+        <el-table-column prop="estimatedAmount" label="璐圭敤閲戦" />
+        <el-table-column prop="currency" label="璐圭敤甯佸埗" />
+      </el-table>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="cancel">鍙� 娑�</el-button>
+        </div>
+      </template>
+
+    </el-dialog>
+
+
+
+
   </basicContainer>
 </template>
 
 <script setup name="pendingSettlementBusiness" lang="ts">
-  import {PendingSettlementBusinessI,addPendingSettlementBusiness, delPendingSettlementBusiness, exportPendingSettlementBusiness, getPendingSettlementBusiness, listPendingSettlementBusiness, updatePendingSettlementBusiness} from "@/api/cwgl/pendingSettlementBusiness";
-  import useCurrentInstance from "@/utils/useCurrentInstance";
-  import {computed,reactive, ref, toRefs} from "vue";
-  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
-  import {usePagePlus} from "@/hooks/usePagePlus";
-  import {hasPermission} from "@/utils/permissionUtils";
+import {
+  PendingSettlementBusinessI, addPendingSettlementBusiness, delPendingSettlementBusiness, exportPendingSettlementBusiness, getPendingSettlementBusiness, listPendingSettlementBusiness, updatePendingSettlementBusiness,
+  getPendingSettlementBusinessBill, getCwglPendingSettlementBusinessBillList, getSelectCustomNam, cwglPendingSettlementBusinessCreateBill, pendingSettlementBusinessCreateBillList
+} from "@/api/cwgl/pendingSettlementBusiness";
+import { listEstimatedReceivable } from "@/api/cwgl/estimatedReceivable";
 
-  const { proxy } = useCurrentInstance();
-  const crudRef = ref();
 
-  const permissionList = computed(()=>{
-    return {
-      addBtn: hasPermission(["cwgl:pendingSettlementBusiness:add"]),
-      delBtn: hasPermission(["cwgl:pendingSettlementBusiness:remove"]),
-      editBtn: hasPermission(["cwgl:pendingSettlementBusiness:edit"]),
-      viewBtn: hasPermission(["cwgl:pendingSettlementBusiness:query"]),
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
+
+const permissionList = computed(() => {
+  return {
+    addBtn: hasPermission(["cwgl:pendingSettlementBusiness:add"]),
+    delBtn: hasPermission(["cwgl:pendingSettlementBusiness:remove"]),
+    editBtn: hasPermission(["cwgl:pendingSettlementBusiness:edit"]),
+    viewBtn: hasPermission(["cwgl:pendingSettlementBusiness:query"]),
+    generate: hasPermission(["cwgl:pendingSettlementBusiness:generate"]),
+
+  }
+})
+
+const data = reactive({
+  form: <PendingSettlementBusinessI & any>{
+    billName: '',
+    customerNa: '',
+    count: 0,
+    price: 0
+  },
+  selectCustomName: [],
+  queryParams: <PendingSettlementBusinessI & PageQueryInterface>{},
+  page: <PagesInterface>{
+    pageSize: 10,
+    total: 0,
+    currentPage: 1,
+  },
+  selectionList: [],
+  tableDataList: [],
+  rules: {
+    billName: [
+      { required: true, message: '璐﹀崟鍚嶇О涓嶈兘涓虹┖', trigger: 'blur' }
+    ],
+  },
+  generateDisabled: false, // 鎺у埗鐢熸垚璐﹀崟鎸夐挳鐨勭鐢ㄧ姸鎬�
+})
+const { queryParams, form, page, selectionList, generateDisabled, rules, tableDataList,
+  selectCustomName
+} = toRefs(data);
+const getSelectCustomName = () => {
+  getSelectCustomNam().then((res) => {
+    if (res.code === 200) {
+      // selectCustomName.value = res.data;
+      selectCustomName.value = res.data.map(item => ({
+        dictLabel: item,
+        dictValue: item
+      }));
+      option.value.column.customerName.dicData = selectCustomName.value || [];
     }
   })
-
-  const data = reactive({
-    form:<PendingSettlementBusinessI>{},
-    queryParams:<PendingSettlementBusinessI&PageQueryInterface>{},
-    page: <PagesInterface>{
-      pageSize: 10,
-      total: 0,
-      currentPage: 1,
+}
+getSelectCustomName()
+const option = ref({
+  pageKey: 'PendingSettlementBusiness',
+  rowKey: 'id',
+  addBtn: false,
+  generateDisabled: true,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  selection: true,
+  generate: false,
+  searchSpan: 5,
+  searchLabelWidth: 100,
+  column: {
+    // id: {
+    //   label: 'ID',
+    // },
+    projectName: {
+      fixed: 'left',
+      label: '椤圭洰鍚嶇О', search: true,
     },
-    selectionList:[],
-  })
-  const {queryParams,form,page,selectionList} = toRefs(data);
-  const option = ref({
-    pageKey: 'PendingSettlementBusiness',
-    rowKey: 'id',
-    column: {
-                                id: {
-          label: 'ID',
-                            },
-                                bookingNo: {
-          label: '瀹㈡埛璁㈠崟鍙�',
-                            },
-                                customerId: {
-          label: '瀹㈡埛id',
-                            },
-                                carrierId: {
-          label: '鎵胯繍鍟唅d',
-                            },
-                                projectName: {
-          label: '椤圭洰鍚嶇О',
-                            },
-                                dispatchNo: {
-          label: '璋冨害鍗曞彿',
-                                rules: [
-              {
-                required: true,
-                message: "璋冨害鍗曞彿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                createdTime: {
-          label: '涓嬪崟鏃堕棿',
-                            },
-                                transportMode: {
-          label: '杩愯緭鏂瑰紡',
-                            },
-                                productId: {
-          label: '鏈嶅姟浜у搧',
-                            },
-                                customerName: {
-          label: '瀹㈡埛鍚嶇О',
-                            },
-                                operationMode: {
-          label: '杩愯惀妯″紡',
-                            },
-                                carrierName: {
-          label: '鎵胯繍鍟�',
-                            },
-                                departureLocation: {
-          label: '鍑哄彂鍦�',
-                            },
-                                arrivalLocation: {
-          label: '鐩殑鍦�',
-                            },
-                                vehicleId: {
-          label: '杩愯緭宸ュ叿ID',
-                            },
-                                licensePlateNumber: {
-          label: '杞︾墝',
-                            },
-                                vehicleType: {
-          label: '杞﹀瀷',
-                            },
-                                mainDriver: {
-          label: '涓婚┚椹跺憳',
-                            },
-                                assistantDriver: {
-          label: '鍓┚椹跺憳',
-                            },
-                                pointNum: {
-          label: '鎻愰�佽揣鐐规暟',
-                            },
-                                businessContact: {
-          label: '涓氬姟鑱旂郴浜�',
-                            },
-                                estimatedTotalIncome: {
-          label: '棰勪及鎬绘敹鍏�',
-                            },
-                                estimatedTotalCost: {
-          label: '棰勪及鎬绘垚鏈�',
-                            },
-                                estimatedProfit: {
-          label: '棰勪及鍒╂鼎',
-                            },
-                                electronicLock: {
-          label: '鐢靛瓙閿�',
-                            },
-                                reWeighingWeight: {
-          label: '澶嶇閲嶉噺',
-                            },
-                                quantity: {
-          label: '浠舵暟',
-                            },
-                                actualDepartureTime: {
-          label: '瀹為檯鍑哄彂鏃堕棿',
-                            },
-                                requiredArrivalTime: {
-          label: '瑕佹眰鍒拌揪鏃堕棿',
-                            },
-                                actualArrivalTime: {
-          label: '瀹為檯鍒拌揪鏃堕棿',
-                            },
-                                beReturn: {
-          label: '鏄惁鍥炵▼',
-                            },
-                                dispatchQuantity: {
-          label: '瀹炲彂浠舵暟',
-                            },
-                                dispatchWeight: {
-          label: '瀹炲彂閲嶉噺',
-                            },
-                                dispatchVolume: {
-          label: '瀹炲彂浣撶Н(绔嬫柟锛�',
-                            },
-                                emptyMileage: {
-          label: '绌鸿浇閲岀▼',
-                            },
-                                emptyFuel: {
-          label: '绌鸿浇娌硅��',
-                            },
-                                heavyMileage: {
-          label: '閲嶈浇閲岀▼',
-                            },
-                                heavyFuel: {
-          label: '閲嶈浇娌硅��',
-                            },
-                                beScheduled: {
-          label: '鏄惁鎸夌彮娆�',
-                            },
-                                trackingNo: {
-          label: '蹇�掑崟鍙�',
-                            },
-                                sealNo: {
-          label: '閾呭皝鍙�',
-                            },
-                                scheduleNo: {
-          label: '鐝鍙�',
-                            },
-                                transportStatus: {
-          label: '杩愯緭鐘舵��',
-                            },
-                                estimatedBillId: {
-          label: '棰勪及璐﹀崟ID',
-                            },
-                                settlementBillId: {
-          label: '缁撶畻璐﹀崟ID',
-                            },
-                                settlementStatus: {
-          label: '缁撶畻鐘舵��',
-                            },
-                                createTime: {
-          label: '鍒涘缓鏃堕棿',
-                                rules: [
-              {
-                required: true,
-                message: "鍒涘缓鏃堕棿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                updateTime: {
-          label: '鏇存柊鏃堕棿',
-                                rules: [
-              {
-                required: true,
-                message: "鏇存柊鏃堕棿涓嶈兘涓虹┖", trigger: "blur" }
-            ]                  },
-          }
-  })
+    dispatchNo: {
+      label: '璋冨害鍗曞彿',
+      search: true,
+      rules: [
+        {
+          required: true,
+          message: "璋冨害鍗曞彿涓嶈兘涓虹┖", trigger: "blur"
+        }
+      ],
+    },
+    customerName: {
+      label: '瀹㈡埛鍚嶇О',
+      search: true,
+      type: 'select',           // 璁剧疆涓轰笅鎷夋绫诲瀷
+      dicData: [], // 浣跨敤 selectCustomName 浣滀负鏁版嵁婧�
+      disabled: false  // 鏍规嵁闇�瑕佽缃槸鍚︾鐢�
+    },
+    licensePlateNumber: {
+      label: '杞︾墝', search: true, hide: true,
+    },
+    vehicleType: {
+      label: '杞﹀瀷', search: true, hide: true,
+    },
+    createdTime: {
+      label: '涓嬪崟鏃堕棿',
+      display: false,
+      search: true,
+      type: 'date',
+      format: 'YYYY-MM-DD',
+      searchSpan: 5, minWidth: 100,
+      valueFormat: 'YYYY-MM-DD',
+    },
+    operationMode: {
+      label: '杩愯惀妯″紡',
+    },
+    createTime: {
+      label: '鍒涘缓鏃堕棿', display: false, hide: true, type: 'date',
+      format: 'YYYY-MM-DD', searchSpan: 5, minWidth: 100, searchLabelWidth: 110,
+      valueFormat: 'YYYY-MM-DD',
+    },
+    // bookingNo: {
+    //   label: '瀹㈡埛璁㈠崟鍙�', showOverflowTooltip: true,
+    // },
 
-  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
-    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
-    form:form,
-    option:option,
-    queryParams:queryParams,
-    idKey:'id',
-    page:page.value,
-    getListApi:listPendingSettlementBusiness,
-    getDetailApi:getPendingSettlementBusiness,
-    exportApi:exportPendingSettlementBusiness,
-    deleteApi:delPendingSettlementBusiness,
-    addApi:addPendingSettlementBusiness,
-    updateApi:updatePendingSettlementBusiness,
-    handleUpdateFunc:()=>{
+    // customerId: {
+    //   label: '瀹㈡埛id',
+    // },
+    // carrierId: {
+    //   label: '鎵胯繍鍟唅d',
+    // },
+
+
+    // createdTime: {
+    //   label: '涓嬪崟鏃堕棿',
+    // },
+    transportMode: {
+      label: '杩愯緭鏂瑰紡', hide: true,
+    },
+    productId: {
+      label: '鏈嶅姟浜у搧', hide: true,
+    },
+
+
+    carrierName: {
+      label: '鎵胯繍鍟�',
+    },
+    departureLocation: {
+      label: '鍑哄彂鍦�',
+    },
+    arrivalLocation: {
+      label: '鐩殑鍦�',
+    },
+    isCreate: {
+      label: '鏄惁宸插叆璐�', dataType: 'string', search: true,
+      type: 'select',
+      dicUrl: '/system/dict/data/type/sys_whether_type',
+    },
+    // vehicleId: {
+    //   label: '杩愯緭宸ュ叿ID',hide: true,
+    // },
+
+
+    // mainDriver: {
+    //   label: '涓婚┚椹跺憳',hide: true,
+    // },
+    // assistantDriver: {
+    //   label: '鍓┚椹跺憳',hide: true,
+    // },
+    // pointNum: {
+    //   label: '鎻愰�佽揣鐐规暟',hide: true,
+    // },
+    // businessContact: {
+    //   label: '涓氬姟鑱旂郴浜�',hide: true,
+    // },
+    // estimatedTotalIncome: {
+    //   label: '棰勪及鎬绘敹鍏�',
+    // },
+    // estimatedTotalCost: {
+    //   label: '棰勪及鎬绘垚鏈�',
+    // },
+    // estimatedProfit: {
+    //   label: '棰勪及鍒╂鼎',
+    // },
+    // electronicLock: {
+    //   label: '鐢靛瓙閿�',
+    // },
+    // reWeighingWeight: {
+    //   label: '澶嶇閲嶉噺',
+    // },
+    // quantity: {
+    //   label: '浠舵暟',
+    // },
+    // actualDepartureTime: {
+    //   label: '瀹為檯鍑哄彂鏃堕棿',
+    // },
+    // requiredArrivalTime: {
+    //   label: '瑕佹眰鍒拌揪鏃堕棿',
+    // },
+    // actualArrivalTime: {
+    //   label: '瀹為檯鍒拌揪鏃堕棿',
+    // },
+    // beReturn: {
+    //   label: '鏄惁鍥炵▼',
+    // },
+    // dispatchQuantity: {
+    //   label: '瀹炲彂浠舵暟',
+    // },
+    // dispatchWeight: {
+    //   label: '瀹炲彂閲嶉噺',
+    // },
+    // dispatchVolume: {
+    //   label: '瀹炲彂浣撶Н(绔嬫柟锛�',
+    // },
+    // emptyMileage: {
+    //   label: '绌鸿浇閲岀▼',
+    // },
+    // emptyFuel: {
+    //   label: '绌鸿浇娌硅��',
+    // },
+    // heavyMileage: {
+    //   label: '閲嶈浇閲岀▼',
+    // },
+    // heavyFuel: {
+    //   label: '閲嶈浇娌硅��',
+    // },
+    // beScheduled: {
+    //   label: '鏄惁鎸夌彮娆�',
+    // },
+    // trackingNo: {
+    //   label: '蹇�掑崟鍙�',
+    // },
+    // sealNo: {
+    //   label: '閾呭皝鍙�',
+    // },
+    // scheduleNo: {
+    //   label: '鐝鍙�',
+    // },
+    // transportStatus: {
+    //   label: '杩愯緭鐘舵��',
+    // },
+    // estimatedBillId: {
+    //   label: '棰勪及璐﹀崟ID',
+    // },
+    // settlementBillId: {
+    //   label: '缁撶畻璐﹀崟ID',
+    // },
+    // settlementStatus: {
+    //   label: '缁撶畻鐘舵��',
+    // },
+    // updateTime: {
+    //   label: '鏇存柊鏃堕棿',
+    //   rules: [
+    //     {
+    //       required: true,
+    //       message: "鏇存柊鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
+    //     }
+    //   ]
+    // },
+  }
+})
+
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+  searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+    form: form,
+    option: option,
+    queryParams: queryParams,
+    idKey: 'id',
+    page: page.value,
+    getListApi: listPendingSettlementBusiness,
+    getDetailApi: getPendingSettlementBusiness,
+    exportApi: exportPendingSettlementBusiness,
+    deleteApi: delPendingSettlementBusiness,
+    addApi: addPendingSettlementBusiness,
+    updateApi: updatePendingSettlementBusiness,
+    handleUpdateFunc: () => {
       crudRef.value.rowEdit(selectionList.value[0]);
     },
-    handleSelectionChangeFunc:(selection:any)=>{
+    handleSelectionChangeFunc: (selection: any) => {
+      if (selection.every((item: any) => item.isCreate == '0')) {
+        generateDisabled.value = false;
+      } else {
+        generateDisabled.value = true;
+        if (selection.length > 0) {
+          proxy.$message.warning('璇烽�夋嫨鏈叆璐︾殑璁板綍');
+        }
+      }
+      selectionList.value = selection;
       selectionList.value = selection;
     }
   })
+const dialog = reactive({
+  visible: false,
+  detail: false,
+  title: '',
+})
+const selectedIds = ref<string>('');
+const handleGenerate = () => {
+  form.value = {};
+  dialog.title = '鐢熸垚璐﹀崟';
+  if (selectionList.value.length > 0) {
+    selectedIds.value = selectionList.value.map(item => item.id).join(',');
+  }
+  if (selectionList.value.length === 0) {
+    if (queryParams.value.customerName == '') {
+      proxy.$message.warning('璇烽�夋嫨瀹㈡埛鍚嶇О');
+      return;
+    }
+    getCwglPendingSettlementBusinessBillList({ customerName: queryParams.value.customerName }).then((res) => {
+      if (res.code === 200) {
+        form.value = res.data;
+        // option.value.generate = true;
+        dialog.visible = true;
+      }
+    })
+  } else {
+    getPendingSettlementBusinessBill(selectedIds.value).then((res) => {
+      if (res.code === 200) {
+        form.value = res.data;
+        // option.value.generate = true;
+        dialog.visible = true;
+      }
+    })
+  }
 
 
+}
+
+const storagesTransferRef = ref<FormInstance>()
+const submitForm = () => {
+  storagesTransferRef.value!.validate(valid => {
+    if (valid) {
+      if (selectionList.value.length == 0) {
+        pendingSettlementBusinessCreateBillList(form.value).then((res) => {
+          if (res.code === 200) {
+            proxy.$message.success(res.msg);
+            dialog.visible = false;
+            onLoad(page.value)
+          }
+
+        });
+      } else {
+
+        cwglPendingSettlementBusinessCreateBill(form.value, selectedIds.value).then((res) => {
+          if (res.code === 200) {
+            proxy.$message.success(res.msg);
+            dialog.visible = false;
+            onLoad(page.value)
+
+
+          }
+        });
+      }
+    }
+  })
+}
+const cancel = () => {
+  form.value = {};
+  dialog.visible = false;
+  dialog.detail = false;
+  proxy.resetForm(storagesTransferRef.value)
+  option.value.generate = false;
+}
+const activeName = ref('first')
+const dispatchNo = ref('');
+const handleClick = (tab: TabsPaneContext, event: Event) => {
+  if (tab.props.name == 'first') {
+    getListVable(dispatchNo.value, 0);
+  } else if (tab.props.name == 'second') {
+    getListVable(dispatchNo.value, 1);
+  }
+}
+
+const handleFy = (row: any) => {
+  dispatchNo.value = row.dispatchNo;
+  if (activeName.value == 'first') {
+    listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0 }).then((res) => {
+      if (res.code === 200) {
+        dialog.detail = true;
+        tableDataList.value = res.rows || [];
+      }
+    })
+  } else if (activeName.value == 'second') {
+    // 杩欓噷鍙互娣诲姞鏌ヨ鏀跺叆鐩稿叧鐨勯�昏緫
+    listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1 }).then((res) => {
+      if (res.code === 200) {
+        dialog.detail = true;
+        tableDataList.value = res.rows || [];
+      }
+    })
+  }
+}
+const getListVable = (dispatchNo, feeType) => {
+  listEstimatedReceivable({ dispatchNo: dispatchNo, feeType: feeType }).then((res) => {
+    if (res.code === 200) {
+      tableDataList.value = res.rows || [];
+    }
+  })
+}
+// 娣诲姞鍚堣鏂规硶
+const getSummaries = (param) => {
+  const { columns, data } = param;
+  const sums = [];
+  columns.forEach((column, index) => {
+    if (index === 0) {
+      sums[index] = '鍚堣';
+      return;
+    }
+    if (column.property === 'estimatedAmount') {
+      const values = data.map(item => Number(item.estimatedAmount));
+      if (!values.every(value => Number.isNaN(value))) {
+        sums[index] = values.reduce((prev, curr) => {
+          const value = Number(curr);
+          if (!Number.isNaN(value)) {
+            return prev + curr;
+          } else {
+            return prev;
+          }
+        }, 0);
+        sums[index] = sums[index].toFixed(2);
+      } else {
+        sums[index] = 'N/A';
+      }
+    } else {
+      sums[index] = '';
+    }
+  });
+
+  return sums;
+}
 </script>

--
Gitblit v1.8.0