ly 1 år sedan
förälder
incheckning
71a861651a
47 ändrade filer med 6092 tillägg och 8238 borttagningar
  1. 18 15
      src/views/business/collect/count/index.vue
  2. 140 137
      src/views/business/contracts/simpleCompany/index.vue
  3. 259 396
      src/views/business/contracts/standardCpmpany/index.vue
  4. 124 175
      src/views/business/crm/bin/index.vue
  5. 6 3
      src/views/business/crm/company/index.vue
  6. 168 163
      src/views/business/crm/dict/index.vue
  7. 197 275
      src/views/business/crm/noContractWorkOrder/index.vue
  8. 236 385
      src/views/business/crm/workorder/index.vue
  9. 25 21
      src/views/business/deduction/index.vue
  10. 141 188
      src/views/business/entrust/deduct/index.vue
  11. 153 211
      src/views/business/entrust/deductOfFactory/index.vue
  12. 315 493
      src/views/business/entrust/deposit/index.vue
  13. 315 456
      src/views/business/entrust/depositOfFactory/index.vue
  14. 176 293
      src/views/business/entrust/entrustOrder/index.vue
  15. 210 282
      src/views/business/entrust/statementAccount/index.vue
  16. 10 7
      src/views/business/entrust/workOrder/currentMonth/index.vue
  17. 19 14
      src/views/business/entrust/workOrder/historyMonth/index.vue
  18. 194 281
      src/views/business/entrust/workOrder/nextMonth/index.vue
  19. 160 222
      src/views/business/entrust/workOrder/once/index.vue
  20. 7 4
      src/views/business/entrust/workOrderForFactory/currentMonth/index.vue
  21. 348 343
      src/views/business/entrust/workOrderForFactory/history/index.vue
  22. 164 214
      src/views/business/entrust/workOrderForFactory/nextMonth/index.vue
  23. 140 180
      src/views/business/entrust/workOrderForFactory/once/index.vue
  24. 248 368
      src/views/business/financial/collection/index.vue
  25. 139 231
      src/views/business/financial/contract/index.vue
  26. 201 342
      src/views/business/financial/payment/index.vue
  27. 8 4
      src/views/business/housingFund/confirm/index.vue
  28. 8 4
      src/views/business/housingFund/declare/index.vue
  29. 17 13
      src/views/business/invoice/index.vue
  30. 299 437
      src/views/business/paymentEntry/type/index.vue
  31. 7 3
      src/views/business/production/IndividualIncomeTaxIs/index.vue
  32. 8 4
      src/views/business/production/IndividualIncomeTaxIsZero/index.vue
  33. 305 449
      src/views/business/production/accountAdjustment/index.vue
  34. 33 29
      src/views/business/production/archiveTicket/index.vue
  35. 232 357
      src/views/business/production/deduction/index.vue
  36. 136 130
      src/views/business/production/financialReportTax/index.vue
  37. 259 385
      src/views/business/production/financialReportTaxIsZero/index.vue
  38. 8 4
      src/views/business/production/keepAccount/index.vue
  39. 5 2
      src/views/business/production/onceWork/index.vue
  40. 169 166
      src/views/business/production/productionCompany/index.vue
  41. 9 4
      src/views/business/production/receiveTicket/index.vue
  42. 9 4
      src/views/business/production/receiveTicketFeedback/index.vue
  43. 8 3
      src/views/business/production/salary/index.vue
  44. 8 3
      src/views/business/production/salaryZero/index.vue
  45. 420 516
      src/views/business/service/loop/index.vue
  46. 7 3
      src/views/business/socialSecurity/confirm/index.vue
  47. 24 19
      src/views/business/socialSecurity/declare/index.vue

+ 18 - 15
src/views/business/collect/count/index.vue

@@ -5,29 +5,28 @@
             <el-button type="primary" size="small" icon="Download" @click="handleExport">导出</el-button>
         </div>
         <!-- 搜索区 -->
-        <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true"
-            label-width="68px">
+        <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
             <el-form-item label="客户名称:" prop="companyName">
-                <el-input v-model="queryParams.companyName"  size="small"  placeholder="请输入客户名称:" style="width: 150px" clearable
-                    @keyup.enter="handleQuery" />
+                <el-input v-model="queryParams.companyName" size="small" placeholder="请输入客户名称:" style="width: 150px"
+                    clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item label="合同编号:" prop="contractNo">
-                <el-input v-model="queryParams.contractNo"  size="small" placeholder="请输入合同编号" style="width: 150px" clearable
-                    @keyup.enter="handleQuery" />
+                <el-input v-model="queryParams.contractNo" size="small" placeholder="请输入合同编号" style="width: 150px"
+                    clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item label="产品:">
-                <el-select size="small"  v-model="queryParams.taskTypeIds"   placeholder="产品" clearable
+                <el-select size="small" v-model="queryParams.taskTypeIds" placeholder="产品" clearable
                     style="width: 150px" multiple>
                     <el-option v-for="item in taskType " :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
             </el-form-item>
             <el-form-item prop="receiptDateFilter" label="到账时间:">
-                <el-date-picker v-model="queryParams.receiptDateFilter" type="daterange" clearable  size="small"
+                <el-date-picker v-model="queryParams.receiptDateFilter" type="daterange" clearable size="small"
                     format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
                     end-placeholder="业务日期" style="width: 100%;"></el-date-picker>
             </el-form-item>
             <el-form-item prop="examineTimeFilter" label="审核时间:">
-                <el-date-picker v-model="queryParams.examineTimeFilter"   size="small" type="daterange" clearable
+                <el-date-picker v-model="queryParams.examineTimeFilter" size="small" type="daterange" clearable
                     format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
                     end-placeholder="业务日期" style="width: 100%;"></el-date-picker>
             </el-form-item>
@@ -47,8 +46,8 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item style="margin-left: 40px;">
-                    <el-button type="primary" icon="Search" @click="handleQuery"  size="small">搜索</el-button>
-                    <el-button icon="Refresh" @click="resetQuery"  size="small">重置</el-button>
+                    <el-button type="primary" icon="Search" @click="handleQuery" size="small">搜索</el-button>
+                    <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
                 </el-form-item>
             </div>
 
@@ -119,10 +118,10 @@
                     <el-table-column label="是否是项目" align="center" prop="isProject" />
                     <el-table-column label="服务金额" align="center" prop="detailAllAmount" />
                     <el-table-column label="实收" align="center" prop="reallyDetailAmount" />
-                    <el-table-column label="审核时间" align="center" prop="examineTime" >
+                    <el-table-column label="审核时间" align="center" prop="examineTime">
                         <template #default="scope">
-                            {{(scope.row.examineTime === '0000-00-00 00:00:00') ? '' : scope.row.examineTime}} 
-                          </template>
+                            {{(scope.row.examineTime === '0000-00-00 00:00:00') ? '' : scope.row.examineTime}}
+                        </template>
                     </el-table-column>
                 </el-table>
             </div>
@@ -144,7 +143,7 @@
                     <!-- <el-table-column label="审核时间" align="center" prop="examineTime"/> -->
                     <el-table-column label="审核时间" align="center" prop="examineTime">
                         <template #default="scope">
-                          {{(scope.row.examineTime === '0000-00-00 00:00:00') ? '' : scope.row.examineTime}} 
+                            {{(scope.row.examineTime === '0000-00-00 00:00:00') ? '' : scope.row.examineTime}}
                         </template>
                     </el-table-column>
                 </el-table>
@@ -209,6 +208,10 @@
         },
 
     ]);
+    onActivated(() => {
+        // 你的逻辑
+        getList();
+    });
     /***********************  方法区  ****************************/
     listTasks()
     /** 查询报表列表 */

+ 140 - 137
src/views/business/contracts/simpleCompany/index.vue

@@ -98,143 +98,146 @@
 </template>
 
 <script setup name="SimpleCompany">
-import { listCompany, delCompany } from "@/api/business/crm/company";
-import companyForm from "./form"
-const { proxy } = getCurrentInstance()
-/** 字典数组区 */
-/** 查询 对象 */
-
-const companyList = ref([]);
-const loading = ref(true);
-const ids = ref([])
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-/** 查询对象 */
-const queryParams = ref({
-    pageNum: 1,
-    pageSize: 20,
-    category: null,
-    code: null,
-    name: null,
-    shortName: null,
-    oldName: null,
-    owner: null,
-    phone: null,
-    email: null,
-    contactAddress: null,
-    source: null,
-    type: null,
-    socialCreditCode: null,
-    mainBusiness: null,
-    legalRepresentative: null,
-    foundationDate: null,
-    licenceDate: null,
-    businessStartDate: null,
-    businessEndDate: null,
-    isPermanentlyEffective: null,
-    registerMoney: null,
-    registerMoneyUnit: null,
-    provinceCode: null,
-    province: null,
-    cityCode: null,
-    city: null,
-    districtCode: null,
-    district: null,
-    address: null,
-    businessField: null,
-    taxType: null,
-    isZero: null,
-    competentTaxAuthority: null,
-    taxCollectorName: null,
-    taxCollectorPhone: null,
-    taxMonth: null,
-    openingBank: null,
-    bankAccount: null,
-    annualIncome: null,
-    governmentAccountNo: null,
-    governmentPassword: null,
-    socialSecurityAccountNo: null,
-    socialSecurityPassword: null,
-    employeePassword: null,
-    housingFundPassword: null,
-    housingFundUnitAccount: null,
-    housingFundDeductionPassword: null,
-    collectionMethod: null,
-    quotaAmount: null,
-    isPayOnWindow: null,
-    isFirstSocialSecurity: null,
-    isFirstHousingFund: null,
-    leaderId: null,
-    adviserId: null,
-    leaderName: null,
-    adviserName: null,
-})
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-    loading.value = true;
-    listCompany(queryParams.value).then(response => {
-        companyList.value = response.rows;
-        total.value = response.total;
-        loading.value = false;
-        console.log(companyList.value)
+    import { listCompany, delCompany } from "@/api/business/crm/company";
+    import companyForm from "./form"
+    const { proxy } = getCurrentInstance()
+    /** 字典数组区 */
+    /** 查询 对象 */
+
+    const companyList = ref([]);
+    const loading = ref(true);
+    const ids = ref([])
+    const single = ref(true);
+    const multiple = ref(true);
+    const total = ref(0);
+    /** 查询对象 */
+    const queryParams = ref({
+        pageNum: 1,
+        pageSize: 20,
+        category: null,
+        code: null,
+        name: null,
+        shortName: null,
+        oldName: null,
+        owner: null,
+        phone: null,
+        email: null,
+        contactAddress: null,
+        source: null,
+        type: null,
+        socialCreditCode: null,
+        mainBusiness: null,
+        legalRepresentative: null,
+        foundationDate: null,
+        licenceDate: null,
+        businessStartDate: null,
+        businessEndDate: null,
+        isPermanentlyEffective: null,
+        registerMoney: null,
+        registerMoneyUnit: null,
+        provinceCode: null,
+        province: null,
+        cityCode: null,
+        city: null,
+        districtCode: null,
+        district: null,
+        address: null,
+        businessField: null,
+        taxType: null,
+        isZero: null,
+        competentTaxAuthority: null,
+        taxCollectorName: null,
+        taxCollectorPhone: null,
+        taxMonth: null,
+        openingBank: null,
+        bankAccount: null,
+        annualIncome: null,
+        governmentAccountNo: null,
+        governmentPassword: null,
+        socialSecurityAccountNo: null,
+        socialSecurityPassword: null,
+        employeePassword: null,
+        housingFundPassword: null,
+        housingFundUnitAccount: null,
+        housingFundDeductionPassword: null,
+        collectionMethod: null,
+        quotaAmount: null,
+        isPayOnWindow: null,
+        isFirstSocialSecurity: null,
+        isFirstHousingFund: null,
+        leaderId: null,
+        adviserId: null,
+        leaderName: null,
+        adviserName: null,
+    })
+
+    /***********************  方法区  ****************************/
+    onActivated(() => {
+        // 你的逻辑
+        getList();
     });
-}
+    /** 查询company列表 */
+    function getList() {
+        loading.value = true;
+        listCompany(queryParams.value).then(response => {
+            companyList.value = response.rows;
+            total.value = response.total;
+            loading.value = false;
+            console.log(companyList.value)
+        });
+    }
+
+    /** 搜索按钮操作 */
+    function handleQuery() {
+        queryParams.value.pageNum = 1;
+        getList();
+    }
+
+    /** 重置按钮操作 */
+    function resetQuery() {
+        proxy.resetForm("queryRef");
+        queryParams.value.name = "";
+        queryParams.value.socialCreditCode = "";
+        queryParams.value.leaderName = "";
+        handleQuery();
+    }
+
+    // 多选框选中数据
+    function handleSelectionChange(selection) {
+        ids.value = selection.map(item => item.id);
+        single.value = selection.length != 1;
+        multiple.value = !selection.length;
+    }
+
+    /** 新增按钮操作 */
+    function handleAdd() {
+        proxy.$refs.companyRef.open()
+    }
+
+    /** 修改按钮操作 */
+    function handleUpdate(row) {
+        const id = row.id || ids.value
+        proxy.$refs.companyRef.open(id)
+    }
+
+
+    /** 删除按钮操作 */
+    function handleDelete(row) {
+        const _ids = row.id || ids.value;
+        proxy.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+            return delCompany(_ids);
+        }).then(() => {
+            getList();
+            proxy.$modal.msgSuccess("删除成功!");
+        }).catch(() => { });
+    }
+
+    /** 导出按钮操作 */
+    function handleExport() {
+        proxy.download('business/company/export', {
+            ...queryParams.value
+        }, `company_${new Date().getTime()}.xlsx`)
+    }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-    queryParams.value.pageNum = 1;
     getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-    proxy.resetForm("queryRef");
-    queryParams.value.name = "";
-    queryParams.value.socialCreditCode = "";
-    queryParams.value.leaderName = "";
-    handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-    ids.value = selection.map(item => item.id);
-    single.value = selection.length != 1;
-    multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-    proxy.$refs.companyRef.open()
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-    const id = row.id || ids.value
-    proxy.$refs.companyRef.open(id)
-}
-
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-    const _ids = row.id || ids.value;
-    proxy.$modal.confirm('是否确认删除选中的数据项?').then(function () {
-        return delCompany(_ids);
-    }).then(() => {
-        getList();
-        proxy.$modal.msgSuccess("删除成功!");
-    }).catch(() => { });
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-    proxy.download('business/company/export', {
-        ...queryParams.value
-    }, `company_${new Date().getTime()}.xlsx`)
-}
-
-getList();
-</script>
+</script>

+ 259 - 396
src/views/business/contracts/standardCpmpany/index.vue

@@ -2,212 +2,90 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-hasPermi="['business:company:add']"
-        >新增</el-button
-      >
-
-      <el-button
-        type="danger"
-        size="small"
-        icon="Delete"
-        :disabled="multiple"
-        @click="handleDelete"
-        v-hasPermi="['business:standardCompany:remove']"
-        >删除</el-button
-      >
-      <el-button
-        type="success"
-        icon="Edit"
-        size="small"
-        :disabled="multiple"
-        @click="setEntrustHandle"
-        v-hasPermi="['business:standardCompany:setLoopEntrust']"
-        >生成循环委托</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
+        v-hasPermi="['business:company:add']">新增</el-button>
+
+      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
+        v-hasPermi="['business:standardCompany:remove']">删除</el-button>
+      <el-button type="success" icon="Edit" size="small" :disabled="multiple" @click="setEntrustHandle"
+        v-hasPermi="['business:standardCompany:setLoopEntrust']">生成循环委托</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              @click="handleCommand(true)"
-              icon="Operation"
-              v-if="viewAdviser('business:standardCompany:Adviser')"
-              >设置客服</el-dropdown-item
-            >
-            <el-dropdown-item
-              @click="handleCommand(false)"
-              icon="Operation"
-              v-if="viewAdviser('business:standardCompany:Leader')"
-              >设置负责人</el-dropdown-item
-            >
-            <el-dropdown-item
-              type="warning"
-              size="small"
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:standardCompany:export')"
-              >导出</el-dropdown-item
-            >
+            <el-dropdown-item @click="handleCommand(true)" icon="Operation"
+              v-if="viewAdviser('business:standardCompany:Adviser')">设置客服</el-dropdown-item>
+            <el-dropdown-item @click="handleCommand(false)" icon="Operation"
+              v-if="viewAdviser('business:standardCompany:Leader')">设置负责人</el-dropdown-item>
+            <el-dropdown-item type="warning" size="small" icon="Download" @click="handleExport"
+              v-if="viewAdviser('business:standardCompany:export')">导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-    >
-      <el-form
-        class="list-search-container"
-        size="small"
-        :model="queryParams"
-        ref="queryRef"
-        :inline="true"
-      >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true">
+      <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true">
         <el-form-item label="客户名称:" prop="name">
-          <el-input
-            v-model="queryParams.name"
-            style="width: 180px"
-            placeholder="请输入客户名称"
-            clearable
-            @keyup.enter="handleQuery"
-          />
+          <el-input v-model="queryParams.name" style="width: 180px" placeholder="请输入客户名称" clearable
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item label="税号:" prop="socialCreditCode">
-          <el-input
-            style="width: 180px"
-            v-model="queryParams.socialCreditCode"
-            placeholder="请输入税号"
-            clearable
-            @keyup.enter="handleQuery"
-          />
+          <el-input style="width: 180px" v-model="queryParams.socialCreditCode" placeholder="请输入税号" clearable
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item label="客户负责人:" prop="leaderName">
-          <el-input
-            style="width: 180px"
-            v-model="queryParams.leaderName"
-            placeholder="请输入客户负责人"
-            clearable
-            @keyup.enter="handleQuery"
-          />
+          <el-input style="width: 180px" v-model="queryParams.leaderName" placeholder="请输入客户负责人" clearable
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" icon="Search" @click="handleQuery"
-            >搜索</el-button
-          >
+          <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
           <el-button icon="Refresh" @click="resetQuery">重置</el-button>
         </el-form-item>
       </el-form>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="companyList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="companyList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="客户名称"
-        width="230"
-        align="center"
-        prop="name"
-      />
-      <el-table-column
-        label="税号"
-        width="180"
-        align="center"
-        prop="socialCreditCode"
-      />
-      <el-table-column
-        label="注册省-市-区"
-        width="180"
-        align="center"
-        prop="province"
-      >
+      <el-table-column label="客户名称" width="230" align="center" prop="name" />
+      <el-table-column label="税号" width="180" align="center" prop="socialCreditCode" />
+      <el-table-column label="注册省-市-区" width="180" align="center" prop="province">
         <template #default="scope">
           <span>{{
             scope.row.province + "-" + scope.row.city + "-" + scope.row.district
-          }}</span>
+            }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="年收入"
-        align="center"
-        width="100"
-        prop="annualIncome"
-      />
-      <el-table-column
-        label="纳税类型"
-        align="center"
-        width="130"
-        prop="taxType"
-      />
-      <el-table-column
-        label="是否零申报"
-        width="100"
-        align="center"
-        prop="isZero"
-      >
+      <el-table-column label="年收入" align="center" width="100" prop="annualIncome" />
+      <el-table-column label="纳税类型" align="center" width="130" prop="taxType" />
+      <el-table-column label="是否零申报" width="100" align="center" prop="isZero">
         <template #default="scope">
           <span>{{
             scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
-          }}</span>
+            }}</span>
         </template>
       </el-table-column>
       <el-table-column label="客服" align="center" prop="adviserName" />
       <el-table-column label="负责人" align="center" prop="leaderName" />
 
-      <el-table-column
-        label="操作"
-        width="180"
-        align="center"
-        class-name="small-padding fixed-width"
-        :resizable="false"
-        fixed="right"
-      >
+      <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width" :resizable="false"
+        fixed="right">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="handleOneEnrust(scope.row)"
-            v-hasPermi="['business:standardCompany:setOneEntrust']"
-            >单次委托</el-button
-          >
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="handleInfo(scope.row)"
-            v-hasPermi="['business:standardCompany:query']"
-            >详细信息</el-button
-          >
+          <el-button link type="primary" size="small" @click="handleOneEnrust(scope.row)"
+            v-hasPermi="['business:standardCompany:setOneEntrust']">单次委托</el-button>
+          <el-button link type="primary" size="small" @click="handleInfo(scope.row)"
+            v-hasPermi="['business:standardCompany:query']">详细信息</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
     <!-- 表单 -->
     <company-form ref="companyRef" :get-list="getList"></company-form>
@@ -215,32 +93,15 @@
     <set-one-entrust-dialog ref="setOneEntrustDialogRef" :get-list="getList" />
     <add ref="addRef" :get-list="getList"></add>
 
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
     <!-- 设置客服和负责人对话框 -->
-    <el-dialog
-      :title="title"
-      v-model="open"
-      width="500px"
-      append-to-body
-      draggable
-      :close-on-click-modal = "false"
-    >
+    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" :rules="rules" label-width="100">
         <el-form-item :label="title" :prop="content">
-          <el-autocomplete
-            :fetch-suggestions="querySearchAsync"
-            :trigger-on-focus="true"
-            v-model="creatorName"
-            :placeholder="content"
-            @select="handleSelect"
-          />
+          <el-autocomplete :fetch-suggestions="querySearchAsync" :trigger-on-focus="true" v-model="creatorName"
+            :placeholder="content" @select="handleSelect" />
         </el-form-item>
       </el-form>
       <template #footer>
@@ -252,229 +113,231 @@
     </el-dialog>
   </div>
 </template>
-  
+
 <script setup name="Company">
-import { listUser } from "@/api/system/user";
-import SetEntrustDialog from "./setEntrustDialog";
-import useUserStore from "@/store/modules/user";
-import SetOneEntrustDialog from "./setOneEntrustDialog";
-import {
-  listStandardCompany,
-  delStandardCompany,
-  updateStandardCompanyName,
-  updateStandardCompanyAdviser,
-  exportCompany,
-} from "@/api/business/standardCompany";
-import companyForm from "./form";
-import add from "./add.vue";
-const { proxy } = getCurrentInstance();
-
-// /** 字典数组区 */
-// /** 查询 对象 */
-
-const companyList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const selections = ref([]);
-const title = ref("");
-const content = ref("");
-const creatorName = ref("");
-const total = ref(0);
-const userList = ref([]);
-const open = ref(false);
-const dateRange = ref([]);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const links = ref([]);
-const adviserOpen = ref(true);
-const userId = ref();
-const setEntrustDialogRef = ref(null);
-const setOneEntrustDialogRef = ref(null);
-
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  orderByColumn: "create_time",
-});
-
-/** 用户对象 */
-const queryUser = {
-  pageNum: 1,
-  pageSize: 20,
-  userName: null,
-  phonenumber: null,
-  status: null,
-  deptId: null,
-  userId: null,
-  nickName: null,
-};
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  links.value.length = 0;
-  loading.value = true;
-
-  Promise.all([
-    listStandardCompany(queryParams.value),
-    listUser(proxy.addDateRange(queryUser, dateRange.value)),
-  ]).then((result) => {
-    companyList.value = result[0].rows;
-    total.value = result[0].total;
-    userList.value = result[1].rows;
-    loading.value = false;
-    linkList();
-  }).catch;
-}
-
-function linkList() {
-  userList.value.forEach((item) => {
-    links.value.push({ value: item.nickName });
+  import { listUser } from "@/api/system/user";
+  import SetEntrustDialog from "./setEntrustDialog";
+  import useUserStore from "@/store/modules/user";
+  import SetOneEntrustDialog from "./setOneEntrustDialog";
+  import {
+    listStandardCompany,
+    delStandardCompany,
+    updateStandardCompanyName,
+    updateStandardCompanyAdviser,
+    exportCompany,
+  } from "@/api/business/standardCompany";
+  import companyForm from "./form";
+  import add from "./add.vue";
+  const { proxy } = getCurrentInstance();
+
+  // /** 字典数组区 */
+  // /** 查询 对象 */
+
+  const companyList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const selections = ref([]);
+  const title = ref("");
+  const content = ref("");
+  const creatorName = ref("");
+  const total = ref(0);
+  const userList = ref([]);
+  const open = ref(false);
+  const dateRange = ref([]);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const links = ref([]);
+  const adviserOpen = ref(true);
+  const userId = ref();
+  const setEntrustDialogRef = ref(null);
+  const setOneEntrustDialogRef = ref(null);
+
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    orderByColumn: "create_time",
   });
-}
-
-/** 输入框输出建议 */
-const querySearchAsync = (queryString, cb) => {
-  console.log(links);
-  const results = queryString
-    ? links.value.filter(createFilter(queryString))
-    : links.value;
-  cb(results);
-};
-
-function createFilter(queryString) {
-  return (restaurant) => {
-    return (
-      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
-    );
+
+  /** 用户对象 */
+  const queryUser = {
+    pageNum: 1,
+    pageSize: 20,
+    userName: null,
+    phonenumber: null,
+    status: null,
+    deptId: null,
+    userId: null,
+    nickName: null,
   };
-}
 
-function setEntrustHandle() {
-  setEntrustDialogRef.value.open({
-    selections: selections.value,
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
-
-function handleOneEnrust(row) {
-  setOneEntrustDialogRef.value.open(row);
-}
-
-/** 对话框确定按钮操作 */
-function submitForm() {
-  const id = ids.value;
-  const index = userList.value.findIndex(
-    (item) => item.nickName == creatorName.value
-  );
-
-  if (index != -1) userId.value = userList.value[index].userId;
-  else {
-    proxy.$modal.msgError("请选择人员");
-    return;
+  /** 查询company列表 */
+  function getList() {
+    links.value.length = 0;
+    loading.value = true;
+
+    Promise.all([
+      listStandardCompany(queryParams.value),
+      listUser(proxy.addDateRange(queryUser, dateRange.value)),
+    ]).then((result) => {
+      companyList.value = result[0].rows;
+      total.value = result[0].total;
+      userList.value = result[1].rows;
+      loading.value = false;
+      linkList();
+    }).catch;
   }
-  if (adviserOpen.value) {
-    updateStandardCompanyAdviser(id, userId.value).then((response) => {
-      proxy.$modal.msgSuccess("设置完成!");
-      creatorName.value = "";
-      open.value = false;
-      getList();
+
+  function linkList() {
+    userList.value.forEach((item) => {
+      links.value.push({ value: item.nickName });
     });
-  } else {
-    updateStandardCompanyName(id, userId.value).then((response) => {
-      proxy.$modal.msgSuccess("设置完成!");
-      creatorName.value = "";
-      open.value = false;
-      getList();
+  }
+
+  /** 输入框输出建议 */
+  const querySearchAsync = (queryString, cb) => {
+    console.log(links);
+    const results = queryString
+      ? links.value.filter(createFilter(queryString))
+      : links.value;
+    cb(results);
+  };
+
+  function createFilter(queryString) {
+    return (restaurant) => {
+      return (
+        restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+      );
+    };
+  }
+
+  function setEntrustHandle() {
+    setEntrustDialogRef.value.open({
+      selections: selections.value,
     });
   }
-}
 
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  function handleOneEnrust(row) {
+    setOneEntrustDialogRef.value.open(row);
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  queryParams.value.name = "";
-  queryParams.value.socialCreditCode = "";
-  queryParams.value.leaderName = "";
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 打开修改客服、负责人对话框 */
-function handleCommand(com) {
-  adviserOpen.value = com;
-  const updateIds = ids.value;
-  if (updateIds.length == 0) {
-    proxy.$modal.msgError("请至少选择一条数据!");
-    return;
+  /** 对话框确定按钮操作 */
+  function submitForm() {
+    const id = ids.value;
+    const index = userList.value.findIndex(
+      (item) => item.nickName == creatorName.value
+    );
+
+    if (index != -1) userId.value = userList.value[index].userId;
+    else {
+      proxy.$modal.msgError("请选择人员");
+      return;
+    }
+    if (adviserOpen.value) {
+      updateStandardCompanyAdviser(id, userId.value).then((response) => {
+        proxy.$modal.msgSuccess("设置完成!");
+        creatorName.value = "";
+        open.value = false;
+        getList();
+      });
+    } else {
+      updateStandardCompanyName(id, userId.value).then((response) => {
+        proxy.$modal.msgSuccess("设置完成!");
+        creatorName.value = "";
+        open.value = false;
+        getList();
+      });
+    }
+  }
+
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
   }
 
-  if (com) {
-    open.value = true;
-    title.value = "设置客服";
-    content.value = "输入客服名称";
-  } else {
-    open.value = true;
-    title.value = "设置负责人";
-    content.value = "输入负责人名称";
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
   }
-}
-
-/** 关闭对话框 */
-function cancel() {
-  open.value = false;
-  creatorName.value = "";
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  proxy.$refs.addRef.open();
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delStandardCompany(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  exportCompany(queryParams.value);
-}
-
-function handleInfo(row) {
-  proxy.$refs.companyRef.open(row.id);
-}
-
-getList();
-</script>
-  
+
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    queryParams.value.name = "";
+    queryParams.value.socialCreditCode = "";
+    queryParams.value.leaderName = "";
+    handleQuery();
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+
+  /** 打开修改客服、负责人对话框 */
+  function handleCommand(com) {
+    adviserOpen.value = com;
+    const updateIds = ids.value;
+    if (updateIds.length == 0) {
+      proxy.$modal.msgError("请至少选择一条数据!");
+      return;
+    }
+
+    if (com) {
+      open.value = true;
+      title.value = "设置客服";
+      content.value = "输入客服名称";
+    } else {
+      open.value = true;
+      title.value = "设置负责人";
+      content.value = "输入负责人名称";
+    }
+  }
+
+  /** 关闭对话框 */
+  function cancel() {
+    open.value = false;
+    creatorName.value = "";
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd() {
+    proxy.$refs.addRef.open();
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delStandardCompany(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportCompany(queryParams.value);
+  }
+
+  function handleInfo(row) {
+    proxy.$refs.companyRef.open(row.id);
+  }
+
+  getList();
+</script>

+ 124 - 175
src/views/business/crm/bin/index.vue

@@ -2,25 +2,11 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Finished"
-        :disabled="multiple"
-        @click="handleUpdate"
-        v-hasPermi="['business:bin:restore']"
-        >还原</el-button
-      >
-
-      <el-button
-        type="danger"
-        size="small"
-        icon="Delete"
-        :disabled="multiple"
-        @click="handleDelete"
-        v-hasPermi="['business:bin:remove']"
-        >删除</el-button
-      >
+      <el-button type="primary" size="small" icon="Finished" :disabled="multiple" @click="handleUpdate"
+        v-hasPermi="['business:bin:restore']">还原</el-button>
+
+      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
+        v-hasPermi="['business:bin:remove']">删除</el-button>
 
       <!-- <el-button
         type="info"
@@ -33,78 +19,38 @@
       <!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="sourceTableName">
-        <el-input
-          v-model="queryParams.sourceValue"
-          placeholder="请输入客户名称"
-          style="width: 150px"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.sourceValue" placeholder="请输入客户名称" style="width: 150px" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="binList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="binList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="客户名称" align="center" prop="sourceValue" />
       <el-table-column label="合同编号" align="center" prop="archiveCode" />
       <!-- <el-table-column label="来源表" align="center" prop="sourceTableName" /> -->
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:bin:restore']"
-            >还原</el-button
-          >
-          <el-button
-            link
-            type="danger"
-            size="small"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['business:bin:remove']"
-            >删除</el-button
-          >
+          <el-button link type="primary" size="small" @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:bin:restore']">还原</el-button>
+          <el-button link type="danger" size="small" @click="handleDelete(scope.row)"
+            v-hasPermi="['business:bin:remove']">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
     <!-- 表单 -->
     <bin-form ref="binRef" :get-list="getList"></bin-form>
@@ -112,108 +58,111 @@
 </template>
 
 <script setup name="OrderBin">
-import { listBin, delBin, restoreArchiveBin } from "@/api/business/bin";
-import binForm from "./form";
-
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const binList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  orderByColumn: "create_time",
-  sourceTableName: "biz_archive_input",
-  sourceValue: null,
-  isClean: null,
-  isReturn: null,
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询回收站列表 */
-function getList() {
-  loading.value = true;
-  listBin(queryParams.value).then((response) => {
-    binList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  import { listBin, delBin, restoreArchiveBin } from "@/api/business/bin";
+  import binForm from "./form";
+
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const binList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    orderByColumn: "create_time",
+    sourceTableName: "biz_archive_input",
+    sourceValue: null,
+    isClean: null,
+    isReturn: null,
+  });
+
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  /** 查询回收站列表 */
+  function getList() {
+    loading.value = true;
+    listBin(queryParams.value).then((response) => {
+      binList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd() {
+    proxy.$refs.binRef.open();
+  }
+
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认还原选中的数据项?")
+      .then(function () {
+        loading.value = true;
+        return restoreArchiveBin(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("还原成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("删除数据项后不可恢复,是否确认删除选中的数据项?")
+      .then(function () {
+        return delBin(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    proxy.download(
+      "business/bin/export",
+      {
+        ...queryParams.value,
+      },
+      `bin_${new Date().getTime()}.xlsx`
+    );
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
   getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  proxy.$refs.binRef.open();
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认还原选中的数据项?")
-    .then(function () {
-      loading.value = true;
-      return restoreArchiveBin(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("还原成功!");
-    })
-    .catch(() => {});
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("删除数据项后不可恢复,是否确认删除选中的数据项?")
-    .then(function () {
-      return delBin(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  proxy.download(
-    "business/bin/export",
-    {
-      ...queryParams.value,
-    },
-    `bin_${new Date().getTime()}.xlsx`
-  );
-}
-
-getList();
-</script>
+</script>

+ 6 - 3
src/views/business/crm/company/index.vue

@@ -46,8 +46,8 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
-      <el-tab-pane label=" 全部" name="first">
+      <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>
@@ -195,7 +195,10 @@
   });
 
   /***********************  列表页方法 ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询项目信息列表 */
   function getList() {
     loading.value = true;

+ 168 - 163
src/views/business/crm/dict/index.vue

@@ -10,7 +10,7 @@
         v-hasPermi="['business:crm:dict:remove']">删除</el-button>
     </div>
 
-    <el-form class="list-search-container"  :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"
+    <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"
       label-width="68px">
       <el-form-item label="字典名称:" prop="dictName" style="width: 220px">
         <el-input size="small" v-model="queryParams.dictName" placeholder="请输入字典名称" clearable
@@ -69,11 +69,11 @@
       </el-table-column>
     </el-table>
 
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-      @pagination="getList" />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
     <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable :close-on-click-modal = "false">
+    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="字典名称" prop="dictName">
           <el-input v-model="form.dictName" placeholder="请输入字典名称" />
@@ -83,11 +83,13 @@
         </el-form-item>
         <el-form-item label="状态" prop="status">
           <el-radio-group v-model="form.status">
-            <el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+            <el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
+              }}</el-radio>
           </el-radio-group>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" maxlength="200" show-word-limit placeholder="请输入内容"></el-input>
+          <el-input v-model="form.remark" type="textarea" maxlength="200" show-word-limit
+            placeholder="请输入内容"></el-input>
         </el-form-item>
       </el-form>
       <template #footer>
@@ -101,167 +103,170 @@
 </template>
 
 <script setup name="CustomerDict">
-import useDictStore from "@/store/modules/dict";
-import {
-  listType,
-  getType,
-  delType,
-  addType,
-  updateType,
-  refreshCache,
-} from "@/api/system/dict/type";
-import { customRef } from "vue";
+  import useDictStore from "@/store/modules/dict";
+  import {
+    listType,
+    getType,
+    delType,
+    addType,
+    updateType,
+    refreshCache,
+  } from "@/api/system/dict/type";
+  import { customRef } from "vue";
 
-const { proxy } = getCurrentInstance();
-const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
+  const { proxy } = getCurrentInstance();
+  const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
 
-const typeList = ref([]);
-const open = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const title = ref("");
-const dateRange = ref([]);
-const webHost = import.meta.env.VITE_APP_BASE_API;
+  const typeList = ref([]);
+  const open = ref(false);
+  const loading = ref(true);
+  const showSearch = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const title = ref("");
+  const dateRange = ref([]);
+  const webHost = import.meta.env.VITE_APP_BASE_API;
 
-const data = reactive({
-  form: {},
-  queryParams: {
-    pageNum: 1,
-    pageSize: 20,
-    dictName: undefined,
-    dictType: undefined,
-    module: "customer",
-    status: undefined,
-  },
-  rules: {
-    dictName: [
-      { required: true, message: "字典名称不能为空", trigger: "blur" },
-    ],
-    dictType: [
-      { required: true, message: "字典类型不能为空", trigger: "blur" },
-    ],
-  },
-});
-
-const { queryParams, form, rules } = toRefs(data);
+  const data = reactive({
+    form: {},
+    queryParams: {
+      pageNum: 1,
+      pageSize: 20,
+      dictName: undefined,
+      dictType: undefined,
+      module: "customer",
+      status: undefined,
+    },
+    rules: {
+      dictName: [
+        { required: true, message: "字典名称不能为空", trigger: "blur" },
+      ],
+      dictType: [
+        { required: true, message: "字典类型不能为空", trigger: "blur" },
+      ],
+    },
+  });
 
-/** 查询字典类型列表 */
-function getList() {
-  loading.value = true;
-  listType(proxy.addDateRange(queryParams.value, dateRange.value)).then(
-    (response) => {
-      typeList.value = response.rows;
-      total.value = response.total;
-      loading.value = false;
-    }
-  );
-}
-/** 取消按钮 */
-function cancel() {
-  open.value = false;
-  reset();
-}
-/** 表单重置 */
-function reset() {
-  form.value = {
-    dictId: undefined,
-    dictName: undefined,
-    dictType: undefined,
-    status: "0",
-    remark: undefined,
-    module: 'customer'
-  };
-  proxy.resetForm("dictRef");
-}
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-/** 重置按钮操作 */
-function resetQuery() {
-  dateRange.value = [];
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-/** 新增按钮操作 */
-function handleAdd() {
-  reset();
-  open.value = true;
-  title.value = "添加字典类型";
-}
-/** 多选框选中数据 */
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.dictId);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  reset();
-  const dictId = row.dictId || ids.value;
-  getType(dictId).then((response) => {
-    form.value = response.data;
-    open.value = true;
-    title.value = "修改字典类型";
+  const { queryParams, form, rules } = toRefs(data);
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
-/** 提交按钮 */
-function submitForm() {
-  proxy.$refs["dictRef"].validate((valid) => {
-    if (valid) {
-      if (form.value.dictId != undefined) {
-        updateType(form.value).then((response) => {
-          proxy.$modal.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        });
-      } else {
-        addType(form.value).then((response) => {
-          proxy.$modal.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        });
+  /** 查询字典类型列表 */
+  function getList() {
+    loading.value = true;
+    listType(proxy.addDateRange(queryParams.value, dateRange.value)).then(
+      (response) => {
+        typeList.value = response.rows;
+        total.value = response.total;
+        loading.value = false;
       }
-    }
-  });
-}
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const dictIds = row.dictId || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除?")
-    .then(function () {
-      return delType(dictIds);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功");
-    })
-    .catch(() => { });
-}
-/** 导出按钮操作 */
-function handleExport() {
-  queryParams.value.ids = ids.value;
-  proxy.download(
-    "system/dict/type/export",
-    {
-      ...queryParams.value,
-    },
-    `dict_${new Date().getTime()}.xlsx`
-  );
-}
-/** 刷新缓存按钮操作 */
-function handleRefreshCache() {
-  refreshCache().then(() => {
-    proxy.$modal.msgSuccess("刷新成功");
-    useDictStore().cleanDict();
-  });
-}
+    );
+  }
+  /** 取消按钮 */
+  function cancel() {
+    open.value = false;
+    reset();
+  }
+  /** 表单重置 */
+  function reset() {
+    form.value = {
+      dictId: undefined,
+      dictName: undefined,
+      dictType: undefined,
+      status: "0",
+      remark: undefined,
+      module: 'customer'
+    };
+    proxy.resetForm("dictRef");
+  }
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+  /** 重置按钮操作 */
+  function resetQuery() {
+    dateRange.value = [];
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
+  /** 新增按钮操作 */
+  function handleAdd() {
+    reset();
+    open.value = true;
+    title.value = "添加字典类型";
+  }
+  /** 多选框选中数据 */
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.dictId);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    reset();
+    const dictId = row.dictId || ids.value;
+    getType(dictId).then((response) => {
+      form.value = response.data;
+      open.value = true;
+      title.value = "修改字典类型";
+    });
+  }
+  /** 提交按钮 */
+  function submitForm() {
+    proxy.$refs["dictRef"].validate((valid) => {
+      if (valid) {
+        if (form.value.dictId != undefined) {
+          updateType(form.value).then((response) => {
+            proxy.$modal.msgSuccess("修改成功");
+            open.value = false;
+            getList();
+          });
+        } else {
+          addType(form.value).then((response) => {
+            proxy.$modal.msgSuccess("新增成功");
+            open.value = false;
+            getList();
+          });
+        }
+      }
+    });
+  }
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const dictIds = row.dictId || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除?")
+      .then(function () {
+        return delType(dictIds);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功");
+      })
+      .catch(() => { });
+  }
+  /** 导出按钮操作 */
+  function handleExport() {
+    queryParams.value.ids = ids.value;
+    proxy.download(
+      "system/dict/type/export",
+      {
+        ...queryParams.value,
+      },
+      `dict_${new Date().getTime()}.xlsx`
+    );
+  }
+  /** 刷新缓存按钮操作 */
+  function handleRefreshCache() {
+    refreshCache().then(() => {
+      proxy.$modal.msgSuccess("刷新成功");
+      useDictStore().cleanDict();
+    });
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 197 - 275
src/views/business/crm/noContractWorkOrder/index.vue

@@ -2,14 +2,8 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-hasPermi="['business:workOrder:add']"
-        >新增</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
+        v-hasPermi="['business:workOrder:add']">新增</el-button>
 
       <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
         v-hasPermi="['business:workOrder:remove']">删除</el-button>
@@ -19,71 +13,32 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:workOrder:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:workOrder:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          style="width: 150px"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" style="width: 150px" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="客户名称"
-        align="center"
-        min-width="250"
-        prop="companyName"
-      />
-      <el-table-column
-        label="税号"
-        align="center"
-        min-width="180"
-        prop="socialCreditCode"
-      />
-      <el-table-column
-        label="服务内容"
-        align="center"
-        min-width="650"
-        prop="remark"
-      >
+      <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" />
+      <el-table-column label="税号" align="center" min-width="180" prop="socialCreditCode" />
+      <el-table-column label="服务内容" align="center" min-width="650" prop="remark">
         <template #default="scope">
           <div>{{ scope.row.remark }}</div>
         </template>
@@ -92,39 +47,24 @@
         <template #default="scope">{{ getTransactor(scope.row) }}</template>
       </el-table-column>
     </el-table>
-    <el-dialog
-      title="新增工单"
-      v-model="formOpen"
-      width="500px"
-      append-to-body
-      draggable
-    >
+    <el-dialog title="新增工单" v-model="formOpen" width="500px" append-to-body draggable>
       <el-form ref="dictRef" :model="form" label-width="100" size="small">
         <el-row :gutter="30">
           <el-col :span="24">
             <el-form-item label="客户名称:" prop="companyName">
-              <el-autocomplete
-                style="width: 100%"
-                fit-input-width="300px"
-                size="small"
-                :fetch-suggestions="querySearchCompanyAsync"
-                :trigger-on-focus="true"
-                v-model="form.companyName"
-                placeholder="请输入客户名称"
-                @select="handleSelectCompany"
-              >
+              <el-autocomplete style="width: 100%" fit-input-width="300px" size="small"
+                :fetch-suggestions="querySearchCompanyAsync" :trigger-on-focus="true" v-model="form.companyName"
+                placeholder="请输入客户名称" @select="handleSelectCompany">
                 <template #append>
                   <el-button icon="Plus" @click="showAddCompanyDialog">
                   </el-button>
                 </template>
                 <template #default="{ item }">
-                  <div
-                    style="
+                  <div style="
                       display: flex;
                       flex-direction: row;
                       justify-content: space-between;
-                    "
-                  >
+                    ">
                     <div class="name" style="font-size: 12px">
                       {{ item.name }}
                     </div>
@@ -134,16 +74,8 @@
               </el-autocomplete>
             </el-form-item>
             <el-form-item label="服务内容:">
-              <el-input
-                v-model.trim="form.remark"
-                type="textarea"
-                size="small"
-                :rows="4"
-                maxlength="200"
-                show-word-limit
-                placeholder="服务内容"
-                :clearable="true"
-              />
+              <el-input v-model.trim="form.remark" type="textarea" size="small" :rows="4" maxlength="200"
+                show-word-limit placeholder="服务内容" :clearable="true" />
             </el-form-item>
           </el-col>
 
@@ -152,228 +84,218 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button
-            type="primary"
-            icon="Finished"
-            size="small"
-            @click="saveHandler"
-            >确 定</el-button
-          >
-          <el-button @click="formCancel" icon="close" size="small"
-            >取 消</el-button
-          >
+          <el-button type="primary" icon="Finished" size="small" @click="saveHandler">确 定</el-button>
+          <el-button @click="formCancel" icon="close" size="small">取 消</el-button>
         </div>
       </template>
     </el-dialog>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
     <AddCompanyDialog ref="addCompanyDialogRef" />
   </div>
 </template>
 
 <script setup name="WorkOrder">
-// import contractForm from "./form";
-import {
-  listWorkOrder,
-  delWorkOrder,
-  exportWorkOrder,
-  addWorkOrder,
-  exportNoContract,
-} from "@/api/business/crm/workOrder";
-import { listCompany } from "@/api/business/crm/company";
-import AddCompanyDialog from "../AddCompanyDialog.vue";
-import { ref } from "vue";
-// import workorderForm from "./form"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
+  // import contractForm from "./form";
+  import {
+    listWorkOrder,
+    delWorkOrder,
+    exportWorkOrder,
+    addWorkOrder,
+    exportNoContract,
+  } from "@/api/business/crm/workOrder";
+  import { listCompany } from "@/api/business/crm/company";
+  import AddCompanyDialog from "../AddCompanyDialog.vue";
+  import { ref } from "vue";
+  // import workorderForm from "./form"
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const addCompanyDialogRef = ref(null);
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const addCompanyDialogRef = ref(null);
 
-const formOpen = ref(false);
+  const formOpen = ref(false);
 
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  type: 2,
-  noContract: 1,
-});
-
-const emptyForm = {
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 2,
-  remark: "",
-  noContract: 1,
-};
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    type: 2,
+    noContract: 1,
+  });
 
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  orderByColumn: "create_time",
-  companyName: "",
-  noContract: 1,
-});
+  const emptyForm = {
+    id: null,
+    companyName: "",
+    companyId: null,
+    type: 2,
+    remark: "",
+    noContract: 1,
+  };
 
-const editStatus = {
-  startMonth: false,
-};
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    orderByColumn: "create_time",
+    companyName: "",
+    noContract: 1,
+  });
 
-/***********************  方法区  ****************************/
+  const editStatus = {
+    startMonth: false,
+  };
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listWorkOrder(queryParams.value).then((response) => {
-    orderList.value = response.rows.map((l) => ({
-      ...l,
-      editStatus: proxy.deepClone(editStatus),
-    }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listWorkOrder(queryParams.value).then((response) => {
+      orderList.value = response.rows.map((l) => ({
+        ...l,
+        editStatus: proxy.deepClone(editStatus),
+      }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-/** 新增按钮操作 */
-function handleAdd() {
-  // proxy.$refs.workOrderRef.open();
-  formOpen.value = true;
-}
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // proxy.$refs.workOrderRef.open();
+    formOpen.value = true;
+  }
 
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
 
-function reset() {
-  form.value = proxy.deepClone(emptyForm);
-}
+  function reset() {
+    form.value = proxy.deepClone(emptyForm);
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.workOrderRef.open(id);
-}
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    // const id = row.id || ids.value;
+    // proxy.$refs.workOrderRef.open(id);
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delWorkOrder(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delWorkOrder(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportNoContract(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportNoContract(queryParams.value);
+  }
 
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
 
-function querySearchCompanyAsync(queryString, cb) {
-  const query =
-    queryString.length > 0
-      ? {
+  function querySearchCompanyAsync(queryString, cb) {
+    const query =
+      queryString.length > 0
+        ? {
           keyword: queryString,
           pageSize: 20,
           pageNum: 1,
           orderByColumn: "create_time",
         }
-      : { pageSize: 20, pageNum: 1, orderByColumn: "create_time" };
-  listCompany(query).then((res) => {
-    cb(res.rows);
-  });
-}
-
-function handleSelectCompany(item) {
-  form.value.companyName = item.name;
-  form.value.companyId = item.id;
-}
-
-function saveHandler() {
-  if (form.value.companyId == null) {
-    proxy.$modal.msgError("请选择公司");
-    return;
+        : { pageSize: 20, pageNum: 1, orderByColumn: "create_time" };
+    listCompany(query).then((res) => {
+      cb(res.rows);
+    });
   }
-  if (form.value.remark == null || form.value.remark === "") {
-    proxy.$modal.msgError("请输入备注");
-    return;
+
+  function handleSelectCompany(item) {
+    form.value.companyName = item.name;
+    form.value.companyId = item.id;
   }
-  if (form.value.id == null) {
-    addWorkOrder(form.value).then((res) => {
-      formCancel();
-      getList();
-    });
+
+  function saveHandler() {
+    if (form.value.companyId == null) {
+      proxy.$modal.msgError("请选择公司");
+      return;
+    }
+    if (form.value.remark == null || form.value.remark === "") {
+      proxy.$modal.msgError("请输入备注");
+      return;
+    }
+    if (form.value.id == null) {
+      addWorkOrder(form.value).then((res) => {
+        formCancel();
+        getList();
+      });
+    }
   }
-}
 
-function getTransactor(row) {
-  if (row.entrusts != null && row.entrusts.length > 0) {
-    const names = Array.from(new Set(row.entrusts.map((v) => v.toAccountName)));
-    return names.join(",");
-  } else {
-    return row.serviceName;
+  function getTransactor(row) {
+    if (row.entrusts != null && row.entrusts.length > 0) {
+      const names = Array.from(new Set(row.entrusts.map((v) => v.toAccountName)));
+      return names.join(",");
+    } else {
+      return row.serviceName;
+    }
   }
-}
 
-function showAddCompanyDialog() {
-  addCompanyDialogRef.value.open();
-}
+  function showAddCompanyDialog() {
+    addCompanyDialogRef.value.open();
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 236 - 385
src/views/business/crm/workorder/index.vue

@@ -8,507 +8,358 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:workOrder:export')"
-            >
-              导出</el-dropdown-item
-            >
-            <el-dropdown-item
-              icon="Edit"
-              @click="handleSetContinue"
-              v-if="viewAdviser('business:workOrder:continue')"
-            >
-              延续设置</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-if="viewAdviser('business:workOrder:export')">
+              导出</el-dropdown-item>
+            <el-dropdown-item icon="Edit" @click="handleSetContinue" v-if="viewAdviser('business:workOrder:continue')">
+              延续设置</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          style="width: 150px"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" style="width: 150px" placeholder="请输入客户名称" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="工单类型:" prop="type">
-        <el-select
-          size="small"
-          v-model="queryParams.type"
-          placeholder="工单类型"
-          clearable
-        >
-          <el-option
-            v-for="item in types"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
+        <el-select size="small" v-model="queryParams.type" placeholder="工单类型" clearable>
+          <el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="客户名称"
-        align="center"
-        min-width="250"
-        prop="companyName"
-        :resizable="false"
-      />
-      <el-table-column
-        label="税号"
-        align="center"
-        min-width="200"
-        prop="socialCreditCode"
-        :resizable="false"
-      />
-      <el-table-column
-        label="工单类型"
-        align="center"
-        prop="amount"
-        min-width="80"
-        :resizable="false"
-      >
+      <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" :resizable="false" />
+      <el-table-column label="税号" align="center" min-width="200" prop="socialCreditCode" :resizable="false" />
+      <el-table-column label="工单类型" align="center" prop="amount" min-width="80" :resizable="false">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="项目"
-        align="center"
-        prop="taskTypeName"
-        :resizable="false"
-        min-width="110"
-      >
+      <el-table-column label="项目" align="center" prop="taskTypeName" :resizable="false" min-width="110">
         <template #default="scope">
           {{ scope.row.taskTypeName }}
           {{
-            scope.row.taskTypeDetailName
-              ? `-${scope.row.taskTypeDetailName}`
-              : ""
+          scope.row.taskTypeDetailName
+          ? `-${scope.row.taskTypeDetailName}`
+          : ""
           }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="是否延续"
-        align="center"
-        prop="isContinue"
-        :resizable="false"
-      >
+      <el-table-column label="是否延续" align="center" prop="isContinue" :resizable="false">
         <template #default="scope">
           {{ scope.row.isContinue === 0 ? "否" : "是" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="合同状态"
-        align="center"
-        width="150"
-        prop="socialCreditCode"
-        :resizable="false"
-      >
+      <el-table-column label="合同状态" align="center" width="150" prop="socialCreditCode" :resizable="false">
         <template #default="scope">
           <span v-if="scope.row.type === 1">{{ scope.row.closingMonth }}</span>
           <span v-else>{{ scope.row.onceContractStatus }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="起始月"
-        align="center"
-        min-width="120"
-        prop="startMonth"
-        :resizable="false"
-      >
+      <el-table-column label="起始月" align="center" min-width="120" prop="startMonth" :resizable="false">
         <template #default="scope">
           <div v-if="scope.row.type === 1">
-            <div
-              v-if="scope.row.editStatus.startMonth"
-              style="
+            <div v-if="scope.row.editStatus.startMonth" style="
                 display: flex;
                 flex-direction: row;
                 justify-content: center;
-              "
-            >
-              <el-date-picker
-                v-model="scope.row.startMonth"
-                size="small"
-                placeholder="起始月"
-                :clearable="true"
-                value-format="YYYY-MM-DD"
-                format="YYYY年MM月"
-                type="month"
-                @change="(arg) => startDateChangeHandler(scope.row, arg)"
-              />
-              <el-button
-                link
-                type="primary"
-                icon="Check"
-                size="small"
-                style="padding: 0"
-                @click="saveHandler(scope.row, 'startMonth')"
-              />
+              ">
+              <el-date-picker v-model="scope.row.startMonth" size="small" placeholder="起始月" :clearable="true"
+                value-format="YYYY-MM-DD" format="YYYY年MM月" type="month"
+                @change="(arg) => startDateChangeHandler(scope.row, arg)" />
+              <el-button link type="primary" icon="Check" size="small" style="padding: 0"
+                @click="saveHandler(scope.row, 'startMonth')" />
             </div>
-            <div
-              v-else
-              style="
+            <div v-else style="
                 display: flex;
                 flex-direction: row;
                 justify-content: center;
-              "
-            >
+              ">
               <div style="width: auto">
                 {{
-                  scope.row.startMonth
-                    ? moment(scope.row.startMonth).format("YYYY年MM月")
-                    : ""
+                scope.row.startMonth
+                ? moment(scope.row.startMonth).format("YYYY年MM月")
+                : ""
                 }}
               </div>
-              <el-button
-                v-show="
+              <el-button v-show="
                   scope.row.isStop === 0 && scope.row.records.length === 0
-                "
-                link
-                type="primary"
-                icon="Edit"
-                size="small"
-                style="padding: 0"
-                v-hasPermi="['business:workOrder:edit']"
-                @click="
+                " link type="primary" icon="Edit" size="small" style="padding: 0"
+                v-hasPermi="['business:workOrder:edit']" @click="
                   () => {
                     scope.row.editStatus.startMonth =
                       !scope.row.editStatus.startMonth;
                   }
-                "
-              />
+                " />
             </div>
           </div>
           <div v-else>-</div>
         </template>
       </el-table-column>
-      <el-table-column
-        label="结束月"
-        align="center"
-        min-width="90"
-        :resizable="false"
-      >
+      <el-table-column label="结束月" align="center" min-width="90" :resizable="false">
         <template #default="scope">
           <div v-if="scope.row.monthNum > 0">
             {{
-              scope.row.type === 1
-                ? scope.row.endMonth
-                  ? moment(scope.row.endMonth).format("YYYY年MM月")
-                  : ""
-                : "-"
+            scope.row.type === 1
+            ? scope.row.endMonth
+            ? moment(scope.row.endMonth).format("YYYY年MM月")
+            : ""
+            : "-"
             }}
           </div>
         </template>
       </el-table-column>
-      <el-table-column
-        label="工单月数"
-        align="center"
-        :resizable="false"
-        width="80"
-        prop="monthNum"
-      >
+      <el-table-column label="工单月数" align="center" :resizable="false" width="80" prop="monthNum">
         <template #default="scope">
           {{ scope.row.type === 1 ? scope.row.monthNum : "-" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="工单执行人"
-        align="center"
-        :resizable="false"
-        min-width="100"
-      >
+      <el-table-column label="工单执行人" align="center" :resizable="false" min-width="100">
         <template #default="scope">{{ getTransactor(scope.row) }}</template>
       </el-table-column>
     </el-table>
     <!-- <contract-form ref="contractRef" :get-list="getList" /> -->
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
     <ZeroChangeDialog ref="zeroChangeDialogRef" :save-call-back="thenSave" />
-    <el-dialog
-      title="延续设置"
-      v-model="continueOpen"
-      width="500px"
-      append-to-body
-      draggable
-      @close="close"
-      :close-on-click-modal = "false"
-    >
+    <el-dialog title="延续设置" v-model="continueOpen" width="500px" append-to-body draggable @close="close"
+      :close-on-click-modal="false">
       <div style="padding: 8px 24px 16px 24px">
         <el-form size="small" label-width="100px">
           <el-form-item label="是否延续">
             <el-select v-model="cont" placeholder="请选择" style="width: 100%">
-              <el-option
-                v-for="item in yesOrNo"
-                :key="item.label"
-                :label="item.label"
-                :value="item.value"
-              />
+              <el-option v-for="item in yesOrNo" :key="item.label" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
         </el-form>
       </div>
       <div class="form-btns-container" style="height: 40px">
-        <el-button
-          size="small"
-          style="float: right"
-          @click="close"
-          icon="close"
-        >
-          取消</el-button
-        >
-        <el-button
-          type="primary"
-          icon="Finished"
-          size="small"
-          style="float: right; margin-left: 12px; margin-right: 12px"
-          @click="handleSave"
-          >保存</el-button
-        >
+        <el-button size="small" style="float: right" @click="close" icon="close">
+          取消</el-button>
+        <el-button type="primary" icon="Finished" size="small"
+          style="float: right; margin-left: 12px; margin-right: 12px" @click="handleSave">保存</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script setup name="ContractWorkOrder">
-import {
-  listWorkOrder,
-  delWorkOrder,
-  exportWorkOrder,
-  updateWorkOrder,
-  setContract,
-} from "@/api/business/crm/workOrder";
-import useUserStore from "@/store/modules/user";
-import { yesOrNo } from "@/utils/default";
-import { get } from "@vueuse/core";
-import { ref } from "vue";
-import ZeroChangeDialog from "../ZeroChangeDialog";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
+  import {
+    listWorkOrder,
+    delWorkOrder,
+    exportWorkOrder,
+    updateWorkOrder,
+    setContract,
+  } from "@/api/business/crm/workOrder";
+  import useUserStore from "@/store/modules/user";
+  import { yesOrNo } from "@/utils/default";
+  import { get } from "@vueuse/core";
+  import { ref } from "vue";
+  import ZeroChangeDialog from "../ZeroChangeDialog";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const orderList = ref([]);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const continueOpen = ref(false);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const cont = ref(1);
-const setContinue = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const zeroChangeDialogRef = ref(null);
+  const orderList = ref([]);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const continueOpen = ref(false);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const cont = ref(1);
+  const setContinue = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const zeroChangeDialogRef = ref(null);
 
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  orderByColumn: "create_time",
-  noContract: 0,
-});
-
-const types = ref([
-  {
-    value: 1,
-    label: "循环工单",
-  },
-  {
-    value: 2,
-    label: "代办工单",
-  },
-]);
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    orderByColumn: "create_time",
+    noContract: 0,
+  });
 
-const editStatus = {
-  startMonth: false,
-};
+  const types = ref([
+    {
+      value: 1,
+      label: "循环工单",
+    },
+    {
+      value: 2,
+      label: "代办工单",
+    },
+  ]);
 
-/***********************  方法区  ****************************/
+  const editStatus = {
+    startMonth: false,
+  };
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listWorkOrder(queryParams.value).then((response) => {
-    orderList.value = response.rows.map((l) => ({
-      ...l,
-      editStatus: proxy.deepClone(editStatus),
-    }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
-    console.log("查询", orderList);
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listWorkOrder(queryParams.value).then((response) => {
+      orderList.value = response.rows.map((l) => ({
+        ...l,
+        editStatus: proxy.deepClone(editStatus),
+      }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+      console.log("查询", orderList);
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleSetContinue() {
-  if (ids.value.length < 1) {
-    proxy.$modal.msgError("至少选择一条数据");
-  } else {
-    if (setContinue) {
-      proxy.$modal.msgError("只能修改循环工单");
+  /** 搜索按钮操作 */
+  function handleSetContinue() {
+    if (ids.value.length < 1) {
+      proxy.$modal.msgError("至少选择一条数据");
     } else {
-      continueOpen.value = true;
+      if (setContinue) {
+        proxy.$modal.msgError("只能修改循环工单");
+      } else {
+        continueOpen.value = true;
+      }
     }
   }
-}
 
-/** 延续设置保存操作 */
-function handleSave() {
-  setContract(ids.value, cont.value).then((response) => {
-    proxy.$modal.msgSuccess("保存成功");
-    continueOpen.value = false;
-    getList();
-  });
-}
+  /** 延续设置保存操作 */
+  function handleSave() {
+    setContract(ids.value, cont.value).then((response) => {
+      proxy.$modal.msgSuccess("保存成功");
+      continueOpen.value = false;
+      getList();
+    });
+  }
 
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-function close() {
-  continueOpen.value = false;
-  cont.value = 1;
-}
+  function close() {
+    continueOpen.value = false;
+    cont.value = 1;
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  setContinue.value = selection.map((item) => item.type === 2);
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    setContinue.value = selection.map((item) => item.type === 2);
+  }
 
-/** 新增按钮操作 */
-function handleAdd() {
-  proxy.$refs.contractRef.open();
-}
+  /** 新增按钮操作 */
+  function handleAdd() {
+    proxy.$refs.contractRef.open();
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  const id = row.id || ids.value;
-  proxy.$refs.contractRef.open(id);
-}
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    const id = row.id || ids.value;
+    proxy.$refs.contractRef.open(id);
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delWorkOrder(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delWorkOrder(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportWorkOrder(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportWorkOrder(queryParams.value);
+  }
 
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
 
-function saveHandler(row, field) {
-  const index = prev.value.findIndex((l) => l.id === row.id);
-  if (prev.value[index][field] === row[field]) {
-    row.editStatus[field] = !row.editStatus[field];
-  } else {
-    if (row.isZero == null) {
-      zeroChangeDialogRef.value.open(row.companyId, row);
+  function saveHandler(row, field) {
+    const index = prev.value.findIndex((l) => l.id === row.id);
+    if (prev.value[index][field] === row[field]) {
+      row.editStatus[field] = !row.editStatus[field];
     } else {
-      proxy.$modal
-        .confirm("确定修改起始月么?")
-        .then((_) => {
-          updateWorkOrder(row).then((res) => {
-            getList();
-          });
-        })
-        .catch((_) => {});
+      if (row.isZero == null) {
+        zeroChangeDialogRef.value.open(row.companyId, row);
+      } else {
+        proxy.$modal
+          .confirm("确定修改起始月么?")
+          .then((_) => {
+            updateWorkOrder(row).then((res) => {
+              getList();
+            });
+          })
+          .catch((_) => { });
+      }
     }
   }
-}
 
-function thenSave(row) {
-  proxy.$modal
-    .confirm("确定修改起始月么?")
-    .then((_) => {
-      updateWorkOrder(row).then((res) => {
-        getList();
-      });
-    })
-    .catch((_) => {});
-}
+  function thenSave(row) {
+    proxy.$modal
+      .confirm("确定修改起始月么?")
+      .then((_) => {
+        updateWorkOrder(row).then((res) => {
+          getList();
+        });
+      })
+      .catch((_) => { });
+  }
 
-function getTransactor(row) {
-  if (row.entrusts != null && row.entrusts.length > 0) {
-    const names = Array.from(new Set(row.entrusts.map((v) => v.toAccountName)));
-    return names.join(",");
-  } else {
-    return row.serviceName;
+  function getTransactor(row) {
+    if (row.entrusts != null && row.entrusts.length > 0) {
+      const names = Array.from(new Set(row.entrusts.map((v) => v.toAccountName)));
+      return names.join(",");
+    } else {
+      return row.serviceName;
+    }
   }
-}
-getList();
-</script>
+  getList();
+</script>

+ 25 - 21
src/views/business/deduction/index.vue

@@ -60,9 +60,10 @@
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="客户名" prop="companyName" min-width="250" align="center" fixed="left"  />
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="客户名" prop="companyName" min-width="250" align="center" fixed="left" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" prop="taxType" width="100" align="center" />
       <el-table-column label="扣款期" prop="currentMonth" min-width="100" align="center">
         <template #default="scope">
@@ -236,23 +237,23 @@
 </template>
 
 <script setup name="Deduction">
-import {
-  listDeduction,
-  exportDeposition,
-  saveDeduction
-} from "@/api/business/production/deduction";
-import MergeTaxViewDialog from "./MergeTaxViewDialog";
-import feedbackDialog from "./feedbackDialog";
-import { uploadFile } from "@/api/tool/file";
-import { rowNum } from "@/utils/index";
-import { listCompany } from "@/api/business/crm/company";
-import { taxTypes } from "@/utils/default";
-import useUserStore from "@/store/modules/user";
-import { getTenant } from "@/utils/auth";
-import { ref } from "vue";
-import FileDialog from "./fileDialog.vue";
-import HousingFundViewDialog from "./HousingFundViewDialog";
-import SocialSecurityViewDialog from "./SocialSecurityViewDialog";
+  import {
+    listDeduction,
+    exportDeposition,
+    saveDeduction
+  } from "@/api/business/production/deduction";
+  import MergeTaxViewDialog from "./MergeTaxViewDialog";
+  import feedbackDialog from "./feedbackDialog";
+  import { uploadFile } from "@/api/tool/file";
+  import { rowNum } from "@/utils/index";
+  import { listCompany } from "@/api/business/crm/company";
+  import { taxTypes } from "@/utils/default";
+  import useUserStore from "@/store/modules/user";
+  import { getTenant } from "@/utils/auth";
+  import { ref } from "vue";
+  import FileDialog from "./fileDialog.vue";
+  import HousingFundViewDialog from "./HousingFundViewDialog";
+  import SocialSecurityViewDialog from "./SocialSecurityViewDialog";
 
   // import DepositForm from "./form"
   const { proxy } = getCurrentInstance();
@@ -324,7 +325,10 @@ import SocialSecurityViewDialog from "./SocialSecurityViewDialog";
   });
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 141 - 188
src/views/business/entrust/deduct/index.vue

@@ -28,240 +28,193 @@
     </el-row>
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button type="success" size="small" icon="Refresh" @click="getList"
-        >刷新</el-button
-      >
+      <el-button type="success" size="small" icon="Refresh" @click="getList">刷新</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:deduct:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:deduct:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="委托单号"
-        align="center"
-        prop="formNo"
-        min-width="140"
-      />
-      <el-table-column
-        label="扣款单位"
-        align="center"
-        prop="contactCompany"
-        min-width="150"
-      />
+      <el-table-column label="委托单号" align="center" prop="formNo" min-width="140" />
+      <el-table-column label="扣款单位" align="center" prop="contactCompany" min-width="150" />
       <el-table-column label="扣款信息" align="center">
         <template #default="scope">
           {{ scope.row.year }}年{{ scope.row.month }}月扣款
         </template>
       </el-table-column>
-      <el-table-column
-        label="扣款时间"
-        align="center"
-        prop="deductDate"
-        min-width="120"
-      />
-      <el-table-column
-        label="扣款金额"
-        header-align="center"
-        align="right"
-        prop="amount"
-        min-width="80"
-      >
+      <el-table-column label="扣款时间" align="center" prop="deductDate" min-width="120" />
+      <el-table-column label="扣款金额" header-align="center" align="right" prop="amount" min-width="80">
         <template #default="scope">
           <span> {{ rowNum(scope.row.amount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="扣款明细"
-        align="center"
-        prop="amount"
-        min-width="80"
-      >
+      <el-table-column label="扣款明细" align="center" prop="amount" min-width="80">
         <template #default="scope">
           <!-- <el-button link size="small" type="primary" @click="handleDetail(scope.row)">查看明细</el-button> -->
-          <el-button
-            link
-            size="small"
-            type="primary"
-            v-hasPermi="['business:deduct:info']"
-            @click="handleStatementAccount(scope.row)"
-            >跳转对账单</el-button
-          >
+          <el-button link size="small" type="primary" v-hasPermi="['business:deduct:info']"
+            @click="handleStatementAccount(scope.row)">跳转对账单</el-button>
         </template>
       </el-table-column>
     </el-table>
     <statementAccountForm ref="statementAccountFormRef" :get-list="getList" />
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="Deduct">
-// import contractForm from "./form";
-import {
-  listDeduct,
-  delDeduct,
-  exportDeduct,
-} from "@/api/business/entrust/deduct";
-import { rowNum } from "@/utils/index";
-import statementAccountForm from "./form.vue";
-import { getRemain } from "@/api/business/entrust/deposit";
-// import companyForm from "./form"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const statementAccountFormRef = ref(null);
-
-const totalRemain = ref(0);
-const donateRemain = ref(0);
-
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  orderByColumn: "create_time",
-  companyName: "",
-  noContract: 0,
-});
-
-const editStatus = {
-  startMonth: false,
-};
+  // import contractForm from "./form";
+  import {
+    listDeduct,
+    delDeduct,
+    exportDeduct,
+  } from "@/api/business/entrust/deduct";
+  import { rowNum } from "@/utils/index";
+  import statementAccountForm from "./form.vue";
+  import { getRemain } from "@/api/business/entrust/deposit";
+  // import companyForm from "./form"
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const statementAccountFormRef = ref(null);
+
+  const totalRemain = ref(0);
+  const donateRemain = ref(0);
+
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    orderByColumn: "create_time",
+    companyName: "",
+    noContract: 0,
+  });
 
-/***********************  方法区  ****************************/
+  const editStatus = {
+    startMonth: false,
+  };
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  Promise.all([listDeduct(queryParams.value), getRemain()]).then((res) => {
-    orderList.value = res[0].rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(res[0].rows);
-    total.value = res[0].total;
-    totalRemain.value = res[1].data.totalRemain;
-    donateRemain.value = res[1].data.donateRemain;
-    loading.value = false;
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    Promise.all([listDeduct(queryParams.value), getRemain()]).then((res) => {
+      orderList.value = res[0].rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(res[0].rows);
+      total.value = res[0].total;
+      totalRemain.value = res[1].data.totalRemain;
+      donateRemain.value = res[1].data.donateRemain;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delDeduct(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delDeduct(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportDeduct(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportDeduct(queryParams.value);
+  }
 
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
 
-function saveHandler(row, field) {
-  const index = prev.value.findIndex((l) => l.id === row.id);
-  if (prev.value[index][field] === row[field]) {
-    row.editStatus[field] = !row.editStatus[field];
-  } else {
-    proxy.$modal
-      .confirm("确定修改起始月么?")
-      .then((_) => {
-        updateDeduct(row).then((res) => {
-          getList();
-        });
-      })
-      .catch((_) => {});
+  function saveHandler(row, field) {
+    const index = prev.value.findIndex((l) => l.id === row.id);
+    if (prev.value[index][field] === row[field]) {
+      row.editStatus[field] = !row.editStatus[field];
+    } else {
+      proxy.$modal
+        .confirm("确定修改起始月么?")
+        .then((_) => {
+          updateDeduct(row).then((res) => {
+            getList();
+          });
+        })
+        .catch((_) => { });
+    }
   }
-}
 
-function handleDetail(row) {}
+  function handleDetail(row) { }
 
-function handleStatementAccount(row) {
-  statementAccountFormRef.value.open(row.id);
-}
+  function handleStatementAccount(row) {
+    statementAccountFormRef.value.open(row.id);
+  }
 
-getList();
+  getList();
 </script>
 <style>
-.dashboard-total-item {
-  display: flex;
-  align-items: center;
-  padding: 0 24px;
-  height: 80px;
-  background-color: #fff;
-  font-size: 16px;
-  justify-content: space-between;
-}
+  .dashboard-total-item {
+    display: flex;
+    align-items: center;
+    padding: 0 24px;
+    height: 80px;
+    background-color: #fff;
+    font-size: 16px;
+    justify-content: space-between;
+  }
 </style>

+ 153 - 211
src/views/business/entrust/deductOfFactory/index.vue

@@ -2,104 +2,48 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="success"
-        size="small"
-        icon="Refresh"
-        @click="getList"
-        v-hasPermi="['business:entrustOrder:remove']"
-        >刷新</el-button
-      >
+      <el-button type="success" size="small" icon="Refresh" @click="getList"
+        v-hasPermi="['business:entrustOrder:remove']">刷新</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:entrustOrder:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-if="viewAdviser('business:entrustOrder:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-      @submit.native.prevent
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px" @submit.native.prevent>
       <el-form-item label="往来单位:" prop="contactCompany">
-        <el-input
-          v-model="queryParams.contactCompany"
-          placeholder="请输入往来单位"
-          clearable
-          @keyup.enter="handleQuery"
-          style="width: 150px"
-        />
+        <el-input v-model="queryParams.contactCompany" placeholder="请输入往来单位" clearable @keyup.enter="handleQuery"
+          style="width: 150px" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="签约日期"
-        align="center"
-        prop="formDate"
-        width="150"
-      />
-      <el-table-column
-        label="合同编号"
-        align="center"
-        prop="formNo"
-        width="120"
-      >
+      <el-table-column label="签约日期" align="center" prop="formDate" width="150" />
+      <el-table-column label="合同编号" align="center" prop="formNo" width="120">
       </el-table-column>
-      <el-table-column
-        label="往来单位"
-        align="center"
-        prop="contactCompany"
-        width="140"
-      >
+      <el-table-column label="往来单位" align="center" prop="contactCompany" width="140">
       </el-table-column>
-      <el-table-column
-        label="预存金额"
-        prop="depositAmount"
-        align="center"
-        width="100"
-      >
+      <el-table-column label="预存金额" prop="depositAmount" align="center" width="100">
         <template #default="scope">
           <span>{{ rowNum(scope.row.depositAmount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="结余金额"
-        prop="remainAmount"
-        align="center"
-        width="100"
-      >
+      <el-table-column label="结余金额" prop="remainAmount" align="center" width="100">
         <template #default="scope">
           <span>{{ rowNum(scope.row.remainAmount) }}</span>
         </template>
@@ -114,151 +58,149 @@
     </el-table>
     <entrust-order-form ref="entrustOrderFormRef" :getList="getList" />
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="General">
-import {
-  listEntrustOrder,
-  exportEntrustOrder,
-  delEntrustOrder,
-  confirmEntrustOrder,
-  finishedEntrustOrder,
-} from "@/api/business/entrust/entrustOrder";
-import { rowNum } from "@/utils/index";
-import useUserStore from "@/store/modules/user";
-import entrustOrderForm from "./form";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const selections = ref([]);
-const single = ref(false);
-const multiple = ref(false);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const total = ref(0);
-const prev = ref([]);
-const entrustOrderFormRef = ref(null);
-
-const setEntrustDialogRef = ref(null);
-
-const { entrust_order_status } = proxy.useDict("entrust_order_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  contactCompany: "",
-  type: 2,
-});
-
-const editStatus = {
-  startMonth: false,
-};
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listEntrustOrder(queryParams.value).then((response) => {
-    list.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  import {
+    listEntrustOrder,
+    exportEntrustOrder,
+    delEntrustOrder,
+    confirmEntrustOrder,
+    finishedEntrustOrder,
+  } from "@/api/business/entrust/entrustOrder";
+  import { rowNum } from "@/utils/index";
+  import useUserStore from "@/store/modules/user";
+  import entrustOrderForm from "./form";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const selections = ref([]);
+  const single = ref(false);
+  const multiple = ref(false);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const total = ref(0);
+  const prev = ref([]);
+  const entrustOrderFormRef = ref(null);
+
+  const setEntrustDialogRef = ref(null);
+
+  const { entrust_order_status } = proxy.useDict("entrust_order_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    contactCompany: "",
+    type: 2,
   });
-}
-
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
-  single.value = selection.length != 1;
-  multiple.value = selection.length > 0;
-}
+  const editStatus = {
+    startMonth: false,
+  };
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportEntrustOrder(queryParams.value);
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  entrustOrderFormRef.value.open();
-}
-
-function handleUpdate(id) {
-  entrustOrderFormRef.value.open(id);
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delEntrustOrder(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
-
-function handleConfirm(row) {
-  proxy.$modal
-    .confirm("确认启用该合同?")
-    .then((_) => {
-      return confirmEntrustOrder(row);
-    })
-    .then((res) => {
-      console.log(res);
-      getList();
-      proxy.$modal.msgSuccess("确认成功");
-    });
-}
-
-function handleFinished(row) {
-  proxy.$modal
-    .confirm("确认完结该合同?")
-    .then((_) => {
-      return finishedEntrustOrder(row);
-    })
-    .then((res) => {
-      console.log(res);
-      getList();
-      proxy.$modal.msgSuccess("完结成功");
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listEntrustOrder(queryParams.value).then((response) => {
+      list.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
     });
-}
+  }
+
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
+  }
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
+    single.value = selection.length != 1;
+    multiple.value = selection.length > 0;
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportEntrustOrder(queryParams.value);
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd() {
+    entrustOrderFormRef.value.open();
+  }
+
+  function handleUpdate(id) {
+    entrustOrderFormRef.value.open(id);
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delEntrustOrder(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  function handleConfirm(row) {
+    proxy.$modal
+      .confirm("确认启用该合同?")
+      .then((_) => {
+        return confirmEntrustOrder(row);
+      })
+      .then((res) => {
+        console.log(res);
+        getList();
+        proxy.$modal.msgSuccess("确认成功");
+      });
+  }
+
+  function handleFinished(row) {
+    proxy.$modal
+      .confirm("确认完结该合同?")
+      .then((_) => {
+        return finishedEntrustOrder(row);
+      })
+      .then((res) => {
+        console.log(res);
+        getList();
+        proxy.$modal.msgSuccess("完结成功");
+      });
+  }
+
+  function handleViewAccountment(row) { }
 
-function handleViewAccountment(row) {}
-
-getList();
-</script>
+  getList();
+</script>

+ 315 - 493
src/views/business/entrust/deposit/index.vue

@@ -2,192 +2,75 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-hasPermi="['business:deposit:add']"
-        >新增</el-button
-      >
-      <el-button
-        type="danger"
-        size="small"
-        icon="Delete"
-        :disabled="multiple"
-        @click="handleDelete"
-        v-hasPermi="['business:deposit:remove']"
-        >删除</el-button
-      >
-      <el-button
-        type="success"
-        size="small"
-        icon="Refresh"
-        @click="getList"
-        v-hasPermi="['business:deposit:list']"
-        >刷新</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
+        v-hasPermi="['business:deposit:add']">新增</el-button>
+      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
+        v-hasPermi="['business:deposit:remove']">删除</el-button>
+      <el-button type="success" size="small" icon="Refresh" @click="getList"
+        v-hasPermi="['business:deposit:list']">刷新</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:deposit:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-if="viewAdviser('business:deposit:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="日期"
-        align="center"
-        prop="depositDate"
-        min-width="200"
-      />
-      <el-table-column
-        label="委托单号"
-        align="center"
-        prop="formNo"
-        min-width="120"
-      />
-      <el-table-column
-        label="预存单位"
-        align="center"
-        prop="contactCompany"
-        min-width="150"
-      />
-      <el-table-column
-        label="签约主体"
-        align="center"
-        prop="signingSubject"
-        min-width="150"
-      />
-      <el-table-column
-        label="金额"
-        header-align="center"
-        align="right"
-        prop="amount"
-        width="120"
-      >
+      <el-table-column label="日期" align="center" prop="depositDate" min-width="200" />
+      <el-table-column label="委托单号" align="center" prop="formNo" min-width="120" />
+      <el-table-column label="预存单位" align="center" prop="contactCompany" min-width="150" />
+      <el-table-column label="签约主体" align="center" prop="signingSubject" min-width="150" />
+      <el-table-column label="金额" header-align="center" align="right" prop="amount" width="120">
         <template #default="scope">
           <span>{{ rowNum(scope.row.amount) }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column
-        label="审核状态"
-        align="center"
-        min-width="80"
-        prop="remark"
-      >
+      <el-table-column label="审核状态" align="center" min-width="80" prop="remark">
         <template #default="scope">
           <dict-tag :options="verify_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        prop="verifyStatus"
-        min-width="200"
-      >
+      <el-table-column label="操作" align="center" prop="verifyStatus" min-width="200">
         <template #default="scope">
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="warning"
-            size="small"
-            @click="handleInfo(scope.row)"
-            v-hasPermi="['business:deposit:edit']"
-            >修改</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="danger"
-            size="small"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['business:deposit:remove']"
-            >删除</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="success"
-            size="small"
-            @click="handleVerify(scope.row, 1)"
-            v-hasPermi="['business:deposit:verify']"
-            >审核通过</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="danger"
-            size="small"
-            @click="handleVerify(scope.row, 4)"
-            v-hasPermi="['business:deposit:verify']"
-            >驳回</el-button
-          >
-          <el-button
-            v-show="scope.row.status !== 0"
-            link
-            type="primary"
-            size="small"
-            @click="handleInfo(scope.row)"
-            v-hasPermi="['business:deposit:query']"
-            >查看</el-button
-          >
+          <el-button v-show="scope.row.status === 0" link type="warning" size="small" @click="handleInfo(scope.row)"
+            v-hasPermi="['business:deposit:edit']">修改</el-button>
+          <el-button v-show="scope.row.status === 0" link type="danger" size="small" @click="handleDelete(scope.row)"
+            v-hasPermi="['business:deposit:remove']">删除</el-button>
+          <el-button v-show="scope.row.status === 0" link type="success" size="small"
+            @click="handleVerify(scope.row, 1)" v-hasPermi="['business:deposit:verify']">审核通过</el-button>
+          <el-button v-show="scope.row.status === 0" link type="danger" size="small" @click="handleVerify(scope.row, 4)"
+            v-hasPermi="['business:deposit:verify']">驳回</el-button>
+          <el-button v-show="scope.row.status !== 0" link type="primary" size="small" @click="handleInfo(scope.row)"
+            v-hasPermi="['business:deposit:query']">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
     <!-- <Deposit-form ref="DepositRef" :get-list="getList" /> -->
-    <el-dialog
-      title="存款信息"
-      v-model="formOpen"
-      width="500px"
-      append-to-body
-      draggable
-      @close="formCancel"
-      :close-on-click-modal = "false"
-    >
+    <el-dialog title="存款信息" v-model="formOpen" width="500px" append-to-body draggable @close="formCancel"
+      :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" label-width="100" size="small">
         <el-row :gutter="30">
           <el-col :span="24">
             <el-form-item label="预存合同:">
-              <el-autocomplete
-                v-if="form.status == 0"
-                style="width: 60%"
-                :fetch-suggestions="querySearchEntrustOrderAsync"
-                :trigger-on-focus="true"
-                v-model="form.formNo"
-                placeholder="请输入客户名称"
-                popper-class="my-autocomplete"
-                @select="handleSelectEntrustOrder"
-              >
+              <el-autocomplete v-if="form.status == 0" style="width: 60%"
+                :fetch-suggestions="querySearchEntrustOrderAsync" :trigger-on-focus="true" v-model="form.formNo"
+                placeholder="请输入客户名称" popper-class="my-autocomplete" @select="handleSelectEntrustOrder">
                 <template #default="{ item }">
-                  <div
-                    style="
+                  <div style="
                       display: flex;
                       flex-direction: row;
                       justify-content: space-between;
-                    "
-                  >
+                    ">
                     <div class="name" style="font-size: 12px">
                       {{ item.formNo }}-{{ item.signingSubject }}
                     </div>
@@ -209,78 +92,32 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="存款金额:">
-              <el-input-number
-                style="width: 60%"
-                v-if="form.status == 0"
-                v-model="form.amount"
-                :precision="2"
-                :step="0.1"
-                :min="0"
-                :controls="false"
-              />
+              <el-input-number style="width: 60%" v-if="form.status == 0" v-model="form.amount" :precision="2"
+                :step="0.1" :min="0" :controls="false" />
               <div v-else>{{ rowNum(form.amount) }}</div>
             </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="凭证附件:">
               <div class="details-btns-container" style="display: flex">
-                <el-upload
-                  v-if="form.status == 0"
-                  action="#"
-                  :http-request="upload"
-                  :with-credentials="true"
-                  :show-file-list="false"
-                  multiple
-                >
-                  <el-button size="small" type="primary" icon="Upload"
-                    >点击上传</el-button
-                  >
+                <el-upload v-if="form.status == 0" action="#" :http-request="upload" :with-credentials="true"
+                  :show-file-list="false" multiple>
+                  <el-button size="small" type="primary" icon="Upload">点击上传</el-button>
                 </el-upload>
               </div>
-              <el-table
-                ref="filesTable"
-                :data="form.files"
-                size="small"
-                height="200px"
-                border
-                header-row-class-name="list-header-row"
-              >
-                <el-table-column
-                  type="index"
-                  label="序号"
-                  width="47"
-                  align="center"
-                />
-                <el-table-column
-                  label="文件名"
-                  prop="originalFileName"
-                  align="center"
-                >
+              <el-table ref="filesTable" :data="form.files" size="small" height="200px" border
+                header-row-class-name="list-header-row">
+                <el-table-column type="index" label="序号" width="47" align="center" />
+                <el-table-column label="文件名" prop="originalFileName" align="center">
                   <template #default="scope">
-                    <el-link
-                      :href="`${baseUrl}${scope.row.fileUrl}`"
-                      :underline="false"
-                      target="_blank"
-                      type="primary"
-                    >
+                    <el-link :href="`${baseUrl}${scope.row.fileUrl}`" :underline="false" target="_blank" type="primary">
                       {{ scope.row.originalFileName }}
                     </el-link>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  v-if="form.status == 0"
-                  label="操作"
-                  width="47"
-                  align="center"
-                >
+                <el-table-column v-if="form.status == 0" label="操作" width="47" align="center">
                   <template #default="scope">
-                    <el-button
-                      link
-                      size="small"
-                      type="danger"
-                      @click="handleDelFile(scope.$index)"
-                      >删除</el-button
-                    >
+                    <el-button link size="small" type="danger" @click="handleDelFile(scope.$index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -290,314 +127,299 @@
       </el-form>
       <template #footer>
         <div v-if="form.status == 0" class="dialog-footer">
-          <el-button
-            type="primary"
-            icon="Finished"
-            size="small"
-            @click="saveHandler"
-            >确 定</el-button
-          >
-          <el-button @click="formCancel" icon="close" size="small"
-            >取 消</el-button
-          >
+          <el-button type="primary" icon="Finished" size="small" @click="saveHandler">确 定</el-button>
+          <el-button @click="formCancel" icon="close" size="small">取 消</el-button>
         </div>
       </template>
     </el-dialog>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <el-image-viewer
-      v-if="showViewer"
-      :url-list="currentFileList"
-      @close="closeImages"
-      :initial-index="showIndex"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <el-image-viewer v-if="showViewer" :url-list="currentFileList" @close="closeImages" :initial-index="showIndex" />
   </div>
 </template>
 
 <script setup name="Deposit">
-import {
-  listDeposit,
-  delDeposit,
-  exportDeposit,
-  addDeposit,
-  getDeposit,
-  updateDeposit,
-  listEntrustOrder,
-  verifyDeposit,
-} from "@/api/business/entrust/deposit";
-import { rowNum } from "@/utils/index";
-import { uploadFile } from "@/api/tool/file";
-import { listCompany } from "@/api/business/crm/company";
-import useUserStore from "@/store/modules/user";
-import { ref } from "vue";
-// import DepositForm from "./form"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const formOpen = ref(false);
-
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  status: 0,
-  type: 1,
-  files: [],
-});
-
-const emptyForm = {
-  status: 0,
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 1,
-  remark: "",
-  files: [],
-};
-
-const { verify_status } = proxy.useDict("verify_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  orderByColumn: "create_time",
-  noContract: 1,
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listDeposit(queryParams.value).then((response) => {
-    orderList.value = response.rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  import {
+    listDeposit,
+    delDeposit,
+    exportDeposit,
+    addDeposit,
+    getDeposit,
+    updateDeposit,
+    listEntrustOrder,
+    verifyDeposit,
+  } from "@/api/business/entrust/deposit";
+  import { rowNum } from "@/utils/index";
+  import { uploadFile } from "@/api/tool/file";
+  import { listCompany } from "@/api/business/crm/company";
+  import useUserStore from "@/store/modules/user";
+  import { ref } from "vue";
+  // import DepositForm from "./form"
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const formOpen = ref(false);
+
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    status: 0,
+    type: 1,
+    files: [],
   });
-}
 
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  const emptyForm = {
+    status: 0,
+    id: null,
+    companyName: "",
+    companyId: null,
+    type: 1,
+    remark: "",
+    files: [],
+  };
+
+  const { verify_status } = proxy.useDict("verify_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    orderByColumn: "create_time",
+    noContract: 1,
+  });
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  // proxy.$refs.DepositRef.open();
-  formOpen.value = true;
-}
-
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
-
-function reset() {
-  form.value = proxy.deepClone(emptyForm);
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.DepositRef.open(id);
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delDeposit(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  exportDeposit(queryParams.value);
-}
-
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
-
-function handleSelectCompany(item) {
-  form.value.companyName = item.name;
-  form.value.companyId = item.id;
-}
-
-function saveHandler() {
-  if (
-    form.value.entrustOrderId == null ||
-    form.value.entrustOrderId === 0 ||
-    form.value.entrustOrderId === ""
-  ) {
-    proxy.$modal.msgError("请选择存款委托合同");
-    return;
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listDeposit(queryParams.value).then((response) => {
+      orderList.value = response.rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
   }
-  if (form.value.amount == null || form.value.amount === 0) {
-    proxy.$modal.msgError("请输入存款金额");
-    return;
+
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
   }
-  if (form.value.files.length === 0) {
-    proxy.$modal.msgError("请上传凭证附件");
-    return;
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
   }
-  if (form.value.id == null) {
-    addDeposit(form.value).then((res) => {
-      formCancel();
-      getList();
-    });
-  } else {
-    updateDeposit(form.value).then((res) => {
-      console.log("新增", form.value);
 
-      formCancel();
-      getList();
-    });
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
   }
-}
-
-function upload(param) {
-  const formData = new FormData();
-  formData.append("file", param.file);
-  uploadFile(formData).then((res) => {
-    if (res.code === 200) {
-      const file = {};
-      file.fileName = res.newFileName;
-      file.url = res.url;
-      file.originalFileName = res.originalFilename;
-      file.fileUrl = res.fileName;
-      form.value.files.push(file);
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // proxy.$refs.DepositRef.open();
+    formOpen.value = true;
+  }
+
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
+
+  function reset() {
+    form.value = proxy.deepClone(emptyForm);
+  }
+
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    // const id = row.id || ids.value;
+    // proxy.$refs.DepositRef.open(id);
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delDeposit(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportDeposit(queryParams.value);
+  }
+
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
+
+  function handleSelectCompany(item) {
+    form.value.companyName = item.name;
+    form.value.companyId = item.id;
+  }
+
+  function saveHandler() {
+    if (
+      form.value.entrustOrderId == null ||
+      form.value.entrustOrderId === 0 ||
+      form.value.entrustOrderId === ""
+    ) {
+      proxy.$modal.msgError("请选择存款委托合同");
+      return;
     }
-  });
-}
-
-function openFollowFile(arg) {
-  // console.log(arg)
-  const attach = arg;
-  window.open(`${arg.url}`, arg.fileName);
-}
-
-function showFileList(row) {
-  currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
-  showViewer.value = true;
-}
-
-function closeImages() {
-  showViewer.value = false;
-}
-
-function querySearchEntrustOrderAsync(queryString, cb) {
-  const query =
-    queryString.length > 0
-      ? {
+    if (form.value.amount == null || form.value.amount === 0) {
+      proxy.$modal.msgError("请输入存款金额");
+      return;
+    }
+    if (form.value.files.length === 0) {
+      proxy.$modal.msgError("请上传凭证附件");
+      return;
+    }
+    if (form.value.id == null) {
+      addDeposit(form.value).then((res) => {
+        formCancel();
+        getList();
+      });
+    } else {
+      updateDeposit(form.value).then((res) => {
+        console.log("新增", form.value);
+
+        formCancel();
+        getList();
+      });
+    }
+  }
+
+  function upload(param) {
+    const formData = new FormData();
+    formData.append("file", param.file);
+    uploadFile(formData).then((res) => {
+      if (res.code === 200) {
+        const file = {};
+        file.fileName = res.newFileName;
+        file.url = res.url;
+        file.originalFileName = res.originalFilename;
+        file.fileUrl = res.fileName;
+        form.value.files.push(file);
+      }
+    });
+  }
+
+  function openFollowFile(arg) {
+    // console.log(arg)
+    const attach = arg;
+    window.open(`${arg.url}`, arg.fileName);
+  }
+
+  function showFileList(row) {
+    currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
+    showViewer.value = true;
+  }
+
+  function closeImages() {
+    showViewer.value = false;
+  }
+
+  function querySearchEntrustOrderAsync(queryString, cb) {
+    const query =
+      queryString.length > 0
+        ? {
           keyword: queryString,
           pageSize: 20,
           pageNum: 1,
           status: 1,
           orderByColumn: "create_time",
         }
-      : { pageSize: 20, pageNum: 1, status: 1, orderByColumn: "create_time" };
-  listEntrustOrder(query).then((res) => {
-    cb(res.rows);
-  });
-}
-
-function handleSelectEntrustOrder(item) {
-  form.value.formNo = item.formNo;
-  form.value.tenantId = item.tenantId;
-  form.value.fromTenantId = item.fromTenantId;
-  form.value.entrustOrderId = item.id;
-  form.value.signingSubject = item.signingSubject;
-  form.value.contactCompany = item.contactCompany;
-}
-
-function handleInfo(row) {
-  formOpen.value = true;
-  getForm(row.id);
-}
-
-function getForm(id) {
-  getDeposit(id).then((res) => {
-    form.value = res.data;
-    if (form.value == null) {
-      reset();
-    }
-  });
-}
-
-function handleVerify(row, status) {
-  proxy.$modal
-    .confirm(`确认${status === 1 ? "审核通过" : "驳回"}么?`)
-    .then((_) => {
-      const saveValue = proxy.deepClone(row);
-      saveValue.status = status;
-      return verifyDeposit(saveValue);
-    })
-    .then((res) => {
-      getList();
+        : { pageSize: 20, pageNum: 1, status: 1, orderByColumn: "create_time" };
+    listEntrustOrder(query).then((res) => {
+      cb(res.rows);
+    });
+  }
+
+  function handleSelectEntrustOrder(item) {
+    form.value.formNo = item.formNo;
+    form.value.tenantId = item.tenantId;
+    form.value.fromTenantId = item.fromTenantId;
+    form.value.entrustOrderId = item.id;
+    form.value.signingSubject = item.signingSubject;
+    form.value.contactCompany = item.contactCompany;
+  }
+
+  function handleInfo(row) {
+    formOpen.value = true;
+    getForm(row.id);
+  }
+
+  function getForm(id) {
+    getDeposit(id).then((res) => {
+      form.value = res.data;
+      if (form.value == null) {
+        reset();
+      }
     });
-}
+  }
 
-function handleDelFile(index) {
-  form.value.files.splice(index, 1);
-}
+  function handleVerify(row, status) {
+    proxy.$modal
+      .confirm(`确认${status === 1 ? "审核通过" : "驳回"}么?`)
+      .then((_) => {
+        const saveValue = proxy.deepClone(row);
+        saveValue.status = status;
+        return verifyDeposit(saveValue);
+      })
+      .then((res) => {
+        getList();
+      });
+  }
 
-getList();
+  function handleDelFile(index) {
+    form.value.files.splice(index, 1);
+  }
+
+  getList();
 </script>
-<style></style>
+<style></style>

+ 315 - 456
src/views/business/entrust/depositOfFactory/index.vue

@@ -2,72 +2,30 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="success"
-        size="small"
-        icon="Refresh"
-        @click="getList"
-        v-hasPermi="['business:entrustOrder:remove']"
-        >刷新</el-button
-      >
+      <el-button type="success" size="small" icon="Refresh" @click="getList"
+        v-hasPermi="['business:entrustOrder:remove']">刷新</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:deposit:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-if="viewAdviser('business:deposit:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        align="center"
-        type="index"
-        label="序号"
-        width="50"
-      ></el-table-column>
-      <el-table-column
-        label="日期"
-        align="center"
-        prop="depositDate"
-        width="200"
-      />
-      <el-table-column
-        label="委托单号"
-        align="center"
-        prop="formNo"
-        width="120"
-      />
-      <el-table-column
-        label="预存单位"
-        align="center"
-        prop="contactCompany"
-        width="120"
-      />
-      <el-table-column
-        label="签约主体"
-        align="center"
-        prop="signingSubject"
-        width="120"
-      />
+      <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
+      <el-table-column label="日期" align="center" prop="depositDate" width="200" />
+      <el-table-column label="委托单号" align="center" prop="formNo" width="120" />
+      <el-table-column label="预存单位" align="center" prop="contactCompany" width="120" />
+      <el-table-column label="签约主体" align="center" prop="signingSubject" width="120" />
       <el-table-column label="金额" align="center" prop="amount" width="120">
         <template #default="scope">
           <span>{{ rowNum(scope.row.amount) }}</span>
@@ -75,13 +33,7 @@
       </el-table-column>
       <el-table-column label="附件" align="center" prop="files">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="showFileList(scope.row)"
-            >查看</el-button
-          >
+          <el-button link type="primary" size="small" @click="showFileList(scope.row)">查看</el-button>
         </template>
       </el-table-column>
       <el-table-column label="审核状态" align="center" width="80" prop="remark">
@@ -89,74 +41,33 @@
           <dict-tag :options="verify_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        prop="verifyStatus"
-        width="200"
-      >
+      <el-table-column label="操作" align="center" prop="verifyStatus" width="200">
         <template #default="scope">
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="warning"
-            size="small"
-            @click="handleVerify(scope.row, 1)"
-            v-hasPermi="['business:deposit:verify']"
-            >审核通过</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="danger"
-            size="small"
-            @click="handleVerify(scope.row, 4)"
-            v-hasPermi="['business:deposit:verify']"
-            >驳回</el-button
-          >
-          <el-button
-            v-show="scope.row.status !== 0"
-            link
-            type="success"
-            size="small"
-            @click="handleInfo(scope.row)"
-            v-hasPermi="['business:deposit:info']"
-            >查看</el-button
-          >
+          <el-button v-show="scope.row.status === 0" link type="warning" size="small"
+            @click="handleVerify(scope.row, 1)" v-hasPermi="['business:deposit:verify']">审核通过</el-button>
+          <el-button v-show="scope.row.status === 0" link type="danger" size="small" @click="handleVerify(scope.row, 4)"
+            v-hasPermi="['business:deposit:verify']">驳回</el-button>
+          <el-button v-show="scope.row.status !== 0" link type="success" size="small" @click="handleInfo(scope.row)"
+            v-hasPermi="['business:deposit:info']">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
     <!-- <Deposit-form ref="DepositRef" :get-list="getList" /> -->
-    <el-dialog
-      title="存款信息"
-      v-model="formOpen"
-      width="500px"
-      append-to-body
-      draggable
-      @close="formCancel"
-      :close-on-click-modal = "false"
-    >
+    <el-dialog title="存款信息" v-model="formOpen" width="500px" append-to-body draggable @close="formCancel"
+      :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" label-width="100" size="small">
         <el-row :gutter="30">
           <el-col :span="24">
             <el-form-item label="预存合同:">
-              <el-autocomplete
-                v-if="form.status !== 1"
-                :fetch-suggestions="querySearchEntrustOrderAsync"
-                :trigger-on-focus="true"
-                v-model="form.formNo"
-                placeholder="请输入客户名称"
-                popper-class="my-autocomplete"
-                @select="handleSelectEntrustOrder"
-              >
+              <el-autocomplete v-if="form.status !== 1" :fetch-suggestions="querySearchEntrustOrderAsync"
+                :trigger-on-focus="true" v-model="form.formNo" placeholder="请输入客户名称" popper-class="my-autocomplete"
+                @select="handleSelectEntrustOrder">
                 <template #default="{ item }">
-                  <div
-                    style="
+                  <div style="
                       display: flex;
                       flex-direction: row;
                       justify-content: space-between;
-                    "
-                  >
+                    ">
                     <div class="name" style="font-size: 12px">
                       {{ item.formNo }}-{{ item.signingSubject }}
                     </div>
@@ -178,75 +89,30 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="存款金额:">
-              <el-input-number
-                v-if="form.status !== 1"
-                v-model="form.amount"
-                :precision="2"
-                :step="0.1"
-                :min="0"
-                :controls="false"
-              />
+              <el-input-number v-if="form.status !== 1" v-model="form.amount" :precision="2" :step="0.1" :min="0"
+                :controls="false" />
               <div v-else>{{ form.amount }}</div>
             </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="凭证附件:">
               <div class="details-btns-container" style="display: flex">
-                <el-upload
-                  v-if="form.status !== 1"
-                  action="#"
-                  :http-request="upload"
-                  :with-credentials="true"
-                  :show-file-list="false"
-                  multiple
-                >
-                  <el-button size="small" type="primary" icon="Upload"
-                    >点击上传</el-button
-                  >
+                <el-upload v-if="form.status !== 1" action="#" :http-request="upload" :with-credentials="true"
+                  :show-file-list="false" multiple>
+                  <el-button size="small" type="primary" icon="Upload">点击上传</el-button>
                 </el-upload>
               </div>
-              <el-table
-                ref="filesTable"
-                :data="form.files"
-                size="small"
-                height="200px"
-                border
-                header-row-class-name="list-header-row"
-              >
-                <el-table-column
-                  v-if="form.status !== 1"
-                  label="操作"
-                  width="47"
-                  align="center"
-                >
+              <el-table ref="filesTable" :data="form.files" size="small" height="200px" border
+                header-row-class-name="list-header-row">
+                <el-table-column v-if="form.status !== 1" label="操作" width="47" align="center">
                   <template #default="scope">
-                    <el-button
-                      icon="Minus"
-                      size="small"
-                      circle
-                      type="danger"
-                      @click="handleDelFile(scope.$index)"
-                    />
+                    <el-button icon="Minus" size="small" circle type="danger" @click="handleDelFile(scope.$index)" />
                   </template>
                 </el-table-column>
-                <el-table-column
-                  type="index"
-                  label="序号"
-                  width="47"
-                  align="center"
-                />
-                <el-table-column
-                  label="文件名"
-                  prop="originalFileName"
-                  align="center"
-                >
+                <el-table-column type="index" label="序号" width="47" align="center" />
+                <el-table-column label="文件名" prop="originalFileName" align="center">
                   <template #default="scope">
-                    <el-link
-                      :href="`${baseUrl}${scope.row.fileUrl}`"
-                      :underline="false"
-                      target="_blank"
-                      type="primary"
-                    >
+                    <el-link :href="`${baseUrl}${scope.row.fileUrl}`" :underline="false" target="_blank" type="primary">
                       {{ scope.row.originalFileName }}
                     </el-link>
                   </template>
@@ -264,307 +130,300 @@
       </template>
     </el-dialog>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
     <free-amount-dialog ref="freeAmountDialogRef" :get-list="getList" />
-    <el-image-viewer
-      v-if="showViewer"
-      :url-list="currentFileList"
-      @close="closeImages"
-      :initial-index="showIndex"
-    />
+    <el-image-viewer v-if="showViewer" :url-list="currentFileList" @close="closeImages" :initial-index="showIndex" />
   </div>
 </template>
 
 <script setup name="PrevDeposit">
-// import contractForm from "./form";
-import {
-  listDeposit,
-  delDeposit,
-  exportDeposit,
-  addDeposit,
-  getDeposit,
-  updateDeposit,
-  listEntrustOrder,
-  verifyDeposit,
-} from "@/api/business/entrust/deposit";
-// import ElImageViewer from 'element-plus/lib/components/image-viewer';
-import freeAmountDialog from "./freeAmountDialog.vue";
-import { uploadFile } from "@/api/tool/file";
-import { rowNum } from "@/utils/index";
-import { listCompany } from "@/api/business/crm/company";
-import useUserStore from "@/store/modules/user";
-import { ref } from "vue";
-// import DepositForm from "./form"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
-const freeAmountDialogRef = ref(null);
-
-const formOpen = ref(false);
-
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  type: 1,
-  files: [],
-});
-
-const emptyForm = {
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 1,
-  remark: "",
-  files: [],
-};
-
-const { verify_status } = proxy.useDict("verify_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  noContract: 1,
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listDeposit(queryParams.value).then((response) => {
-    orderList.value = response.rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  // import contractForm from "./form";
+  import {
+    listDeposit,
+    delDeposit,
+    exportDeposit,
+    addDeposit,
+    getDeposit,
+    updateDeposit,
+    listEntrustOrder,
+    verifyDeposit,
+  } from "@/api/business/entrust/deposit";
+  // import ElImageViewer from 'element-plus/lib/components/image-viewer';
+  import freeAmountDialog from "./freeAmountDialog.vue";
+  import { uploadFile } from "@/api/tool/file";
+  import { rowNum } from "@/utils/index";
+  import { listCompany } from "@/api/business/crm/company";
+  import useUserStore from "@/store/modules/user";
+  import { ref } from "vue";
+  // import DepositForm from "./form"
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
+  const freeAmountDialogRef = ref(null);
+
+  const formOpen = ref(false);
+
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    type: 1,
+    files: [],
   });
-}
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  // proxy.$refs.DepositRef.open();
-  formOpen.value = true;
-}
-
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
-
-function reset() {
-  form.value = proxy.deepClone(emptyForm);
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.DepositRef.open(id);
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delDeposit(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportDeposit(queryParams.value);
-}
-
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
-
-function handleSelectCompany(item) {
-  form.value.companyName = item.name;
-  form.value.companyId = item.id;
-}
-
-function saveHandler() {
-  if (
-    form.value.entrustOrderId == null ||
-    form.value.entrustOrderId === 0 ||
-    form.value.entrustOrderId === ""
-  ) {
-    proxy.$modal.msgError("请选择存款委托合同");
-    return;
+  const emptyForm = {
+    id: null,
+    companyName: "",
+    companyId: null,
+    type: 1,
+    remark: "",
+    files: [],
+  };
+
+  const { verify_status } = proxy.useDict("verify_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    noContract: 1,
+  });
+
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listDeposit(queryParams.value).then((response) => {
+      orderList.value = response.rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
   }
-  if (form.value.amount == null || form.value.amount === 0) {
-    proxy.$modal.msgError("请输入存款金额");
-    return;
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
   }
-  if (form.value.files.length === 0) {
-    proxy.$modal.msgError("请上传凭证附件");
-    return;
+
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
   }
-  if (form.value.id == null) {
-    addDeposit(form.value).then((res) => {
-      formCancel();
-      getList();
-    });
-  } else {
-    updateDeposit(form.value).then((res) => {
-      console.log("新增", form.value);
 
-      formCancel();
-      getList();
-    });
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
   }
-}
-
-function upload(param) {
-  const formData = new FormData();
-  formData.append("file", param.file);
-  uploadFile(formData).then((res) => {
-    if (res.code === 200) {
-      const file = {};
-      file.fileName = res.newFileName;
-      file.url = res.url;
-      file.originalFileName = res.originalFilename;
-      file.fileUrl = res.fileName;
-      form.value.files.push(file);
-    }
-  });
-}
-
-function openFollowFile(arg) {
-  // console.log(arg)
-  const attach = arg;
-  window.open(`${arg.url}`, arg.fileName);
-}
-
-function showFileList(row) {
-  currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
-  showViewer.value = true;
-}
-
-function closeImages() {
-  showViewer.value = false;
-}
-
-function querySearchEntrustOrderAsync(queryString, cb) {
-  const query =
-    queryString.length > 0
-      ? { keyword: queryString, pageSize: 20, pageNum: 1, status: 1 }
-      : { pageSize: 20, pageNum: 1, status: 1 };
-  listEntrustOrder(query).then((res) => {
-    cb(res.rows);
-  });
-}
-
-function handleSelectEntrustOrder(item) {
-  form.value.formNo = item.formNo;
-  form.value.tenantId = item.tenantId;
-  form.value.fromTenantId = item.fromTenantId;
-  form.value.entrustOrderId = item.id;
-  form.value.signingSubject = item.signingSubject;
-  form.value.contactCompany = item.contactCompany;
-}
-
-function handleInfo(row) {
-  formOpen.value = true;
-  getForm(row.id);
-}
-
-function getForm(id) {
-  getDeposit(id).then((res) => {
-    form.value = res.data;
-    if (form.value == null) {
-      reset();
-    }
-  });
-}
 
-function handleVerify(row, status) {
-  if (status === 1) {
-    freeAmountDialogRef.value.open(row);
-  } else {
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // proxy.$refs.DepositRef.open();
+    formOpen.value = true;
+  }
+
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
+
+  function reset() {
+    form.value = proxy.deepClone(emptyForm);
+  }
+
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    // const id = row.id || ids.value;
+    // proxy.$refs.DepositRef.open(id);
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
     proxy.$modal
-      .confirm(`确认${status === 1 ? "审核通过" : "驳回"}么?`)
-      .then((_) => {
-        const saveValue = proxy.deepClone(row);
-        saveValue.status = status;
-        return verifyDeposit(saveValue);
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delDeposit(_ids);
       })
-      .then((res) => {
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    // proxy.download(
+    //   "business/archive/order/export",
+    //   {
+    //     ...queryParams.value,
+    //   },
+    //   `合同导出_${new Date().getTime()}.xlsx`
+    // );
+    exportDeposit(queryParams.value);
+  }
+
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
+
+  function handleSelectCompany(item) {
+    form.value.companyName = item.name;
+    form.value.companyId = item.id;
+  }
+
+  function saveHandler() {
+    if (
+      form.value.entrustOrderId == null ||
+      form.value.entrustOrderId === 0 ||
+      form.value.entrustOrderId === ""
+    ) {
+      proxy.$modal.msgError("请选择存款委托合同");
+      return;
+    }
+    if (form.value.amount == null || form.value.amount === 0) {
+      proxy.$modal.msgError("请输入存款金额");
+      return;
+    }
+    if (form.value.files.length === 0) {
+      proxy.$modal.msgError("请上传凭证附件");
+      return;
+    }
+    if (form.value.id == null) {
+      addDeposit(form.value).then((res) => {
+        formCancel();
         getList();
       });
+    } else {
+      updateDeposit(form.value).then((res) => {
+        console.log("新增", form.value);
+
+        formCancel();
+        getList();
+      });
+    }
+  }
+
+  function upload(param) {
+    const formData = new FormData();
+    formData.append("file", param.file);
+    uploadFile(formData).then((res) => {
+      if (res.code === 200) {
+        const file = {};
+        file.fileName = res.newFileName;
+        file.url = res.url;
+        file.originalFileName = res.originalFilename;
+        file.fileUrl = res.fileName;
+        form.value.files.push(file);
+      }
+    });
+  }
+
+  function openFollowFile(arg) {
+    // console.log(arg)
+    const attach = arg;
+    window.open(`${arg.url}`, arg.fileName);
+  }
+
+  function showFileList(row) {
+    currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
+    showViewer.value = true;
+  }
+
+  function closeImages() {
+    showViewer.value = false;
+  }
+
+  function querySearchEntrustOrderAsync(queryString, cb) {
+    const query =
+      queryString.length > 0
+        ? { keyword: queryString, pageSize: 20, pageNum: 1, status: 1 }
+        : { pageSize: 20, pageNum: 1, status: 1 };
+    listEntrustOrder(query).then((res) => {
+      cb(res.rows);
+    });
+  }
+
+  function handleSelectEntrustOrder(item) {
+    form.value.formNo = item.formNo;
+    form.value.tenantId = item.tenantId;
+    form.value.fromTenantId = item.fromTenantId;
+    form.value.entrustOrderId = item.id;
+    form.value.signingSubject = item.signingSubject;
+    form.value.contactCompany = item.contactCompany;
+  }
+
+  function handleInfo(row) {
+    formOpen.value = true;
+    getForm(row.id);
   }
-}
 
-function handleDelFile(index) {
-  form.value.files.splice(index, 1);
-}
+  function getForm(id) {
+    getDeposit(id).then((res) => {
+      form.value = res.data;
+      if (form.value == null) {
+        reset();
+      }
+    });
+  }
+
+  function handleVerify(row, status) {
+    if (status === 1) {
+      freeAmountDialogRef.value.open(row);
+    } else {
+      proxy.$modal
+        .confirm(`确认${status === 1 ? "审核通过" : "驳回"}么?`)
+        .then((_) => {
+          const saveValue = proxy.deepClone(row);
+          saveValue.status = status;
+          return verifyDeposit(saveValue);
+        })
+        .then((res) => {
+          getList();
+        });
+    }
+  }
+
+  function handleDelFile(index) {
+    form.value.files.splice(index, 1);
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 176 - 293
src/views/business/entrust/entrustOrder/index.vue

@@ -2,345 +2,228 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-show="handleVerifi()"
-        v-hasPermi="['business:entrustOrder:add']"
-        >新增</el-button
-      >
-      <el-button
-        type="danger"
-        size="small"
-        icon="Delete"
-        :disabled="!multiple"
-        @click="handleDelete"
-        v-hasPermi="['business:entrustOrder:remove']"
-        >删除</el-button
-      >
-      <el-button
-        type="success"
-        size="small"
-        icon="Refresh"
-        @click="getList"
-        v-hasPermi="['business:entrustOrder:remove']"
-        >刷新</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" @click="handleAdd" v-show="handleVerifi()"
+        v-hasPermi="['business:entrustOrder:add']">新增</el-button>
+      <el-button type="danger" size="small" icon="Delete" :disabled="!multiple" @click="handleDelete"
+        v-hasPermi="['business:entrustOrder:remove']">删除</el-button>
+      <el-button type="success" size="small" icon="Refresh" @click="getList"
+        v-hasPermi="['business:entrustOrder:remove']">刷新</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:entrustOrder:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:entrustOrder:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-      @submit.native.prevent
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px" @submit.native.prevent>
       <el-form-item label="往来单位:" prop="contactCompany">
-        <el-input
-          v-model="queryParams.contactCompany"
-          placeholder="请输入往来单位"
-          style="width: 150px"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.contactCompany" placeholder="请输入往来单位" style="width: 150px" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="签约主体"
-        align="center"
-        min-width="150"
-        prop="signingSubject"
-      />
-      <el-table-column
-        label="签约日期"
-        align="center"
-        prop="formDate"
-        min-width="80"
-      />
-      <el-table-column
-        label="合同编号"
-        align="center"
-        prop="formNo"
-        min-width="150"
-      >
+      <el-table-column label="签约主体" align="center" min-width="150" prop="signingSubject" />
+      <el-table-column label="签约日期" align="center" prop="formDate" min-width="80" />
+      <el-table-column label="合同编号" align="center" prop="formNo" min-width="150">
       </el-table-column>
-      <el-table-column
-        label="往来单位"
-        align="center"
-        prop="contactCompany"
-        min-width="150"
-      >
+      <el-table-column label="往来单位" align="center" prop="contactCompany" min-width="150">
       </el-table-column>
-      <el-table-column
-        label="预存金额"
-        prop="depositAmount"
-        header-align="center"
-        align="right"
-        min-width="80"
-      >
+      <el-table-column label="预存金额" prop="depositAmount" header-align="center" align="right" min-width="80">
         <template #default="scope">
           <span>{{ rowNum(scope.row.depositAmount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="结余金额"
-        prop="remainAmount"
-        header-align="center"
-        align="right"
-        min-width="80"
-        ><template #default="scope">
+      <el-table-column label="结余金额" prop="remainAmount" header-align="center" align="right" min-width="80"><template
+          #default="scope">
           <span>{{ rowNum(scope.row.remainAmount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="状态"
-        prop="status"
-        align="center"
-        minm-width="100"
-      >
+      <el-table-column label="状态" prop="status" align="center" minm-width="100">
         <template #default="scope">
           <dict-tag :options="entrust_order_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        min-width="150"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="操作" align="center" min-width="150" class-name="small-padding fixed-width">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="handleUpdate(scope.row.id)"
-            v-hasPermi="['business:entrustOrder:query']"
-            >详情</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="primary"
-            size="small"
-            @click="handleConfirm(scope.row)"
-            v-hasPermi="['business:entrustOrder:confirm']"
-            >确认订单</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 1"
-            link
-            type="primary"
-            size="small"
-            @click="handleFinished(scope.row)"
-            v-hasPermi="['business:entrustOrder:finished']"
-            >确认完结</el-button
-          >
-
-          <router-link
-            v-if="scope.row.status !== 0"
-            :to="'/entrust/statusment/order/' + scope.row.id"
-            class="link-type"
-          >
-            <el-button
-              link
-              size="small"
-              style="margin-left: 10px"
-              type="primary"
-              v-hasPermi="['business:entrustOrder:statement:list']"
-              >对账单列表</el-button
-            >
+          <el-button link type="primary" size="small" @click="handleUpdate(scope.row.id)"
+            v-hasPermi="['business:entrustOrder:query']">详情</el-button>
+          <el-button v-show="scope.row.status === 0" link type="primary" size="small" @click="handleConfirm(scope.row)"
+            v-hasPermi="['business:entrustOrder:confirm']">确认订单</el-button>
+          <el-button v-show="scope.row.status === 1" link type="primary" size="small" @click="handleFinished(scope.row)"
+            v-hasPermi="['business:entrustOrder:finished']">确认完结</el-button>
+
+          <router-link v-if="scope.row.status !== 0" :to="'/entrust/statusment/order/' + scope.row.id"
+            class="link-type">
+            <el-button link size="small" style="margin-left: 10px" type="primary"
+              v-hasPermi="['business:entrustOrder:statement:list']">对账单列表</el-button>
           </router-link>
         </template>
       </el-table-column>
     </el-table>
     <entrust-order-form ref="entrustOrderFormRef" :getList="getList" />
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="EntrustOrder">
-import {
-  listEntrustOrder,
-  exportEntrustOrder,
-  delEntrustOrder,
-  confirmEntrustOrder,
-  finishedEntrustOrder,
-} from "@/api/business/entrust/entrustOrder";
-import entrustOrderForm from "./form";
-import useUserStore from "@/store/modules/user";
-import { rowNum } from "@/utils/index";
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const selections = ref([]);
-const single = ref(false);
-const multiple = ref(false);
-const total = ref(0);
-const prev = ref([]);
-const entrustOrderFormRef = ref(null);
-
-const setEntrustDialogRef = ref(null);
-
-const { entrust_order_status } = proxy.useDict("entrust_order_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  contactCompany: "",
-  orderByColumn: "create_time",
-  type: 2,
-});
-
-const editStatus = {
-  startMonth: false,
-};
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listEntrustOrder(queryParams.value).then((response) => {
-    list.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  import {
+    listEntrustOrder,
+    exportEntrustOrder,
+    delEntrustOrder,
+    confirmEntrustOrder,
+    finishedEntrustOrder,
+  } from "@/api/business/entrust/entrustOrder";
+  import entrustOrderForm from "./form";
+  import useUserStore from "@/store/modules/user";
+  import { rowNum } from "@/utils/index";
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const selections = ref([]);
+  const single = ref(false);
+  const multiple = ref(false);
+  const total = ref(0);
+  const prev = ref([]);
+  const entrustOrderFormRef = ref(null);
+
+  const setEntrustDialogRef = ref(null);
+
+  const { entrust_order_status } = proxy.useDict("entrust_order_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    contactCompany: "",
+    orderByColumn: "create_time",
+    type: 2,
   });
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
 
-//验证当前版本
-function handleVerifi() {
-  return (
-    permissions.includes(all_permission) ||
-    useUserStore().tenant.versionId == "4"
-  );
-}
+  const editStatus = {
+    startMonth: false,
+  };
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
-  single.value = selection.length != 1;
-  multiple.value = selection.length > 0;
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  exportEntrustOrder(queryParams.value);
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  entrustOrderFormRef.value.open();
-}
-
-function handleUpdate(id) {
-  entrustOrderFormRef.value.open(id);
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delEntrustOrder(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
-
-function handleConfirm(row) {
-  proxy.$modal
-    .confirm("确认启用该合同?")
-    .then((_) => {
-      return confirmEntrustOrder(row);
-    })
-    .then((res) => {
-      console.log(res);
-      getList();
-      proxy.$modal.msgSuccess("确认成功");
-    });
-}
-
-function handleFinished(row) {
-  proxy.$modal
-    .confirm("确认完结该合同?")
-    .then((_) => {
-      return finishedEntrustOrder(row);
-    })
-    .then((res) => {
-      console.log(res);
-      getList();
-      proxy.$modal.msgSuccess("完结成功");
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listEntrustOrder(queryParams.value).then((response) => {
+      list.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
     });
-}
+  }
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
+
+  //验证当前版本
+  function handleVerifi() {
+    return (
+      permissions.includes(all_permission) ||
+      useUserStore().tenant.versionId == "4"
+    );
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
+    single.value = selection.length != 1;
+    multiple.value = selection.length > 0;
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportEntrustOrder(queryParams.value);
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd() {
+    entrustOrderFormRef.value.open();
+  }
+
+  function handleUpdate(id) {
+    entrustOrderFormRef.value.open(id);
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delEntrustOrder(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  function handleConfirm(row) {
+    proxy.$modal
+      .confirm("确认启用该合同?")
+      .then((_) => {
+        return confirmEntrustOrder(row);
+      })
+      .then((res) => {
+        console.log(res);
+        getList();
+        proxy.$modal.msgSuccess("确认成功");
+      });
+  }
+
+  function handleFinished(row) {
+    proxy.$modal
+      .confirm("确认完结该合同?")
+      .then((_) => {
+        return finishedEntrustOrder(row);
+      })
+      .then((res) => {
+        console.log(res);
+        getList();
+        proxy.$modal.msgSuccess("完结成功");
+      });
+  }
+
+  function handleViewAccountment(row) { }
 
-function handleViewAccountment(row) {}
-
-getList();
-</script>
+  getList();
+</script>

+ 210 - 282
src/views/business/entrust/statementAccount/index.vue

@@ -1,59 +1,26 @@
 <template>
   <div class="page-container list-container">
     <div class="list-btns-container">
-      <el-button
-        v-show="info.status !== 2"
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-hasPermi="['business:deduct:add']"
-        >生成新对账单</el-button
-      >
+      <el-button v-show="info.status !== 2" type="primary" size="small" icon="Plus" @click="handleAdd"
+        v-hasPermi="['business:deduct:add']">生成新对账单</el-button>
 
       <el-button size="small" icon="Close" @click="handleClose">关闭</el-button>
     </div>
 
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="对账日期:" size="small" prop="dictLabel">
-        <el-date-picker
-          clearable
-          size="small"
-          v-model="queryParams.formDate"
-          type="date"
-          value-format="YYYY-MM-DD"
-          placeholder="请选择签约日期"
-        ></el-date-picker>
+        <el-date-picker clearable size="small" v-model="queryParams.formDate" type="date" value-format="YYYY-MM-DD"
+          placeholder="请选择签约日期"></el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button
-          type="primary"
-          size="small"
-          icon="Search"
-          @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="Refresh" size="small" @click="resetQuery"
-          >重置</el-button
-        >
+        <el-button type="primary" size="small" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" size="small" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-table
-      v-loading="loading"
-      :data="dataList"
-      height="100%"
-      size="small"
-      border
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="dataList" height="100%" size="small" border
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="对账日期" align="center" prop="statementDate" />
       <el-table-column label="委托单号" align="center" prop="formNo">
@@ -66,272 +33,233 @@
       </el-table-column>
       <el-table-column label="状态" align="center" prop="status">
         <template #default="scope">
-          <dict-tag
-            :options="entrust_deduct_status"
-            :value="scope.row.status"
-          />
+          <dict-tag :options="entrust_deduct_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="备注"
-        align="center"
-        prop="remark"
-        :show-overflow-tooltip="true"
-      />
-      <el-table-column
-        label="操作"
-        align="center"
-        width="160"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+      <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
         <template #default="scope">
-          <el-button
-            v-show="scope.row.status !== 2"
-            link
-            size="small"
-            type="warning"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:deduct:edit']"
-            >查看</el-button
-          >
-          <el-button
-            v-show="scope.row.status !== 2"
-            link
-            size="small"
-            type="danger"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['business:deduct:remove']"
-            >删除</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 2"
-            link
-            size="small"
-            type="primary"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:deduct:info']"
-            >查看</el-button
-          >
+          <el-button v-show="scope.row.status !== 2" link size="small" type="warning" @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:deduct:edit']">查看</el-button>
+          <el-button v-show="scope.row.status !== 2" link size="small" type="danger" @click="handleDelete(scope.row)"
+            v-hasPermi="['business:deduct:remove']">删除</el-button>
+          <el-button v-show="scope.row.status === 2" link size="small" type="primary" @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:deduct:info']">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
     <statement-account-form ref="statementAccountFormRef" :get-list="getList" />
-    <choice-month-dialog
-      ref="choiceMonthDialogRef"
-      @confirm="monthConfirmHandler"
-    />
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <choice-month-dialog ref="choiceMonthDialogRef" @confirm="monthConfirmHandler" />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="Data">
-import {
-  listDeduct,
-  delDeduct,
-  exportDeduct,
-  checkStatementAccount,
-  getEntrustOrder,
-} from "@/api/business/entrust/deduct";
-import statementAccountForm from "./form.vue";
-import ChoiceMonthDialog from "./ChoiceMonthDialog.vue";
+  import {
+    listDeduct,
+    delDeduct,
+    exportDeduct,
+    checkStatementAccount,
+    getEntrustOrder,
+  } from "@/api/business/entrust/deduct";
+  import statementAccountForm from "./form.vue";
+  import ChoiceMonthDialog from "./ChoiceMonthDialog.vue";
 
-const { proxy } = getCurrentInstance();
-const { entrust_deduct_status } = proxy.useDict("entrust_deduct_status");
-const info = ref({});
+  const { proxy } = getCurrentInstance();
+  const { entrust_deduct_status } = proxy.useDict("entrust_deduct_status");
+  const info = ref({});
 
-const dataList = ref([]);
-const open = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const title = ref("");
-const defaultDictType = ref("");
-const typeOptions = ref([]);
+  const dataList = ref([]);
+  const open = ref(false);
+  const loading = ref(true);
+  const showSearch = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const title = ref("");
+  const defaultDictType = ref("");
+  const typeOptions = ref([]);
 
-const statementAccountFormRef = ref(null);
-const choiceMonthDialogRef = ref(null);
+  const statementAccountFormRef = ref(null);
+  const choiceMonthDialogRef = ref(null);
 
-const route = useRoute();
-const webHost = import.meta.env.VITE_APP_BASE_API;
+  const route = useRoute();
+  const webHost = import.meta.env.VITE_APP_BASE_API;
 
-// 数据标签回显样式
-const listClassOptions = ref([
-  { value: "default", label: "默认" },
-  { value: "primary", label: "主要" },
-  { value: "success", label: "成功" },
-  { value: "info", label: "信息" },
-  { value: "warning", label: "警告" },
-  { value: "danger", label: "危险" },
-]);
+  // 数据标签回显样式
+  const listClassOptions = ref([
+    { value: "default", label: "默认" },
+    { value: "primary", label: "主要" },
+    { value: "success", label: "成功" },
+    { value: "info", label: "信息" },
+    { value: "warning", label: "警告" },
+    { value: "danger", label: "危险" },
+  ]);
 
-const data = reactive({
-  form: {},
-  queryParams: {
-    pageNum: 1,
-    orderByColumn: "create_time",
-    pageSize: 20,
-    entrustOrderId: null,
-  },
-  rules: {
-    dictLabel: [
-      { required: true, message: "数据标签不能为空", trigger: "blur" },
-    ],
-    dictValue: [
-      { required: true, message: "数据键值不能为空", trigger: "blur" },
-    ],
-    dictSort: [
-      { required: true, message: "数据顺序不能为空", trigger: "blur" },
-    ],
-  },
-});
-
-const { queryParams, form, rules } = toRefs(data);
-
-/** 查询字典类型详细 */
-function setEntrustOrder(id) {
-  queryParams.value.entrustOrderId = id;
-  getInfo(id);
-  getList();
-}
-
-function getInfo(id) {
-  getEntrustOrder(id).then((res) => {
-    info.value = res.data;
+  const data = reactive({
+    form: {},
+    queryParams: {
+      pageNum: 1,
+      orderByColumn: "create_time",
+      pageSize: 20,
+      entrustOrderId: null,
+    },
+    rules: {
+      dictLabel: [
+        { required: true, message: "数据标签不能为空", trigger: "blur" },
+      ],
+      dictValue: [
+        { required: true, message: "数据键值不能为空", trigger: "blur" },
+      ],
+      dictSort: [
+        { required: true, message: "数据顺序不能为空", trigger: "blur" },
+      ],
+    },
   });
-}
 
-/** 查询字典数据列表 */
-function getList() {
-  loading.value = true;
-  listDeduct(queryParams.value).then((response) => {
-    dataList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  const { queryParams, form, rules } = toRefs(data);
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
-/** 取消按钮 */
-function cancel() {
-  open.value = false;
-  reset();
-}
-/** 表单重置 */
-function reset() {
-  form.value = {
-    dictCode: undefined,
-    dictLabel: undefined,
-    dictValue: undefined,
-    cssClass: undefined,
-    listClass: "default",
-    dictSort: 0,
-    status: "0",
-    remark: undefined,
-  };
-  proxy.resetForm("dataRef");
-}
+  /** 查询字典类型详细 */
+  function setEntrustOrder(id) {
+    queryParams.value.entrustOrderId = id;
+    getInfo(id);
+    getList();
+  }
+
+  function getInfo(id) {
+    getEntrustOrder(id).then((res) => {
+      info.value = res.data;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 查询字典数据列表 */
+  function getList() {
+    loading.value = true;
+    listDeduct(queryParams.value).then((response) => {
+      dataList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
+  /** 取消按钮 */
+  function cancel() {
+    open.value = false;
+    reset();
+  }
+  /** 表单重置 */
+  function reset() {
+    form.value = {
+      dictCode: undefined,
+      dictLabel: undefined,
+      dictValue: undefined,
+      cssClass: undefined,
+      listClass: "default",
+      dictSort: 0,
+      status: "0",
+      remark: undefined,
+    };
+    proxy.resetForm("dataRef");
+  }
 
-/** 返回按钮操作 */
-function handleClose() {
-  const obj = { path: "/contracts/entrustOrder" };
-  proxy.$tab.closeOpenPage(obj);
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  queryParams.value.dictType = defaultDictType;
-  handleQuery();
-}
+  /** 返回按钮操作 */
+  function handleClose() {
+    const obj = { path: "/contracts/entrustOrder" };
+    proxy.$tab.closeOpenPage(obj);
+  }
 
-/** 新增按钮操作 */
-function handleAdd() {
-  // 判断是否有上月委托
-  // 判断上月委托是否已做对账单
-  // 假设已做对账单 则询问是否做本月对账单
-  // 假设做本月对账单 传入本月信息到dialog
-  choiceMonthDialogRef.value.open(queryParams.value.entrustOrderId);
-  // checkStatementAccount(queryParams.value.entrustOrderId).then((res) => {
-  //   const currentDate = res.msg;
-  //   statementAccountFormRef.value.add({
-  //     entrustOrderId: queryParams.value.entrustOrderId,
-  //     currentDate: currentDate,
-  //   });
-  //   // console.log(res)
-  // });
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    queryParams.value.dictType = defaultDictType;
+    handleQuery();
+  }
 
-/** 多选框选中数据 */
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.dictCode);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // 判断是否有上月委托
+    // 判断上月委托是否已做对账单
+    // 假设已做对账单 则询问是否做本月对账单
+    // 假设做本月对账单 传入本月信息到dialog
+    choiceMonthDialogRef.value.open(queryParams.value.entrustOrderId);
+    // checkStatementAccount(queryParams.value.entrustOrderId).then((res) => {
+    //   const currentDate = res.msg;
+    //   statementAccountFormRef.value.add({
+    //     entrustOrderId: queryParams.value.entrustOrderId,
+    //     currentDate: currentDate,
+    //   });
+    //   // console.log(res)
+    // });
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  statementAccountFormRef.value.open(row.id);
-}
+  /** 多选框选中数据 */
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.dictCode);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-/** 提交按钮 */
-function submitForm() {
-  proxy.$refs["dataRef"].validate((valid) => {
-    if (valid) {
-      if (form.value.dictCode != undefined) {
-        updateData(form.value).then((response) => {
-          useDictStore().removeDict(queryParams.value.dictType);
-          proxy.$modal.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        });
-      } else {
-        addData(form.value).then((response) => {
-          useDictStore().removeDict(queryParams.value.dictType);
-          proxy.$modal.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        });
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    statementAccountFormRef.value.open(row.id);
+  }
+
+  /** 提交按钮 */
+  function submitForm() {
+    proxy.$refs["dataRef"].validate((valid) => {
+      if (valid) {
+        if (form.value.dictCode != undefined) {
+          updateData(form.value).then((response) => {
+            useDictStore().removeDict(queryParams.value.dictType);
+            proxy.$modal.msgSuccess("修改成功");
+            open.value = false;
+            getList();
+          });
+        } else {
+          addData(form.value).then((response) => {
+            useDictStore().removeDict(queryParams.value.dictType);
+            proxy.$modal.msgSuccess("新增成功");
+            open.value = false;
+            getList();
+          });
+        }
       }
-    }
-  });
-}
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除?")
-    .then(function () {
-      return delDeduct(ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功");
-    })
-    .catch(() => {});
-}
+    });
+  }
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除?")
+      .then(function () {
+        return delDeduct(ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功");
+      })
+      .catch(() => { });
+  }
 
-function monthConfirmHandler(daterange) {
-  const startMonth = daterange[0];
-  const endMonth = daterange[1];
-  statementAccountFormRef.value.add({
-    entrustOrderId: queryParams.value.entrustOrderId,
-    startMonth: startMonth,
-    endMonth: endMonth,
-  });
-}
+  function monthConfirmHandler(daterange) {
+    const startMonth = daterange[0];
+    const endMonth = daterange[1];
+    statementAccountFormRef.value.add({
+      entrustOrderId: queryParams.value.entrustOrderId,
+      startMonth: startMonth,
+      endMonth: endMonth,
+    });
+  }
 
-setEntrustOrder(route.params && route.params.orderId);
-</script>
+  setEntrustOrder(route.params && route.params.orderId);
+</script>

+ 10 - 7
src/views/business/entrust/workOrder/currentMonth/index.vue

@@ -126,7 +126,7 @@
     exportCurrentWorkOrder,
     delEntrust,
     transNext,
-    addEntrust,exportStore
+    addEntrust, exportStore
   } from "@/api/business/entrust/currentWorkOrder";
   import SetEntrustDialog from "../setEntrustDialog";
   import useUserStore from "@/store/modules/user";
@@ -198,7 +198,10 @@
       loading.value = false;
     });
   }
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   //判断是否有权限
   function viewAdviser(quer) {
     return permissions.includes(all_permission) || permissions.includes(quer);
@@ -263,7 +266,7 @@
 
   function setCurrentMonth(month) {
     // currentMonth.value = month;
-    currentMonth.value = proxy.moment().format("YYYY-MM")+"-01";
+    currentMonth.value = proxy.moment().format("YYYY-MM") + "-01";
   }
 
   function setEntrustHandle() {
@@ -288,11 +291,11 @@
 
   function transEntrustHandler() {
     proxy.$modal.confirm("确定流转到下一月?").then(() => {
-        transNext().then((res) => {
-          proxy.$modal.msgSuccess("流转成功");
-          checkCurrentMonthHandle();
-        });
+      transNext().then((res) => {
+        proxy.$modal.msgSuccess("流转成功");
+        checkCurrentMonthHandle();
       });
+    });
     // let currentDate = new Date().getMonth() + 1;
     // let formattedMonth = currentDate.toString().padStart(2, '0');
     // let month = currentMonth.value.split('-')[1];

+ 19 - 14
src/views/business/entrust/workOrder/historyMonth/index.vue

@@ -8,10 +8,9 @@
         <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
             label-width="68px">
             <el-form-item label="工作月:">
-                <el-date-picker v-model="queryParams.date" 
-                    format="YYYY-MM" value-format="YYYY-MM-DD" type="month" placeholder="请选择工作月"
-                    style="width: 150px"  :disabled-date="disabledDate"/>
-  
+                <el-date-picker v-model="queryParams.date" format="YYYY-MM" value-format="YYYY-MM-DD" type="month"
+                    placeholder="请选择工作月" style="width: 150px" :disabled-date="disabledDate" />
+
             </el-form-item>
             <el-form-item label="客户名称:" prop="companyName">
                 <el-input v-model="queryParams.companyName" style="width: 150px" placeholder="请输入客户名称" clearable
@@ -135,15 +134,18 @@
 
     const { contract_verify_status } = proxy.useDict("contract_verify_status");
     const { contract_status } = proxy.useDict("contract_status");
-  /** 查询对象 */
-  const queryParams = ref({
-    pageNum: 1,
-    pageSize: 20,
-    companyName: "",
-    noContract: 0,
-    type: 1,
-  });
-
+    /** 查询对象 */
+    const queryParams = ref({
+        pageNum: 1,
+        pageSize: 20,
+        companyName: "",
+        noContract: 0,
+        type: 1,
+    });
+    onActivated(() => {
+        // 你的逻辑
+        getList();
+    });
     const editStatus = {
         startMonth: false,
     };
@@ -161,7 +163,10 @@
         // 如果选择的是当前年份,只能选择当前月份之前的月份
         return selectedYear === currentYear && selectedMonth >= currentMonth;
     }
-
+    onActivated(() => {
+        // 你的逻辑
+        getList();
+    });
     function checkCurrentMonthHandle() {
         checkCurrent().then((res) => {
             if (res.data.checkResult === true) {

+ 194 - 281
src/views/business/entrust/workOrder/nextMonth/index.vue

@@ -2,165 +2,88 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        :disabled="multiple"
-        icon="Plus"
-        @click="setEntrustHandle"
-        v-hasPermi="['business:entrust:workOrder:next:edit']"
-        >设置委托</el-button
-      >
-      <el-button
-        type="danger"
-        size="small"
-        :disabled="cancel"
-        icon="delete"
-        @click="delEntrustHandle"
-        v-hasPermi="['business:entrust:workOrder:next:edit']"
-        >取消委托</el-button
-      >
+      <el-button type="primary" size="small" :disabled="multiple" icon="Plus" @click="setEntrustHandle"
+        v-hasPermi="['business:entrust:workOrder:next:edit']">设置委托</el-button>
+      <el-button type="danger" size="small" :disabled="cancel" icon="delete" @click="delEntrustHandle"
+        v-hasPermi="['business:entrust:workOrder:next:edit']">取消委托</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:entrust:workOrder:next:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport"
+              v-if="viewAdviser('business:entrust:workOrder:next:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
       <el-button style="margin-left: 5px;" type="primary" size="small" icon="Plus" @click="exportZero">导入委托</el-button>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="当前月:">{{
-       moment().add(1, 'month').format("YYYY年MM月")
-      }}</el-form-item>
+        moment().add(1, 'month').format("YYYY年MM月")
+        }}</el-form-item>
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          style="width: 150px"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" style="width: 150px" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="执行人:" prop="toAccountName">
-        <el-input
-          v-model="queryParams.toAccountName"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.toAccountName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
-      <el-table-column
-        label="客户名称"
-        align="center"
-        min-width="250"
-        prop="companyName"
-      />
-      <el-table-column
-        label="税号"
-        align="center"
-        prop="socialCreditCode"
-        min-width="200"
-      />
-      <el-table-column
-        label="工单类型"
-        align="center"
-        prop="amount"
-        min-width="90"
-      >
+      <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
+      <el-table-column label="工单类型" align="center" prop="amount" min-width="90">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="项目"
-        align="center"
-        prop="taskTypeName"
-        min-width="130"
-      >
+      <el-table-column label="项目" align="center" prop="taskTypeName" min-width="130">
         <template #default="scope">
           {{ scope.row.taskTypeName }}
           {{
-            scope.row.taskTypeDetailName
-              ? `-${scope.row.taskTypeDetailName}`
-              : ""
+          scope.row.taskTypeDetailName
+          ? `-${scope.row.taskTypeDetailName}`
+          : ""
           }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="起始月"
-        align="center"
-        min-width="90"
-        prop="startMonth"
-      >
+      <el-table-column label="起始月" align="center" min-width="90" prop="startMonth">
         <template #default="scope">
           {{
-            scope.row.type === 1
-              ? scope.row.startMonth
-                ? moment(scope.row.startMonth).format("YYYY年MM月")
-                : ""
-              : "-"
+          scope.row.type === 1
+          ? scope.row.startMonth
+          ? moment(scope.row.startMonth).format("YYYY年MM月")
+          : ""
+          : "-"
           }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="结束月"
-        align="center"
-        min-width="90"
-        prop="endMonth"
-      >
+      <el-table-column label="结束月" align="center" min-width="90" prop="endMonth">
         <template #default="scope">
           {{
-            scope.row.type === 1
-              ? scope.row.endMonth
-                ? moment(scope.row.endMonth).format("YYYY年MM月")
-                : ""
-              : "-"
+          scope.row.type === 1
+          ? scope.row.endMonth
+          ? moment(scope.row.endMonth).format("YYYY年MM月")
+          : ""
+          : "-"
           }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="工单月数"
-        align="center"
-        min-width="80"
-        prop="monthNum"
-      >
+      <el-table-column label="工单月数" align="center" min-width="80" prop="monthNum">
         <template #default="scope">
           {{ scope.row.type === 1 ? scope.row.monthNum : "-" }}
         </template>
@@ -168,208 +91,198 @@
       <el-table-column label="工单执行人" align="center" min-width="120">
         <template #default="scope">
           {{
-            scope.row.entrust != null
-              ? scope.row.entrust.toAccountName
-              : scope.row.serviceName
+          scope.row.entrust != null
+          ? scope.row.entrust.toAccountName
+          : scope.row.serviceName
           }}
         </template>
       </el-table-column>
     </el-table>
     <exports ref="exportRef" :get-list="getList"></exports>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <init-month-dialog
-      ref="initMonthDialogRef"
-      :get-list="getList"
-      :setCurrentMonth="setCurrentMonth"
-    />
-    <set-entrust-dialog
-      ref="setEntrustDialogRef"
-      :get-list="getList"
-      @submit="handleAddEntrust"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <init-month-dialog ref="initMonthDialogRef" :get-list="getList" :setCurrentMonth="setCurrentMonth" />
+    <set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" @submit="handleAddEntrust" />
   </div>
 </template>
 
 <script setup name="NextMonthWorkOrder">
-import InitMonthDialog from "../initMonthDialog";
-import exports from "./export.vue"
-import {
-  listNextWorkORder,
-  checkCurrent,
-  exportNextWorkOrder,
-  delEntrust,
-  addEntrust,
-} from "@/api/business/entrust/nextWorkOrder";
-import{exportNextStore}   from "@/api/business/entrust/currentWorkOrder";
-import SetEntrustDialog from "../setEntrustDialog";
-import useUserStore from "@/store/modules/user";
-const { proxy } = getCurrentInstance();
-const currentMonth = ref(null);
-/** 字典数组区 */
-/** 查询 对象 */
+  import InitMonthDialog from "../initMonthDialog";
+  import exports from "./export.vue"
+  import {
+    listNextWorkORder,
+    checkCurrent,
+    exportNextWorkOrder,
+    delEntrust,
+    addEntrust,
+  } from "@/api/business/entrust/nextWorkOrder";
+  import { exportNextStore } from "@/api/business/entrust/currentWorkOrder";
+  import SetEntrustDialog from "../setEntrustDialog";
+  import useUserStore from "@/store/modules/user";
+  const { proxy } = getCurrentInstance();
+  const currentMonth = ref(null);
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const selections = ref([]);
-const single = ref(false);
-const cancel = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const selections = ref([]);
+  const single = ref(false);
+  const cancel = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
 
-const initMonthDialogRef = ref(null);
-const setEntrustDialogRef = ref(null);
+  const initMonthDialogRef = ref(null);
+  const setEntrustDialogRef = ref(null);
 
-const showInitMonth = ref(false);
+  const showInitMonth = ref(false);
 
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  orderByColumn: "create_time",
-  noContract: 0,
-  type: 1,
-});
-
-const editStatus = {
-  startMonth: false,
-};
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    orderByColumn: "create_time",
+    noContract: 0,
+    type: 1,
+  });
 
-function checkCurrentMonthHandle() {
-  checkCurrent().then((res) => {
-    if (res.data.checkResult === true) {
-      setCurrentMonth(res.data.currentMonth);
-      getList();
-    } else {
-      proxy.$modal.msgError("未设置当前月,请设置本月");
-    }
+  const editStatus = {
+    startMonth: false,
+  };
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  function checkCurrentMonthHandle() {
+    checkCurrent().then((res) => {
+      if (res.data.checkResult === true) {
+        setCurrentMonth(res.data.currentMonth);
+        getList();
+      } else {
+        proxy.$modal.msgError("未设置当前月,请设置本月");
+      }
+    });
+  }
 
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
+  }
   /** 新增导入操作 */
   function exportZero() {
     proxy.$refs.exportRef.open();
   }
-function showInitMonthDialog() {
-  initMonthDialogRef.value.open();
-}
+  function showInitMonthDialog() {
+    initMonthDialogRef.value.open();
+  }
 
-/***********************  方法区  ****************************/
+  /***********************  方法区  ****************************/
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  queryParams.value.currentMonth = currentMonth.value;
-  listNextWorkORder(queryParams.value).then((response) => {
-    list.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    queryParams.value.currentMonth = currentMonth.value;
+    listNextWorkORder(queryParams.value).then((response) => {
+      list.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
 
-  //取消委托计数
-  let cancelNum = 0;
-  //设置委托计数
-  let multipleNum = 0;
-  //判断是否有执行人
-  selections.value.forEach((item) => {
-    if (item.entrust) {
-      //有执行人
-      if (item.entrust.toAccountName) {
-        cancelNum++;
+    //取消委托计数
+    let cancelNum = 0;
+    //设置委托计数
+    let multipleNum = 0;
+    //判断是否有执行人
+    selections.value.forEach((item) => {
+      if (item.entrust) {
+        //有执行人
+        if (item.entrust.toAccountName) {
+          cancelNum++;
+        }
       }
+      //没有执行人
+      if (!item.entrust) {
+        multipleNum++;
+      }
+    });
+
+    //判断是否有选中数据
+    if (!selections.value.length > 0) {
+      multiple.value = true;
+      cancel.value = true;
+    } //判断是否设置执行人和设置委托选中
+    else if (cancelNum > 0 && multipleNum > 0) {
+      cancel.value = cancelNum > 0;
+      multiple.value = multipleNum > 0;
+    } else {
+      cancel.value = !cancelNum > 0;
+      multiple.value = !multipleNum > 0;
     }
-    //没有执行人
-    if (!item.entrust) {
-      multipleNum++;
-    }
-  });
+  }
 
-  //判断是否有选中数据
-  if (!selections.value.length > 0) {
-    multiple.value = true;
-    cancel.value = true;
-  } //判断是否设置执行人和设置委托选中
-  else if (cancelNum > 0 && multipleNum > 0) {
-    cancel.value = cancelNum > 0;
-    multiple.value = multipleNum > 0;
-  } else {
-    cancel.value = !cancelNum > 0;
-    multiple.value = !multipleNum > 0;
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportNextStore(queryParams.value);
   }
-}
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportNextStore(queryParams.value);
-}
+  function setCurrentMonth(month) {
+    // currentMonth.value = month;
+    currentMonth.value = proxy.moment().add(1, 'month').format("YYYY-MM") + "-01";
+  }
 
-function setCurrentMonth(month) {
-  // currentMonth.value = month;
-  currentMonth.value = proxy.moment().add(1, 'month').format("YYYY-MM")+"-01";
-}
+  function setEntrustHandle() {
+    setEntrustDialogRef.value.open({
+      selections: selections.value,
+      optionCurrentMonth: currentMonth.value,
+    });
+  }
 
-function setEntrustHandle() {
-  setEntrustDialogRef.value.open({
-    selections: selections.value,
-    optionCurrentMonth: currentMonth.value,
-  });
-}
+  function delEntrustHandle() {
+    const entrust = {
+      workMonth: currentMonth.value,
+      workOrderIds: ids.value,
+    };
+    proxy.$modal.confirm("是否确认取消委托?").then(() => {
+      delEntrust(entrust).then((res) => {
+        proxy.$modal.msgSuccess("取消成功");
+        getList();
+      });
+    });
+  }
 
-function delEntrustHandle() {
-  const entrust = {
-    workMonth: currentMonth.value,
-    workOrderIds: ids.value,
-  };
-  proxy.$modal.confirm("是否确认取消委托?").then(() => {
-    delEntrust(entrust).then((res) => {
-      proxy.$modal.msgSuccess("取消成功");
+  function handleAddEntrust(data) {
+    addEntrust(data).then((response) => {
+      proxy.$modal.msgSuccess("设置完成!");
+      setEntrustDialogRef.value.cancel();
       getList();
     });
-  });
-}
-
-function handleAddEntrust(data) {
-  addEntrust(data).then((response) => {
-    proxy.$modal.msgSuccess("设置完成!");
-    setEntrustDialogRef.value.cancel();
-    getList();
-  });
-}
+  }
 
-checkCurrentMonthHandle();
-</script>
+  checkCurrentMonthHandle();
+</script>

+ 160 - 222
src/views/business/entrust/workOrder/once/index.vue

@@ -2,298 +2,236 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        :disabled="multiple"
-        @click="setEntrustHandle"
-        v-hasPermi="['business:entrust:workOrder:current:edit']"
-        >设置委托</el-button
-      >
-      <el-button
-        type="danger"
-        size="small"
-        icon="Delete"
-        :disabled="cancel"
-        @click="delEntrustHandle"
-        v-hasPermi="['business:entrust:workOrder:current:edit']"
-        >取消委托</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" :disabled="multiple" @click="setEntrustHandle"
+        v-hasPermi="['business:entrust:workOrder:current:edit']">设置委托</el-button>
+      <el-button type="danger" size="small" icon="Delete" :disabled="cancel" @click="delEntrustHandle"
+        v-hasPermi="['business:entrust:workOrder:current:edit']">取消委托</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:entrust:workOrder:once:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport"
+              v-if="viewAdviser('business:entrust:workOrder:once:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          style="width: 150px"
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable style="width: 150px"
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
-      <el-table-column
-        label="客户名称"
-        align="center"
-        min-width="250"
-        prop="companyName"
-      />
+      <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" />
       <!-- <el-table-column
         label="税号"
         align="center"
         prop="socialCreditCode"
         min-width="160"
       /> -->
-      <el-table-column
-        label="工单类型"
-        align="center"
-        prop="amount"
-        min-width="80"
-      >
+      <el-table-column label="工单类型" align="center" prop="amount" min-width="80">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-         <!-- <el-table-column
+      <!-- <el-table-column
         label="说明"
         align="center"
         prop="explain"
         min-width="180"
       /> -->
-      <el-table-column
-        label="项目"
-        align="center"
-        prop="taskTypeName"
-        min-width="600"
-      >
+      <el-table-column label="项目" align="center" prop="taskTypeName" min-width="600">
         <template #default="scope">
           {{
-            scope.row.noContract === 1? scope.row.remark: `${scope.row.taskTypeName}${scope.row.alterType ?`-${scope.row.alterType}` : ""}${scope.row.taskTypeDetailName? `-${scope.row.taskTypeDetailName}` : ""}`
+          scope.row.noContract === 1? scope.row.remark: `${scope.row.taskTypeName}${scope.row.alterType
+          ?`-${scope.row.alterType}` : ""}${scope.row.taskTypeDetailName? `-${scope.row.taskTypeDetailName}` : ""}`
           }}
         </template>
       </el-table-column>
-      <el-table-column
-      label="说明"
-      align="center"
-      prop="explain"
-      min-width="180"
-    />
+      <el-table-column label="说明" align="center" prop="explain" min-width="180" />
       <el-table-column label="工单执行人" align="center" min-width="120">
         <template #default="scope">
           {{
-            scope.row.entrust != null
-              ? scope.row.entrust.toAccountName
-              : scope.row.serviceName
+          scope.row.entrust != null
+          ? scope.row.entrust.toAccountName
+          : scope.row.serviceName
           }}
         </template>
       </el-table-column>
     </el-table>
     <!-- <contract-form ref="contractRef" :get-list="getList" /> -->
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <set-entrust-dialog
-      ref="setEntrustDialogRef"
-      :get-list="getList"
-      @submit="handleAddEntrust"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" @submit="handleAddEntrust" />
   </div>
 </template>
 
 <script setup name="OnceWorkOrder">
-import {
-  listOnceWorkOrder,
-  checkCurrent,
-  exportOnceWorkOrder,
-  delEntrust,
-  transNext,
-  addEntrust,
-} from "@/api/business/entrust/onceWorkOrder";
-import SetEntrustDialog from "../setEntrustDialog";
-import useUserStore from "@/store/modules/user";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const selections = ref([]);
-const single = ref(false);
-const cancel = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const prev = ref([]);
-
-const setEntrustDialogRef = ref(null);
-
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  orderByColumn: "create_time",
-  type: 2,
-});
-
-const editStatus = {
-  startMonth: false,
-};
+  import {
+    listOnceWorkOrder,
+    checkCurrent,
+    exportOnceWorkOrder,
+    delEntrust,
+    transNext,
+    addEntrust,
+  } from "@/api/business/entrust/onceWorkOrder";
+  import SetEntrustDialog from "../setEntrustDialog";
+  import useUserStore from "@/store/modules/user";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const selections = ref([]);
+  const single = ref(false);
+  const cancel = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const prev = ref([]);
+
+  const setEntrustDialogRef = ref(null);
+
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    orderByColumn: "create_time",
+    type: 2,
+  });
 
-/***********************  方法区  ****************************/
+  const editStatus = {
+    startMonth: false,
+  };
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listOnceWorkOrder(queryParams.value).then((response) => {
-    list.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
-
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listOnceWorkOrder(queryParams.value).then((response) => {
+      list.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-  //取消委托计数
-  let cancelNum = 0;
-  //设置委托计数
-  let multipleNum = 0;
-  //判断是否有执行人
-  selections.value.forEach((item) => {
-    if (item.entrust) {
-      //有执行人
-      if (item.entrust.toAccountName) {
-        cancelNum++;
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
+
+    //取消委托计数
+    let cancelNum = 0;
+    //设置委托计数
+    let multipleNum = 0;
+    //判断是否有执行人
+    selections.value.forEach((item) => {
+      if (item.entrust) {
+        //有执行人
+        if (item.entrust.toAccountName) {
+          cancelNum++;
+        }
       }
+      //没有执行人
+      if (!item.entrust) {
+        multipleNum++;
+      }
+    });
+
+    //判断是否有选中数据
+    if (!selections.value.length > 0) {
+      multiple.value = true;
+      cancel.value = true;
+    } //判断是否设置执行人和设置委托选中
+    else if (cancelNum > 0 && multipleNum > 0) {
+      cancel.value = cancelNum > 0;
+      multiple.value = multipleNum > 0;
+    } else {
+      cancel.value = !cancelNum > 0;
+      multiple.value = !multipleNum > 0;
     }
-    //没有执行人
-    if (!item.entrust) {
-      multipleNum++;
-    }
-  });
+  }
 
-  //判断是否有选中数据
-  if (!selections.value.length > 0) {
-    multiple.value = true;
-    cancel.value = true;
-  } //判断是否设置执行人和设置委托选中
-  else if (cancelNum > 0 && multipleNum > 0) {
-    cancel.value = cancelNum > 0;
-    multiple.value = multipleNum > 0;
-  } else {
-    cancel.value = !cancelNum > 0;
-    multiple.value = !multipleNum > 0;
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportOnceWorkOrder(queryParams.value);
   }
-}
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportOnceWorkOrder(queryParams.value);
-}
+  function setEntrustHandle() {
+    setEntrustDialogRef.value.open({ selections: selections.value });
+  }
 
-function setEntrustHandle() {
-  setEntrustDialogRef.value.open({ selections: selections.value });
-}
+  function delEntrustHandle() {
+    const entrust = {
+      workOrderIds: ids.value,
+    };
+    proxy.$modal.confirm("是否确认取消委托?").then(() => {
+      delEntrust(entrust).then((res) => {
+        proxy.$modal.msgSuccess("取消成功");
+        getList();
+      });
+    });
+  }
 
-function delEntrustHandle() {
-  const entrust = {
-    workOrderIds: ids.value,
-  };
-  proxy.$modal.confirm("是否确认取消委托?").then(() => {
-    delEntrust(entrust).then((res) => {
-      proxy.$modal.msgSuccess("取消成功");
+  function handleAddEntrust(data) {
+    addEntrust(data).then((response) => {
+      proxy.$modal.msgSuccess("设置完成!");
+      setEntrustDialogRef.value.cancel();
       getList();
     });
-  });
-}
-
-function handleAddEntrust(data) {
-  addEntrust(data).then((response) => {
-    proxy.$modal.msgSuccess("设置完成!");
-    setEntrustDialogRef.value.cancel();
-    getList();
-  });
-}
+  }
 
-function transEntrustHandler() {
-  proxy.$modal.confirm("确定流转到下一月?").then(() => {
-    transNext().then((res) => {
-      proxy.$modal.msgSuccess("流转成功");
-      checkCurrentMonthHandle();
+  function transEntrustHandler() {
+    proxy.$modal.confirm("确定流转到下一月?").then(() => {
+      transNext().then((res) => {
+        proxy.$modal.msgSuccess("流转成功");
+        checkCurrentMonthHandle();
+      });
     });
-  });
-}
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 7 - 4
src/views/business/entrust/workOrderForFactory/currentMonth/index.vue

@@ -21,7 +21,7 @@
     <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
       label-width="68px">
       <el-form-item label="当前月:">{{
-       moment().format("YYYY年MM月")
+        moment().format("YYYY年MM月")
         }}</el-form-item>
       <el-form-item label="客户名称:" prop="companyName">
         <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
@@ -114,7 +114,7 @@
   } from "@/api/business/entrust/currentWorkOrder";
   import InitMonthDialog from "../initMonthDialog";
   import useUserStore from "@/store/modules/user";
-  import{exportFactory}   from "@/api/business/entrust/currentWorkOrder";
+  import { exportFactory } from "@/api/business/entrust/currentWorkOrder";
   const { proxy } = getCurrentInstance();
   const currentMonth = ref(null);
   /** 字典数组区 */
@@ -151,7 +151,10 @@
   const editStatus = {
     startMonth: false,
   };
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   function checkCurrentMonthHandle() {
     checkCurrent().then((res) => {
       if (res.data.checkResult === true) {
@@ -211,7 +214,7 @@
   }
 
   function setCurrentMonth(month) {
-    currentMonth.value = proxy.moment().format("YYYY-MM")+"-01";
+    currentMonth.value = proxy.moment().format("YYYY-MM") + "-01";
   }
 
   function setEntrustHandle() {

+ 348 - 343
src/views/business/entrust/workOrderForFactory/history/index.vue

@@ -1,348 +1,353 @@
 <template>
-  <div class="page-container list-container">
-      <!-- 功能按钮区 -->
-      <div class="list-btns-container">
-
-      </div>
-      <!-- 搜索区 -->
-      <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
-          label-width="68px">
-          <el-form-item label="工作月:">
-              <el-date-picker v-model="queryParams.date" format="YYYY-MM" value-format="YYYY-MM-DD" type="month"
-                  placeholder="请选择工作月" :disabled-date="disabledDate"></el-date-picker>
-          </el-form-item>
-          <el-form-item label="客户名称:" prop="companyName">
-              <el-input v-model="queryParams.companyName" style="width: 150px" placeholder="请输入客户名称" clearable
-                  @keyup.enter="handleQuery" />
-          </el-form-item>
-          <el-form-item label="来源:" prop="fromCompanyName">
-            <el-input v-model="queryParams.fromCompanyName" placeholder="请输入来源" clearable @keyup.enter="handleQuery" />
-          </el-form-item>
-          <el-form-item>
-              <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-          </el-form-item>
-      </el-form>
-
-      <!-- 列表区 -->
-      <el-table v-loading="loading" :data="list" size="small" border height="100%"
-          @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center" />
-          <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
-          <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" />
-          <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
-          <el-table-column label="来源" align="center" width="100" prop="fromCompanyName" />
-          <el-table-column label="工单类型" align="center" prop="amount" min-width="80">
-              <template #default="scope">
-                  {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
-              </template>
-          </el-table-column>
-          <el-table-column label="项目" align="center" prop="taskTypeName" min-width="140">
-              <template #default="scope">
-                  {{ scope.row.taskTypeName }}
-                  {{
-                  scope.row.taskTypeDetailName
-                  ? `-${scope.row.taskTypeDetailName}`
-                  : ""
-                  }}
-              </template>
-          </el-table-column>
-          <el-table-column label="起始月" align="center" width="90" min-prop="startMonth">
-              <template #default="scope">
-                  {{
-                  scope.row.type === 1
-                  ? scope.row.startMonth !="0000-00-00"
-                  ? moment(scope.row.startMonth).format("YYYY年MM月")
-                  : ""
-                  : "-"
-                  }}
-              </template>
-          </el-table-column>
-          <el-table-column label="结束月" align="center" min-width="90" prop="endMonth">
-              <template #default="scope">
-                  {{
-                  scope.row.type === 1
-                  ? scope.row.endMonth !="0000-00-00"
-                  ? moment(scope.row.endMonth).format("YYYY年MM月")
-                  : ""
-                  : "-"
-                  }}
-              </template>
-          </el-table-column>
-          <el-table-column label="工单月数" align="center" min-width="80" prop="monthNum">
-              <template #default="scope">
-                  {{ scope.row.type === 1 ? scope.row.monthNum : "-" }}
-              </template>
-          </el-table-column>
-          <el-table-column label="工单执行人" align="center" min-width="100">
-              <template #default="scope">
-                  {{
-                  scope.row.toAccountName
-                  }}
-              </template>
-          </el-table-column>
-      </el-table>
-      <!-- <contract-form ref="contractRef" :get-list="getList" /> -->
-      <!-- 分页 -->
-      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
-          v-model:limit="queryParams.pageSize" @pagination="getList" />
-      <init-month-dialog ref="initMonthDialogRef" :get-list="checkCurrentMonthHandle"
-          :setCurrentMonth="setCurrentMonth" />
-
-      <set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" @submit="handleAddEntrust" />
-
-  </div>
+    <div class="page-container list-container">
+        <!-- 功能按钮区 -->
+        <div class="list-btns-container">
+
+        </div>
+        <!-- 搜索区 -->
+        <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+            label-width="68px">
+            <el-form-item label="工作月:">
+                <el-date-picker v-model="queryParams.date" format="YYYY-MM" value-format="YYYY-MM-DD" type="month"
+                    placeholder="请选择工作月" :disabled-date="disabledDate"></el-date-picker>
+            </el-form-item>
+            <el-form-item label="客户名称:" prop="companyName">
+                <el-input v-model="queryParams.companyName" style="width: 150px" placeholder="请输入客户名称" clearable
+                    @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="来源:" prop="fromCompanyName">
+                <el-input v-model="queryParams.fromCompanyName" placeholder="请输入来源" clearable
+                    @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item>
+                <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+                <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+            </el-form-item>
+        </el-form>
+
+        <!-- 列表区 -->
+        <el-table v-loading="loading" :data="list" size="small" border height="100%"
+            @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="55" align="center" />
+            <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
+            <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" />
+            <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
+            <el-table-column label="来源" align="center" width="100" prop="fromCompanyName" />
+            <el-table-column label="工单类型" align="center" prop="amount" min-width="80">
+                <template #default="scope">
+                    {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
+                </template>
+            </el-table-column>
+            <el-table-column label="项目" align="center" prop="taskTypeName" min-width="140">
+                <template #default="scope">
+                    {{ scope.row.taskTypeName }}
+                    {{
+                    scope.row.taskTypeDetailName
+                    ? `-${scope.row.taskTypeDetailName}`
+                    : ""
+                    }}
+                </template>
+            </el-table-column>
+            <el-table-column label="起始月" align="center" width="90" min-prop="startMonth">
+                <template #default="scope">
+                    {{
+                    scope.row.type === 1
+                    ? scope.row.startMonth !="0000-00-00"
+                    ? moment(scope.row.startMonth).format("YYYY年MM月")
+                    : ""
+                    : "-"
+                    }}
+                </template>
+            </el-table-column>
+            <el-table-column label="结束月" align="center" min-width="90" prop="endMonth">
+                <template #default="scope">
+                    {{
+                    scope.row.type === 1
+                    ? scope.row.endMonth !="0000-00-00"
+                    ? moment(scope.row.endMonth).format("YYYY年MM月")
+                    : ""
+                    : "-"
+                    }}
+                </template>
+            </el-table-column>
+            <el-table-column label="工单月数" align="center" min-width="80" prop="monthNum">
+                <template #default="scope">
+                    {{ scope.row.type === 1 ? scope.row.monthNum : "-" }}
+                </template>
+            </el-table-column>
+            <el-table-column label="工单执行人" align="center" min-width="100">
+                <template #default="scope">
+                    {{
+                    scope.row.toAccountName
+                    }}
+                </template>
+            </el-table-column>
+        </el-table>
+        <!-- <contract-form ref="contractRef" :get-list="getList" /> -->
+        <!-- 分页 -->
+        <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+            v-model:limit="queryParams.pageSize" @pagination="getList" />
+        <init-month-dialog ref="initMonthDialogRef" :get-list="checkCurrentMonthHandle"
+            :setCurrentMonth="setCurrentMonth" />
+
+        <set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" @submit="handleAddEntrust" />
+
+    </div>
 </template>
 
 <script setup name="HistoryWorkOrderForFactory">
-  import InitMonthDialog from "../initMonthDialog";
-  import { getToken, getTenant } from "@/utils/auth";
-  import {
-      listCurrentWorkOrder,
-      checkCurrent,
-      exportCurrentWorkOrder,
-      delEntrust,
-      transNext,
-      addEntrust, listHistory
-  } from "@/api/business/entrust/currentWorkOrder";
-  import SetEntrustDialog from "../setEntrustDialog";
-  import useUserStore from "@/store/modules/user";
-  // import { ca } from "element-plus/es/locale";
-  const { proxy } = getCurrentInstance();
-  const currentMonth = ref(null);
-  /** 字典数组区 */
-  /** 查询 对象 */
-
-  const list = ref([]);
-  const loading = ref(true);
-  const cancel = ref(true);
-  const multiple = ref(true);
-  const ids = ref([]);
-  const selections = ref([]);
-  const single = ref(false);
-  const total = ref(0);
-  const prev = ref([]);
-  const tenantId = ref(getTenant());
-  const permissions = useUserStore().permissions;
-  const all_permission = "*:*:*";
-
-  const initMonthDialogRef = ref(null);
-  const setEntrustDialogRef = ref(null);
-
-  const showInitMonth = ref(false);
-
-  const { contract_verify_status } = proxy.useDict("contract_verify_status");
-  const { contract_status } = proxy.useDict("contract_status");
-  /** 查询对象 */
-  const queryParams = ref({
-      pageNum: 1,
-      pageSize: 20,
-
-  });
-
-  const editStatus = {
-      startMonth: false,
-  };
-  function disabledDate(time) {
-      const currentMonth = new Date().getMonth();
-      const selectedMonth = time.getMonth();
-      const currentYear = new Date().getFullYear();
-      const selectedYear = time.getFullYear();
-
-      // 禁用当前年份之后的所有月份
-      if (selectedYear > currentYear) {
-          return true;
-      }
-
-      // 如果选择的是当前年份,只能选择当前月份之前的月份
-      return selectedYear === currentYear && selectedMonth >= currentMonth;
-  }
-
-  function checkCurrentMonthHandle() {
-      checkCurrent().then((res) => {
-          if (res.data.checkResult === true) {
-              setCurrentMonth(res.data.currentMonth);
-              getList();
-          } else {
-              showInitMonthDialog();
-          }
-      });
-  }
-
-  function showInitMonthDialog() {
-      initMonthDialogRef.value.open();
-  }
-
-  /***********************  方法区  ****************************/
-  // 禁用当前月及之后的月份
-  const beforeCurrentMonth = (time) => {
-      const currentMonth = new Date().getMonth();
-      const selectedMonth = time.getMonth();
-      return selectedMonth >= currentMonth;
-  };
-  /** 查询company列表 */
-  function getList() {
-      loading.value = true;
-      console.log(queryParams.value);
-
-      queryParams.value.currentMonth = currentMonth.value;
-      listHistory(queryParams.value).then((response) => {
-          list.value = response.rows;
-          console.log(response);
-          total.value = response.total;
-      }).finally(() => {
-          loading.value = false;
-      });
-  }
-
-  /** 取消委托按钮操作 */
-  function cancelEntrust() {
-      if (selections.value.length === 0) {
-          proxy.$modal.msgError("请选择要取消委托的数据");
-          return;
-      }
-      proxy.$modal
-          .confirm("是否确认取消委托?")
-          .then(function () {
-
-          });
-  }
-
-  //判断是否有权限
-  function viewAdviser(quer) {
-      return permissions.includes(all_permission) || permissions.includes(quer);
-  }
-
-  /** 搜索按钮操作 */
-  function handleQuery() {
-      queryParams.value.pageNum = 1;
-      getList();
-  }
-
-  /** 重置按钮操作 */
-  function resetQuery() {
-      proxy.resetForm("queryRef");
-      handleQuery();
-  }
-  /** 新增导入操作 */
-  function exportZero() {
-      proxy.$refs.exportRef.open();
-  }
-  // 多选框选中数据
-  function handleSelectionChange(selection) {
-      ids.value = selection.map((item) => item.id);
-      selections.value = selection;
-
-      //取消委托计数
-      let cancelNum = 0;
-      //设置委托计数
-      let multipleNum = 0;
-      //判断是否有执行人
-      selections.value.forEach((item) => {
-          if (item.entrust) {
-              //有执行人
-              if (item.entrust.toAccountName) {
-                  cancelNum++;
-              }
-          }
-          //没有执行人
-          if (!item.entrust) {
-              multipleNum++;
-          }
-      });
-
-      //判断是否有选中数据
-      if (!selections.value.length > 0) {
-          multiple.value = true;
-          cancel.value = true;
-      } //判断是否设置执行人和设置委托选中
-      else if (cancelNum > 0 && multipleNum > 0) {
-          cancel.value = cancelNum > 0;
-          multiple.value = multipleNum > 0;
-      } else {
-          cancel.value = !cancelNum > 0;
-          multiple.value = !multipleNum > 0;
-      }
-  }
-
-  /** 导出按钮操作 */
-  function handleExport() {
-      exportCurrentWorkOrder(queryParams.value);
-  }
-
-  function setCurrentMonth(month) {
-      currentMonth.value = month;
-  }
-
-  function setEntrustHandle() {
-      setEntrustDialogRef.value.open({
-          selections: selections.value,
-          optionCurrentMonth: currentMonth.value,
-      });
-  }
-
-  function delEntrustHandle() {
-      const entrust = {
-          workMonth: currentMonth.value,
-          workOrderIds: ids.value,
-      };
-      proxy.$modal.confirm("是否确认取消委托?").then(() => {
-          delEntrust(entrust).then((res) => {
-              proxy.$modal.msgSuccess("取消成功");
-              getList();
-          });
-      });
-  }
-
-  function transEntrustHandler() {
-      // proxy.$modal.confirm("确定流转到下一月?").then(() => {
-      //     transNext().then((res) => {
-      //       proxy.$modal.msgSuccess("流转成功");
-      //       checkCurrentMonthHandle();
-      //     });
-      //   });
-      let currentDate = new Date().getMonth() + 1;
-      let formattedMonth = currentDate.toString().padStart(2, '0');
-      let month = currentMonth.value.split('-')[1];
-      console.log(formattedMonth);
-      if (month < formattedMonth) {
-          proxy.$modal.confirm("确定流转到下一月?").then(() => {
-              transNext().then((res) => {
-                  proxy.$modal.msgSuccess("流转成功");
-                  checkCurrentMonthHandle();
-              });
-          });
-      } else {
-          // //真实月 != 当前月 
-          if (month != formattedMonth) {
-              proxy.$modal.msgError("每月只可流转一次");
-          } else {
-              let currentDay = new Date().getDate()
-              let cutoffDay = 20;
-              //如果当前月时间小于20号
-              if (currentDay < cutoffDay) {
-                  proxy.$modal.msgError("每月20号后才能流转");
-              } else {
-                  proxy.$modal.confirm("确定流转到下一月?").then(() => {
-                      transNext().then((res) => {
-                          proxy.$modal.msgSuccess("流转成功");
-                          checkCurrentMonthHandle();
-                      });
-                  });
-              }
-
-          }
-      }
-
-  }
-
-  function handleAddEntrust(data) {
-      addEntrust(data).then((response) => {
-          proxy.$modal.msgSuccess("设置完成!");
-          setEntrustDialogRef.value.cancel();
-          getList();
-      });
-  }
-
-  checkCurrentMonthHandle();
+    import InitMonthDialog from "../initMonthDialog";
+    import { getToken, getTenant } from "@/utils/auth";
+    import {
+        listCurrentWorkOrder,
+        checkCurrent,
+        exportCurrentWorkOrder,
+        delEntrust,
+        transNext,
+        addEntrust, listHistory
+    } from "@/api/business/entrust/currentWorkOrder";
+    import SetEntrustDialog from "../setEntrustDialog";
+    import useUserStore from "@/store/modules/user";
+    // import { ca } from "element-plus/es/locale";
+    const { proxy } = getCurrentInstance();
+    const currentMonth = ref(null);
+    /** 字典数组区 */
+    /** 查询 对象 */
+
+    const list = ref([]);
+    const loading = ref(true);
+    const cancel = ref(true);
+    const multiple = ref(true);
+    const ids = ref([]);
+    const selections = ref([]);
+    const single = ref(false);
+    const total = ref(0);
+    const prev = ref([]);
+    const tenantId = ref(getTenant());
+    const permissions = useUserStore().permissions;
+    const all_permission = "*:*:*";
+
+    const initMonthDialogRef = ref(null);
+    const setEntrustDialogRef = ref(null);
+
+    const showInitMonth = ref(false);
+
+    const { contract_verify_status } = proxy.useDict("contract_verify_status");
+    const { contract_status } = proxy.useDict("contract_status");
+    onActivated(() => {
+        // 你的逻辑
+        getList();
+    });
+    /** 查询对象 */
+    const queryParams = ref({
+        pageNum: 1,
+        pageSize: 20,
+
+    });
+
+    const editStatus = {
+        startMonth: false,
+    };
+    function disabledDate(time) {
+        const currentMonth = new Date().getMonth();
+        const selectedMonth = time.getMonth();
+        const currentYear = new Date().getFullYear();
+        const selectedYear = time.getFullYear();
+
+        // 禁用当前年份之后的所有月份
+        if (selectedYear > currentYear) {
+            return true;
+        }
+
+        // 如果选择的是当前年份,只能选择当前月份之前的月份
+        return selectedYear === currentYear && selectedMonth >= currentMonth;
+    }
+
+    function checkCurrentMonthHandle() {
+        checkCurrent().then((res) => {
+            if (res.data.checkResult === true) {
+                setCurrentMonth(res.data.currentMonth);
+                getList();
+            } else {
+                showInitMonthDialog();
+            }
+        });
+    }
+
+    function showInitMonthDialog() {
+        initMonthDialogRef.value.open();
+    }
+
+    /***********************  方法区  ****************************/
+    // 禁用当前月及之后的月份
+    const beforeCurrentMonth = (time) => {
+        const currentMonth = new Date().getMonth();
+        const selectedMonth = time.getMonth();
+        return selectedMonth >= currentMonth;
+    };
+    /** 查询company列表 */
+    function getList() {
+        loading.value = true;
+        console.log(queryParams.value);
+
+        queryParams.value.currentMonth = currentMonth.value;
+        listHistory(queryParams.value).then((response) => {
+            list.value = response.rows;
+            console.log(response);
+            total.value = response.total;
+        }).finally(() => {
+            loading.value = false;
+        });
+    }
+
+    /** 取消委托按钮操作 */
+    function cancelEntrust() {
+        if (selections.value.length === 0) {
+            proxy.$modal.msgError("请选择要取消委托的数据");
+            return;
+        }
+        proxy.$modal
+            .confirm("是否确认取消委托?")
+            .then(function () {
+
+            });
+    }
+
+    //判断是否有权限
+    function viewAdviser(quer) {
+        return permissions.includes(all_permission) || permissions.includes(quer);
+    }
+
+    /** 搜索按钮操作 */
+    function handleQuery() {
+        queryParams.value.pageNum = 1;
+        getList();
+    }
+
+    /** 重置按钮操作 */
+    function resetQuery() {
+        proxy.resetForm("queryRef");
+        handleQuery();
+    }
+    /** 新增导入操作 */
+    function exportZero() {
+        proxy.$refs.exportRef.open();
+    }
+    // 多选框选中数据
+    function handleSelectionChange(selection) {
+        ids.value = selection.map((item) => item.id);
+        selections.value = selection;
+
+        //取消委托计数
+        let cancelNum = 0;
+        //设置委托计数
+        let multipleNum = 0;
+        //判断是否有执行人
+        selections.value.forEach((item) => {
+            if (item.entrust) {
+                //有执行人
+                if (item.entrust.toAccountName) {
+                    cancelNum++;
+                }
+            }
+            //没有执行人
+            if (!item.entrust) {
+                multipleNum++;
+            }
+        });
+
+        //判断是否有选中数据
+        if (!selections.value.length > 0) {
+            multiple.value = true;
+            cancel.value = true;
+        } //判断是否设置执行人和设置委托选中
+        else if (cancelNum > 0 && multipleNum > 0) {
+            cancel.value = cancelNum > 0;
+            multiple.value = multipleNum > 0;
+        } else {
+            cancel.value = !cancelNum > 0;
+            multiple.value = !multipleNum > 0;
+        }
+    }
+
+    /** 导出按钮操作 */
+    function handleExport() {
+        exportCurrentWorkOrder(queryParams.value);
+    }
+
+    function setCurrentMonth(month) {
+        currentMonth.value = month;
+    }
+
+    function setEntrustHandle() {
+        setEntrustDialogRef.value.open({
+            selections: selections.value,
+            optionCurrentMonth: currentMonth.value,
+        });
+    }
+
+    function delEntrustHandle() {
+        const entrust = {
+            workMonth: currentMonth.value,
+            workOrderIds: ids.value,
+        };
+        proxy.$modal.confirm("是否确认取消委托?").then(() => {
+            delEntrust(entrust).then((res) => {
+                proxy.$modal.msgSuccess("取消成功");
+                getList();
+            });
+        });
+    }
+
+    function transEntrustHandler() {
+        // proxy.$modal.confirm("确定流转到下一月?").then(() => {
+        //     transNext().then((res) => {
+        //       proxy.$modal.msgSuccess("流转成功");
+        //       checkCurrentMonthHandle();
+        //     });
+        //   });
+        let currentDate = new Date().getMonth() + 1;
+        let formattedMonth = currentDate.toString().padStart(2, '0');
+        let month = currentMonth.value.split('-')[1];
+        console.log(formattedMonth);
+        if (month < formattedMonth) {
+            proxy.$modal.confirm("确定流转到下一月?").then(() => {
+                transNext().then((res) => {
+                    proxy.$modal.msgSuccess("流转成功");
+                    checkCurrentMonthHandle();
+                });
+            });
+        } else {
+            // //真实月 != 当前月 
+            if (month != formattedMonth) {
+                proxy.$modal.msgError("每月只可流转一次");
+            } else {
+                let currentDay = new Date().getDate()
+                let cutoffDay = 20;
+                //如果当前月时间小于20号
+                if (currentDay < cutoffDay) {
+                    proxy.$modal.msgError("每月20号后才能流转");
+                } else {
+                    proxy.$modal.confirm("确定流转到下一月?").then(() => {
+                        transNext().then((res) => {
+                            proxy.$modal.msgSuccess("流转成功");
+                            checkCurrentMonthHandle();
+                        });
+                    });
+                }
+
+            }
+        }
+
+    }
+
+    function handleAddEntrust(data) {
+        addEntrust(data).then((response) => {
+            proxy.$modal.msgSuccess("设置完成!");
+            setEntrustDialogRef.value.cancel();
+            getList();
+        });
+    }
+
+    checkCurrentMonthHandle();
 </script>

+ 164 - 214
src/views/business/entrust/workOrderForFactory/nextMonth/index.vue

@@ -8,125 +8,77 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:entrust:workOrder:next:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport"
+              v-if="viewAdviser('business:entrust:workOrder:next:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="当前月:">{{
-     moment().add(1, 'month').format("YYYY年MM月")
-      }}</el-form-item>
+        moment().add(1, 'month').format("YYYY年MM月")
+        }}</el-form-item>
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="来源:" prop="fromCompanyName">
         <el-input v-model="queryParams.fromCompanyName" placeholder="请输入来源" clearable @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
       <el-table-column label="客户名称" align="center" prop="companyName" />
-      <el-table-column
-        label="来源"
-        width="100"
-        align="center"
-        prop="fromCompanyName"
-      />
-      <el-table-column
-        label="税号"
-        align="center"
-        prop="socialCreditCode"
-        width="200"
-      />
+      <el-table-column label="来源" width="100" align="center" prop="fromCompanyName" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" width="200" />
       <el-table-column label="工单类型" align="center" prop="amount" width="80">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="项目"
-        align="center"
-        prop="taskTypeName"
-        width="140"
-      >
+      <el-table-column label="项目" align="center" prop="taskTypeName" width="140">
         <template #default="scope">
           {{ scope.row.taskTypeName }}
           {{
-            scope.row.taskTypeDetailName
-              ? `-${scope.row.taskTypeDetailName}`
-              : ""
+          scope.row.taskTypeDetailName
+          ? `-${scope.row.taskTypeDetailName}`
+          : ""
           }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="起始月"
-        align="center"
-        width="90"
-        prop="startMonth"
-      >
+      <el-table-column label="起始月" align="center" width="90" prop="startMonth">
         <template #default="scope">
           {{
-            scope.row.type === 1
-              ? scope.row.startMonth
-                ? moment(scope.row.startMonth).format("YYYY年MM月")
-                : ""
-              : "-"
+          scope.row.type === 1
+          ? scope.row.startMonth
+          ? moment(scope.row.startMonth).format("YYYY年MM月")
+          : ""
+          : "-"
           }}
         </template>
       </el-table-column>
       <el-table-column label="结束月" align="center" width="90" prop="endMonth">
         <template #default="scope">
           {{
-            scope.row.type === 1
-              ? scope.row.endMonth
-                ? moment(scope.row.endMonth).format("YYYY年MM月")
-                : ""
-              : "-"
+          scope.row.type === 1
+          ? scope.row.endMonth
+          ? moment(scope.row.endMonth).format("YYYY年MM月")
+          : ""
+          : "-"
           }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="工单月数"
-        align="center"
-        width="80"
-        prop="monthNum"
-      >
+      <el-table-column label="工单月数" align="center" width="80" prop="monthNum">
         <template #default="scope">
           {{ scope.row.type === 1 ? scope.row.monthNum : "-" }}
         </template>
@@ -134,176 +86,174 @@
       <el-table-column label="工单执行人" align="center" width="150">
         <template #default="scope">
           {{
-            scope.row.entrust != null
-              ? scope.row.entrust.toAccountName
-              : scope.row.serviceName
+          scope.row.entrust != null
+          ? scope.row.entrust.toAccountName
+          : scope.row.serviceName
           }}
         </template>
       </el-table-column>
     </el-table>
     <exports ref="exportRef" :get-list="getList"></exports>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="NextWorkOrderForFactory">
-import { getToken, getTenant } from "@/utils/auth";
-import useUserStore from "@/store/modules/user";
+  import { getToken, getTenant } from "@/utils/auth";
+  import useUserStore from "@/store/modules/user";
 
-import {
-  listFactoryNextWorkOrder,
-  checkCurrent,
-  exportNextWorkOrder,
-  delEntrust,
-  addEntrust,
-} from "@/api/business/entrust/nextWorkOrder";
+  import {
+    listFactoryNextWorkOrder,
+    checkCurrent,
+    exportNextWorkOrder,
+    delEntrust,
+    addEntrust,
+  } from "@/api/business/entrust/nextWorkOrder";
 
-import{exportNextFactory} from  "@/api/business/entrust/currentWorkOrder";
-const { proxy } = getCurrentInstance();
+  import { exportNextFactory } from "@/api/business/entrust/currentWorkOrder";
+  const { proxy } = getCurrentInstance();
 
-const currentMonth = ref(null);
-/** 字典数组区 */
-/** 查询 对象 */
+  const currentMonth = ref(null);
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const selections = ref([]);
-const single = ref(false);
-const multiple = ref(false);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const total = ref(0);
-const prev = ref([]);
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const selections = ref([]);
+  const single = ref(false);
+  const multiple = ref(false);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const total = ref(0);
+  const prev = ref([]);
 
-const initMonthDialogRef = ref(null);
-const setEntrustDialogRef = ref(null);
+  const initMonthDialogRef = ref(null);
+  const setEntrustDialogRef = ref(null);
 
-const showInitMonth = ref(false);
+  const showInitMonth = ref(false);
 
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  noContract: 0,
-  toTenantId: getTenant(),
-  type: 1,
-});
-
-const editStatus = {
-  startMonth: false,
-};
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    noContract: 0,
+    toTenantId: getTenant(),
+    type: 1,
+  });
 
-function checkCurrentMonthHandle() {
-  checkCurrent().then((res) => {
-    if (res.data.checkResult === true) {
-      setCurrentMonth(res.data.currentMonth);
-      
-      getList();
-    } else {
-      proxy.$modal.msgError("未设置当前月,请设置本月");
-    }
+  const editStatus = {
+    startMonth: false,
+  };
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  function checkCurrentMonthHandle() {
+    checkCurrent().then((res) => {
+      if (res.data.checkResult === true) {
+        setCurrentMonth(res.data.currentMonth);
 
-function showInitMonthDialog() {
-  initMonthDialogRef.value.open();
-}
+        getList();
+      } else {
+        proxy.$modal.msgError("未设置当前月,请设置本月");
+      }
+    });
+  }
 
-/***********************  方法区  ****************************/
+  function showInitMonthDialog() {
+    initMonthDialogRef.value.open();
+  }
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  queryParams.value.currentMonth = currentMonth.value;
-  listFactoryNextWorkOrder(queryParams.value).then((response) => {
-    list.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
+  /***********************  方法区  ****************************/
 
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    queryParams.value.currentMonth = currentMonth.value;
+    listFactoryNextWorkOrder(queryParams.value).then((response) => {
+      list.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
-  single.value = selection.length != 1;
-  multiple.value = selection.length > 0;
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportNextFactory(queryParams.value);
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
+    single.value = selection.length != 1;
+    multiple.value = selection.length > 0;
+  }
 
-function setCurrentMonth(month) {
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportNextFactory(queryParams.value);
+  }
+
+  function setCurrentMonth(month) {
 
-  
-  currentMonth.value = proxy.moment().add(1, 'month').format("YYYY-MM")+"-01";
-}
 
-function setEntrustHandle() {
-  if (!multiple.value) {
-    proxy.$modal.msgError("请选择一条记录!");
-    return;
+    currentMonth.value = proxy.moment().add(1, 'month').format("YYYY-MM") + "-01";
   }
-  setEntrustDialogRef.value.open({
-    selections: selections.value,
-    optionCurrentMonth: currentMonth.value,
-  });
-}
 
-function delEntrustHandle() {
-  if (!multiple.value) {
-    proxy.$modal.msgError("请选择一条记录!");
-    return;
+  function setEntrustHandle() {
+    if (!multiple.value) {
+      proxy.$modal.msgError("请选择一条记录!");
+      return;
+    }
+    setEntrustDialogRef.value.open({
+      selections: selections.value,
+      optionCurrentMonth: currentMonth.value,
+    });
   }
-  const entrust = {
-    workMonth: currentMonth.value,
-    workOrderIds: ids.value,
-  };
-  proxy.$modal.confirm("是否确认取消委托?").then(() => {
-    delEntrust(entrust).then((res) => {
-      proxy.$modal.msgSuccess("取消成功");
-      getList();
+
+  function delEntrustHandle() {
+    if (!multiple.value) {
+      proxy.$modal.msgError("请选择一条记录!");
+      return;
+    }
+    const entrust = {
+      workMonth: currentMonth.value,
+      workOrderIds: ids.value,
+    };
+    proxy.$modal.confirm("是否确认取消委托?").then(() => {
+      delEntrust(entrust).then((res) => {
+        proxy.$modal.msgSuccess("取消成功");
+        getList();
+      });
     });
-  });
-}
+  }
 
-function handleAddEntrust(data) {
-  addEntrust(data).then((response) => {
-    proxy.$modal.msgSuccess("设置完成!");
-    setEntrustDialogRef.value.cancel();
-    getList();
-  });
-}
+  function handleAddEntrust(data) {
+    addEntrust(data).then((response) => {
+      proxy.$modal.msgSuccess("设置完成!");
+      setEntrustDialogRef.value.cancel();
+      getList();
+    });
+  }
 
-checkCurrentMonthHandle();
-</script>
+  checkCurrentMonthHandle();
+</script>

+ 140 - 180
src/views/business/entrust/workOrderForFactory/once/index.vue

@@ -8,235 +8,195 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-if="viewAdviser('business:entrust:workOrder:once:export')"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport"
+              v-if="viewAdviser('business:entrust:workOrder:once:export')">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
       <el-table-column label="客户名称" align="center" prop="companyName" />
-      <el-table-column
-        label="税号"
-        align="center"
-        prop="socialCreditCode"
-        width="200"
-      />
-      <el-table-column
-        label="来源"
-        align="center"
-        width="100"
-        prop="fromCompanyName"
-      />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" width="200" />
+      <el-table-column label="来源" align="center" width="100" prop="fromCompanyName" />
       <el-table-column label="工单类型" align="center" prop="amount" width="80">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="项目"
-        align="center"
-        prop="taskTypeName"
-        width="140"
-      >
+      <el-table-column label="项目" align="center" prop="taskTypeName" width="140">
         <template #default="scope">
           {{ scope.row.noContract === 1 ? scope.row.remark : "" }}
           {{ scope.row.taskTypeName }}
           {{
-            scope.row.taskTypeDetailName
-              ? `-${scope.row.taskTypeDetailName}`
-              : ""
+          scope.row.taskTypeDetailName
+          ? `-${scope.row.taskTypeDetailName}`
+          : ""
           }}
         </template>
       </el-table-column>
       <el-table-column label="工单执行人" align="center" width="100">
         <template #default="scope">
           {{
-            scope.row.entrust != null
-              ? scope.row.entrust.toAccountName
-              : scope.row.serviceName
+          scope.row.entrust != null
+          ? scope.row.entrust.toAccountName
+          : scope.row.serviceName
           }}
         </template>
       </el-table-column>
     </el-table>
     <!-- <contract-form ref="contractRef" :get-list="getList" /> -->
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="Company">
-import { getTenant } from "@/utils/auth";
-import useUserStore from "@/store/modules/user";
-
-import {
-  listFactoryOnceWorkOrder,
-  checkCurrent,
-  exportOnceWorkOrder,
-  delEntrust,
-  transNext,
-  addEntrust,
-} from "@/api/business/entrust/onceWorkOrder";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const selections = ref([]);
-const single = ref(false);
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const multiple = ref(false);
-const total = ref(0);
-const prev = ref([]);
-
-const setEntrustDialogRef = ref(null);
-
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  toTenantId: getTenant(),
-  type: 2,
-});
-
-const editStatus = {
-  startMonth: false,
-};
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listFactoryOnceWorkOrder(queryParams.value).then((response) => {
-    list.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  import { getTenant } from "@/utils/auth";
+  import useUserStore from "@/store/modules/user";
+
+  import {
+    listFactoryOnceWorkOrder,
+    checkCurrent,
+    exportOnceWorkOrder,
+    delEntrust,
+    transNext,
+    addEntrust,
+  } from "@/api/business/entrust/onceWorkOrder";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const selections = ref([]);
+  const single = ref(false);
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const multiple = ref(false);
+  const total = ref(0);
+  const prev = ref([]);
+
+  const setEntrustDialogRef = ref(null);
+
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    toTenantId: getTenant(),
+    type: 2,
   });
-}
 
-//判断是否有权限
-function viewAdviser(quer) {
-  return permissions.includes(all_permission) || permissions.includes(quer);
-}
+  const editStatus = {
+    startMonth: false,
+  };
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /***********************  方法区  ****************************/
+
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listFactoryOnceWorkOrder(queryParams.value).then((response) => {
+      list.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  selections.value = selection;
-  single.value = selection.length != 1;
-  multiple.value = selection.length > 0;
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  exportOnceWorkOrder(queryParams.value);
-}
-
-function setEntrustHandle() {
-  if (!multiple.value) {
-    proxy.$modal.msgError("请选择一条记录!");
-    return;
+  //判断是否有权限
+  function viewAdviser(quer) {
+    return permissions.includes(all_permission) || permissions.includes(quer);
+  }
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
   }
-  setEntrustDialogRef.value.open({ selections: selections.value });
-}
 
-function delEntrustHandle() {
-  if (!multiple.value) {
-    proxy.$modal.msgError("请选择一条记录!");
-    return;
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
   }
-  const entrust = {
-    workOrderIds: ids.value,
-  };
-  proxy.$modal.confirm("是否确认取消委托?").then(() => {
-    delEntrust(entrust).then((res) => {
-      proxy.$modal.msgSuccess("取消成功");
-      getList();
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    selections.value = selection;
+    single.value = selection.length != 1;
+    multiple.value = selection.length > 0;
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportOnceWorkOrder(queryParams.value);
+  }
+
+  function setEntrustHandle() {
+    if (!multiple.value) {
+      proxy.$modal.msgError("请选择一条记录!");
+      return;
+    }
+    setEntrustDialogRef.value.open({ selections: selections.value });
+  }
+
+  function delEntrustHandle() {
+    if (!multiple.value) {
+      proxy.$modal.msgError("请选择一条记录!");
+      return;
+    }
+    const entrust = {
+      workOrderIds: ids.value,
+    };
+    proxy.$modal.confirm("是否确认取消委托?").then(() => {
+      delEntrust(entrust).then((res) => {
+        proxy.$modal.msgSuccess("取消成功");
+        getList();
+      });
     });
-  });
-}
+  }
 
-function handleAddEntrust(data) {
-  addEntrust(data).then((response) => {
-    proxy.$modal.msgSuccess("设置完成!");
-    setEntrustDialogRef.value.cancel();
-    getList();
-  });
-}
+  function handleAddEntrust(data) {
+    addEntrust(data).then((response) => {
+      proxy.$modal.msgSuccess("设置完成!");
+      setEntrustDialogRef.value.cancel();
+      getList();
+    });
+  }
 
-function transEntrustHandler() {
-  proxy.$modal.confirm("确定流转到下一月?").then(() => {
-    transNext().then((res) => {
-      proxy.$modal.msgSuccess("流转成功");
-      checkCurrentMonthHandle();
+  function transEntrustHandler() {
+    proxy.$modal.confirm("确定流转到下一月?").then(() => {
+      transNext().then((res) => {
+        proxy.$modal.msgSuccess("流转成功");
+        checkCurrentMonthHandle();
+      });
     });
-  });
-}
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 248 - 368
src/views/business/financial/collection/index.vue

@@ -2,15 +2,8 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="danger"
-        size="small"
-        icon="Delete"
-        :disabled="multiple"
-        @click="handleDelete"
-        v-hasPermi="['business:collection:remove']"
-        >删除</el-button
-      >
+      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
+        v-hasPermi="['business:collection:remove']">删除</el-button>
 
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
@@ -18,60 +11,33 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:collection:export']"
-            >
-              导出</el-dropdown-item
-            >
-            <el-dropdown-item
-              icon="Upload"
-              @click="handleImport"
-              v-hasPermi="['business:collection:import']"
-              >导入</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:collection:export']">
+              导出</el-dropdown-item>
+            <el-dropdown-item icon="Upload" @click="handleImport"
+              v-hasPermi="['business:collection:import']">导入</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          style="width: 150px"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" style="width: 150px" placeholder="请输入客户名称" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="合同编号:" prop="contractNo">
-        <el-input
-          v-model="queryParams.contractNo"
-          style="width: 150px"
-          placeholder="请输入合同编号"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.contractNo" style="width: 150px" placeholder="请输入合同编号" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
 
       <el-form-item prop="applierTime" label="审核时间:">
         <el-date-picker v-model="queryParams.dateFilter" type="daterange" clearable format="YYYY - MM - DD "
-        value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期" end-placeholder="业务日期"
-        style="width: 100%;"></el-date-picker>
+          value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期" end-placeholder="业务日期"
+          style="width: 100%;"></el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
@@ -79,389 +45,303 @@
     <!-- 列表区 -->
     <!-- 
       :summary-method="getSummaries" -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      show-summary
-      :summary-method="getSummaries"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" show-summary :summary-method="getSummaries" border
+      height="100%" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        v-if="getShowStatus(2)"
-        label="客户"
-        prop="companyName"
-        min-width="250"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(3)"
-        label="合同编号"
-        prop="contractNo"
-        min-width="150"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(4)"
-        label="实际付款时间"
-        prop="actuallyDate"
-        width="100"
-        align="center"
-      >
+      <el-table-column v-if="getShowStatus(2)" label="客户" prop="companyName" min-width="250" align="center" />
+      <el-table-column v-if="getShowStatus(3)" label="合同编号" prop="contractNo" min-width="150" align="center" />
+      <el-table-column v-if="getShowStatus(4)" label="实际付款时间" prop="actuallyDate" width="100" align="center">
         <template #default="scope">
           {{
-            scope.row.actuallyDate
-              ? moment(scope.row.actuallyDate).format("YYYY-MM-DD")
-              : ""
+          scope.row.actuallyDate
+          ? moment(scope.row.actuallyDate).format("YYYY-MM-DD")
+          : ""
           }}
         </template>
       </el-table-column>
-      <el-table-column label="审核时间" prop="verifyDate" width="80" align="center"> 
+      <el-table-column label="审核时间" prop="verifyDate" width="80" align="center">
         <template #default="scope">
           {{
-            scope.row.verifyDate
-              ? moment(scope.row.verifyDate).format("YYYY-MM-DD")
-              : ""
+          scope.row.verifyDate
+          ? moment(scope.row.verifyDate).format("YYYY-MM-DD")
+          : ""
           }}
         </template>
-        </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(5)"
-        label="收款时间"
-        prop="paymentCause"
-        align="center"
-      />
+      </el-table-column>
+      <el-table-column v-if="getShowStatus(5)" label="收款时间" prop="paymentCause" align="center" />
       <!-- <el-table-column label="支出科目" prop="paymentSubject" align="center" /> -->
-      <el-table-column
-        v-if="getShowStatus(8)"
-        width="80"
-        label="收款金额"
-        prop="arriveAmount"
-        header-align="center"
-        align="right"
-      >
+      <el-table-column v-if="getShowStatus(8)" width="80" label="收款金额" prop="arriveAmount" header-align="center"
+        align="right">
         <template #default="scope">
           <span>{{ rowNum(scope.row.arriveAmount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(9)"
-        label="申请人"
-        prop="applierName"
-        min-width="100"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(11)"
-        label="审核状态"
-        prop="status"
-        min-width="90"
-        align="center"
-      >
+      <el-table-column v-if="getShowStatus(9)" label="申请人" prop="applierName" min-width="100" align="center" />
+      <el-table-column v-if="getShowStatus(11)" label="审核状态" prop="status" min-width="90" align="center">
         <template #header>
           <!-- <el-badge v-if="unVerifiedNum > 0 && verifiable" is-dot>审核状态</el-badge> -->
           <div>审核状态</div>
         </template>
         <template #default="scope">
-          <span v-if="scope.row.status === 0" style="color: #cd853f"
-            >未审核</span
-          >
-          <span v-else-if="scope.row.status === 1" style="color: #32cd32"
-            >审核通过</span
-          >
-          <span v-else-if="scope.row.status === 2" style="color: #dc143c"
-            >审核不通过</span
-          >
+          <span v-if="scope.row.status === 0" style="color: #cd853f">未审核</span>
+          <span v-else-if="scope.row.status === 1" style="color: #32cd32">审核通过</span>
+          <span v-else-if="scope.row.status === 2" style="color: #dc143c">审核不通过</span>
         </template>
       </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(12)"
-        label="支付状态"
-        min-width="90"
-        prop="arriveStatus"
-        align="center"
-      >
+      <el-table-column v-if="getShowStatus(12)" label="支付状态" min-width="90" prop="arriveStatus" align="center">
         <template #default="scope">
-          <span v-if="scope.row.arriveStatus === 0" style="color: #dc143c"
-            >未支付</span
-          >
-          <span v-else-if="scope.row.arriveStatus === 1" style="color: #32cd32"
-            >已支付</span
-          >
-          <span v-else-if="scope.row.arriveStatus === 2" style="color: #cd853f"
-            >部分支付</span
-          >
+          <span v-if="scope.row.arriveStatus === 0" style="color: #dc143c">未支付</span>
+          <span v-else-if="scope.row.arriveStatus === 1" style="color: #32cd32">已支付</span>
+          <span v-else-if="scope.row.arriveStatus === 2" style="color: #cd853f">部分支付</span>
         </template>
       </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(14)"
-        label="到账日期"
-        prop="actuallyDate"
-        align="center"
-      >
+      <el-table-column v-if="getShowStatus(14)" label="到账日期" prop="actuallyDate" align="center">
         <template #default="scope">
-          {{ (scope.row.arriveDate) }}  {{scope.row.arriveTime}}
+          {{ (scope.row.arriveDate) }} {{scope.row.arriveTime}}
         </template>
       </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(13)"
-        label="备注"
-        prop="remark"
-        align="center"
-        min-width="100"
-      />
+      <el-table-column v-if="getShowStatus(13)" label="备注" prop="remark" align="center" min-width="100" />
       <el-table-column label="操作" width="80" align="center">
         <template #default="scope">
-          <el-button
-            type="primary"
-            size="small"
-            link
-            @click="handleView(scope.row.id)"
-            >查看</el-button
-          >
+          <el-button type="primary" size="small" link @click="handleView(scope.row.id)">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
     <contract-form ref="contractRef" :get-list="getList" />
     <import-excel-dialog ref="importExcelDialogRef" :get-list="getList" />
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="Collection">
-import contractForm from "./form";
-import {
-  listCollection,
-  delCollection,
-  exportCllection,
-} from "@/api/business/financial/collection";
-import importExcelDialog from "./importExcelDialog.vue";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const showRows = ref([2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13,14]);
-const importExcelDialogRef = ref(null);
-const rows = ref([
-  {
-    key: 2,
-    label: "客户名称",
-  },
-  {
-    key: 3,
-    label: "合同编号",
-  },
-  {
-    key: 4,
-    label: "收款日期",
-  },
-  {
-    key: 5,
-    label: "收款时间",
-  },
-  {
-    key: 9,
-    label: "申请人",
-  },
-  {
-    key: 11,
-    label: "审核状态",
-  },
-  {
-    key: 12,
-    label: "支付状态",
-  },
-  {
-    key: 14,
-    label: "确认到账时间",
-  },
-  {
-    key: 13,
-    label: "备注",
-  },
-]);
+  import contractForm from "./form";
+  import {
+    listCollection,
+    delCollection,
+    exportCllection,
+  } from "@/api/business/financial/collection";
+  import importExcelDialog from "./importExcelDialog.vue";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  orderByColumn: "create_time",
-  pageSize: 20,
-});
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const showRows = ref([2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
+  const importExcelDialogRef = ref(null);
+  const rows = ref([
+    {
+      key: 2,
+      label: "客户名称",
+    },
+    {
+      key: 3,
+      label: "合同编号",
+    },
+    {
+      key: 4,
+      label: "收款日期",
+    },
+    {
+      key: 5,
+      label: "收款时间",
+    },
+    {
+      key: 9,
+      label: "申请人",
+    },
+    {
+      key: 11,
+      label: "审核状态",
+    },
+    {
+      key: 12,
+      label: "支付状态",
+    },
+    {
+      key: 14,
+      label: "确认到账时间",
+    },
+    {
+      key: 13,
+      label: "备注",
+    },
+  ]);
 
-/***********************  方法区  ****************************/
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    orderByColumn: "create_time",
+    pageSize: 20,
+  });
 
-/** 查询company列表 */
-function getList() {
-  console.log(1111,queryParams.value);
-  loading.value = true;
-  listCollection(queryParams.value).then((response) => {
-    orderList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  /** 查询company列表 */
+  function getList() {
+    console.log(1111, queryParams.value);
+    loading.value = true;
+    listCollection(queryParams.value).then((response) => {
+      orderList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-function getSummaries(param) {
-  const { columns, data } = param;
-  const sums = [];
-  let indexOf;
-  columns.forEach((column, index) => {
-    if (column.label != "收款金额") {
-      return;
-    }
-    indexOf = index;
-    const values = [];
+  function getSummaries(param) {
+    const { columns, data } = param;
+    const sums = [];
+    let indexOf;
+    columns.forEach((column, index) => {
+      if (column.label != "收款金额") {
+        return;
+      }
+      indexOf = index;
+      const values = [];
 
-    data.map((item) => {
-      if (item.arriveStatus == 1) {
-        if (item.arriveAmount) {
-          values.push(item.arriveAmount);
+      data.map((item) => {
+        if (item.arriveStatus == 1) {
+          if (item.arriveAmount) {
+            values.push(item.arriveAmount);
+          }
         }
+      });
+
+      if (!values.every((value) => Number.isNaN(value))) {
+        sums[index] = ` ${values.reduce((prev, curr) => {
+          const value = Number(curr);
+          if (!Number.isNaN(value)) {
+            return Number(Number(prev) + value).toFixed(2);
+          } else {
+            return Number(prev).toFixed(2);
+          }
+        }, 0)}`;
       }
     });
+    sums[indexOf] = numberToCurrencyNo(sums[indexOf]);
 
-    if (!values.every((value) => Number.isNaN(value))) {
-      sums[index] = ` ${values.reduce((prev, curr) => {
-        const value = Number(curr);
-        if (!Number.isNaN(value)) {
-          return Number(Number(prev) + value).toFixed(2);
-        } else {
-          return Number(prev).toFixed(2);
-        }
-      }, 0)}`;
-    }
-  });
-  sums[indexOf] = numberToCurrencyNo(sums[indexOf]);
-
-  return sums;
-}
+    return sums;
+  }
 
-function numberToCurrencyNo(value) {
-  if (!value) return 0;
-  // 获取整数部分
-  const intPart = Math.trunc(value);
+  function numberToCurrencyNo(value) {
+    if (!value) return 0;
+    // 获取整数部分
+    const intPart = Math.trunc(value);
 
-  // 整数部分处理,增加,
-  const intPartFormat = intPart
-    .toString()
-    .replace(/(\d)(?=(?:\d{3})+$)/g, "$1,");
-  // 预定义小数部分
+    // 整数部分处理,增加,
+    const intPartFormat = intPart
+      .toString()
+      .replace(/(\d)(?=(?:\d{3})+$)/g, "$1,");
+    // 预定义小数部分
 
-  let floatPart = "";
-  // 将数值截取为小数部分和整数部分
-  const valueArray = value.toString().split(".");
-  if (valueArray.length === 2) {
-    // 有小数部分
+    let floatPart = "";
+    // 将数值截取为小数部分和整数部分
+    const valueArray = value.toString().split(".");
+    if (valueArray.length === 2) {
+      // 有小数部分
 
-    floatPart = valueArray[1].toString(); // 取得小数部分
-    return intPartFormat + "." + floatPart;
+      floatPart = valueArray[1].toString(); // 取得小数部分
+      return intPartFormat + "." + floatPart;
+    }
+    return intPartFormat + floatPart;
   }
-  return intPartFormat + floatPart;
-}
 
-function rowNum(num) {
-  num = num.toLocaleString(); // 3,000
-  if (num.indexOf(".") == -1) {
-    num = num + ".00"; //3,000.00
-  } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
-    num = num + "0";
+  function rowNum(num) {
+    num = num.toLocaleString(); // 3,000
+    if (num.indexOf(".") == -1) {
+      num = num + ".00"; //3,000.00
+    } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
+      num = num + "0";
+    }
+    return num;
   }
-  return num;
-}
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  // proxy.resetForm("queryRef");
-  queryParams.value = {
-    pageNum: 1,
-    pageSize: 20,
-    nonpayment: true,
-  };
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    // proxy.resetForm("queryRef");
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      nonpayment: true,
+    };
+    handleQuery();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-/** 新增按钮操作 */
-function handleView(id) {
-  proxy.$refs.contractRef.open(id);
-}
+  /** 新增按钮操作 */
+  function handleView(id) {
+    proxy.$refs.contractRef.open(id);
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delCollection(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delCollection(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-function handleAlter(row) {
-  const id = row.id || ids.value;
-  proxy.$refs.contractRef.openSimple(id, "alterOrder");
-}
+  function handleAlter(row) {
+    const id = row.id || ids.value;
+    proxy.$refs.contractRef.openSimple(id, "alterOrder");
+  }
 
-function handleDissolution() {
-  const row = orderList.value.find((item) => item.id === ids.value[0]);
-  proxy.$modal
-    .confirm("是否确认解除合同?")
-    .then(function () {
-      return dissolutionOrder(row);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  function handleDissolution() {
+    const row = orderList.value.find((item) => item.id === ids.value[0]);
+    proxy.$modal
+      .confirm("是否确认解除合同?")
+      .then(function () {
+        return dissolutionOrder(row);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportCllection(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportCllection(queryParams.value);
+  }
 
-function handleImport() {
-  importExcelDialogRef.value.open();
-}
+  function handleImport() {
+    importExcelDialogRef.value.open();
+  }
 
-function getShowStatus(key) {
-  const index = showRows.value.findIndex((l) => l === key);
-  return index >= 0;
-}
+  function getShowStatus(key) {
+    const index = showRows.value.findIndex((l) => l === key);
+    return index >= 0;
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 139 - 231
src/views/business/financial/contract/index.vue

@@ -2,105 +2,42 @@
   <div class="page-container list-container">
     <div class="list-btns-container"></div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          style="width: 150px"
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable style="width: 150px"
+          @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="客户名称"
-        align="center"
-        prop="companyName"
-        min-width="250"
-      />
-      <el-table-column
-        label="税号"
-        align="center"
-        prop="socialCreditCode"
-        min-width="180"
-      />
-      <el-table-column
-        label="合同编号"
-        align="center"
-        prop="contractNo"
-        min-width="150"
-      />
-      <el-table-column
-        label="签约日期"
-        align="center"
-        prop="formDate"
-        width="85"
-      >
+      <el-table-column label="客户名称" align="center" prop="companyName" min-width="250" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="180" />
+      <el-table-column label="合同编号" align="center" prop="contractNo" min-width="150" />
+      <el-table-column label="签约日期" align="center" prop="formDate" width="85">
         <template #default="scope">
           <span>{{ parseTime(scope.row.formDate, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="签约金额"
-        header-align="center"
-        align="right"
-        prop="trueAmount"
-        min-width="90"
-      >
+      <el-table-column label="签约金额" header-align="center" align="right" prop="trueAmount" min-width="90">
         <template #default="scope">
           <span>{{ rowNum(scope.row.trueAmount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="签单人"
-        align="center"
-        prop="signerName"
-        min-width="100"
-      />
-      <el-table-column
-        label="收款状态"
-        align="center"
-        prop="collectionStatus"
-        min-width="140"
-      >
+      <el-table-column label="签单人" align="center" prop="signerName" min-width="100" />
+      <el-table-column label="收款状态" align="center" prop="collectionStatus" min-width="140">
         <template #default="scope">
-          <dict-tag
-            :options="contract_receipt_verify"
-            :value="scope.row.collectionStatus"
-          />
+          <dict-tag :options="contract_receipt_verify" :value="scope.row.collectionStatus" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="合同来源"
-        align="center"
-        prop="sourceCategoryName"
-        min-width="130"
-      />
+      <el-table-column label="合同来源" align="center" prop="sourceCategoryName" min-width="130" />
       <!-- <el-table-column
         label="审核状态"
         align="center"
@@ -114,193 +51,164 @@
           />
         </template>
       </el-table-column> -->
-      <el-table-column
-        label="合同类型"
-        align="center"
-        width="80"
-        prop="contractType"
-      >
+      <el-table-column label="合同类型" align="center" width="80" prop="contractType">
         <template #default="scope">
           {{ scope.row.contractType === 0 ? "新签" : "续签" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="任务类型"
-        align="center"
-        width="80"
-        prop="serviceType"
-      >
+      <el-table-column label="任务类型" align="center" width="80" prop="serviceType">
         <template #default="scope">
           {{ scope.row.serviceType === 1 ? "循环" : "代办" }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="合同状态"
-        min-width="100"
-        align="center"
-        prop="status"
-      >
+      <el-table-column label="合同状态" min-width="100" align="center" prop="status">
         <template #default="scope">
           <dict-tag :options="contract_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        fixed="right"
-        min-width="100"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="操作" align="center" fixed="right" min-width="100" class-name="small-padding fixed-width">
         <template #default="scope">
-          <el-button
-            link
-            type="warning"
-            size="small"
-            @click="handleAdd(scope.row)"
-            v-hasPermi="['business:collection:add']"
-            >新增收款</el-button
-          >
+          <el-button link type="warning" size="small" @click="handleAdd(scope.row)"
+            v-hasPermi="['business:collection:add']">新增收款</el-button>
         </template>
       </el-table-column>
     </el-table>
     <contract-form ref="contractRef" :get-list="getList" />
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="WaitForCollection">
-import contractForm from "./form";
-import { listContract } from "@/api/business/financial/collection";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-const { contract_receipt_verify } = proxy.useDict("contract_receipt_verify");
-console.log(22,contract_verify_status);
-
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  nonpayment: true,
-  orderByColumn: "create_time",
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listContract(queryParams.value).then((response) => {
-    orderList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  // proxy.resetForm("queryRef");
-  queryParams.value = {
+  import contractForm from "./form";
+  import { listContract } from "@/api/business/financial/collection";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  const { contract_receipt_verify } = proxy.useDict("contract_receipt_verify");
+  console.log(22, contract_verify_status);
+
+  /** 查询对象 */
+  const queryParams = ref({
     pageNum: 1,
     pageSize: 20,
     nonpayment: true,
     orderByColumn: "create_time",
-  };
-  handleQuery();
-}
+  });
+
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listContract(queryParams.value).then((response) => {
+      orderList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-// 数字格式化
-function rowNum(num) {
-  num = num.toLocaleString(); // 3,000
-  if (num.indexOf(".") == -1) {
-    num = num + ".00"; //3,000.00
-  } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
-    num = num + "0";
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
   }
-  return num;
-}
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    // proxy.resetForm("queryRef");
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      nonpayment: true,
+      orderByColumn: "create_time",
+    };
+    handleQuery();
+  }
+
+  // 数字格式化
+  function rowNum(num) {
+    num = num.toLocaleString(); // 3,000
+    if (num.indexOf(".") == -1) {
+      num = num + ".00"; //3,000.00
+    } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
+      num = num + "0";
+    }
+    return num;
+  }
 
-/** 新增按钮操作 */
-function handleAdd(row) {
-  proxy.$refs.contractRef.open(row);
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd(row) {
+    proxy.$refs.contractRef.open(row);
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  const id = row.id || ids.value;
-  proxy.$refs.contractRef.open(id);
-}
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    const id = row.id || ids.value;
+    proxy.$refs.contractRef.open(id);
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delOrder(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delOrder(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-function handleAlter(row) {
-  const id = row.id || ids.value;
-  proxy.$refs.contractRef.openSimple(id, "alterOrder");
-}
+  function handleAlter(row) {
+    const id = row.id || ids.value;
+    proxy.$refs.contractRef.openSimple(id, "alterOrder");
+  }
 
-function handleDissolution() {
-  const row = orderList.value.find((item) => item.id === ids.value[0]);
-  proxy.$modal
-    .confirm("是否确认解除合同?")
-    .then(function () {
-      return dissolutionOrder(row);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  function handleDissolution() {
+    const row = orderList.value.find((item) => item.id === ids.value[0]);
+    proxy.$modal
+      .confirm("是否确认解除合同?")
+      .then(function () {
+        return dissolutionOrder(row);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportOrder(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportOrder(queryParams.value);
+  }
 
-function handleImport() {}
+  function handleImport() { }
 
-getList();
+  getList();
 </script>

+ 201 - 342
src/views/business/financial/payment/index.vue

@@ -2,423 +2,282 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-hasPermi="['business:payment:add']"
-        >新增</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
+        v-hasPermi="['business:payment:add']">新增</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:payment:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:payment:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          style="width: 150px"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" style="width: 150px" placeholder="请输入客户名称" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
 
       <el-form-item label="合同编号:" prop="contractNo">
-        <el-input
-          v-model="queryParams.contractNo"
-          style="width: 150px"
-          placeholder="请输入合同编号"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.contractNo" style="width: 150px" placeholder="请输入合同编号" clearable
+          @keyup.enter="handleQuery" />
       </el-form-item>
-      
+
       <el-form-item prop="applierTime" label="审核时间:">
         <el-date-picker v-model="queryParams.dateFilter" type="daterange" clearable format="YYYY - MM - DD "
-        value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期" end-placeholder="业务日期"
-        style="width: 100%;"></el-date-picker>
+          value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期" end-placeholder="业务日期"
+          style="width: 100%;"></el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column type="index" label="序号" width="50" align="center" /> -->
-      <el-table-column
-        v-if="getShowStatus(2)"
-        label="客户名称"
-        prop="companyName"
-        min-width="250"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(16)"
-        label="服务公司"
-        prop="serviceCompanyName"
-        width="200"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(3)"
-        label="合同号"
-        prop="formNo"
-        min-width="200"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(4)"
-        label="申请日期"
-        prop="formDate"
-        min-width="90"
-        align="center"
-      >
+      <el-table-column v-if="getShowStatus(2)" label="客户名称" prop="companyName" min-width="250" align="center" />
+      <el-table-column v-if="getShowStatus(16)" label="服务公司" prop="serviceCompanyName" width="200" align="center" />
+      <el-table-column v-if="getShowStatus(3)" label="合同号" prop="formNo" min-width="200" align="center" />
+      <el-table-column v-if="getShowStatus(4)" label="申请日期" prop="formDate" min-width="90" align="center">
         <template #default="scope">
           {{
-            scope.row.formDate
-              ? moment(scope.row.formDate).format("YYYY-MM-DD")
-              : ""
+          scope.row.formDate
+          ? moment(scope.row.formDate).format("YYYY-MM-DD")
+          : ""
           }}
         </template>
       </el-table-column>
       <!-- <el-table-column label="服务公司" prop="subsidiary" width="150" align="center" /> -->
-      <el-table-column
-        v-if="getShowStatus(5)"
-        label="支出事由"
-        prop="paymentCause"
-        min-width="90"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(6)"
-        label="支出科目"
-        prop="paymentSubject"
-        min-width="90"
-        align="center"
-        show-overflow-tooltip
-      />
-      <el-table-column
-        v-if="getShowStatus(7)"
-        label="支出金额"
-        prop="sumAmount"
-        width="80"
-        header-align="center"
-        align="right"
-      >
+      <el-table-column v-if="getShowStatus(5)" label="支出事由" prop="paymentCause" min-width="90" align="center" />
+      <el-table-column v-if="getShowStatus(6)" label="支出科目" prop="paymentSubject" min-width="90" align="center"
+        show-overflow-tooltip />
+      <el-table-column v-if="getShowStatus(7)" label="支出金额" prop="sumAmount" width="80" header-align="center"
+        align="right">
         <template #default="scope">
           <span>{{ rowNum(scope.row.sumAmount) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="审核日期"
-        prop="verifyDate"
-        width="150"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(8)"
-        label="审核状态"
-        prop="status"
-        min-width="120"
-        align="center"
-      >
+      <el-table-column label="审核日期" prop="verifyDate" width="150" align="center" />
+      <el-table-column v-if="getShowStatus(8)" label="审核状态" prop="status" min-width="120" align="center">
         <template #header>
           <div>审核状态</div>
         </template>
         <template #default="scope">
-          <span v-if="scope.row.verifyStatus === 0" style="color: #cd853f"
-            >未审核</span
-          >
-          <span v-else-if="scope.row.verifyStatus === 1" style="color: #32cd32"
-            >财务审核通过</span
-          >
-          <span v-else-if="scope.row.verifyStatus === 2" style="color: #dc143c"
-            >财务审核不通过</span
-          >
-          <span v-else-if="scope.row.verifyStatus === 3" style="color: #32cd32"
-            >出纳审核通过</span
-          >
-          <span v-else-if="scope.row.verifyStatus === 4" style="color: #dc143c"
-            >出纳审核不通过</span
-          >
+          <span v-if="scope.row.verifyStatus === 0" style="color: #cd853f">未审核</span>
+          <span v-else-if="scope.row.verifyStatus === 1" style="color: #32cd32">财务审核通过</span>
+          <span v-else-if="scope.row.verifyStatus === 2" style="color: #dc143c">财务审核不通过</span>
+          <span v-else-if="scope.row.verifyStatus === 3" style="color: #32cd32">出纳审核通过</span>
+          <span v-else-if="scope.row.verifyStatus === 4" style="color: #dc143c">出纳审核不通过</span>
         </template>
       </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(9)"
-        label="支付状态"
-        min-width="100"
-        prop="arriveStatus"
-        align="center"
-      >
+      <el-table-column v-if="getShowStatus(9)" label="支付状态" min-width="100" prop="arriveStatus" align="center">
         <template #default="scope">
-          <span v-if="scope.row.paymentStatus === 0" style="color: #dc143c"
-            >未支付</span
-          >
-          <span v-else-if="scope.row.paymentStatus === 1" style="color: #32cd32"
-            >已支付</span
-          >
-          <span v-else-if="scope.row.paymentStatus === 2" style="color: #cd853f"
-            >部分支付</span
-          >
+          <span v-if="scope.row.paymentStatus === 0" style="color: #dc143c">未支付</span>
+          <span v-else-if="scope.row.paymentStatus === 1" style="color: #32cd32">已支付</span>
+          <span v-else-if="scope.row.paymentStatus === 2" style="color: #cd853f">部分支付</span>
         </template>
       </el-table-column>
-      <el-table-column
-        v-if="getShowStatus(10)"
-        label="收款账户名"
-        prop="acceptAccount"
-        min-width="100"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(11)"
-        label="收款账号"
-        prop="acceptAccountNo"
-        width="90"
-        align="center"
-      />
+      <el-table-column v-if="getShowStatus(10)" label="收款账户名" prop="acceptAccount" min-width="100" align="center" />
+      <el-table-column v-if="getShowStatus(11)" label="收款账号" prop="acceptAccountNo" width="90" align="center" />
 
-      <el-table-column
-        v-if="getShowStatus(13)"
-        label="申请人"
-        prop="applierName"
-        min-width="130"
-        align="center"
-      />
-      <el-table-column
-        v-if="getShowStatus(14)"
-        label="备注"
-        prop="remark"
-        align="center"
-      />
+      <el-table-column v-if="getShowStatus(13)" label="申请人" prop="applierName" min-width="130" align="center" />
+      <el-table-column v-if="getShowStatus(14)" label="备注" prop="remark" align="center" />
       <el-table-column label="操作" fixed="right" width="60" align="center">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="handleFormPageOpen(scope.row.id)"
-            >查看</el-button
-          >
+          <el-button link type="primary" size="small" @click="handleFormPageOpen(scope.row.id)">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
     <payment-form ref="paymentRef" :get-list="getList" />
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script setup name="Payment">
-import paymentForm from "./form";
-import { listPayment, exportPayment } from "@/api/business/financial/payment";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const showRows = ref([2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13]);
-const rows = ref([
-  {
-    key: 2,
-    label: "客户名称",
-  },
-  {
-    key: 3,
-    label: "合同编号",
-  },
-  {
-    key: 4,
-    label: "收款日期",
-  },
-  {
-    key: 5,
-    label: "收款时间",
-  },
-  {
-    key: 9,
-    label: "申请人",
-  },
-  {
-    key: 11,
-    label: "审核状态",
-  },
-  {
-    key: 12,
-    label: "支付状态",
-  },
-  {
-    key: 14,
-    label: "确认到账时间",
-  },
-  {
-    key: 13,
-    label: "备注",
-  },
-]);
-
-const { contract_verify_status } = proxy.useDict("contract_verify_status");
-const { contract_status } = proxy.useDict("contract_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  orderByColumn: "create_time",
-  pageSize: 20,
-});
+  import paymentForm from "./form";
+  import { listPayment, exportPayment } from "@/api/business/financial/payment";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-/***********************  方法区  ****************************/
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const showRows = ref([2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13]);
+  const rows = ref([
+    {
+      key: 2,
+      label: "客户名称",
+    },
+    {
+      key: 3,
+      label: "合同编号",
+    },
+    {
+      key: 4,
+      label: "收款日期",
+    },
+    {
+      key: 5,
+      label: "收款时间",
+    },
+    {
+      key: 9,
+      label: "申请人",
+    },
+    {
+      key: 11,
+      label: "审核状态",
+    },
+    {
+      key: 12,
+      label: "支付状态",
+    },
+    {
+      key: 14,
+      label: "确认到账时间",
+    },
+    {
+      key: 13,
+      label: "备注",
+    },
+  ]);
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listPayment(queryParams.value).then((response) => {
-    orderList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
+  const { contract_verify_status } = proxy.useDict("contract_verify_status");
+  const { contract_status } = proxy.useDict("contract_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    orderByColumn: "create_time",
+    pageSize: 20,
   });
-}
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listPayment(queryParams.value).then((response) => {
+      orderList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  // proxy.resetForm("queryRef");
-  queryParams.value = {
-    pageNum: 1,
-    pageSize: 20,
-    nonpayment: true,
-  };
-  handleQuery();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    // proxy.resetForm("queryRef");
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      nonpayment: true,
+    };
+    handleQuery();
+  }
 
-/** 新增按钮操作 */
-function handleView(id) {
-  proxy.$refs.paymentRef.open(id);
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-// 数字格式化
-function rowNum(num) {
-  if (!num) {
-    return;
+  /** 新增按钮操作 */
+  function handleView(id) {
+    proxy.$refs.paymentRef.open(id);
   }
-  num = num.toLocaleString(); // 3,000
-  if (num.indexOf(".") == -1) {
-    num = num + ".00"; //3,000.00
-  } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
-    num = num + "0";
+
+  // 数字格式化
+  function rowNum(num) {
+    if (!num) {
+      return;
+    }
+    num = num.toLocaleString(); // 3,000
+    if (num.indexOf(".") == -1) {
+      num = num + ".00"; //3,000.00
+    } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
+      num = num + "0";
+    }
+    return num;
   }
-  return num;
-}
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delOrder(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delOrder(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-function handleAlter(row) {
-  const id = row.id || ids.value;
-  proxy.$refs.paymentRef.openSimple(id, "alterOrder");
-}
+  function handleAlter(row) {
+    const id = row.id || ids.value;
+    proxy.$refs.paymentRef.openSimple(id, "alterOrder");
+  }
 
-function handleDissolution() {
-  const row = orderList.value.find((item) => item.id === ids.value[0]);
-  proxy.$modal
-    .confirm("是否确认解除合同?")
-    .then(function () {
-      return dissolutionOrder(row);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  function handleDissolution() {
+    const row = orderList.value.find((item) => item.id === ids.value[0]);
+    proxy.$modal
+      .confirm("是否确认解除合同?")
+      .then(function () {
+        return dissolutionOrder(row);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportPayment(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportPayment(queryParams.value);
+  }
 
-function handleImport() {}
+  function handleImport() { }
 
-function getShowStatus(key) {
-  const index = showRows.value.findIndex((l) => l === key);
-  return index >= 0;
-}
+  function getShowStatus(key) {
+    const index = showRows.value.findIndex((l) => l === key);
+    return index >= 0;
+  }
 
-function handleAdd() {
-  proxy.$refs.paymentRef.open();
-}
+  function handleAdd() {
+    proxy.$refs.paymentRef.open();
+  }
 
-function handleFormPageOpen(id) {
-  proxy.$refs.paymentRef.open(id);
-}
+  function handleFormPageOpen(id) {
+    proxy.$refs.paymentRef.open(id);
+  }
 
-getList();
+  getList();
 </script>

+ 8 - 4
src/views/business/housingFund/confirm/index.vue

@@ -55,7 +55,7 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <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">
@@ -67,8 +67,9 @@
       @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="客户名称" align="center" prop="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" width="120" align="center" prop="taxType" />
       <el-table-column label="所属期" min-width="90" align="center">
         <template #default="scope">
@@ -326,7 +327,10 @@
   };
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 8 - 4
src/views/business/housingFund/declare/index.vue

@@ -52,7 +52,7 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <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">
@@ -64,8 +64,9 @@
       @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="客户名称" min-width="250" align="center" prop="companyName" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" width="100" align="center" prop="taxType" />
       <el-table-column label="人员信息" width="100" align="center" prop="">
         <template #default="scope">
@@ -298,7 +299,10 @@
     month: proxy.moment().format("MM"),
     principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /***********************  方法区  ****************************/
 
   /** 查询company列表 */

+ 17 - 13
src/views/business/invoice/index.vue

@@ -30,21 +30,22 @@
         <!-- 搜索区 -->
         <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
             <el-form-item label="收票方:" prop="invoiceOther">
-                <el-input size="small" v-model="queryParams.invoiceOther" style="width: 150px"  placeholder="请输入收票方" clearable
-                    @keyup.enter="handleQuery" />
+                <el-input size="small" v-model="queryParams.invoiceOther" style="width: 150px" placeholder="请输入收票方"
+                    clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item label="合同编号: " prop="contractNo">
-                <el-input size="small" v-model="queryParams.contractNo" style="width: 150px"  placeholder="合同编号" clearable
-                    @keyup.enter="handleQuery" />
+                <el-input size="small" v-model="queryParams.contractNo" style="width: 150px" placeholder="合同编号"
+                    clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item label="发票类型: " prop="invoiceType">
-                <el-select v-model="queryParams.invoiceType" placeholder="请选择发票类型" size="small" clearable style="width: 150px" >
+                <el-select v-model="queryParams.invoiceType" placeholder="请选择发票类型" size="small" clearable
+                    style="width: 150px">
                     <el-option label="增值税专用发票" value="1"></el-option>
                     <el-option label="增值税普通发票" value="2"></el-option>
                 </el-select>
             </el-form-item>
             <el-form-item label="状态:" prop="status">
-                <el-select v-model="queryParams.status" placeholder="请选择状态" size="small" clearable style="width: 150px" >
+                <el-select v-model="queryParams.status" placeholder="请选择状态" size="small" clearable style="width: 150px">
                     <el-option label="未提交" value="0"></el-option>
                     <el-option label="待开票" value="1"></el-option>
                     <el-option label="已拒绝" value="2"></el-option>
@@ -52,8 +53,8 @@
                 </el-select>
             </el-form-item>
             <el-form-item label="申请人: " prop="applierName">
-                <el-input size="small" v-model="queryParams.applierName" style="width: 150px"  placeholder="申请人" clearable
-                    @keyup.enter="handleQuery" />
+                <el-input size="small" v-model="queryParams.applierName" style="width: 150px" placeholder="申请人"
+                    clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item prop="dateFilter" label="申请时间:">
                 <el-date-picker v-model="queryParams.dateFilter" type="daterange" clearable size="small"
@@ -61,8 +62,8 @@
                     end-placeholder="业务日期" style="width: 100%;"></el-date-picker>
             </el-form-item>
             <el-form-item label="开票人:" prop="invoiceName">
-                <el-input size="small" v-model="queryParams.invoiceName" placeholder="请输入开票人" clearable style="width: 150px" 
-                    @keyup.enter="handleQuery" />
+                <el-input size="small" v-model="queryParams.invoiceName" placeholder="请输入开票人" clearable
+                    style="width: 150px" @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item prop="invoiceDateFilter" label="开票时间:">
                 <el-date-picker v-model="queryParams.invoiceDateFilter" type="daterange" clearable size="small"
@@ -109,8 +110,8 @@
 
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                 <template #default="scope">
-                    <el-button link type="warning" size="small" icon="Edit"
-                        @click="handleUpdate(scope.row)"   v-hasPermi="['business:invoice:query']">查看</el-button>
+                    <el-button link type="warning" size="small" icon="Edit" @click="handleUpdate(scope.row)"
+                        v-hasPermi="['business:invoice:query']">查看</el-button>
                     <!-- <el-button link type="warning" size="small" icon="Edit" @click="handleUpdate(scope.row)"
                         v-hasPermi="['business:invoice:edit']">修改</el-button> -->
                     <!-- <el-button link type="danger" size="small" icon="Delete" @click="handleDelete(scope.row)"
@@ -162,7 +163,10 @@
     })
 
     /***********************  方法区  ****************************/
-
+    onActivated(() => {
+        // 你的逻辑
+        getList();
+    });
     /** 查询企业租户列表 */
     function getList() {
         loading.value = true;

+ 299 - 437
src/views/business/paymentEntry/type/index.vue

@@ -6,8 +6,7 @@
         <div class="page-container list-container">
           <!--操作按钮 开始-->
           <div>
-            <span
-              style="
+            <span style="
                 display: inline-block;
                 height: 20px;
                 line-height: 18px;
@@ -16,120 +15,52 @@
                 margin-top: 5px;
                 font-weight: 700;
                 border-left: 3px;
-              "
-              >支出类目</span
-            >
-            <el-button
-              type="primary"
-              size="small"
-              v-hasPermi="['paymentEntry:type:add']"
-              icon="plus"
-              @click="newType"
-            >
-              新增</el-button
-            >
+              ">支出类目</span>
+            <el-button type="primary" size="small" v-hasPermi="['paymentEntry:type:add']" icon="plus" @click="newType">
+              新增</el-button>
 
-            <el-button
-              type="success"
-              size="small"
-              icon="refresh"
-              @click="loadData"
-            >
-              刷新</el-button
-            >
+            <el-button type="success" size="small" icon="refresh" @click="loadData">
+              刷新</el-button>
           </div>
-          <div
-            class="el-table-container"
-            style="height: 100%; position: relative; overflow: auto"
-          >
-            <div
-              style="
+          <div class="el-table-container" style="height: 100%; position: relative; overflow: auto">
+            <div style="
                 height: 100%;
                 position: absolute;
                 top: 0;
                 left: 0;
                 right: 0;
                 bottom: 0;
-              "
-            >
-              <el-table
-                class="table-falex"
-                v-loading="loading"
-                :data="typeList"
-                size="small"
-                border
-                height="100%"
-                @row-click="rowClick"
-                @selection-change="handleSelectionChange"
-                highlight-current-row="true"
-              >
+              ">
+              <el-table class="table-falex" v-loading="loading" :data="typeList" size="small" border height="100%"
+                @row-click="rowClick" @selection-change="handleSelectionChange" highlight-current-row="true">
                 <el-table-column label="支出类目" align="center" prop="name">
                   <template #default="scope">
-                    <el-input
-                      size="small"
-                      v-if="scope.row.isAdd || scope.row.isEdit"
-                      v-model="scope.row.name"
-                      placeholder="请输入支出类目"
-                    ></el-input>
+                    <el-input size="small" v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.name"
+                      placeholder="请输入支出类目"></el-input>
                     <span v-else>{{ scope.row.name }}</span>
                   </template>
                 </el-table-column>
 
                 <el-table-column label="备注" align="center" prop="remark">
                   <template #default="scope">
-                    <el-input
-                      size="small"
-                      v-if="scope.row.isAdd || scope.row.isEdit"
-                      v-model="scope.row.remark"
-                      placeholder="请输入备注"
-                    ></el-input>
+                    <el-input size="small" v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.remark"
+                      placeholder="请输入备注"></el-input>
                     <span v-else>{{ scope.row.remark }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  label="操作"
-                  align="center"
-                  class-name="small-padding fixed-width"
-                >
+                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                   <template #default="scope">
                     <template v-if="!scope.row.isAdd && !scope.row.isEdit">
-                      <el-button
-                        v-show="!scope.row.isAdd && !scope.row.isEdit"
-                        link
-                        type="warning"
-                        size="small"
-                        @click="handleUpdate(scope.row)"
-                        circle
-                        v-hasPermi="['paymentEntry:type:edit']"
-                        >修改</el-button
-                      >
-                      <el-button
-                        v-show="!scope.row.isAdd && !scope.row.isEdit"
-                        link
-                        type="danger"
-                        size="small"
-                        @click="handleDelete(scope.row)"
-                        v-hasPermi="['paymentEntry:type:remove']"
-                        >删除</el-button
-                      >
+                      <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="warning" size="small"
+                        @click="handleUpdate(scope.row)" circle v-hasPermi="['paymentEntry:type:edit']">修改</el-button>
+                      <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="danger" size="small"
+                        @click="handleDelete(scope.row)" v-hasPermi="['paymentEntry:type:remove']">删除</el-button>
                     </template>
                     <template v-if="scope.row.isEdit || scope.row.isAdd">
-                      <el-button
-                        v-if="scope.row.isEdit || scope.row.isAdd"
-                        link
-                        type="primary"
-                        size="small"
-                        @click="typeleSave(scope.row)"
-                        >保存</el-button
-                      >
-                      <el-button
-                        v-if="scope.row.isEdit || scope.row.isAdd"
-                        link
-                        type="Delete"
-                        size="small"
-                        @click="handleCancel(scope.row)"
-                        >取消</el-button
-                      >
+                      <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="primary" size="small"
+                        @click="typeleSave(scope.row)">保存</el-button>
+                      <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="Delete" size="small"
+                        @click="handleCancel(scope.row)">取消</el-button>
                     </template>
                   </template>
                 </el-table-column>
@@ -141,8 +72,7 @@
       <el-col :span="14" style="height: 100%">
         <div class="page-container list-container">
           <div>
-            <span
-              style="
+            <span style="
                 display: inline-block;
                 height: 20px;
                 line-height: 18px;
@@ -151,115 +81,49 @@
                 margin-top: 5px;
                 font-weight: 700;
                 border-left: 3px;
-              "
-              >支付科目</span
-            >
+              ">支付科目</span>
             <template v-if="currentDepartment !== null">
-              <el-button
-                type="primary"
-                size="small"
-                icon="plus"
-                v-hasPermi="['expenditure:subject:add']"
-                @click="newSubType"
-                >新增</el-button
-              >
+              <el-button type="primary" size="small" icon="plus" v-hasPermi="['expenditure:subject:add']"
+                @click="newSubType">新增</el-button>
             </template>
-            <el-button
-              type="success"
-              size="small"
-              icon="refresh"
-              @click="loadSubData"
-            >
-              刷新</el-button
-            >
+            <el-button type="success" size="small" icon="refresh" @click="loadSubData">
+              刷新</el-button>
           </div>
           <div class="el-table-container" style="height: 100%">
             <div style="height: 100%">
-              <el-table
-                v-loading="loading"
-                :data="typeSubLis"
-                size="small"
-                border
-                height="100%"
-                @selection-change="handleSelectionChange"
-              >
+              <el-table v-loading="loading" :data="typeSubLis" size="small" border height="100%"
+                @selection-change="handleSelectionChange">
                 <el-table-column label="支付科目" align="center" prop="name">
                   <template #default="scope">
-                    <el-input
-                      size="small"
-                      v-if="scope.row.isAdd || scope.row.isEdit"
-                      v-model="scope.row.name"
-                      placeholder="请输入支付科目"
-                    ></el-input>
+                    <el-input size="small" v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.name"
+                      placeholder="请输入支付科目"></el-input>
                     <span v-else>{{ scope.row.name }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="状态" align="center" prop="status">
                   <template #default="scope">
-                    <el-select
-                      size="small"
-                      style="width: 100%"
-                      v-if="scope.row.isAdd || scope.row.isEdit"
-                      v-model.trim="scope.row.status"
-                      placeholder="选择状态"
-                      :clearable="true"
-                    >
-                      <el-option
-                        v-for="item in subType"
-                        :key="item.label"
-                        :label="item.label"
-                        :value="item.value"
-                      />
+                    <el-select size="small" style="width: 100%" v-if="scope.row.isAdd || scope.row.isEdit"
+                      v-model.trim="scope.row.status" placeholder="选择状态" :clearable="true">
+                      <el-option v-for="item in subType" :key="item.label" :label="item.label" :value="item.value" />
                     </el-select>
                     <span v-else>{{
                       scope.row.status === 0 ? "启用" : "停用"
-                    }}</span>
+                      }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  label="操作"
-                  align="center"
-                  class-name="small-padding fixed-width"
-                >
+                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                   <template #default="scope">
                     <template v-if="!scope.row.isAdd && !scope.row.isEdit">
-                      <el-button
-                        v-show="!scope.row.isAdd && !scope.row.isEdit"
-                        link
-                        type="warning"
-                        size="small"
-                        @click="handleUpdate(scope.row)"
-                        circle
-                        v-hasPermi="['expenditure:subject:edit']"
-                        >修改</el-button
-                      >
-                      <el-button
-                        v-show="!scope.row.isAdd && !scope.row.isEdit"
-                        link
-                        type="danger"
-                        size="small"
-                        @click="handleSubDelete(scope.row)"
-                        v-hasPermi="['expenditure:subject:remove']"
-                        >删除</el-button
-                      >
+                      <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="warning" size="small"
+                        @click="handleUpdate(scope.row)" circle v-hasPermi="['expenditure:subject:edit']">修改</el-button>
+                      <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="danger" size="small"
+                        @click="handleSubDelete(scope.row)" v-hasPermi="['expenditure:subject:remove']">删除</el-button>
                     </template>
                     <template v-if="scope.row.isEdit || scope.row.isAdd">
-                      <el-button
-                        v-if="scope.row.isEdit || scope.row.isAdd"
-                        link
-                        type="primary"
-                        size="small"
-                        @click="typeSubSave(scope.row)"
-                        >保存</el-button
-                      >
-                      <el-button
-                        v-if="scope.row.isEdit || scope.row.isAdd"
-                        link
-                        type="Delete"
-                        size="small"
-                        @click="subCancel(scope.row)"
-                        >取消</el-button
-                      >
+                      <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="primary" size="small"
+                        @click="typeSubSave(scope.row)">保存</el-button>
+                      <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="Delete" size="small"
+                        @click="subCancel(scope.row)">取消</el-button>
                     </template>
                   </template>
                 </el-table-column>
@@ -269,304 +133,302 @@
         </div>
       </el-col>
     </el-row>
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="loadSubData"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="loadSubData" />
   </div>
 </template>
 
 <script setup name="PaymentEntry">
-import {
-  listType,
-  delType,
-  listTypeSub,
-  addType,
-  updateType,
-} from "@/api/business/paymentEntry/type";
-import {
-  addSubject,
-  updateSubject,
-  delSubject,
-} from "@/api/business/paymentEntry/subject";
-import { subType } from "@/utils/default";
+  import {
+    listType,
+    delType,
+    listTypeSub,
+    addType,
+    updateType,
+  } from "@/api/business/paymentEntry/type";
+  import {
+    addSubject,
+    updateSubject,
+    delSubject,
+  } from "@/api/business/paymentEntry/subject";
+  import { subType } from "@/utils/default";
 
-import { ref } from "vue";
-// import typeForm from "./form";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
+  import { ref } from "vue";
+  // import typeForm from "./form";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const typeList = ref([]);
-const typeSubLis = ref([]);
-const bizPaymentSubjectList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const typeId = ref();
-/** 查询对象 */
+  const typeList = ref([]);
+  const typeSubLis = ref([]);
+  const bizPaymentSubjectList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const typeId = ref();
+  /** 查询对象 */
 
-const query = ref({
-  name: null,
-  remark: null,
-  isAdd: false,
-  isEdit: false,
-});
+  const query = ref({
+    name: null,
+    remark: null,
+    isAdd: false,
+    isEdit: false,
+  });
 
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  id: null,
-  name: null,
-  isAdd: false,
-  isEdit: false,
-  status: 0,
-});
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    id: null,
+    name: null,
+    isAdd: false,
+    isEdit: false,
+    status: 0,
+  });
 
-/***********************  方法区  ****************************/
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询支出类目列表 */
+  function getList() {
+    listType(query.value).then((response) => {
+      typeList.value = response.rows;
+
+      if (typeList.value.length > 0) {
+        queryParams.value.paymentTypeId = typeList.value[0].id;
+        typeId.value = typeList.value[0].id;
+        getTypeSubList(queryParams.value);
+      } else {
+        loading.value = false;
+      }
+    });
+  }
 
-/** 查询支出类目列表 */
-function getList() {
-  listType(query.value).then((response) => {
-    typeList.value = response.rows;
+  /** 支出类目列表刷新 */
+  function loadData() {
+    getList();
+  }
 
-    if (typeList.value.length > 0) {
-      queryParams.value.paymentTypeId = typeList.value[0].id;
-      typeId.value = typeList.value[0].id;
+  //支付科目刷新
+  function loadSubData() {
+    if (typeId.value != null) {
+      loading.value = true;
+      queryParams.value.paymentTypeId = typeId.value;
       getTypeSubList(queryParams.value);
-    } else {
-      loading.value = false;
     }
-  });
-}
-
-/** 支出类目列表刷新 */
-function loadData() {
-  getList();
-}
+  }
 
-//支付科目刷新
-function loadSubData() {
-  if (typeId.value != null) {
-    loading.value = true;
-    queryParams.value.paymentTypeId = typeId.value;
+  /** 支出类目列表点击事件 */
+  function rowClick(record) {
+    if (record.isAdd) {
+      return;
+    }
+    queryParams.value.paymentTypeId = record.id;
+    typeId.value = record.id;
     getTypeSubList(queryParams.value);
   }
-}
 
-/** 支出类目列表点击事件 */
-function rowClick(record) {
-  if (record.isAdd) {
-    return;
+  /** 获取支出科目列表 */
+  function getTypeSubList(data) {
+    listTypeSub(data).then((response) => {
+      typeSubLis.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
   }
-  queryParams.value.paymentTypeId = record.id;
-  typeId.value = record.id;
-  getTypeSubList(queryParams.value);
-}
 
-/** 获取支出科目列表 */
-function getTypeSubList(data) {
-  listTypeSub(data).then((response) => {
-    typeSubLis.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
+  /** 新增支付科目 */
+  function newSubType() {
+    // 此处必须进行深拷贝,否则添加的明细,将都指向了一个对象
+    const _newSource = JSON.parse(JSON.stringify(queryParams.value));
+    typeSubLis.value.push(_newSource);
+    handleSourceCurrentChange(_newSource);
+  }
 
-/** 新增支付科目 */
-function newSubType() {
-  // 此处必须进行深拷贝,否则添加的明细,将都指向了一个对象
-  const _newSource = JSON.parse(JSON.stringify(queryParams.value));
-  typeSubLis.value.push(_newSource);
-  handleSourceCurrentChange(_newSource);
-}
+  /** 支出科目保存 */
+  function typeSubSave(row) {
+    if (typeList.value.length == 0) {
+      proxy.$modal.msgError("请先添加支出类目");
+      return;
+    }
+    if (typeId.value == null || typeId.value === "") {
+      proxy.$modal.msgError("请选择支出类目");
+      return;
+    }
+    if (row.name == "" || row.name == null) {
+      proxy.$modal.msgError("支付科目不能为空");
+      return;
+    }
+    if (row.status == null || row.status === "") {
+      proxy.$modal.msgError("状态不能为空");
+      return;
+    }
+    loading.value = true;
 
-/** 支出科目保存 */
-function typeSubSave(row) {
-  if (typeList.value.length == 0) {
-    proxy.$modal.msgError("请先添加支出类目");
-    return;
-  }
-  if (typeId.value == null || typeId.value === "") {
-    proxy.$modal.msgError("请选择支出类目");
-    return;
-  }
-  if (row.name == "" || row.name == null) {
-    proxy.$modal.msgError("支付科目不能为空");
-    return;
-  }
-  if (row.status == null || row.status === "") {
-    proxy.$modal.msgError("状态不能为空");
-    return;
+    if (row.isAdd) {
+      addSubject(row).then((response) => {
+        if (response.code === 200) {
+          proxy.$modal.msgSuccess("保存成功");
+          queryParams.value.paymentTypeId = typeId.value;
+          getTypeSubList(queryParams.value);
+        }
+      });
+    } else {
+      updateSubject(row).then((response) => {
+        if (response.code === 200) {
+          proxy.$modal.msgSuccess("保存成功");
+          queryParams.value.paymentTypeId = typeId.value;
+          getTypeSubList(queryParams.value);
+        }
+      });
+    }
   }
-  loading.value = true;
 
-  if (row.isAdd) {
-    addSubject(row).then((response) => {
-      if (response.code === 200) {
-        proxy.$modal.msgSuccess("保存成功");
-        queryParams.value.paymentTypeId = typeId.value;
-        getTypeSubList(queryParams.value);
-      }
-    });
-  } else {
-    updateSubject(row).then((response) => {
-      if (response.code === 200) {
-        proxy.$modal.msgSuccess("保存成功");
-        queryParams.value.paymentTypeId = typeId.value;
-        getTypeSubList(queryParams.value);
-      }
-    });
+  /** 支出类目保存按钮 */
+  function typeleSave(row) {
+    if (row.name == "" || row.name == null) {
+      proxy.$modal.msgError("支出类目不能为空");
+      return;
+    }
+    if (row.isAdd) {
+      addType(row).then((response) => {
+        if (response.code === 200) {
+          proxy.$modal.msgSuccess("保存成功");
+          getList();
+        }
+      });
+    } else {
+      updateType(row).then((response) => {
+        if (response.code === 200) {
+          proxy.$modal.msgSuccess("保存成功");
+          getList();
+        }
+      });
+    }
   }
-}
 
-/** 支出类目保存按钮 */
-function typeleSave(row) {
-  if (row.name == "" || row.name == null) {
-    proxy.$modal.msgError("支出类目不能为空");
-    return;
-  }
-  if (row.isAdd) {
-    addType(row).then((response) => {
-      if (response.code === 200) {
-        proxy.$modal.msgSuccess("保存成功");
-        getList();
-      }
-    });
-  } else {
-    updateType(row).then((response) => {
-      if (response.code === 200) {
-        proxy.$modal.msgSuccess("保存成功");
-        getList();
-      }
-    });
+  /** 取消按钮 */
+  function handleCancel(row) {
+    console.log("取消", row.isAdd);
+    if (row.isAdd) {
+      typeList.value.length = typeList.value.length - 1;
+    } else {
+      row.isEdit = false;
+    }
   }
-}
 
-/** 取消按钮 */
-function handleCancel(row) {
-  console.log("取消", row.isAdd);
-  if (row.isAdd) {
-    typeList.value.length = typeList.value.length - 1;
-  } else {
-    row.isEdit = false;
+  /** 支出科目取消按钮 */
+  function subCancel(row) {
+    console.log("科目取消", row.isAdd);
+    if (row.isAdd) {
+      typeSubLis.value.length = typeSubLis.value.length - 1;
+    } else {
+      row.isEdit = false;
+    }
   }
-}
 
-/** 支出科目取消按钮 */
-function subCancel(row) {
-  console.log("科目取消", row.isAdd);
-  if (row.isAdd) {
-    typeSubLis.value.length = typeSubLis.value.length - 1;
-  } else {
-    row.isEdit = false;
+  /** 支出类目新增按钮 */
+  function newType() {
+    // 此处必须进行深拷贝,否则添加的明细,将都指向了一个对象
+    const _newSource = JSON.parse(JSON.stringify(query.value));
+    typeList.value.push(_newSource);
+    handleSourceCurrentChange(_newSource);
   }
-}
 
-/** 支出类目新增按钮 */
-function newType() {
-  // 此处必须进行深拷贝,否则添加的明细,将都指向了一个对象
-  const _newSource = JSON.parse(JSON.stringify(query.value));
-  typeList.value.push(_newSource);
-  handleSourceCurrentChange(_newSource);
-}
-
-/** 修改新增属性判断 */
-function handleSourceCurrentChange(row) {
-  row.isAdd = true;
-}
+  /** 修改新增属性判断 */
+  function handleSourceCurrentChange(row) {
+    row.isAdd = true;
+  }
 
-/** 输入框输出建议 */
-const querySearchAsync = (queryString, cb) => {
-  console.log(links);
-  const results = queryString
-    ? links.value.filter(createFilter(queryString))
-    : links.value;
-  cb(results);
-};
+  /** 输入框输出建议 */
+  const querySearchAsync = (queryString, cb) => {
+    console.log(links);
+    const results = queryString
+      ? links.value.filter(createFilter(queryString))
+      : links.value;
+    cb(results);
+  };
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-/** 新增按钮操作 */
-function handleAdd() {
-  proxy.$refs.typeRef.open();
-}
+  /** 新增按钮操作 */
+  function handleAdd() {
+    proxy.$refs.typeRef.open();
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  row.isEdit = true;
-}
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    row.isEdit = true;
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  queryParams.value.paymentTypeId = _ids;
-  console.log("ids", _ids);
-  listTypeSub(queryParams.value).then((response) => {
-    if (response.rows.length > 0) {
-      proxy.$modal.msgError("请先删除支出科目!");
-      return;
-    }
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    queryParams.value.paymentTypeId = _ids;
+    console.log("ids", _ids);
+    listTypeSub(queryParams.value).then((response) => {
+      if (response.rows.length > 0) {
+        proxy.$modal.msgError("请先删除支出科目!");
+        return;
+      }
+      proxy.$modal
+        .confirm("是否确认删除选中的数据项?")
+        .then(function () {
+          return delType(_ids);
+        })
+        .then(() => {
+          getList();
+          proxy.$modal.msgSuccess("删除成功!");
+        })
+        .catch(() => { });
+    });
+  }
+  /** 科目删除按钮操作 */
+  function handleSubDelete(row) {
+    const _ids = row.id || ids.value;
     proxy.$modal
       .confirm("是否确认删除选中的数据项?")
       .then(function () {
-        return delType(_ids);
+        return delSubject(_ids);
       })
       .then(() => {
-        getList();
+        queryParams.value.paymentTypeId = typeId.value;
+        getTypeSubList(queryParams.value);
         proxy.$modal.msgSuccess("删除成功!");
       })
-      .catch(() => {});
-  });
-}
-/** 科目删除按钮操作 */
-function handleSubDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delSubject(_ids);
-    })
-    .then(() => {
-      queryParams.value.paymentTypeId = typeId.value;
-      getTypeSubList(queryParams.value);
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  proxy.download(
-    "paymentEntry/type/export",
-    {
-      ...queryParams.value,
-    },
-    `type_${new Date().getTime()}.xlsx`
-  );
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    proxy.download(
+      "paymentEntry/type/export",
+      {
+        ...queryParams.value,
+      },
+      `type_${new Date().getTime()}.xlsx`
+    );
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 7 - 3
src/views/business/production/IndividualIncomeTaxIs/index.vue

@@ -84,8 +84,9 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
       <el-table-column label="人员信息" align="center">
         <template #default="scope">
@@ -284,7 +285,10 @@
     month: proxy.moment().subtract(1, "month").format("MM"),
     principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /***********************  方法区  ****************************/
   function getOption() {
     listLableNoPage().then(res => {

+ 8 - 4
src/views/business/production/IndividualIncomeTaxIsZero/index.vue

@@ -56,7 +56,7 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <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>
@@ -83,8 +83,9 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
       <el-table-column label="人员信息" min-width="60" align="center">
         <template #default="scope">
@@ -296,7 +297,10 @@
     month: proxy.moment().subtract(1, "month").format("MM"),
     principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /***********************  方法区  ****************************/
   function getOption() {
     listLableNoPage().then(res => {

+ 305 - 449
src/views/business/production/accountAdjustment/index.vue

@@ -2,46 +2,25 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button
-        type="primary"
-        size="small"
-        icon="Plus"
-        @click="handleAdd"
-        v-hasPermi="['business:accountAdjustment:add']"
-        >新增</el-button
-      >
+      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
+        v-hasPermi="['business:accountAdjustment:add']">新增</el-button>
       <el-dropdown trigger="click">
         <el-button type="primary" size="small">
           其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:deposit:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:deposit:export']">
+              导出</el-dropdown-item>
             <!-- <el-dropdown-item type="warning" size="small" icon="Download" @click="handleArea"
               v-hasPermi="['business:deposit:export']"> area</el-dropdown-item> -->
-            <el-dropdown-item
-              icon="Delete"
-              :disabled="multiple"
-              @click="handleDelete"
-              v-hasPermi="['business:accountAdjustment:remove']"
-            >
-              删除</el-dropdown-item
-            >
+            <el-dropdown-item icon="Delete" :disabled="multiple" @click="handleDelete"
+              v-hasPermi="['business:accountAdjustment:remove']">
+              删除</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
-      <el-radio-group
-        v-model="queryRadio"
-        style="margin-left: 20px"
-        size="small"
-        @change="radioChangeHandler"
-      >
+      <el-radio-group v-model="queryRadio" style="margin-left: 20px" size="small" @change="radioChangeHandler">
         <el-radio-button label="全部" />
         <el-radio-button label="审核中" />
         <el-radio-button label="处理中" />
@@ -53,167 +32,76 @@
       <!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        align="center"
-        type="index"
-        label="序号"
-        width="50"
-      ></el-table-column>
-      <el-table-column
-        label="申请时间"
-        prop="createTime"
-        width="150"
-        align="center"
-      />
-      <el-table-column
-        label="申请人"
-        prop="applieName"
-        width="150"
-        align="center"
-      />
-      <el-table-column
-        label="客户名称"
-        prop="companyName"
-        width="150"
-        align="center"
-      />
+      <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
+      <el-table-column label="申请时间" prop="createTime" width="150" align="center" />
+      <el-table-column label="申请人" prop="applieName" width="150" align="center" />
+      <el-table-column label="客户名称" prop="companyName" width="150" align="center" />
       <el-table-column label="调账账期" width="150" align="center">
         <template #default="scope">
           <span>{{ scope.row.year + "-" + scope.row.month }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="调账原因"
-        prop="adjustmentResult"
-        width="100"
-        align="center"
-      />
+      <el-table-column label="调账原因" prop="adjustmentResult" width="100" align="center" />
       <!-- <el-table-column label="要求完成时间" prop="planFinishedDate" align="center" /> -->
-      <el-table-column
-        label="实际完成时间"
-        prop="actuallyFinishedDate"
-        width="126"
-        align="center"
-      />
-      <el-table-column
-        label="记账会计"
-        prop="accountantName"
-        width="100"
-        align="center"
-      />
+      <el-table-column label="实际完成时间" prop="actuallyFinishedDate" width="126" align="center" />
+      <el-table-column label="记账会计" prop="accountantName" width="100" align="center" />
       <el-table-column label="操作" width="60" align="center">
         <template #default="scope">
-          <el-button
-            v-if="scope.row.status == 0"
-            type="primary"
-            size="small"
-            icon="Edit"
-            circle
-            @click="edit(scope.row.id)"
-          />
+          <el-button v-if="scope.row.status == 0" type="primary" size="small" icon="Edit" circle
+            @click="edit(scope.row.id)" />
         </template>
       </el-table-column>
       <el-table-column label="状态" width="100" align="center">
         <template #default="scope">
           <span v-if="scope.row.status === 1">已审批&nbsp;&nbsp;</span>
           <span v-if="scope.row.status === 2">已完成</span>
-          <span v-if="scope.row.status === 3">审核失败</span></template
-        >
+          <span v-if="scope.row.status === 3">审核失败</span></template>
       </el-table-column>
       <el-table-column label="审批" width="220" align="center">
         <template #default="scope">
-          <el-button
-            v-if="scope.row.status === 0"
-            type="primary"
-            size="small"
-            @click="editStatus(scope.row, 1)"
-            >审批通过</el-button
-          >
-          <el-button
-            v-if="scope.row.status === 0"
-            type="primary"
-            size="small"
-            @click="editStatus(scope.row, 3)"
-            >审批不通过</el-button
-          >
-          <el-button
-            v-if="scope.row.status === 1"
-            type="primary"
-            size="small"
-            @click="editStatus(scope.row, 2)"
-            >完成</el-button
-          >
+          <el-button v-if="scope.row.status === 0" type="primary" size="small"
+            @click="editStatus(scope.row, 1)">审批通过</el-button>
+          <el-button v-if="scope.row.status === 0" type="primary" size="small"
+            @click="editStatus(scope.row, 3)">审批不通过</el-button>
+          <el-button v-if="scope.row.status === 1" type="primary" size="small"
+            @click="editStatus(scope.row, 2)">完成</el-button>
         </template>
       </el-table-column>
     </el-table>
-    <el-dialog
-      title="扣款信息"
-      v-model="formOpen"
-      width="500px"
-      append-to-body
-      draggable
-      @close="formCancel"
-      :close-on-click-modal = "false"
-    >
+    <el-dialog title="扣款信息" v-model="formOpen" width="500px" append-to-body draggable @close="formCancel"
+      :close-on-click-modal="false">
       <!-- 功能按钮 -->
       <div class="form-btns-container">
-        <el-button type="success" size="small" @click="handleSave"
-          ><i class="fa fa-floppy-o" aria-hidden="true" /> 保存</el-button
-        >
+        <el-button type="success" size="small" @click="handleSave"><i class="fa fa-floppy-o" aria-hidden="true" />
+          保存</el-button>
       </div>
       <div style="padding: 8px 24px 16px 24px">
         <el-form size="small" label-width="130px">
           <el-form-item label="客户名称:" required>
-            <el-autocomplete
-              :fetch-suggestions="querySearchCompanyAsync"
-              :trigger-on-focus="true"
-              v-model="form.companyName"
-              placeholder="请输入客户名称"
-              popper-class="my-autocomplete"
-              @select="handleSelectCompany"
-            >
+            <el-autocomplete :fetch-suggestions="querySearchCompanyAsync" :trigger-on-focus="true"
+              v-model="form.companyName" placeholder="请输入客户名称" popper-class="my-autocomplete"
+              @select="handleSelectCompany">
               <template #default="{ item }">
-                <div
-                  style="
+                <div style="
                     display: flex;
                     flex-direction: row;
                     justify-content: space-between;
-                  "
-                >
+                  ">
                   <div class="name" style="font-size: 12px">
                     {{ item.name }}
                   </div>
@@ -223,355 +111,323 @@
             </el-autocomplete>
           </el-form-item>
           <el-form-item label="账期:" required>
-            <el-select
-              v-model="form.creditTerm"
-              placeholder="选择月"
-              style="width: 80.8%"
-              @change="getCreditTerm"
-            >
-              <el-option
-                v-for="item in creditTermList"
-                :key="item.checkDate"
-                :label="item.checkDate"
-                :value="item.checkDate"
-                value-format="yyyy-MM-dd"
-              />
+            <el-select v-model="form.creditTerm" placeholder="选择月" style="width: 80.8%" @change="getCreditTerm">
+              <el-option v-for="item in creditTermList" :key="item.checkDate" :label="item.checkDate"
+                :value="item.checkDate" value-format="yyyy-MM-dd" />
             </el-select>
           </el-form-item>
           <el-form-item label="调账原因">
-            <el-input
-              v-model="form.adjustmentResult"
-              size="small"
-              type="text"
-              placeholder="请输入调账原因"
-              style="width: 80.8%"
-              :clearable="true"
-            />
+            <el-input v-model="form.adjustmentResult" size="small" type="text" placeholder="请输入调账原因"
+              style="width: 80.8%" :clearable="true" />
           </el-form-item>
           <el-form-item label="备注">
-            <el-input
-              v-model="form.remark"
-              size="small"
-              type="text"
-              placeholder="备注"
-              style="width: 80.8%"
-              :clearable="true"
-            />
+            <el-input v-model="form.remark" size="small" type="text" placeholder="备注" style="width: 80.8%"
+              :clearable="true" />
           </el-form-item>
         </el-form>
       </div>
     </el-dialog>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <el-image-viewer
-      v-if="showViewer"
-      :url-list="currentFileList"
-      @close="closeImages"
-      :initial-index="showIndex"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <el-image-viewer v-if="showViewer" :url-list="currentFileList" @close="closeImages" :initial-index="showIndex" />
   </div>
 </template>
 
 <script setup>
-import {
-  listAccountAdjustment,
-  listCompany,
-  getCreditTermByCompId,
-  addAccountAdjustment,
-  updateAccountAdjustment,
-  delAccountAdjustment,
-  getAccountAdjustment,
-} from "@/api/business/production/accountAdjustment";
-import useUserStore from "@/store/modules/user";
-import { reactive, toRefs } from "vue";
-const { proxy } = getCurrentInstance();
+  import {
+    listAccountAdjustment,
+    listCompany,
+    getCreditTermByCompId,
+    addAccountAdjustment,
+    updateAccountAdjustment,
+    delAccountAdjustment,
+    getAccountAdjustment,
+  } from "@/api/business/production/accountAdjustment";
+  import useUserStore from "@/store/modules/user";
+  import { reactive, toRefs } from "vue";
+  const { proxy } = getCurrentInstance();
 
-const formOpen = ref(false);
+  const formOpen = ref(false);
 
-const data = reactive({
-  // 列表数据源
-  list: [],
-  comList: [],
-  // 查询请求携带的参数
-  queryParams: {
+  const data = reactive({
+    // 列表数据源
+    list: [],
+    comList: [],
+    // 查询请求携带的参数
+    queryParams: {
+      pageNum: 1,
+      pageSize: 20,
+    },
+    visible: false,
+    custom: {},
+    creditTerm: null,
+    stages: [],
+    queryRadio: "全部",
+    selections: [],
+    creditTermList: [],
+    form: {},
+    userId: null,
+    employeeId: null,
+    formEmptyData: {
+      id: null,
+      companyId: "",
+      planFinishedDate: "",
+      actuallyFinishedDate: "",
+      remark: "",
+      year: "",
+      month: "",
+      adjustmentResult: "",
+    },
+  });
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
+  const companyQuery = ref({
     pageNum: 1,
-    pageSize: 20,
-  },
-  visible: false,
-  custom: {},
-  creditTerm: null,
-  stages: [],
-  queryRadio: "全部",
-  selections: [],
-  creditTermList: [],
-  form: {},
-  userId: null,
-  employeeId: null,
-  formEmptyData: {
-    id: null,
-    companyId: "",
-    planFinishedDate: "",
-    actuallyFinishedDate: "",
-    remark: "",
-    year: "",
-    month: "",
-    adjustmentResult: "",
-  },
-});
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
-const companyQuery = ref({
-  pageNum: 1,
-  pageSize: 50,
-  keyword: "",
-});
-
-const {
-  queryParams,
-  form,
-  list,
-  queryRadio,
-  selections,
-  creditTerm,
-  creditTermList,
-} = toRefs(data);
+    pageSize: 50,
+    keyword: "",
+  });
 
-function getList() {
-  listAccountAdjustment(queryParams.value).then((res) => {
-    list.value = res.rows.map((l) => ({ ...l }));
-    total.value = res.total;
-    loading.value = false;
+  const {
+    queryParams,
+    form,
+    list,
+    queryRadio,
+    selections,
+    creditTerm,
+    creditTermList,
+  } = toRefs(data);
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  function getList() {
+    listAccountAdjustment(queryParams.value).then((res) => {
+      list.value = res.rows.map((l) => ({ ...l }));
+      total.value = res.total;
+      loading.value = false;
+    });
+  }
 
-function getCompanies() {
-  listCompany();
-}
+  function getCompanies() {
+    listCompany();
+  }
 
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
 
-function radioChangeHandler(arg) {
-  const query = {
-    pageNum: 1,
-    pageSize: 20,
-    companyName: "",
-  };
-  switch (arg) {
-    case "全部":
-      query.status = null;
-      break;
-    case "审核中":
-      query.status = 0;
-      break;
-    case "处理中":
-      query.status = 1;
-      break;
-    case "已处理":
-      query.status = 2;
-      break;
-    case "未通过":
-      query.status = 3;
-      break;
-    default:
-      break;
+  function radioChangeHandler(arg) {
+    const query = {
+      pageNum: 1,
+      pageSize: 20,
+      companyName: "",
+    };
+    switch (arg) {
+      case "全部":
+        query.status = null;
+        break;
+      case "审核中":
+        query.status = 0;
+        break;
+      case "处理中":
+        query.status = 1;
+        break;
+      case "已处理":
+        query.status = 2;
+        break;
+      case "未通过":
+        query.status = 3;
+        break;
+      default:
+        break;
+    }
+    queryParams.value = query;
+    handleQuery();
   }
-  queryParams.value = query;
-  handleQuery();
-}
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-function handleAdd() {
-  formOpen.value = true;
-}
+  function handleAdd() {
+    formOpen.value = true;
+  }
 
-function getCreditTermList() {
-  getCreditTermByCompId({ id: form.value.companyId }).then((res) => {
-    creditTermList.value = res.rows;
-  });
-}
+  function getCreditTermList() {
+    getCreditTermByCompId({ id: form.value.companyId }).then((res) => {
+      creditTermList.value = res.rows;
+    });
+  }
 
-function handleSave() {
-  form.value.applierId = useUserStore().user.userId;
-  if (form.value.companyId == null || form.value.companyId === "") {
-    proxy.$modal.msgError("客户名称不能为空");
-    return;
+  function handleSave() {
+    form.value.applierId = useUserStore().user.userId;
+    if (form.value.companyId == null || form.value.companyId === "") {
+      proxy.$modal.msgError("客户名称不能为空");
+      return;
+    }
+    if (
+      form.value.year == null ||
+      form.value.month == null ||
+      form.value.year === "" ||
+      form.value.month === ""
+    ) {
+      proxy.$modal.msgError("账期不能为空");
+      return;
+    }
+    if (form.value.id == null) {
+      addAccountAdjustment(form.value).then((res) => {
+        getList();
+        formCancel();
+      });
+    } else {
+      updateAccountAdjustment(form.value).then((res) => {
+        getList();
+        formCancel();
+      });
+    }
   }
-  if (
-    form.value.year == null ||
-    form.value.month == null ||
-    form.value.year === "" ||
-    form.value.month === ""
-  ) {
-    proxy.$modal.msgError("账期不能为空");
-    return;
+
+  function edit(id) {
+    formOpen.value = true;
+    form.value.id = id;
+    getFormValue();
   }
-  if (form.value.id == null) {
-    addAccountAdjustment(form.value).then((res) => {
-      getList();
-      formCancel();
-    });
-  } else {
-    updateAccountAdjustment(form.value).then((res) => {
-      getList();
-      formCancel();
+
+  function getFormValue() {
+    getAccountAdjustment(form.value.id).then((res) => {
+      form.value = res.data;
+      form.value.creditTerm = form.value.year + "-" + form.value.month + "-01";
+      getCreditTermList();
     });
   }
-}
-
-function edit(id) {
-  formOpen.value = true;
-  form.value.id = id;
-  getFormValue();
-}
 
-function getFormValue() {
-  getAccountAdjustment(form.value.id).then((res) => {
-    form.value = res.data;
-    form.value.creditTerm = form.value.year + "-" + form.value.month + "-01";
-    getCreditTermList();
-  });
-}
-
-function querySearchCompanyAsync(queryString, cb) {
-  const query =
-    queryString.length > 0
-      ? {
+  function querySearchCompanyAsync(queryString, cb) {
+    const query =
+      queryString.length > 0
+        ? {
           keyword: queryString,
           pageSize: 50,
           pageNum: 1,
           orderByColumn: "create_time",
         }
-      : { pageSize: 50, pageNum: 1, orderByColumn: "create_time" };
-  listCompany(query).then((res) => {
-    cb(res.rows);
-  });
-}
+        : { pageSize: 50, pageNum: 1, orderByColumn: "create_time" };
+    listCompany(query).then((res) => {
+      cb(res.rows);
+    });
+  }
 
-function handleSelectCompany(item) {
-  form.value.companyName = item.name;
-  form.value.companyId = item.id;
-  getCreditTermList();
-}
+  function handleSelectCompany(item) {
+    form.value.companyName = item.name;
+    form.value.companyId = item.id;
+    getCreditTermList();
+  }
 
-function getCreditTerm(arg) {
-  console.log(arg);
-  form.value.year = proxy.moment(arg).format("YYYY");
-  form.value.month = proxy.moment(arg).format("MM");
-}
+  function getCreditTerm(arg) {
+    console.log(arg);
+    form.value.year = proxy.moment(arg).format("YYYY");
+    form.value.month = proxy.moment(arg).format("MM");
+  }
 
-function reset() {
-  form.value = {};
-}
+  function reset() {
+    form.value = {};
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delAccountAdjustment(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    });
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delAccountAdjustment(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      });
+  }
 
-function handleExport() {}
+  function handleExport() { }
 
-function editStatus(row, status) {
-  if (status === 2) {
-    row.accountantId = useUserStore().user.userId;
-    row.actuallyFinishedDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
-  }
-  proxy.$modal
-    .confirm(`确认${status !== 2 ? "审批" : "完成"}么`)
-    .then((_) => {
-      row.status = status;
-      updateAccountAdjustment(row).then((res) => {
-        getList();
-        formCancel();
+  function editStatus(row, status) {
+    if (status === 2) {
+      row.accountantId = useUserStore().user.userId;
+      row.actuallyFinishedDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
+    }
+    proxy.$modal
+      .confirm(`确认${status !== 2 ? "审批" : "完成"}么`)
+      .then((_) => {
+        row.status = status;
+        updateAccountAdjustment(row).then((res) => {
+          getList();
+          formCancel();
+        });
+      })
+      .catch((_) => {
+        proxy.$modal.msg("取消审批");
       });
-    })
-    .catch((_) => {
-      proxy.$modal.msg("取消审批");
-    });
-}
+  }
 
-getList();
+  getList();
 </script>
 <style>
-.companylist .el-badge__content.el-badge__content--undefined.is-fixed {
-  top: 0px;
-  right: -5px;
-}
+  .companylist .el-badge__content.el-badge__content--undefined.is-fixed {
+    top: 0px;
+    right: -5px;
+  }
 
-.companylist .el-radio-button__orig-radio:checked + .el-radio-button__inner {
-  color: rgb(64, 158, 255);
-  background-color: rgba(0, 0, 0, 0);
-  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgb(64, 158, 255)
-    rgba(0, 0, 0, 0);
-  border-style: none none solid none;
-  border-width: 0 0 3px 0;
-  box-shadow: none;
-}
+  .companylist .el-radio-button__orig-radio:checked+.el-radio-button__inner {
+    color: rgb(64, 158, 255);
+    background-color: rgba(0, 0, 0, 0);
+    border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgb(64, 158, 255) rgba(0, 0, 0, 0);
+    border-style: none none solid none;
+    border-width: 0 0 3px 0;
+    box-shadow: none;
+  }
 
-.companylist .el-radio-button__inner {
-  border: none;
-  background-color: rgba(0, 0, 0, 0);
-  border-color: rgba(0, 0, 0, 0);
-  border-style: none none solid none;
-  border-width: 0 0 3px 0;
-  box-shadow: none;
-}
+  .companylist .el-radio-button__inner {
+    border: none;
+    background-color: rgba(0, 0, 0, 0);
+    border-color: rgba(0, 0, 0, 0);
+    border-style: none none solid none;
+    border-width: 0 0 3px 0;
+    box-shadow: none;
+  }
 
-.companylist .el-radio-button:first-child .el-radio-button__inner {
-  border-left: none;
-  border-radius: 0 0 0 0;
-}
+  .companylist .el-radio-button:first-child .el-radio-button__inner {
+    border-left: none;
+    border-radius: 0 0 0 0;
+  }
 
-.companylist .el-radio-button:last-child .el-radio-button__inner {
-  border-radius: 0 0 0 0;
-}
+  .companylist .el-radio-button:last-child .el-radio-button__inner {
+    border-radius: 0 0 0 0;
+  }
 
-.companylist
-  .badge-radio
-  .el-badge__content.el-badge__content--undefined.is-fixed {
-  top: -8px;
-  right: 10px;
-}
-</style>
+  .companylist .badge-radio .el-badge__content.el-badge__content--undefined.is-fixed {
+    top: -8px;
+    right: 10px;
+  }
+</style>

+ 33 - 29
src/views/business/production/archiveTicket/index.vue

@@ -80,7 +80,8 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100"  v-if="tenant.versionId === '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100"
+        v-if="tenant.versionId === '4'" />
       <el-table-column label="受委托方" align="center" prop="toTenantName" v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" prop="taxType" min-width="110" align="center" />
       <el-table-column label="上传人" align="center" prop="finishUserName" min-width="100" />
@@ -148,33 +149,33 @@
 </template>
 
 <script setup name="ArchiveReceiveTicket">
-import { listLableNoPage } from "@/api/business/lable"
-import { listArchiveTicket } from "@/api/business/production/archiveTicket";
-import { uploadFile } from "@/api/tool/file";
-import { listCompany } from "@/api/business/crm/company";
-import useUserStore from "@/store/modules/user";
-import { getTenant } from "@/utils/auth";
-import { ref } from "vue";
-import formDialog from "./form.vue";
-import viewDialog from "./view.vue";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-const tenant = useUserStore().tenant
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const oneself = ref(false);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
-const queryRadio = ref("全部");
-const permissions = useUserStore().permissions;
+  import { listLableNoPage } from "@/api/business/lable"
+  import { listArchiveTicket } from "@/api/business/production/archiveTicket";
+  import { uploadFile } from "@/api/tool/file";
+  import { listCompany } from "@/api/business/crm/company";
+  import useUserStore from "@/store/modules/user";
+  import { getTenant } from "@/utils/auth";
+  import { ref } from "vue";
+  import formDialog from "./form.vue";
+  import viewDialog from "./view.vue";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+  const tenant = useUserStore().tenant
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const oneself = ref(false);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
+  const queryRadio = ref("全部");
+  const permissions = useUserStore().permissions;
 
   const currentMonth = ref(
     proxy.moment().subtract(1, "month").format("YYYY-MM-01")
@@ -217,7 +218,10 @@ const permissions = useUserStore().permissions;
   });
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 232 - 357
src/views/business/production/deduction/index.vue

@@ -8,74 +8,34 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:deposit:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:deposit:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          @keyup.enter="handleQuery"
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        align="center"
-        type="index"
-        label="序号"
-        width="50"
-      ></el-table-column>
-      <el-table-column
-        label="日期"
-        align="center"
-        prop="depositDate"
-        width="200"
-      />
+      <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
+      <el-table-column label="日期" align="center" prop="depositDate" width="200" />
       <el-table-column label="金额" align="center" prop="amount" width="120" />
       <el-table-column label="附件" align="center" prop="files">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="showFileList(scope.row)"
-            >查看</el-button
-          >
+          <el-button link type="primary" size="small" @click="showFileList(scope.row)">查看</el-button>
         </template>
       </el-table-column>
       <el-table-column label="审核状态" align="center" width="80" prop="remark">
@@ -83,126 +43,48 @@
           <dict-tag :options="verify_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        prop="verifyStatus"
-        width="200"
-      >
+      <el-table-column label="操作" align="center" prop="verifyStatus" width="200">
         <template #default="scope">
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="primary"
-            size="small"
-            @click="handleInfo(scope.row)"
-            v-hasPermi="['business:deposit:info']"
-            >修改</el-button
-          >
-          <el-button
-            v-show="scope.row.status === 0"
-            link
-            type="primary"
-            size="small"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['business:deposit:remove']"
-            >删除</el-button
-          >
-          <el-button
-            v-show="scope.row.status !== 0"
-            link
-            type="primary"
-            size="small"
-            @click="handleInfo(scope.row)"
-            v-hasPermi="['business:deposit:info']"
-            >查看</el-button
-          >
+          <el-button v-show="scope.row.status === 0" link type="primary" size="small" @click="handleInfo(scope.row)"
+            v-hasPermi="['business:deposit:info']">修改</el-button>
+          <el-button v-show="scope.row.status === 0" link type="primary" size="small" @click="handleDelete(scope.row)"
+            v-hasPermi="['business:deposit:remove']">删除</el-button>
+          <el-button v-show="scope.row.status !== 0" link type="primary" size="small" @click="handleInfo(scope.row)"
+            v-hasPermi="['business:deposit:info']">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
     <!-- <Deposit-form ref="DepositRef" :get-list="getList" /> -->
-    <el-dialog
-      title="新增存款"
-      v-model="formOpen"
-      width="500px"
-      append-to-body
-      draggable
-      @close="formCancel"
-      :close-on-click-modal = "false"
-    >
+    <el-dialog title="新增存款" v-model="formOpen" width="500px" append-to-body draggable @close="formCancel"
+      :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" label-width="100" size="small">
         <el-row :gutter="30">
           <el-col :span="24">
             <el-form-item label="存款金额:">
-              <el-input-number
-                v-if="form.status !== 1"
-                v-model="form.amount"
-                :precision="2"
-                :step="0.1"
-                :min="0"
-                :controls="false"
-              />
+              <el-input-number v-if="form.status !== 1" v-model="form.amount" :precision="2" :step="0.1" :min="0"
+                :controls="false" />
               <div v-else>{{ form.amount }}</div>
             </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="凭证附件:">
               <div class="details-btns-container" style="display: flex">
-                <el-upload
-                  v-if="form.status !== 1"
-                  action="#"
-                  :http-request="upload"
-                  :with-credentials="true"
-                  :show-file-list="false"
-                  multiple
-                >
-                  <el-button size="small" type="primary" icon="Upload"
-                    >点击上传</el-button
-                  >
+                <el-upload v-if="form.status !== 1" action="#" :http-request="upload" :with-credentials="true"
+                  :show-file-list="false" multiple>
+                  <el-button size="small" type="primary" icon="Upload">点击上传</el-button>
                 </el-upload>
               </div>
-              <el-table
-                ref="filesTable"
-                :data="form.files"
-                size="small"
-                height="200px"
-                border
-                header-row-class-name="list-header-row"
-              >
-                <el-table-column
-                  v-if="form.status !== 1"
-                  label="操作"
-                  width="47"
-                  align="center"
-                >
+              <el-table ref="filesTable" :data="form.files" size="small" height="200px" border
+                header-row-class-name="list-header-row">
+                <el-table-column v-if="form.status !== 1" label="操作" width="47" align="center">
                   <template #default="scope">
-                    <el-button
-                      icon="Minus"
-                      size="small"
-                      circle
-                      type="danger"
-                      @click="handleDelFile(scope.$index)"
-                    />
+                    <el-button icon="Minus" size="small" circle type="danger" @click="handleDelFile(scope.$index)" />
                   </template>
                 </el-table-column>
-                <el-table-column
-                  type="index"
-                  label="序号"
-                  width="47"
-                  align="center"
-                />
-                <el-table-column
-                  label="文件名"
-                  prop="originalFileName"
-                  align="center"
-                >
+                <el-table-column type="index" label="序号" width="47" align="center" />
+                <el-table-column label="文件名" prop="originalFileName" align="center">
                   <template #default="scope">
-                    <el-link
-                      :href="`${baseUrl}${scope.row.fileUrl}`"
-                      :underline="false"
-                      target="_blank"
-                      type="primary"
-                    >
+                    <el-link :href="`${baseUrl}${scope.row.fileUrl}`" :underline="false" target="_blank" type="primary">
                       {{ scope.row.originalFileName }}
                     </el-link>
                   </template>
@@ -220,242 +102,235 @@
       </template>
     </el-dialog>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <el-image-viewer
-      v-if="showViewer"
-      :url-list="currentFileList"
-      @close="closeImages"
-      :initial-index="showIndex"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <el-image-viewer v-if="showViewer" :url-list="currentFileList" @close="closeImages" :initial-index="showIndex" />
   </div>
 </template>
 
 <script setup name="Company">
-// import contractForm from "./form";
-import {
-  listDeposit,
-  delDeposit,
-  exportDeposit,
-  addDeposit,
-  getDeposit,
-  updateDeposit,
-} from "@/api/business/entrust/deposit";
-// import ElImageViewer from 'element-plus/lib/components/image-viewer';
-import { uploadFile } from "@/api/tool/file";
-import { listCompany } from "@/api/business/crm/company";
-import { ref } from "vue";
-// import DepositForm from "./form"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
+  // import contractForm from "./form";
+  import {
+    listDeposit,
+    delDeposit,
+    exportDeposit,
+    addDeposit,
+    getDeposit,
+    updateDeposit,
+  } from "@/api/business/entrust/deposit";
+  // import ElImageViewer from 'element-plus/lib/components/image-viewer';
+  import { uploadFile } from "@/api/tool/file";
+  import { listCompany } from "@/api/business/crm/company";
+  import { ref } from "vue";
+  // import DepositForm from "./form"
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
 
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
 
-const formOpen = ref(false);
+  const formOpen = ref(false);
 
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  type: 1,
-  files: [],
-});
-
-const emptyForm = {
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 1,
-  remark: "",
-  files: [],
-};
-
-const { verify_status } = proxy.useDict("verify_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  noContract: 1,
-});
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    type: 1,
+    files: [],
+  });
 
-/***********************  方法区  ****************************/
+  const emptyForm = {
+    id: null,
+    companyName: "",
+    companyId: null,
+    type: 1,
+    remark: "",
+    files: [],
+  };
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listDeposit(queryParams.value).then((response) => {
-    orderList.value = response.rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  const { verify_status } = proxy.useDict("verify_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    companyName: "",
+    noContract: 1,
   });
-}
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listDeposit(queryParams.value).then((response) => {
+      orderList.value = response.rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    handleQuery();
+  }
 
-/** 新增按钮操作 */
-function handleAdd() {
-  // proxy.$refs.DepositRef.open();
-  formOpen.value = true;
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // proxy.$refs.DepositRef.open();
+    formOpen.value = true;
+  }
 
-function reset() {
-  form.value = proxy.deepClone(emptyForm);
-}
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.DepositRef.open(id);
-}
+  function reset() {
+    form.value = proxy.deepClone(emptyForm);
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delDeposit(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => {});
-}
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    // const id = row.id || ids.value;
+    // proxy.$refs.DepositRef.open(id);
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportDeposit(queryParams.value);
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delDeposit(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    // proxy.download(
+    //   "business/archive/order/export",
+    //   {
+    //     ...queryParams.value,
+    //   },
+    //   `合同导出_${new Date().getTime()}.xlsx`
+    // );
+    exportDeposit(queryParams.value);
+  }
 
-function saveHandler() {
-  if (form.value.amount == null || form.value.amount === 0) {
-    proxy.$modal.msgError("请输入存款金额");
-    return;
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
   }
-  if (form.value.files.length === 0) {
-    proxy.$modal.msgError("请上传凭证附件");
-    return;
+
+  function saveHandler() {
+    if (form.value.amount == null || form.value.amount === 0) {
+      proxy.$modal.msgError("请输入存款金额");
+      return;
+    }
+    if (form.value.files.length === 0) {
+      proxy.$modal.msgError("请上传凭证附件");
+      return;
+    }
+    if (form.value.id == null) {
+      addDeposit(form.value).then((res) => {
+        formCancel();
+        getList();
+      });
+    } else {
+      updateDeposit(form.value).then((res) => {
+        formCancel();
+        getList();
+      });
+    }
   }
-  if (form.value.id == null) {
-    addDeposit(form.value).then((res) => {
-      formCancel();
-      getList();
-    });
-  } else {
-    updateDeposit(form.value).then((res) => {
-      formCancel();
-      getList();
+
+  function upload(param) {
+    const formData = new FormData();
+    formData.append("file", param.file);
+    uploadFile(formData).then((res) => {
+      if (res.code === 200) {
+        const file = {};
+        file.fileName = res.newFileName;
+        file.url = res.url;
+        file.originalFileName = res.originalFilename;
+        file.fileUrl = res.fileName;
+        form.value.files.push(file);
+      }
     });
   }
-}
 
-function upload(param) {
-  const formData = new FormData();
-  formData.append("file", param.file);
-  uploadFile(formData).then((res) => {
-    if (res.code === 200) {
-      const file = {};
-      file.fileName = res.newFileName;
-      file.url = res.url;
-      file.originalFileName = res.originalFilename;
-      file.fileUrl = res.fileName;
-      form.value.files.push(file);
-    }
-  });
-}
-
-function openFollowFile(arg) {
-  // console.log(arg)
-  const attach = arg;
-  window.open(`${arg.url}`, arg.fileName);
-}
+  function openFollowFile(arg) {
+    // console.log(arg)
+    const attach = arg;
+    window.open(`${arg.url}`, arg.fileName);
+  }
 
-function showFileList(row) {
-  currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
-  showViewer.value = true;
-}
+  function showFileList(row) {
+    currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
+    showViewer.value = true;
+  }
 
-function closeImages() {
-  showViewer.value = false;
-}
+  function closeImages() {
+    showViewer.value = false;
+  }
 
-function handleInfo(row) {
-  formOpen.value = true;
-  getForm(row.id);
-}
+  function handleInfo(row) {
+    formOpen.value = true;
+    getForm(row.id);
+  }
 
-function getForm(id) {
-  getDeposit(id).then((res) => {
-    form.value = res.data;
-    if (form.value == null) {
-      reset();
-    }
-  });
-}
+  function getForm(id) {
+    getDeposit(id).then((res) => {
+      form.value = res.data;
+      if (form.value == null) {
+        reset();
+      }
+    });
+  }
 
-function handleDelFile(index) {
-  form.value.files.splice(index, 1);
-}
+  function handleDelFile(index) {
+    form.value.files.splice(index, 1);
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 136 - 130
src/views/business/production/financialReportTax/index.vue

@@ -57,72 +57,73 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-    <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>
-  </div>
-  <!-- 列表区 -->
-  <el-table v-loading="loading" :data="taxList" size="small" border height="100%"
-    @selection-change="handleSelectionChange">
-    <!-- <el-table-column type="selection" width="55" align="center" /> -->
-    <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
-      <template #default="scope">
-        <div style="display: flex; align-items: center; ">
-          <template v-if="scope.row.customerLabelName ">
-            <el-tooltip :content="scope.row.customerLabelName" placement="top">
-              <el-icon :size="15">
-                <CollectionTag />
-              </el-icon>
-            </el-tooltip>
-            <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
-          </template>
-          <template v-else>
-            <div style="width: 20px; height: 15px;"></div>
-            <span>{{ scope.row.companyName }}</span>
-          </template>
-        </div>
-      </template>
-    </el-table-column>
-    <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-    <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
-    <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
-    <el-table-column label="是否零申报" align="center" min-width="80" prop="isZero">
-      <template #default="scope">
-        {{
-        scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
-        }}
-      </template>
-    </el-table-column>
-    <el-table-column label="报税填写" align="center" width="80" prop="evidenceFile">
-      <template #default="scope">
-        <el-button link type="primary" size="small" @click="fillIn(scope.row)"
-          v-hasPermi="['business:financialReportTaxNonZero:saveDetail']">{{
-          scope.row.detail == null
-          ? "填写"
-          : scope.row.detail.status === 1
-          ? "进行中"
-          : "已填写"
-          }}</el-button>
-      </template>
-    </el-table-column>
-    <el-table-column label="报税附件" align="center" width="80" prop="content">
-      <template #default="scope">
-        <el-button link type="primary" :disabled="
+      <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>
+    </div>
+    <!-- 列表区 -->
+    <el-table v-loading="loading" :data="taxList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
+        <template #default="scope">
+          <div style="display: flex; align-items: center; ">
+            <template v-if="scope.row.customerLabelName ">
+              <el-tooltip :content="scope.row.customerLabelName" placement="top">
+                <el-icon :size="15">
+                  <CollectionTag />
+                </el-icon>
+              </el-tooltip>
+              <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
+            </template>
+            <template v-else>
+              <div style="width: 20px; height: 15px;"></div>
+              <span>{{ scope.row.companyName }}</span>
+            </template>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
+      <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
+      <el-table-column label="是否零申报" align="center" min-width="80" prop="isZero">
+        <template #default="scope">
+          {{
+          scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="报税填写" align="center" width="80" prop="evidenceFile">
+        <template #default="scope">
+          <el-button link type="primary" size="small" @click="fillIn(scope.row)"
+            v-hasPermi="['business:financialReportTaxNonZero:saveDetail']">{{
+            scope.row.detail == null
+            ? "填写"
+            : scope.row.detail.status === 1
+            ? "进行中"
+            : "已填写"
+            }}</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="报税附件" align="center" width="80" prop="content">
+        <template #default="scope">
+          <el-button link type="primary" :disabled="
               scope.row.detail == null || scope.row.detail.evidenceFile === ''
             " size="small" @click="showFiles(scope.row)"
-          v-hasPermi="['business:financialReportTaxNonZero:query']">查看文件</el-button>
-      </template>
-    </el-table-column>
-    <el-table-column label="状态" align="center" min-width="80" prop="verifyContent">
-      <template #default="scope">
-        <div :style="getStatusStyle(scope.row)">
-          {{ getStatusLabel(scope.row) }}
-          <el-popover placement="top-start" width="250" trigger="hover">
-            <div style="display: flex; flex-direction: row">
-              <div v-for="item in selectStatus" :key="item.value"
-                style="display: flex; flex-direction: row; margin-right: 10px">
-                <div :style="{
+            v-hasPermi="['business:financialReportTaxNonZero:query']">查看文件</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" min-width="80" prop="verifyContent">
+        <template #default="scope">
+          <div :style="getStatusStyle(scope.row)">
+            {{ getStatusLabel(scope.row) }}
+            <el-popover placement="top-start" width="250" trigger="hover">
+              <div style="display: flex; flex-direction: row">
+                <div v-for="item in selectStatus" :key="item.value"
+                  style="display: flex; flex-direction: row; margin-right: 10px">
+                  <div :style="{
                       backgroundColor: item.color,
                       width: '14px',
                       height: '14px',
@@ -130,18 +131,18 @@
                       borderRadius: '50%',
                       border: item.color === '#fff' ? '1px solid #ddd' : 'none',
                     }" />
-                <div style="
+                  <div style="
                       display: inline-block;
                       margin-left: 10px;
                       line-height: 36px;
                       font-size: 10px;
                     ">
-                  {{ item.label }}
+                    {{ item.label }}
+                  </div>
                 </div>
               </div>
-            </div>
-            <template #reference>
-              <span style="
+              <template #reference>
+                <span style="
                     color: #fff;
                     font-size: 12px;
                     text-align: center;
@@ -152,16 +153,17 @@
                     background-color: #ccc;
                     border-radius: 50%;
                   ">?</span>
-            </template>
-          </el-popover>
-        </div>
-      </template>
-    </el-table-column>
-    <el-table-column label="执行人" align="center" min-width="100" prop="serviceName" />
-    <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-    <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
-    <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150" :show-overflow-tooltip="true" />
-    <!-- <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width">
+              </template>
+            </el-popover>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="执行人" align="center" min-width="100" prop="serviceName" />
+      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
+        :show-overflow-tooltip="true" />
+      <!-- <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width">
         <template #default="scope">
           <el-button size="small" link type="primary" :disabled="
               scope.row.detail == null || scope.row.detail.status !== 3
@@ -169,59 +171,60 @@
             v-hasPermi="['business:financialReportTaxNonZero:back']">退回</el-button>
         </template>
       </el-table-column> -->
-  </el-table>
+    </el-table>
 
-  <!-- 分页 -->
-  <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-    @pagination="getList" />
+    <!-- 分页 -->
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
-  <!-- 表单 -->
-  <FormDialog ref="formDialog" :get-list="getList"></FormDialog>
+    <!-- 表单 -->
+    <FormDialog ref="formDialog" :get-list="getList"></FormDialog>
 
-  <!-- 更多搜索弹窗 -->
-  <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
-    :close-on-click-modal="false">
-    <el-form ref="dictRef" size="small" label-width="100">
-      <el-row :gutter="20">
-        <el-col :span="12">
-          <el-form-item label="报税所属期:" prop="year">
-            <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月" value-format="YYYY-MM-01"
-              :disabled-date="disabledDateHandler" @change="monthChangeHandler" :clearable="false" />
-          </el-form-item>
-          <el-form-item label="纳税性质:" prop="taxType">
-            <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
-              <el-option v-for="item in taxTypes" :key="item.label" :label="item.label" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="报税状态:">
-            <el-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true">
-              <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="关键字:">
-            <el-input size="small" v-model="queryParams.companyName" type="text" placeholder="请输入客户名称"
-              :clearable="true" />
-          </el-form-item>
-          <el-form-item label="来源:" v-if="tenant.versionId === '4'">
-            <el-input v-model="queryParams.fromCompanyName" size="small" type="text" placeholder="请输入客户来源"
-              :clearable="true" />
-          </el-form-item>
-          <el-form-item label="税号:">
-            <el-input size="small" v-model="queryParams.socialCreditCode" type="text" placeholder="请输入税号"
-              :clearable="true" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-    <template #footer>
-      <div class="dialog-footer">
-        <el-button type="primary" icon="Finished" size="small" @click="handleQuery">确 定</el-button>
-        <el-button icon="close" size="small" @click="moreSearch = false">取 消</el-button>
-      </div>
-    </template>
-  </el-dialog>
+    <!-- 更多搜索弹窗 -->
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
+      :close-on-click-modal="false">
+      <el-form ref="dictRef" size="small" label-width="100">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="报税所属期:" prop="year">
+              <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月"
+                value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
+                :clearable="false" />
+            </el-form-item>
+            <el-form-item label="纳税性质:" prop="taxType">
+              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
+                <el-option v-for="item in taxTypes" :key="item.label" :label="item.label" :value="item.value" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="报税状态:">
+              <el-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true">
+                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="关键字:">
+              <el-input size="small" v-model="queryParams.companyName" type="text" placeholder="请输入客户名称"
+                :clearable="true" />
+            </el-form-item>
+            <el-form-item label="来源:" v-if="tenant.versionId === '4'">
+              <el-input v-model="queryParams.fromCompanyName" size="small" type="text" placeholder="请输入客户来源"
+                :clearable="true" />
+            </el-form-item>
+            <el-form-item label="税号:">
+              <el-input size="small" v-model="queryParams.socialCreditCode" type="text" placeholder="请输入税号"
+                :clearable="true" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" icon="Finished" size="small" @click="handleQuery">确 定</el-button>
+          <el-button icon="close" size="small" @click="moreSearch = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -275,7 +278,10 @@
     principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询报税列表 */
   function getList() {
     loading.value = true;

+ 259 - 385
src/views/business/production/financialReportTaxIsZero/index.vue

@@ -8,13 +8,8 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:financialReportTax:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:financialReportTax:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
@@ -22,47 +17,22 @@
     <!-- 搜索区 -->
     <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
       <el-form-item label="客户名称:">
-        <el-input
-          v-model="queryParams.companyName"
-          type="text" size="small"
-          placeholder="请输入客户名称"
-          :clearable="true"
-          style="width: 130px"
-        />
+        <el-input v-model="queryParams.companyName" type="text" size="small" placeholder="请输入客户名称" :clearable="true"
+          style="width: 130px" />
       </el-form-item>
       <el-form-item label="客户标签:">
-        <el-select v-model="queryParams.customerLabelId"   size="small"  style="width: 130px" clearable>
+        <el-select v-model="queryParams.customerLabelId" size="small" style="width: 130px" clearable>
           <el-option v-for="item in options" :key="item.id" :label="item.lable" :value="item.id" />
         </el-select>
       </el-form-item>
       <el-form-item label="所属期:" prop="year">
-        <el-date-picker
-          v-model="currentMonth"
-          type="month"
-          size="small"
-          format="YYYY年MM月"
-          value-format="YYYY-MM-01"
-          :clearable="false"
-          :disabled-date="disabledDateHandler"
-          style="width: 120px"
-          @change="monthChangeHandler"
-        />
+        <el-date-picker v-model="currentMonth" type="month" size="small" format="YYYY年MM月" value-format="YYYY-MM-01"
+          :clearable="false" :disabled-date="disabledDateHandler" style="width: 120px" @change="monthChangeHandler" />
       </el-form-item>
       <el-form-item label="报税状态:">
-        <el-select
-          v-model="queryParams.status"
-          type="text"
-          size="small"
-          placeholder="状态"
-          :clearable="true"
-          style="width: 130px"
-        >
-          <el-option
-            v-for="item in selectStatus"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
+        <el-select v-model="queryParams.status" type="text" size="small" placeholder="状态" :clearable="true"
+          style="width: 130px">
+          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </el-form-item>
       <el-form-item label="审核人:" prop="verifierName">
@@ -75,33 +45,25 @@
           format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
           end-placeholder="业务日期" style="width: 70%;"></el-date-picker>
       </el-form-item>
-<!-- 
+      <!-- 
       <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:" v-hasPermi="['business:taxeszero:person']">  
         <el-switch v-model="oneself" @change="handleOneself" />
       </el-form-item> -->
       <el-form-item>
-        <el-button type="primary" icon="Search" size="small"  @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="operation" @click="moreSearch = true" size="small"  >更多</el-button>
-        <el-button icon="Refresh" @click="resetQuery" size="small" >重置</el-button>
+        <el-button type="primary" icon="Search" size="small" @click="handleQuery">搜索</el-button>
+        <el-button icon="operation" @click="moreSearch = true" size="small">更多</el-button>
+        <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-    <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-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>
     </div>
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="taxList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="taxList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
         <template #default="scope">
@@ -121,58 +83,41 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <!-- <el-table-column
         label="税号"
         align="center"
         prop="socialCreditCode"
         width="180"
       /> -->
-      <el-table-column
-        label="纳税性质"
-        align="center"
-        width="100"
-        prop="taxType"
-      />
+      <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
       <el-table-column label="是否零申报" align="center" prop="isZero">
         <template #default="scope">
           {{
-            scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
+          scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
           }}
         </template>
       </el-table-column>
       <el-table-column label="报税填写" align="center" prop="evidenceFile">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            v-hasPermi="['business:financialReportTax:saveDetail']"
-            @click="fillIn(scope.row)"
-            >{{
-              scope.row.detail == null
-                ? "填写"
-                : scope.row.detail.status === 1
-                ? "进行中"
-                : "已填写"
-            }}</el-button
-          >
+          <el-button link type="primary" size="small" v-hasPermi="['business:financialReportTax:saveDetail']"
+            @click="fillIn(scope.row)">{{
+            scope.row.detail == null
+            ? "填写"
+            : scope.row.detail.status === 1
+            ? "进行中"
+            : "已填写"
+            }}</el-button>
         </template>
       </el-table-column>
       <el-table-column label="报税附件" align="center" prop="content">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            :disabled="
+          <el-button link type="primary" :disabled="
               scope.row.detail == null || scope.row.detail.evidenceFile === ''
-            "
-            size="small"
-            v-hasPermi="['business:financialReportTax:query']"
-            @click="showFiles(scope.row)"
-            >查看文件</el-button
-          >
+            " size="small" v-hasPermi="['business:financialReportTax:query']"
+            @click="showFiles(scope.row)">查看文件</el-button>
         </template>
       </el-table-column>
       <el-table-column label="状态" align="center" prop="verifyContent">
@@ -181,36 +126,28 @@
             {{ getStatusLabel(scope.row) }}
             <el-popover placement="top-start" width="250" trigger="hover">
               <div style="display: flex; flex-direction: row">
-                <div
-                  v-for="item in selectStatus"
-                  :key="item.value"
-                  style="display: flex; flex-direction: row; margin-right: 10px"
-                >
-                  <div
-                    :style="{
+                <div v-for="item in selectStatus" :key="item.value"
+                  style="display: flex; flex-direction: row; margin-right: 10px">
+                  <div :style="{
                       backgroundColor: item.color,
                       width: '14px',
                       height: '14px',
                       margin: 'auto',
                       borderRadius: '50%',
                       border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                    }"
-                  />
-                  <div
-                    style="
+                    }" />
+                  <div style="
                       display: inline-block;
                       margin-left: 10px;
                       line-height: 36px;
                       font-size: 10px;
-                    "
-                  >
+                    ">
                     {{ item.label }}
                   </div>
                 </div>
               </div>
               <template #reference>
-                <span
-                  style="
+                <span style="
                     color: #fff;
                     font-size: 12px;
                     text-align: center;
@@ -220,9 +157,7 @@
                     height: 14px;
                     background-color: #ccc;
                     border-radius: 50%;
-                  "
-                  >?</span
-                >
+                  ">?</span>
               </template>
             </el-popover>
           </div>
@@ -230,9 +165,8 @@
       </el-table-column>
       <el-table-column label="执行人" align="center" prop="serviceName" />
       <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-        :show-overflow-tooltip="true" />
-        <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
         :show-overflow-tooltip="true" />
       <!-- <el-table-column
         label="操作"
@@ -256,116 +190,53 @@
     </el-table>
 
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
     <!-- 表单 -->
     <FormDialog ref="formDialog" :get-list="getList"></FormDialog>
     <!-- 更多搜索弹窗 -->
-    <el-dialog
-      title="更多搜索"
-      v-model="moreSearch"
-      width="620px"
-      append-to-body
-      size="small"
-      draggable
-      :close-on-click-modal = "false"
-    >
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
+      :close-on-click-modal="false">
       <el-form ref="dictRef" size="small" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="报税所属期:" prop="year">
-              <el-date-picker
-                size="small"
-                v-model="currentMonth"
-                type="month"
-                format="YYYY年MM月"
-                value-format="YYYY-MM-01"
-                :disabled-date="disabledDateHandler"
-                @change="monthChangeHandler"
-                :clearable="false"
-              />
+              <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月"
+                value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
+                :clearable="false" />
             </el-form-item>
             <el-form-item label="纳税性质:" prop="taxType">
-              <el-select
-                size="small"
-                v-model="queryParams.taxType"
-                placeholder="请选择纳税性质"
-                :clearable="true"
-              >
-                <el-option
-                  v-for="item in taxTypes"
-                  :key="item.label"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
+                <el-option v-for="item in taxTypes" :key="item.label" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
             <el-form-item label="报税状态:">
-              <el-select
-                size="small"
-                v-model="queryParams.status"
-                type="text"
-                placeholder="状态"
-                :clearable="true"
-              >
-                <el-option
-                  v-for="item in selectStatus"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true">
+                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="关键字:">
-              <el-input
-                size="small"
-                v-model="queryParams.companyName"
-                type="text"
-                placeholder="请输入客户名称"
-                :clearable="true"
-              />
+              <el-input size="small" v-model="queryParams.companyName" type="text" placeholder="请输入客户名称"
+                :clearable="true" />
             </el-form-item>
             <el-form-item v-if="tenant.versionId === 4" label="来源:">
-              <el-input
-                v-model="queryParams.fromCompanyName"
-                size="small"
-                type="text"
-                placeholder="请输入客户来源"
-                :clearable="true"
-              />
+              <el-input v-model="queryParams.fromCompanyName" size="small" type="text" placeholder="请输入客户来源"
+                :clearable="true" />
             </el-form-item>
             <el-form-item label="税号:">
-              <el-input
-                size="small"
-                v-model="queryParams.socialCreditCode"
-                type="text"
-                placeholder="请输入税号"
-                :clearable="true"
-              />
+              <el-input size="small" v-model="queryParams.socialCreditCode" type="text" placeholder="请输入税号"
+                :clearable="true" />
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button
-            type="primary"
-            icon="Finished"
-            size="small"
-            @click="handleQuery"
-            >确 定</el-button
-          >
-          <el-button icon="close" size="small" @click="moreSearch = false"
-            >取 消</el-button
-          >
+          <el-button type="primary" icon="Finished" size="small" @click="handleQuery">确 定</el-button>
+          <el-button icon="close" size="small" @click="moreSearch = false">取 消</el-button>
         </div>
       </template>
     </el-dialog>
@@ -373,79 +244,82 @@
 </template>
 
 <script setup name="FinancialReportTaxIsZero">
-import {
-  selectMonths,
-  selectStatus,
-  taxTypes,
-  confirmDefault,
-} from "@/utils/default";
-import {
-  listTax,
-  deductionTurnBack,
-  exportFinalTax,
-} from "@/api/business/production/taxIsZero";
-import useUserStore from "@/store/modules/user";
-import FormDialog from "./FormDialog.vue";
+  import {
+    selectMonths,
+    selectStatus,
+    taxTypes,
+    confirmDefault,
+  } from "@/utils/default";
+  import {
+    listTax,
+    deductionTurnBack,
+    exportFinalTax,
+  } from "@/api/business/production/taxIsZero";
+  import useUserStore from "@/store/modules/user";
+  import FormDialog from "./FormDialog.vue";
   import { listLableNoPage } from "@/api/business/lable"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-const flag = ref(checkPermission(['business:taxeszero:person']))
-const flag2 = ref(checkPermission(['business:taxeszero:myself']))
- const activeName = flag.value ? ref('first') : ref('second');
-const tenant = useUserStore().tenant;
-const taxList = ref([]);
-const moreSearch = ref(false);
-const loading = ref(true);
-const oneself = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const options = ref([]);
-const currentMonth = ref(
-  proxy.moment().subtract(1, "month").format("YYYY-MM-01")
-);
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  tenantId: null,
-  currentEmployeeId: null,
-  employeeIds: null,
-  createTime: null,
-  creatorId: null,
-  workOrderId: null,
-  isStop: null,
-  year: proxy.moment().subtract(1, "month").format("YYYY"),
-  month: proxy.moment().subtract(1, "month").format("MM"),
-  principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
-});
-
-/***********************  方法区  ****************************/
-function getOption() {
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+  const flag = ref(checkPermission(['business:taxeszero:person']))
+  const flag2 = ref(checkPermission(['business:taxeszero:myself']))
+  const activeName = flag.value ? ref('first') : ref('second');
+  const tenant = useUserStore().tenant;
+  const taxList = ref([]);
+  const moreSearch = ref(false);
+  const loading = ref(true);
+  const oneself = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const options = ref([]);
+  const currentMonth = ref(
+    proxy.moment().subtract(1, "month").format("YYYY-MM-01")
+  );
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    tenantId: null,
+    currentEmployeeId: null,
+    employeeIds: null,
+    createTime: null,
+    creatorId: null,
+    workOrderId: null,
+    isStop: null,
+    year: proxy.moment().subtract(1, "month").format("YYYY"),
+    month: proxy.moment().subtract(1, "month").format("MM"),
+    principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
+  });
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
+  /***********************  方法区  ****************************/
+  function getOption() {
     listLableNoPage().then(res => {
       options.value = res.data
     })
   }
-/** 查询报税列表 */
-function getList() {
-  console.log("查询", queryParams.value);
-  loading.value = true;
-  listTax(queryParams.value).then((response) => {
-    taxList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
+  /** 查询报税列表 */
+  function getList() {
+    console.log("查询", queryParams.value);
+    loading.value = true;
+    listTax(queryParams.value).then((response) => {
+      taxList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  moreSearch.value = false;
-  queryParams.value.pageNum = 1;
-  getList();
-}
-function handleClick(tab) {
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    moreSearch.value = false;
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+  function handleClick(tab) {
     console.log(tab.props.name)
     if (tab.props.name === "second") {
       oneself.value = true
@@ -455,16 +329,16 @@ function handleClick(tab) {
       handleOneself()
     }
   }
-/** 是否为自己负责 */
-function handleOneself() {
-  if (oneself.value) {
-    queryParams.value.principal = useUserStore().user.userId;
-  } else {
-    queryParams.value.principal = null;
+  /** 是否为自己负责 */
+  function handleOneself() {
+    if (oneself.value) {
+      queryParams.value.principal = useUserStore().user.userId;
+    } else {
+      queryParams.value.principal = null;
+    }
+    getList();
   }
-  getList();
-}
-function checkPermission(templatePermission) {
+  function checkPermission(templatePermission) {
     const all_permission = "*:*:*";
     const permissions = useUserStore().permissions;
     const hasPermissions = permissions.some((permission) => {
@@ -474,137 +348,137 @@ function checkPermission(templatePermission) {
     });
     return hasPermissions;
   }
-/** 导出按钮操作 */
-function handleExport() {
-  exportFinalTax(queryParams.value);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportFinalTax(queryParams.value);
+  }
 
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  queryParams.value = {
-    pageNum: 1,
-    pageSize: 20,
-    tenantId: null,
-    currentEmployeeId: null,
-    employeeIds: null,
-    createTime: null,
-    creatorId: null,
-    workOrderId: null,
-    isStop: null,
-    year: proxy.moment().subtract(1, "month").format("YYYY"),
-    month: proxy.moment().subtract(1, "month").format("MM"),
-  };
-  currentMonth.value = proxy.moment().subtract(1, "month").format("YYYY-MM-01");
-  if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      tenantId: null,
+      currentEmployeeId: null,
+      employeeIds: null,
+      createTime: null,
+      creatorId: null,
+      workOrderId: null,
+      isStop: null,
+      year: proxy.moment().subtract(1, "month").format("YYYY"),
+      month: proxy.moment().subtract(1, "month").format("MM"),
+    };
+    currentMonth.value = proxy.moment().subtract(1, "month").format("YYYY-MM-01");
+    if (activeName.value != null && activeName.value === 'second') {
+      queryParams.value.principal = useUserStore().user.userId;
     }
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 查看文件 */
-function showFiles(row) {
-  console.log("查看文件", row);
-  openByPermission(null, row, {
-    month: queryParams.value.month,
-    year: queryParams.value.year,
-  });
-}
+    handleQuery();
+  }
 
-/** 退回按钮操作 */
-function turnBack(detail) {
-  deductionTurnBack(detail)
-    .then((res) => {
-      console.log(res);
-      getList();
-    })
-    .catch((err) => {
-      proxy.$modal.$modalMsgError(err);
-      console.log(err);
-      getList();
-    });
-  getList();
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-/** 填写按钮操作 */
-function fillIn(row) {
-  if (row.detail == null) {
-    openByPermission(0, row, {
-      month: queryParams.value.month,
-      year: queryParams.value.year,
-    });
-  } else if (row.detail != null && row.detail.status == 3) {
+  /** 查看文件 */
+  function showFiles(row) {
+    console.log("查看文件", row);
     openByPermission(null, row, {
       month: queryParams.value.month,
       year: queryParams.value.year,
     });
-  } else {
-    openByPermission(row.detail, row, {
-      month: queryParams.value.month,
-      year: queryParams.value.year,
-    });
   }
-}
 
-/** 打开弹窗 */
-function openByPermission(detailItem, row, item) {
-  console.log("打开弹窗", detailItem, row, item);
-  console.log(detailItem);
-  if (detailItem == null) {
-    proxy.$refs.formDialog.open(null, row, item);
-  } else {
-    proxy.$refs.formDialog.open(detailItem, row, item);
-    console.log(detailItem.id);
+  /** 退回按钮操作 */
+  function turnBack(detail) {
+    deductionTurnBack(detail)
+      .then((res) => {
+        console.log(res);
+        getList();
+      })
+      .catch((err) => {
+        proxy.$modal.$modalMsgError(err);
+        console.log(err);
+        getList();
+      });
+    getList();
   }
-}
 
-function getStatusStyle(row) {
-  if (row.detail == null) {
-    return { color: getStatusColor(0), verticalAlign: "middle" };
-  } else {
-    return {
-      color: getStatusColor(row.detail.status),
-      verticalAlign: "middle",
-    };
+  /** 填写按钮操作 */
+  function fillIn(row) {
+    if (row.detail == null) {
+      openByPermission(0, row, {
+        month: queryParams.value.month,
+        year: queryParams.value.year,
+      });
+    } else if (row.detail != null && row.detail.status == 3) {
+      openByPermission(null, row, {
+        month: queryParams.value.month,
+        year: queryParams.value.year,
+      });
+    } else {
+      openByPermission(row.detail, row, {
+        month: queryParams.value.month,
+        year: queryParams.value.year,
+      });
+    }
   }
-}
 
-function getStatusLabel(row) {
-  const index = selectStatus.findIndex(
-    (v) => v.value === (row.detail == null ? 0 : row.detail.status)
-  );
-  return index >= 0 ? selectStatus[index].label : "";
-}
+  /** 打开弹窗 */
+  function openByPermission(detailItem, row, item) {
+    console.log("打开弹窗", detailItem, row, item);
+    console.log(detailItem);
+    if (detailItem == null) {
+      proxy.$refs.formDialog.open(null, row, item);
+    } else {
+      proxy.$refs.formDialog.open(detailItem, row, item);
+      console.log(detailItem.id);
+    }
+  }
 
-function getStatusColor(status) {
-  const index = selectStatus.findIndex((v) => v.value === status);
-  return index >= 0 ? selectStatus[index].color : "#fff";
-}
+  function getStatusStyle(row) {
+    if (row.detail == null) {
+      return { color: getStatusColor(0), verticalAlign: "middle" };
+    } else {
+      return {
+        color: getStatusColor(row.detail.status),
+        verticalAlign: "middle",
+      };
+    }
+  }
+
+  function getStatusLabel(row) {
+    const index = selectStatus.findIndex(
+      (v) => v.value === (row.detail == null ? 0 : row.detail.status)
+    );
+    return index >= 0 ? selectStatus[index].label : "";
+  }
+
+  function getStatusColor(status) {
+    const index = selectStatus.findIndex((v) => v.value === status);
+    return index >= 0 ? selectStatus[index].color : "#fff";
+  }
 
-function disabledDateHandler(date) {
-  if (date <= proxy.moment().subtract(1, "month")) {
-    return false;
-  } else {
-    return true;
+  function disabledDateHandler(date) {
+    if (date <= proxy.moment().subtract(1, "month")) {
+      return false;
+    } else {
+      return true;
+    }
   }
-}
 
-function monthChangeHandler(arg) {
-  const year = proxy.moment(arg).format("YYYY");
-  const month = proxy.moment(arg).format("MM");
-  queryParams.value.year = year;
-  queryParams.value.month = month;
-  console.log(year, month);
-  handleQuery();
-}
+  function monthChangeHandler(arg) {
+    const year = proxy.moment(arg).format("YYYY");
+    const month = proxy.moment(arg).format("MM");
+    queryParams.value.year = year;
+    queryParams.value.month = month;
+    console.log(year, month);
+    handleQuery();
+  }
 
-getList();
-getOption();
-</script>
+  getList();
+  getOption();
+</script>

+ 8 - 4
src/views/business/production/keepAccount/index.vue

@@ -57,7 +57,7 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <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">
@@ -86,8 +86,9 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" min-width="100" align="center" prop="taxType" />
       <el-table-column label="所属期" width="90" align="center">
         <template #default="scope">
@@ -341,7 +342,10 @@
   const editStatus = {
     startMonth: false,
   };
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /***********************  方法区  ****************************/
   function getOption() {
     listLableNoPage().then(res => {

+ 5 - 2
src/views/business/production/onceWork/index.vue

@@ -69,7 +69,7 @@
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column> -->
-      <el-table-column label="项目" align="center"  width="200" :show-overflow-tooltip="true">
+      <el-table-column label="项目" align="center" width="200" :show-overflow-tooltip="true">
         <template #default="scope">
           {{
           scope.row.noContract === 1? scope.row.remark: `${scope.row.taskTypeName}${scope.row.alterType
@@ -273,7 +273,10 @@
   };
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 169 - 166
src/views/business/production/productionCompany/index.vue

@@ -38,7 +38,7 @@
         <template #default="scope">
           <span>{{
             scope.row.province + "-" + scope.row.city + "-" + scope.row.district
-          }}</span>
+            }}</span>
         </template>
       </el-table-column>
       <el-table-column label="年收入" align="center" prop="annualIncome" />
@@ -47,7 +47,7 @@
         <template #default="scope">
           <span>{{
             scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
-          }}</span>
+            }}</span>
         </template>
       </el-table-column>
       <el-table-column label="客服" align="center" min-width="110" prop="adviserName" />
@@ -55,147 +55,150 @@
     </el-table>
 
     <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-      @pagination="getList" />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
 
     <!-- 表单 -->
   </div>
 </template>
 
 <script setup name="ProductionCompany">
-import {
-  listProductionCompany,
-  delCompany,demo
-} from "@/api/business/production/productionCompany";
-const { proxy } = getCurrentInstance();
-import useUserStore from "@/store/modules/user";
-/** 字典数组区 */
-/** 查询 对象 */
-const flag = ref(checkPermission(['business:customer:person']))
-const flag2 = ref(checkPermission(['business:customer:myself']))
-const activeName = flag.value ? ref('first') : ref('second');
-const companyList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const tenant = useUserStore().tenant;
-const oneself = ref(false);
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  orderByColumn: "create_time",
-  category: null,
-  code: null,
-  name: null,
-  shortName: null,
-  oldName: null,
-  owner: null,
-  phone: null,
-  email: null,
-  contactAddress: null,
-  source: null,
-  type: null,
-  socialCreditCode: null,
-  mainBusiness: null,
-  legalRepresentative: null,
-  foundationDate: null,
-  licenceDate: null,
-  businessStartDate: null,
-  businessEndDate: null,
-  isPermanentlyEffective: null,
-  registerMoney: null,
-  registerMoneyUnit: null,
-  provinceCode: null,
-  province: null,
-  cityCode: null,
-  city: null,
-  districtCode: null,
-  district: null,
-  address: null,
-  businessField: null,
-  taxType: null,
-  isZero: null,
-  competentTaxAuthority: null,
-  taxCollectorName: null,
-  taxCollectorPhone: null,
-  taxMonth: null,
-  openingBank: null,
-  bankAccount: null,
-  annualIncome: null,
-  governmentAccountNo: null,
-  governmentPassword: null,
-  socialSecurityAccountNo: null,
-  socialSecurityPassword: null,
-  employeePassword: null,
-  housingFundPassword: null,
-  housingFundUnitAccount: null,
-  housingFundDeductionPassword: null,
-  collectionMethod: null,
-  quotaAmount: null,
-  isPayOnWindow: null,
-  isFirstSocialSecurity: null,
-  isFirstHousingFund: null,
-  leaderId: null,
-  adviserId: null,
-  leaderName: null,
-  adviserName: null,
-  principal:tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
-});
-
-/***********************  方法区  ****************************/
+  import {
+    listProductionCompany,
+    delCompany, demo
+  } from "@/api/business/production/productionCompany";
+  const { proxy } = getCurrentInstance();
+  import useUserStore from "@/store/modules/user";
+  /** 字典数组区 */
+  /** 查询 对象 */
+  const flag = ref(checkPermission(['business:customer:person']))
+  const flag2 = ref(checkPermission(['business:customer:myself']))
+  const activeName = flag.value ? ref('first') : ref('second');
+  const companyList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const total = ref(0);
+  const tenant = useUserStore().tenant;
+  const oneself = ref(false);
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    orderByColumn: "create_time",
+    category: null,
+    code: null,
+    name: null,
+    shortName: null,
+    oldName: null,
+    owner: null,
+    phone: null,
+    email: null,
+    contactAddress: null,
+    source: null,
+    type: null,
+    socialCreditCode: null,
+    mainBusiness: null,
+    legalRepresentative: null,
+    foundationDate: null,
+    licenceDate: null,
+    businessStartDate: null,
+    businessEndDate: null,
+    isPermanentlyEffective: null,
+    registerMoney: null,
+    registerMoneyUnit: null,
+    provinceCode: null,
+    province: null,
+    cityCode: null,
+    city: null,
+    districtCode: null,
+    district: null,
+    address: null,
+    businessField: null,
+    taxType: null,
+    isZero: null,
+    competentTaxAuthority: null,
+    taxCollectorName: null,
+    taxCollectorPhone: null,
+    taxMonth: null,
+    openingBank: null,
+    bankAccount: null,
+    annualIncome: null,
+    governmentAccountNo: null,
+    governmentPassword: null,
+    socialSecurityAccountNo: null,
+    socialSecurityPassword: null,
+    employeePassword: null,
+    housingFundPassword: null,
+    housingFundUnitAccount: null,
+    housingFundDeductionPassword: null,
+    collectionMethod: null,
+    quotaAmount: null,
+    isPayOnWindow: null,
+    isFirstSocialSecurity: null,
+    isFirstHousingFund: null,
+    leaderId: null,
+    adviserId: null,
+    leaderName: null,
+    adviserName: null,
+    principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
+  });
 
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listProductionCompany(queryParams.value).then((response) => {
-    companyList.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-    console.log(response);
+  /***********************  方法区  ****************************/
+  onActivated(() => {
+    // 你的逻辑
+    getList();
   });
-}
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listProductionCompany(queryParams.value).then((response) => {
+      companyList.value = response.rows;
+      total.value = response.total;
+      loading.value = false;
+      console.log(response);
+    });
+  }
 
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-function aaa(){
-  demo().then(res =>{
-    
-  })
-}
-/** 重置按钮操作 */
-function resetQuery() {
-  proxy.resetForm("queryRef");
-  queryParams.value.name = "";
-  queryParams.value.socialCreditCode = "";
-  queryParams.value.leaderName = "";
-  if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+  function aaa() {
+    demo().then(res => {
+
+    })
+  }
+  /** 重置按钮操作 */
+  function resetQuery() {
+    proxy.resetForm("queryRef");
+    queryParams.value.name = "";
+    queryParams.value.socialCreditCode = "";
+    queryParams.value.leaderName = "";
+    if (activeName.value != null && activeName.value === 'second') {
+      queryParams.value.principal = useUserStore().user.userId;
     }
-  handleQuery();
-}
+    handleQuery();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-/** 是否为自己负责 */
-function handleOneself() {
-  if (oneself.value) {
-    queryParams.value.principal = useUserStore().user.userId;
-  } else {
-    queryParams.value.principal = null;
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
   }
-  getList();
-}
-function checkPermission(templatePermission) {
+  /** 是否为自己负责 */
+  function handleOneself() {
+    if (oneself.value) {
+      queryParams.value.principal = useUserStore().user.userId;
+    } else {
+      queryParams.value.principal = null;
+    }
+    getList();
+  }
+  function checkPermission(templatePermission) {
     const all_permission = "*:*:*";
     const permissions = useUserStore().permissions;
     const hasPermissions = permissions.some((permission) => {
@@ -215,42 +218,42 @@ function checkPermission(templatePermission) {
       handleOneself()
     }
   }
-/** 新增按钮操作 */
-function handleAdd() {
-  proxy.$refs.companyRef.open();
-}
+  /** 新增按钮操作 */
+  function handleAdd() {
+    proxy.$refs.companyRef.open();
+  }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  const id = row.id || ids.value;
-  proxy.$refs.companyRef.open(id);
-}
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    const id = row.id || ids.value;
+    proxy.$refs.companyRef.open(id);
+  }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delCompany(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => { });
-}
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delCompany(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  proxy.download(
-    "business/company/export",
-    {
-      ...queryParams.value,
-    },
-    `company_${new Date().getTime()}.xlsx`
-  );
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    proxy.download(
+      "business/company/export",
+      {
+        ...queryParams.value,
+      },
+      `company_${new Date().getTime()}.xlsx`
+    );
+  }
 
-getList();
-</script>
+  getList();
+</script>

+ 9 - 4
src/views/business/production/receiveTicket/index.vue

@@ -57,7 +57,7 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <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">
@@ -86,8 +86,10 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"
+        v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" min-width="90" align="center" prop="taxType" />
       <el-table-column label="所属期" width="90" align="center">
         <template #default="scope">
@@ -405,7 +407,10 @@
   };
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   function getOption() {
     listLableNoPage().then(res => {
       options.value = res.data

+ 9 - 4
src/views/business/production/receiveTicketFeedback/index.vue

@@ -43,7 +43,7 @@
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <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">
@@ -61,8 +61,10 @@ label="序号"
 width="50"
 ></el-table-column> -->
       <el-table-column label="客户名称" prop="companyName" min-width="250" align="center" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"
+        v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" prop="taxType" align="center" min-width="90" />
       <el-table-column label="收票月份" prop="provinceCode" min-width="80" align="center">
         <template #default="scope">
@@ -211,7 +213,10 @@ width="50"
   });
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 8 - 3
src/views/business/production/salary/index.vue

@@ -88,8 +88,10 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"
+        v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" min-width="100" align="center" prop="taxType" />
 
       <el-table-column label="所属期" min-width="90" align="center">
@@ -397,7 +399,10 @@
   };
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 8 - 3
src/views/business/production/salaryZero/index.vue

@@ -93,8 +93,10 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="130"
+        v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" align="center" min-width="150" prop="taxType" />
 
       <el-table-column label="所属期" min-width="90" align="center">
@@ -351,7 +353,10 @@
   const editStatus = {
     startMonth: false,
   };
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /***********************  方法区  ****************************/
   function getOption() {
     listLableNoPage().then(res => {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 420 - 516
src/views/business/service/loop/index.vue


+ 7 - 3
src/views/business/socialSecurity/confirm/index.vue

@@ -68,8 +68,9 @@
       @selection-change="handleSelectionChange">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="客户名称" align="center" prop="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" width="100" align="center" prop="taxType" />
       <el-table-column label="所属期" min-width="90" align="center">
         <template #default="scope">
@@ -329,7 +330,10 @@
   };
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

+ 24 - 19
src/views/business/socialSecurity/declare/index.vue

@@ -17,12 +17,13 @@
     <!-- 搜索区 -->
     <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input v-model="queryParams.companyName"  size="small"  style="width: 130px" placeholder="请输入客户名称" clearable
+        <el-input v-model="queryParams.companyName" size="small" style="width: 130px" placeholder="请输入客户名称" clearable
           @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="所属月:">
-        <el-date-picker v-model="currentMonth"  size="small"  type="month" style="width: 130px" format="YYYY年MM月" :clearable="false"
-          value-format="YYYY-MM-01" @change="currentMonthChange" :disabled-date="disabledDateHandler" />
+        <el-date-picker v-model="currentMonth" size="small" type="month" style="width: 130px" format="YYYY年MM月"
+          :clearable="false" value-format="YYYY-MM-01" @change="currentMonthChange"
+          :disabled-date="disabledDateHandler" />
       </el-form-item>
       <el-form-item label="状态:">
         <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
@@ -44,26 +45,27 @@
         <el-switch v-model="oneself" @change="handleOneself" />
       </el-form-item> -->
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"  size="small" >搜索</el-button>
-        <el-button icon="operation" @click="moreSearch = true"  size="small" >更多</el-button>
-        <el-button icon="Refresh" @click="resetQuery"  size="small" >重置</el-button>
+        <el-button type="primary" icon="Search" @click="handleQuery" size="small">搜索</el-button>
+        <el-button icon="operation" @click="moreSearch = true" size="small">更多</el-button>
+        <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
     <div v-if="flag && flag2 && tenant.versionId !== '4'">
-    <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>
-  </div>
+      <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>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
       @selection-change="handleSelectionChange">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="客户名称" min-width="250" align="center" prop="companyName" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName"  v-if="tenant.versionId === '4'" />
-      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130" v-if="tenant.versionId !== '4'" />
+      <el-table-column label="来源" align="center" prop="fromCompanyName" v-if="tenant.versionId === '4'" />
+      <el-table-column label="受委托方" align="center" prop="toTenantName" min-width="130"
+        v-if="tenant.versionId !== '4'" />
       <el-table-column label="纳税性质" min-width="100" align="center" prop="taxType" />
       <el-table-column label="人员信息" min-width="60" align="center" prop="">
         <template #default="scope">
@@ -137,8 +139,7 @@
       </el-table-column>
       <el-table-column label="执行人" width="80" align="center" prop="serviceName" />
       <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-        :show-overflow-tooltip="true" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
 
       <!-- <el-table-column label="操作" width="80" align="center" prop="">
         <template #default="scope">
@@ -156,7 +157,8 @@
     <member-dialog ref="memeberDialogRef" :get-list="getList" />
     <FileListDialog ref="fileListDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable :close-on-click-modal = "false">
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
+      :close-on-click-modal="false">
       <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
@@ -296,7 +298,10 @@
   });
 
   /***********************  方法区  ****************************/
-
+  onActivated(() => {
+    // 你的逻辑
+    getList();
+  });
   /** 查询company列表 */
   function getList() {
     loading.value = true;

Vissa filer visades inte eftersom för många filer har ändrats