ezhizao_zx há 1 ano atrás
pai
commit
b3bc2b0f37
100 ficheiros alterados com 8364 adições e 2668 exclusões
  1. 36 36
      nginx.conf
  2. 14 1
      src/api/business/account.js
  3. 15 3
      src/api/business/crm/serviceWorkOrder.js
  4. 13 1
      src/api/business/crm/workOrder.js
  5. 2 1
      src/api/business/entrust/currentWorkOrder.js
  6. 2 2
      src/api/business/entrust/deduct.js
  7. 2 1
      src/api/business/entrust/deposit.js
  8. 1 1
      src/api/business/entrust/entrustOrder.js
  9. 2 2
      src/api/business/entrust/nextWorkOrder.js
  10. 2 2
      src/api/business/entrust/onceWorkOrder.js
  11. 12 0
      src/api/business/financial/collection.js
  12. 13 0
      src/api/business/financial/payment.js
  13. 1 0
      src/api/business/production/deduction.js
  14. 13 0
      src/api/business/production/detail.js
  15. 3 2
      src/api/business/production/detailIsZero.js
  16. 24 0
      src/api/business/production/housingFundConfirm.js
  17. 15 0
      src/api/business/production/housingFundDeclare.js
  18. 13 0
      src/api/business/production/keepAccount.js
  19. 14 0
      src/api/business/production/onceWorkOrder.js
  20. 13 0
      src/api/business/production/receiveTicket.js
  21. 3 2
      src/api/business/production/receiveTicketFeedback.js
  22. 25 0
      src/api/business/production/salary.js
  23. 23 0
      src/api/business/production/salaryZero.js
  24. 24 0
      src/api/business/production/socialSecurityConfirm.js
  25. 14 0
      src/api/business/production/socialSecurityDeclare.js
  26. 13 1
      src/api/business/production/tax.js
  27. 13 1
      src/api/business/production/taxIsZero.js
  28. 52 8
      src/api/business/standardCompany.js
  29. 96 25
      src/components/CustomerFormCom/index.vue
  30. 260 85
      src/views/business/contracts/standardCpmpany/CustomerFormCom.vue
  31. 142 23
      src/views/business/contracts/standardCpmpany/add.vue
  32. 267 49
      src/views/business/contracts/standardCpmpany/form.vue
  33. 222 109
      src/views/business/contracts/standardCpmpany/index.vue
  34. 244 0
      src/views/business/contracts/standardCpmpany/setEntrustDialog.vue
  35. 407 0
      src/views/business/contracts/standardCpmpany/setOneEntrustDialog.vue
  36. 30 11
      src/views/business/crm/ZeroChangeDialog.vue
  37. 2 2
      src/views/business/crm/bin/index.vue
  38. 118 3
      src/views/business/crm/company/add.vue
  39. 213 48
      src/views/business/crm/company/index.vue
  40. 165 38
      src/views/business/crm/dict/data.vue
  41. 115 46
      src/views/business/crm/noContractWorkOrder/index.vue
  42. 59 39
      src/views/business/crm/order/form.vue
  43. 188 173
      src/views/business/crm/order/importExcelDialog.vue
  44. 166 56
      src/views/business/crm/workorder/index.vue
  45. 1 8
      src/views/business/deduction/index.vue
  46. 0 21
      src/views/business/entrust/deduct/index.vue
  47. 89 20
      src/views/business/entrust/deductOfFactory/index.vue
  48. 12 26
      src/views/business/entrust/deposit/index.vue
  49. 193 55
      src/views/business/entrust/depositOfFactory/index.vue
  50. 8 30
      src/views/business/entrust/entrustOrder/form.vue
  51. 12 1
      src/views/business/entrust/entrustOrder/index.vue
  52. 2 1
      src/views/business/entrust/statementAccount/form.vue
  53. 104 29
      src/views/business/entrust/statementAccount/index.vue
  54. 147 43
      src/views/business/entrust/workOrder/currentMonth/index.vue
  55. 132 39
      src/views/business/entrust/workOrder/nextMonth/index.vue
  56. 99 25
      src/views/business/entrust/workOrder/once/index.vue
  57. 62 13
      src/views/business/entrust/workOrder/setEntrustDialog.vue
  58. 100 32
      src/views/business/entrust/workOrderForFactory/currentMonth/index.vue
  59. 93 29
      src/views/business/entrust/workOrderForFactory/nextMonth/index.vue
  60. 70 18
      src/views/business/entrust/workOrderForFactory/once/index.vue
  61. 1 0
      src/views/business/financial/collection/form.vue
  62. 0 38
      src/views/business/financial/collection/importExcelDialog.vue
  63. 7 10
      src/views/business/financial/collection/index.vue
  64. 11 9
      src/views/business/financial/contract/form.vue
  65. 2 25
      src/views/business/financial/contract/index.vue
  66. 20 23
      src/views/business/financial/payment/form.vue
  67. 3 16
      src/views/business/financial/payment/index.vue
  68. 221 0
      src/views/business/housingFund/confirm/importExcelDialog.vue
  69. 260 62
      src/views/business/housingFund/confirm/index.vue
  70. 233 70
      src/views/business/housingFund/declare/index.vue
  71. 1 1
      src/views/business/housingFund/memberDialog.vue
  72. 6 0
      src/views/business/production/IndividualIncomeTaxIs/MemberDialog.vue
  73. 349 315
      src/views/business/production/IndividualIncomeTaxIs/index.vue
  74. 6 0
      src/views/business/production/IndividualIncomeTaxIsZero/MemberDialog.vue
  75. 355 349
      src/views/business/production/IndividualIncomeTaxIsZero/index.vue
  76. 28 2
      src/views/business/production/financialReportTax/index.vue
  77. 24 2
      src/views/business/production/financialReportTaxIsZero/index.vue
  78. 239 61
      src/views/business/production/keepAccount/index.vue
  79. 103 42
      src/views/business/production/onceWork/index.vue
  80. 16 1
      src/views/business/production/receiveTicket/form.vue
  81. 347 82
      src/views/business/production/receiveTicket/index.vue
  82. 181 42
      src/views/business/production/receiveTicketFeedback/index.vue
  83. 12 3
      src/views/business/production/salary/form.vue
  84. 184 0
      src/views/business/production/salary/importExcelDialog.vue
  85. 269 68
      src/views/business/production/salary/index.vue
  86. 13 3
      src/views/business/production/salaryZero/form.vue
  87. 218 0
      src/views/business/production/salaryZero/importExcelDialog.vue
  88. 28 7
      src/views/business/production/salaryZero/index.vue
  89. 5 5
      src/views/business/service/loop/housingFundView.vue
  90. 202 65
      src/views/business/service/loop/index.vue
  91. 5 5
      src/views/business/service/loop/keepAccountView.vue
  92. 5 5
      src/views/business/service/loop/socialSecurityView.vue
  93. 139 70
      src/views/business/service/once/index.vue
  94. 9 7
      src/views/business/service/once/view.vue
  95. 1 0
      src/views/business/service/serviceForm.vue
  96. 153 57
      src/views/business/setting/account/index.vue
  97. 24 0
      src/views/business/socialSecurity/confirm/form.vue
  98. 221 0
      src/views/business/socialSecurity/confirm/importExcelDialog.vue
  99. 261 62
      src/views/business/socialSecurity/confirm/index.vue
  100. 7 0
      src/views/business/socialSecurity/confirm/view.vue

+ 36 - 36
nginx.conf

@@ -13,7 +13,7 @@ http {
     keepalive_timeout  65;
     client_max_body_size 20m;
 
-   server { 
+    server { 
 	listen 80; 
 	server_name   124.70.62.143;
     # ssl_certificate  /home/nginx/html/yzbh/ssl/www.dljpwx.com.crt;
@@ -33,53 +33,53 @@ http {
     # }
 
     location /prod-api/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.6:8040/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.6:8040/;
     }
     location /ezhizao-yzbh-sys/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.6:8040/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.6:8040/;
     }
     location /ezhizao-yzbh-crm/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.7:8041/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.7:8041/;
     }
     location /ezhizao-yzbh-entrust/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.8:8042/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.8:8042/;
     }
     location /ezhizao-yzbh-production/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.10:8043/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.10:8043/;
     }
     location /ezhizao-yzbh-finance/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.10:8043/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.10:8043/;
     }
     location /ezhizao-yzbh-financial/{
-	proxy_set_header Host $http_host;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header REMOTE-HOST $remote_addr;
-	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-	proxy_pass http://172.18.0.9:8044/;
+        proxy_set_header Host $http_host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header REMOTE-HOST $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_pass http://172.18.0.9:8044/;
     }
     error_page   500 502 503 504  /50x.html;
     location = /50x.html {

+ 14 - 1
src/api/business/account.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询银行账户列表
 export function listAccount(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-crm'
@@ -39,6 +39,19 @@ export function updateAccount(data) {
   })
 }
 
+// 导出银行账户
+export function exportAccount(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  download(
+    "business/account/export",
+    {
+      ...data,
+    },
+    `账户导出_${new Date().getTime()}.xlsx`
+  );
+}
+
+
 // 删除银行账户
 export function delAccount(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-crm'

+ 15 - 3
src/api/business/crm/serviceWorkOrder.js

@@ -20,14 +20,26 @@ export function listOnce(query) {
   })
 }
 
-export function exportWorkOrder(query) {
+
+export function exportLoop(query) {
+  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  download(
+    "business/workOrderService/exportLoop",
+    {
+      ...query,
+    },
+    `循环服务导出_${new Date().getTime()}.xlsx`
+  )
+}
+
+export function exportOnce(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-crm'
   download(
-    "business/workOrderService/export",
+    "business/workOrderService/exportOnce",
     {
       ...query,
     },
-    `工单导出_${new Date().getTime()}.xlsx`
+    `单次服务导出_${new Date().getTime()}.xlsx`
   )
 }
 

+ 13 - 1
src/api/business/crm/workOrder.js

@@ -66,10 +66,22 @@ export function exportWorkOrder(query) {
     {
       ...query,
     },
-    `工单导出_${new Date().getTime()}.xlsx`
+    `合同工单导出_${new Date().getTime()}.xlsx`
   )
 }
 
+export function exportNoContract(query) {
+  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  download(
+    "business/workOrder/exportNoContract",
+    {
+      ...query,
+    },
+    `非合同工单导出_${new Date().getTime()}.xlsx`
+  )
+}
+
+
 export function setWorkOrderService(data) {
   request.defaults.baseURL = '/ezhizao-yzbh-crm'
   return request({

+ 2 - 1
src/api/business/entrust/currentWorkOrder.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询本月委托
 export function listCurrentWorkOrder(query) {
@@ -73,7 +74,7 @@ export function exportCurrentWorkOrder(query) {
     {
       ...query,
     },
-    `委托导出_${new Date().getTime()}.xlsx`
+    `本月工单导出_${new Date().getTime()}.xlsx`
   )
 }
 

+ 2 - 2
src/api/business/entrust/deduct.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询扣款记录列表
 export function listDeduct(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'
@@ -83,7 +83,7 @@ export function exportDeduct(query) {
     {
       ...query,
     },
-    `工单导出_${new Date().getTime()}.xlsx`
+    `概览导出_${new Date().getTime()}.xlsx`
   )
 }
 export function confirmDeduct(data) {

+ 2 - 1
src/api/business/entrust/deposit.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询存款列表
 export function listDeposit(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'
@@ -79,6 +79,7 @@ export function delDeposit(id) {
 
 export function exportDeposit(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'
+
   download(
     "business/deposit/export",
     {

+ 1 - 1
src/api/business/entrust/entrustOrder.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询委托签约合同列表
 export function listEntrustOrder(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'

+ 2 - 2
src/api/business/entrust/nextWorkOrder.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询本月委托
 export function listNextWorkORder(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'
@@ -73,6 +73,6 @@ export function exportNextWorkOrder(query) {
     {
       ...query,
     },
-    `委托导出_${new Date().getTime()}.xlsx`
+    `下月工单导出_${new Date().getTime()}.xlsx`
   )
 }

+ 2 - 2
src/api/business/entrust/onceWorkOrder.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询本月委托
 export function listOnceWorkOrder(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'
@@ -73,7 +73,7 @@ export function exportOnceWorkOrder(query) {
     {
       ...query,
     },
-    `委托导出_${new Date().getTime()}.xlsx`
+    `单次任务导出_${new Date().getTime()}.xlsx`
   )
 }
 

+ 12 - 0
src/api/business/financial/collection.js

@@ -20,6 +20,18 @@ export function listContract(query) {
     params: query
   })
 }
+
+export function exportCllection(query) {
+  request.defaults.baseURL = '/ezhizao-yzbh-financial'
+  download(
+    "business/collection/export",
+    {
+      ...query,
+    },
+    `收款管理导出_${new Date().getTime()}.xlsx`
+  )
+}
+
 // 查询账户
 export function listAccount(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-financial'

+ 13 - 0
src/api/business/financial/payment.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询划款管理列表
 export function listPayment(query) {
@@ -20,6 +21,18 @@ export function listContract(query) {
   })
 }
 
+export function exportPayment(query) {
+  request.defaults.baseURL = '/ezhizao-yzbh-financial'
+  download(
+    "business/payment/export",
+    {
+      ...query,
+    },
+    `支出管理导出_${new Date().getTime()}.xlsx`
+  )
+}
+
+
 export function listContractDetail(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-financial'
   return request({

+ 1 - 0
src/api/business/production/deduction.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询划款管理列表
 export function listDeduction(query) {

+ 13 - 0
src/api/business/production/detail.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询个税详情列表
 export function listDetail(query) {
@@ -20,6 +21,18 @@ export function getInfo(id) {
   })
 }
 
+//导出
+export function exportIndividualIncome(query) {
+  request.defaults.baseURL = '/ezhizao-yzbh-finance'
+  download(
+    "/business/detail/export",
+    {
+      ...query,
+    },
+    `个税非零申报信息_${new Date().getTime()}.xlsx`
+  )
+}
+
 
 // 查询查询工资列表信息
 export function getDetail(id) {

+ 3 - 2
src/api/business/production/detailIsZero.js

@@ -20,7 +20,7 @@ export function getDetail(id) {
   })
 }
 
-//查询工资列表
+//查询
 export function getSalaryDetail(data) {
   request.defaults.baseURL = '/ezhizao-yzbh-finance'
   return request({
@@ -30,7 +30,8 @@ export function getSalaryDetail(data) {
   })
 }
 
-export function exportDetail(query) {
+//导出
+export function exportIndividualIncome(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-finance'
   download(
     "/business/detailIsZero/export",

+ 24 - 0
src/api/business/production/housingFundConfirm.js

@@ -11,6 +11,30 @@ export function listHousingFundConfirm(query) {
   })
 }
 
+// 下载导入模板
+export function exportHousingFundTemplate() {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/housingFundConfirm/exportHousingFundTemplate",
+    {
+    },
+    `公积金导入模板_${new Date().getTime()}.xlsx`
+  )
+}
+
+
+// 导出公积金信息
+export function exportHoisngFundConfirm(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/housingFundConfirm/export",
+    {
+      ...data,
+    },
+    `公积金信息${new Date().getTime()}.xlsx`
+  )
+}
+
 // 查询工资详细
 export function getHousingFundConfirm(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 15 - 0
src/api/business/production/housingFundDeclare.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询列表
 export function listHousingFundDeclare(query) {
@@ -10,6 +11,20 @@ export function listHousingFundDeclare(query) {
   })
 }
 
+
+
+// 导出公积金信息
+export function exportHoisngFundDeclare(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/housingFundDeclare/export",
+    {
+      ...data,
+    },
+    `公积金信息${new Date().getTime()}.xlsx`
+  )
+}
+
 // 查询详细
 export function getHousingFundDeclare(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 13 - 0
src/api/business/production/keepAccount.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询工资列表
 export function listKeepAccount(query) {
@@ -90,4 +91,16 @@ export function turnBackDetail(data) {
     method: 'post',
     data: data
   })
+}
+
+// 导出
+export function exportKeepAccount(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/keepAccount/export",
+    {
+      ...data,
+    },
+    `记账信息导出_${new Date().getTime()}.xlsx`
+  )
 }

+ 14 - 0
src/api/business/production/onceWorkOrder.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询工资列表
 export function listOnceWorkOrder(query) {
@@ -10,6 +11,19 @@ export function listOnceWorkOrder(query) {
   })
 }
 
+
+// 导出
+export function exportOnceWork(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/onceWorkOrder/export",
+    {
+      ...data,
+    },
+    `单次任务导出_${new Date().getTime()}.xlsx`
+  )
+}
+
 export function getDetail(data) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'
   return request({

+ 13 - 0
src/api/business/production/receiveTicket.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询工资列表
 export function listReceiveTicket(query) {
@@ -19,6 +20,18 @@ export function getReceiveTicket(id) {
   })
 }
 
+
+// 查询工资详细
+export function exportReceiveTicket(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/receiveTicket/export",
+    {
+      ...data,
+    },
+    `收票任务导出_${new Date().getTime()}.xlsx`
+  )
+}
 // 新增工资
 export function addReceiveTicket(data) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 3 - 2
src/api/business/production/receiveTicketFeedback.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询收票反馈列表
 export function listReceiveTicketFeedback(query) {
@@ -49,9 +50,9 @@ export function delReceiveTicketFeedback(id) {
 }
 
 export function exportReceiveTicketFeedback(query) {
-  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
   download(
-    "business/deposit/export",
+    "business/receiveTicketFeedback/export",
     {
       ...query,
     },

+ 25 - 0
src/api/business/production/salary.js

@@ -20,6 +20,31 @@ export function getSalary(id) {
   })
 }
 
+// 查询工资详细
+export function exportSalary(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/salary/export",
+    {
+      ...data,
+    },
+    `工资导出_${new Date().getTime()}.xlsx`
+  )
+}
+
+// 下载工资模板
+export function exportSalaryTemplate() {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/salary/exportSalaryTemplate",
+    {
+    },
+    `工资导入模板_${new Date().getTime()}.xlsx`
+  )
+}
+
+
+
 // 新增工资
 export function addSalary(data) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 23 - 0
src/api/business/production/salaryZero.js

@@ -11,6 +11,29 @@ export function listSalary(query) {
   })
 }
 
+// 导出工资详细
+export function exportSalary(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/salaryZero/export",
+    {
+      ...data,
+    },
+    `工资导出_${new Date().getTime()}.xlsx`
+  )
+}
+
+// 下载工资模板
+export function exportSalaryTemplate() {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/salary/exportSalaryTemplate",
+    {
+    },
+    `工资零申报导入模板_${new Date().getTime()}.xlsx`
+  )
+}
+
 // 查询工资详细
 export function getSalary(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 24 - 0
src/api/business/production/socialSecurityConfirm.js

@@ -20,6 +20,19 @@ export function getSocialSecurityConfirm(id) {
   })
 }
 
+// 导出社保信息
+export function exportSociaSecurity(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/socialSecurityConfirm/export",
+    {
+      ...data,
+    },
+    `社保信息${new Date().getTime()}.xlsx`
+  )
+}
+
+
 //导出社保人员信息
 export function exportSocialSecurityEmployee(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'
@@ -32,6 +45,17 @@ export function exportSocialSecurityEmployee(id) {
   )
 }
 
+// 下载社保模板
+export function exportSocialSecurityTemplate() {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/socialSecurityConfirm/exportSocialSecurityTemplate",
+    {
+    },
+    `社保人员确认导入模板_${new Date().getTime()}.xlsx`
+  )
+}
+
 // 新增工资
 export function addSocialSecurityConfirm(data) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 14 - 0
src/api/business/production/socialSecurityDeclare.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { download } from '@/utils/request'
 
 // 查询列表
 export function listSocialSecurityDeclare(query) {
@@ -10,6 +11,19 @@ export function listSocialSecurityDeclare(query) {
   })
 }
 
+// 导出
+export function exportSocialSecurityDeclare(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/socialSecurityDeclare/export",
+    {
+      ...data,
+    },
+    `社保申报任务${new Date().getTime()}.xlsx`
+  )
+}
+
+
 // 查询详细
 export function getSocialSecurityDeclare(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-production'

+ 13 - 1
src/api/business/production/tax.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询报税列表
 export function listTax(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-finance'
@@ -10,6 +10,18 @@ export function listTax(query) {
   })
 }
 
+// 导出
+export function exportFinalTax(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/financialReportTaxNonZero/export",
+    {
+      ...data,
+    },
+    `报税非零申报导出_${new Date().getTime()}.xlsx`
+  )
+}
+
 // 查询报税详细
 export function getTax(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-finance'

+ 13 - 1
src/api/business/production/taxIsZero.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询报税列表
 export function listTax(query) {
   request.defaults.baseURL = '/ezhizao-yzbh-finance'
@@ -10,6 +10,18 @@ export function listTax(query) {
   })
 }
 
+// 导出
+export function exportFinalTax(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-production'
+  download(
+    "business/financialReportTax/export",
+    {
+      ...data,
+    },
+    `报税零申报导出_${new Date().getTime()}.xlsx`
+  )
+}
+
 // 查询报税详细
 export function getTax(id) {
   request.defaults.baseURL = '/ezhizao-yzbh-finance'

+ 52 - 8
src/api/business/standardCompany.js

@@ -1,8 +1,8 @@
 import request from '@/utils/request'
-
+import { download } from '@/utils/request'
 // 查询standardCompany列表
 export function listStandardCompany(query) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany/list',
     method: 'get',
@@ -12,7 +12,7 @@ export function listStandardCompany(query) {
 
 // 查询standardCompany详细
 export function getStandardCompany(id) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany/' + id,
     method: 'get'
@@ -21,7 +21,7 @@ export function getStandardCompany(id) {
 
 // 新增standardCompany
 export function addStandardCompany(data) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany',
     method: 'post',
@@ -31,7 +31,7 @@ export function addStandardCompany(data) {
 
 // 修改standardCompany
 export function updateStandardCompany(data) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany',
     method: 'put',
@@ -41,7 +41,7 @@ export function updateStandardCompany(data) {
 
 // 修改standardCompany负责人
 export function updateStandardCompanyName(id, userId) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany/Leader/' + id,
     method: 'post',
@@ -51,7 +51,7 @@ export function updateStandardCompanyName(id, userId) {
 
 // 修改standardCompany客服
 export function updateStandardCompanyAdviser(id, userId) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany/Adviser/' + id,
     method: 'post',
@@ -59,9 +59,53 @@ export function updateStandardCompanyAdviser(id, userId) {
   })
 }
 
+//循环工单
+export function setLoopEntrust(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
+  return request({
+    url: '/business/standardCompany/setLoopEntrust/',
+    method: 'post',
+    data: data
+  })
+}
+
+// 新增档案入库
+export function addOrder(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  return request({
+    url: '/business/standardCompany/order',
+    method: 'post',
+    data: data
+  })
+}
+
+// 单次工单
+export function setOneEntrust(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
+  return request({
+    url: '/business/standardCompany/setOneEntrust',
+    method: 'post',
+    data: data
+  })
+}
+
+// 导出
+export function exportCompany(data) {
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
+  download(
+    "business/standardCompany/export",
+    {
+      ...data,
+    },
+    `客户信息${new Date().getTime()}.xlsx`
+  );
+}
+
+
+
 // 删除standardCompany
 export function delStandardCompany(id) {
-  request.defaults.baseURL = '/ezhizao-yzbh-crm'
+  request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/standardCompany/' + id,
     method: 'delete'

+ 96 - 25
src/components/CustomerFormCom/index.vue

@@ -21,24 +21,64 @@
             </el-select>
           </td>
           <td>
-            <el-input
-              v-model.trim="formData.sourceName"
+            <el-autocomplete
+              :fetch-suggestions="querySearchAsync"
               :disabled="
                 !sourceCategoryId || currentSource.referrerDataSource === ''
               "
-              size="small"
-              type="text"
-              :placeholder="placeholderValue"
-              readonly
+              :trigger-on-focus="true"
+              style="width: 100%"
+              v-model="formData.sourceName"
+              placeholder="请先选择左侧"
+              popper-class="my-autocomplete"
+              @select="handleSelectEmployee"
             >
-              <template #append>
-                <el-button
-                  :disabled="!sourceCategoryId"
-                  icon="Search"
-                  @click="handlerInputOpen"
-                />
+              <template #default="{ item }">
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                  v-if="currentSource.referrerDataSource === 'channel'"
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.name }}
+                  </div>
+                </div>
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                  v-if="currentSource.referrerDataSource === 'company'"
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.name }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.shortName
+                  }}</span>
+                </div>
+
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                  v-if="currentSource.referrerDataSource === 'employee'"
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.nickName }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.userName
+                  }}</span>
+                </div>
               </template>
-            </el-input>
+            </el-autocomplete>
           </td>
         </tr>
       </table>
@@ -67,17 +107,17 @@
       :width="'800px'"
       @choice="simpleSelectedChannel"
     />
-    <!-- <DialogDepartmentEmployeeChoice ref="DialogDepartmentEmployeeChoice" :multiple="false" :width="'800px'" :simple-selected="simpleSelectedDepart" /> -->
   </div>
 </template>
 <script setup>
 import { toRef } from "vue";
-
+import { listUser } from "@/api/system/user";
+import { listChannel } from "@/api/business/channel";
+import { listCompany } from "@/api/business/crm/company";
+import { listSource } from "@/api/settings/source";
 import DialogEmployeeChoice from "@/views/dialog/DialogEmployeeChoice.vue";
 import DialogCustomerChoice from "@/views/dialog/DialogCustomerChoice.vue";
 import DialogChannelChoice from "@/views/dialog/DialogChannelChoice.vue";
-// import DialogDepartmentEmployeeChoice from '@/views/dialog/DialogDepartmentEmployeeChoice.vue'
-// import { watch } from 'vue'
 
 const { proxy } = getCurrentInstance();
 
@@ -148,6 +188,19 @@ watch(
   }
 );
 
+function handleSelectEmployee(item) {
+  // 根据选择id获取数据
+  if (currentSource.value.referrerDataSource === "channel") {
+    formData.value.sourceName = item.name;
+    formData.value.sourceId = item.id;
+  } else if (currentSource.value.referrerDataSource === "employee") {
+    formData.value.sourceName = item.nickName;
+    formData.value.sourceId = item.userId;
+  } else if (currentSource.value.referrerDataSource === "company") {
+    formData.value.sourceName = item.name;
+    formData.value.sourceId = item.id;
+  }
+}
 function handlerChangeCategory(value) {
   formData.value.sourceId = null;
   formData.value.sourceName = "";
@@ -156,7 +209,7 @@ function handlerChangeCategory(value) {
 
 function handlerSelectCategory() {
   formData.value.sourceCategoryId = sourceCategoryId.value;
-  // formData.value.referrerDataSource = currentSource.value.referrerDataSource
+  formData.value.referrerDataSource = currentSource.value.referrerDataSource;
   const index = sourceCategories.value.findIndex(
     (l) => l.id === sourceCategoryId.value
   );
@@ -167,15 +220,33 @@ function handlerSelectCategory() {
   if (item) {
     formData.value.sourceCategoryName = item.title;
     formData.value.referrerDataSource = item.referrerDataSource;
-    placeholderValue.value = item.title + "名称";
-  } else {
-    formData.value.sourceCategoryName = "";
-    formData.value.referrerDataSource = "";
-    placeholderValue.value = "请先选择左侧";
+    // placeholderValue.value = item.title + "名称";
   }
 
-  // 咋整都要清理 右侧
-  sourceName.value = "";
+  // // 咋整都要清理 右侧
+  // sourceName.value = "";
+}
+
+/** 输入框输出建议 */
+function querySearchAsync(queryString, cb) {
+  console.log("输出建议", currentSource.value);
+  // 根据选择id获取数据
+  if (currentSource.value.referrerDataSource === "channel") {
+    const query = { name: queryString };
+    listChannel(query).then((res) => {
+      cb(res.rows);
+    });
+  } else if (currentSource.value.referrerDataSource === "employee") {
+    const query = { keyword: queryString };
+    listUser(query).then((res) => {
+      cb(res.rows);
+    });
+  } else if (currentSource.value.referrerDataSource === "company") {
+    const query = { keyword: queryString };
+    listCompany(query).then((res) => {
+      cb(res.rows);
+    });
+  }
 }
 
 function handlerInputOpen() {

+ 260 - 85
src/views/business/contracts/standardCpmpany/CustomerFormCom.vue

@@ -1,132 +1,307 @@
 <template>
-  <div>
-    <el-form-item label="客户来源:" required size="small">
-      <template v-if="editStatus">
-        <table style="border-spacing:0">
-          <tr>
-            <td>
-              <el-select v-model.trim="sourceCategoryId" placeholder="客户来源分类" size="small" @change="handlerSelectCategory">
-                <el-option v-for="item in sourceCategories" :key="item.id" :label="item.title" :value="item.id" />
-              </el-select>
-            </td>
-            <td>
-              <el-input v-model.trim="sourceName" :disabled="!sourceCategoryId || currentSource.referrerDataSource === ''" size="small" type="text" :placeholder="placeholderValue" readonly>
-                <template #append>
-                  <el-button :disabled="!sourceCategoryId" icon="Search" @click="handlerInputOpen" />
-                </template>
-              </el-input>
-            </td>
-          </tr>
-        </table>
-      </template>
-      <span v-else>{{ (formData.sourceCategoryName ? formData.sourceCategoryName : "") + " - " + (formData.sourceName ? formData.sourceName : "") }}</span>
-    </el-form-item>
-    <DialogEmployeeChoice ref="DialogEmployeeChoice" :multiple="false" :width="'800px'" @choice="simpleSelectedEmployee" />
-    <DialogCustomerChoice ref="DialogCustomerChoice" :multiple="false" :width="'800px'" @choice="simpleSelectedCustomer" />
-    <DialogChannelChoice ref="DialogChannelChoice" :multiple="false" :width="'800px'" @choice="simpleSelectedChannel" />
-    <!-- <DialogDepartmentEmployeeChoice ref="DialogDepartmentEmployeeChoice" :multiple="false" :width="'800px'" :simple-selected="simpleSelectedDepart" /> -->
+  <div style="width: 100%">
+    <!-- <el-form-item label="客户来源:" prop="sourceName" required :rules="sourceRule" size="small"> -->
+    <template v-if="editStatus">
+      <table style="border-spacing: 0; width: 100%">
+        <tr>
+          <td>
+            <el-select
+              style="width: 100%"
+              v-model.trim="sourceCategoryId"
+              placeholder="客户来源分类"
+              size="small"
+              @change="handlerChangeCategory"
+            >
+              <el-option
+                v-for="item in sourceCategories"
+                :key="item.id"
+                :label="item.title"
+                :value="item.id"
+              />
+            </el-select>
+          </td>
+          <td>
+            <el-autocomplete
+              :fetch-suggestions="querySearchAsync"
+              :disabled="
+                !sourceCategoryId || currentSource.referrerDataSource === ''
+              "
+              :trigger-on-focus="true"
+              style="width: 100%"
+              v-model="formData.sourceName"
+              placeholder="请先选择左侧"
+              popper-class="my-autocomplete"
+              @select="handleSelectEmployee"
+            >
+              <template #default="{ item }">
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                  v-if="currentSource.referrerDataSource === 'channel'"
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.name }}
+                  </div>
+                </div>
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                  v-if="currentSource.referrerDataSource === 'company'"
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.name }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.shortName
+                  }}</span>
+                </div>
+
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                  v-if="currentSource.referrerDataSource === 'employee'"
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.nickName }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.userName
+                  }}</span>
+                </div>
+              </template>
+            </el-autocomplete>
+          </td>
+        </tr>
+      </table>
+    </template>
+    <span v-else>{{
+      (formData.sourceCategoryName ? formData.sourceCategoryName : "") +
+      " - " +
+      (formData.sourceName ? formData.sourceName : "")
+    }}</span>
+    <!-- </el-form-item> -->
+    <DialogEmployeeChoice
+      ref="DialogEmployeeChoiceRef"
+      :multiple="false"
+      :width="'800px'"
+      @choice="simpleSelectedEmployee"
+    />
+    <DialogCustomerChoice
+      ref="DialogCustomerChoiceRef"
+      :multiple="false"
+      :width="'800px'"
+      @choice="simpleSelectedCustomer"
+    />
+    <DialogChannelChoice
+      ref="DialogChannelChoiceRef"
+      :multiple="false"
+      :width="'800px'"
+      @choice="simpleSelectedChannel"
+    />
   </div>
 </template>
 <script setup>
-import { toRef } from 'vue';
-
-import DialogEmployeeChoice from '@/views/dialog/DialogEmployeeChoice.vue'
-// import DialogCustomerChoice from '@/views/dialog/DialogCustomerChoice.vue'
-// import DialogChannelChoice from '@/views/dialog/DialogChannelChoice.vue'
-// import DialogDepartmentEmployeeChoice from '@/views/dialog/DialogDepartmentEmployeeChoice.vue'
-// import { watch } from 'vue'
+import { toRef } from "vue";
+import { listUser } from "@/api/system/user";
+import { listChannel } from "@/api/business/channel";
+import { listCompany } from "@/api/business/crm/company";
+import { listSource } from "@/api/settings/source";
+import DialogEmployeeChoice from "@/views/dialog/DialogEmployeeChoice.vue";
+import DialogCustomerChoice from "@/views/dialog/DialogCustomerChoice.vue";
+import DialogChannelChoice from "@/views/dialog/DialogChannelChoice.vue";
 
-const { proxy } = getCurrentInstance()
+const { proxy } = getCurrentInstance();
 
 const props = defineProps({
   editStatus: {
     type: Boolean,
-    default: () => {}
+    default: () => {},
   },
   formData: {
     type: Object,
-    default: () => {}
+    default: () => {},
   },
   sourceCategories: {
     type: Array,
-    default: () => []
+    default: () => [],
+  },
+});
+
+const sourceRule = ref({
+  sourceName: [{ validate: sourceValidator, trigger: "blur" }],
+});
+
+function sourceValidator(rule, value, callback) {
+  if (formData.value.sourceCategoryName === "") {
+    callback(new Error("来源类型不能为空"));
+    return;
+  }
+  if (
+    formData.value.referrerDataSource !== "" &&
+    formData.value.sourceName === ""
+  ) {
+    callback(new Error("来源不能为空"));
+    return;
   }
-})
-const {editStatus, formData, sourceCategories} = toRefs(props)
+  return callback();
+}
+
+const DialogCustomerChoiceRef = ref(null);
+const DialogChannelChoiceRef = ref(null);
+const DialogEmployeeChoiceRef = ref(null);
+const { editStatus, formData, sourceCategories } = toRefs(props);
 const data = reactive({
-  placeholderValue: '请先选择左侧',
-  sourceCategoryId: '',
-  sourceName: '',
-  currentSource: {}
-})
+  placeholderValue: "请先选择左侧",
+  sourceCategoryId: "",
+  sourceName: "",
+  currentSource: {},
+});
 
-const { placeholderValue, sourceCategoryId, sourceName, currentSource } = toRefs(data);
+const { placeholderValue, sourceCategoryId, sourceName, currentSource } =
+  toRefs(data);
 
-watch(formData.value.sourceCategoryId, (val) => {
-  sourceCategoryId.value = val
-  handlerSelectCategory()
-})
+watch(
+  () => formData.value.sourceCategoryId,
+  (val) => {
+    // console.log(formData.value.sourceCategoryId)
+    sourceCategoryId.value = val;
+    // formData.value.sourceId = null
+    // formData.value.sourceName = ''
+    handlerSelectCategory();
+  }
+);
+
+watch(
+  () => formData.value.sourceName,
+  (val) => {
+    sourceName.value = val;
+    // console.log(sourceName.value)
+  }
+);
 
-watch(formData.value.sourceName, (val) => [
-  sourceName.value = val
-])
+function handleSelectEmployee(item) {
+  // 根据选择id获取数据
+  if (currentSource.value.referrerDataSource === "channel") {
+    formData.value.sourceName = item.name;
+    formData.value.sourceId = item.id;
+  } else if (currentSource.value.referrerDataSource === "employee") {
+    formData.value.sourceName = item.nickName;
+    formData.value.sourceId = item.userId;
+  } else if (currentSource.value.referrerDataSource === "company") {
+    formData.value.sourceName = item.name;
+    formData.value.sourceId = item.id;
+  }
+}
+function handlerChangeCategory(value) {
+  formData.value.sourceId = null;
+  formData.value.sourceName = "";
+  handlerSelectCategory();
+}
 
 function handlerSelectCategory() {
-  formData.value.sourceCategoryId = sourceCategoryId.value
-  const index = sourceCategories.value.findIndex(l => l.id === sourceCategoryId.value)
-  currentSource.value = index >= 0 ? sourceCategories.value[index] : {}
-  var item = sourceCategories.value.find((emp) => emp.id === sourceCategoryId.value)
+  formData.value.sourceCategoryId = sourceCategoryId.value;
+  formData.value.referrerDataSource = currentSource.value.referrerDataSource;
+  const index = sourceCategories.value.findIndex(
+    (l) => l.id === sourceCategoryId.value
+  );
+  currentSource.value = index >= 0 ? sourceCategories.value[index] : {};
+  var item = sourceCategories.value.find(
+    (emp) => emp.id === sourceCategoryId.value
+  );
   if (item) {
-    formData.value.sourceCategoryName = item.title
-    placeholderValue.value = item.title + '名称'
-  } else {
-    formData.value.sourceCategoryName = ''
-    placeholderValue.value = '请先选择左侧'
+    formData.value.sourceCategoryName = item.title;
+    formData.value.referrerDataSource = item.referrerDataSource;
+    // placeholderValue.value = item.title + "名称";
   }
 
-  // 咋整都要清理 右侧
-  sourceName.value = ''
+  // // 咋整都要清理 右侧
+  // sourceName.value = "";
+}
+
+/** 输入框输出建议 */
+function querySearchAsync(queryString, cb) {
+  console.log("输出建议", currentSource.value);
+  // 根据选择id获取数据
+  if (currentSource.value.referrerDataSource === "channel") {
+    const query = { name: queryString };
+    listChannel(query).then((res) => {
+      cb(res.rows);
+    });
+  } else if (currentSource.value.referrerDataSource === "employee") {
+    const query = { keyword: queryString };
+    listUser(query).then((res) => {
+      cb(res.rows);
+    });
+  } else if (currentSource.value.referrerDataSource === "company") {
+    const query = { keyword: queryString };
+    listCompany(query).then((res) => {
+      cb(res.rows);
+    });
+  }
 }
 
 function handlerInputOpen() {
   // 根据选择id,打开对话框
-  if (currentSource.value.referrerDataSource === 'channel') {
-    proxy.$refs.DialogChannelChoice.open()
-  } else if (currentSource.value.referrerDataSource === 'employee') {
-    proxy.$refs.DialogEmployeeChoice.open()
-  } else if (currentSource.value.referrerDataSource === 'company') {
-    proxy.$refs.DialogCustomerChoice.open()
+  if (currentSource.value.referrerDataSource === "channel") {
+    DialogChannelChoiceRef.value.open();
+  } else if (currentSource.value.referrerDataSource === "employee") {
+    DialogEmployeeChoiceRef.value.open();
+  } else if (currentSource.value.referrerDataSource === "company") {
+    DialogCustomerChoiceRef.value.open();
   }
 }
 
 function simpleSelectedEmployee(_info) {
-  sourceName.value = _info.nickName
-  formData.value.sourceId = _info.id
-  formData.value.sourceName = _info.nickName
+  sourceName.value = _info.nickName;
+  formData.value.sourceId = _info.userId;
+  formData.value.sourceName = _info.nickName;
   // proxy.$refs.DialogEmployeeChoice.close()
 }
 
 function simpleSelectedCustomer(_info) {
-  sourceName.value = _info.name
-  formData.value.sourceId = _info.id
-  formData.value.sourceName = _info.name
+  sourceName.value = _info.name;
+  formData.value.sourceId = _info.id;
+  formData.value.sourceName = _info.name;
   // proxy.$refs.DialogCustomerChoice.close()
 }
 
 function simpleSelectedChannel(_info) {
-  sourceName.value = _info.name
-  formData.value.sourceId = _info.id
-  formData.value.sourceName = _info.name
+  sourceName.value = _info.name;
+  formData.value.sourceId = _info.id;
+  formData.value.sourceName = _info.name;
   // proxy.$refs.DialogChannelChoice.close()
 }
 
 function simpleSelectedDepart(_info) {
-  sourceName.value = _info.employeeName
-  formData.value.sourceId = _info.employeeId
-  formData.value.sourceName = _info.employeeName
-  proxy.$refs.DialogDepartmentEmployeeChoice.close()
+  sourceName.value = _info.employeeName;
+  formData.value.sourceId = _info.employeeId;
+  formData.value.sourceName = _info.employeeName;
+  // proxy.$refs.DialogDepartmentEmployeeChoice.close()
 }
-
-function sourceable() { return currentSource.value.referrerDataSource !== '' }
-
+function reset() {
+  sourceCategoryId.value = null;
+  sourceName.value = "";
+  formData.value.sourceId = null;
+  formData.value.sourceName = "";
+  formData.value.sourceCategoryId = null;
+}
+function setForm(form) {
+  formData.value = form;
+}
+function sourceable() {
+  return currentSource.value.referrerDataSource !== "";
+}
+defineExpose({
+  reset,
+  setForm,
+});
 </script>

+ 142 - 23
src/views/business/contracts/standardCpmpany/add.vue

@@ -1,7 +1,19 @@
 <template>
   <!-- 添加或修改菜单对话框 -->
-  <el-dialog title="客户添加" v-model="visible" width="680px" append-to-body draggable>
-    <el-form ref="menuRef" :model="form" size="small" :rules="rules" label-width="100px">
+  <el-dialog
+    title="客户添加"
+    v-model="visible"
+    width="680px"
+    append-to-body
+    draggable
+  >
+    <el-form
+      ref="companyRef"
+      :model="form"
+      size="small"
+      :rules="rules"
+      label-width="100px"
+    >
       <el-row>
         <el-col :span="24">
           <el-radio-group v-model="addType">
@@ -15,13 +27,84 @@
           </el-form-item>
         </el-col>
         <el-col v-if="addType === 1" :span="24">
-          <CustomerFormCom :edit-status="true" :form-data="form" :source-categories="sourceCategories" />
+          <el-form-item label="客户来源" prop="">
+            <CustomerFormCom
+              :edit-status="true"
+              :form-data="form"
+              :source-categories="sourceCategories"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col v-if="addType === 1" :span="24">
+          <el-form-item label="负责人">
+            <el-autocomplete
+              :fetch-suggestions="querySearchAsync"
+              style="width: 100%"
+              v-model="form.leaderName"
+              placeholder="请选择负责人"
+              popper-class="my-autocomplete"
+              @select="handleSelectEmployee"
+            >
+              <template #default="{ item }">
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.nickName }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.userName
+                  }}</span>
+                </div>
+              </template>
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item label="客服">
+            <el-autocomplete
+              :fetch-suggestions="querySearchAsync"
+              style="width: 100%"
+              v-model="form.adviserName"
+              placeholder="请选择客服"
+              popper-class="my-autocomplete"
+              @select="handleSelect"
+            >
+              <template #default="{ item }">
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.nickName }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.userName
+                  }}</span>
+                </div>
+              </template>
+            </el-autocomplete>
+          </el-form-item>
         </el-col>
         <el-col v-if="addType === 2" :span="24">
           <el-form-item label="上传">
-            <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
-              :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
-              :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
+            <el-upload
+              ref="uploadRef"
+              :limit="1"
+              accept=".xlsx, .xls"
+              :headers="upload.headers"
+              :action="upload.url + '?updateSupport=' + upload.updateSupport"
+              :disabled="upload.isUploading"
+              :on-progress="handleFileUploadProgress"
+              :on-success="handleFileSuccess"
+              :auto-upload="false"
+              drag
+            >
               <el-icon class="el-icon--upload">
                 <upload-filled />
               </el-icon>
@@ -31,11 +114,18 @@
               <template #tip>
                 <div class="el-upload__tip text-center">
                   <div class="el-upload__tip">
-                    <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
+                    <el-checkbox
+                      v-model="upload.updateSupport"
+                    />是否更新已经存在的用户数据
                   </div>
                   <span>仅允许导入xls、xlsx格式文件。</span>
-                  <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
-                    @click="importTemplate">下载模板</el-link>
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    style="font-size: 12px; vertical-align: baseline"
+                    @click="importTemplate"
+                    >下载模板</el-link
+                  >
                 </div>
               </template>
             </el-upload>
@@ -56,7 +146,10 @@
 <script setup>
 import { getToken, getTenant } from "@/utils/auth";
 import { addCompany } from "@/api/business/crm/company";
-import CustomerFormCom from '@/components/CustomerFormCom'
+import CustomerFormCom from "@/components/CustomerFormCom";
+import { listUser } from "@/api/system/user";
+import { listChannel } from "@/api/business/channel";
+import { listCompany } from "@/api/business/crm/company";
 import useUserStore from "@/store/modules/user";
 import { listSource } from "@/api/settings/source";
 import { deepClone } from "@/utils";
@@ -66,7 +159,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   getList: {
     type: Function,
-    default: () => { },
+    default: () => {},
   },
 });
 const { getList } = toRefs(props);
@@ -125,6 +218,26 @@ const upload = reactive({
   url: "/ezhizao-yzbh-crm/business/company/importData",
 });
 
+/** 输入框输出建议 */
+function querySearchAsync(queryString, cb) {
+  const query = { keyword: queryString };
+  listUser(query).then((res) => {
+    cb(res.rows);
+  });
+}
+
+//设置负责人
+function handleSelectEmployee(item) {
+  form.value.leaderId = item.userId;
+  form.value.leaderName = item.nickName;
+}
+
+//设置客服
+function handleSelect(item) {
+  form.value.adviserId = item.userId;
+  form.value.adviserName = item.nickName;
+}
+
 const contactorEmptyData = {
   id: null,
   name: "",
@@ -209,6 +322,8 @@ const { form, rules, followData } = toRefs(data);
 /** 抽屉打开 */
 function open() {
   reset();
+  form.value.leaderName = useUserStore().user.nickName;
+  form.value.leaderId = useUserStore().user.id;
   visible.value = true;
 }
 
@@ -234,16 +349,20 @@ function cancel() {
 
 function submitForm() {
   if (addType.value === 1) {
-    addCompany(form.value)
-      .then((res) => {
-        console.log(res);
-        visible.value = false;
-        getList.value();
-        emit("success");
-      })
-      .catch((err) => {
-        console.log(err);
-      });
+    proxy.$refs["companyRef"].validate((valid) => {
+      if (valid) {
+        addCompany(form.value)
+          .then((res) => {
+            console.log(res);
+            visible.value = false;
+            getList.value();
+            // emit("success");
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      }
+    });
   } else {
     submitFileForm();
   }
@@ -267,8 +386,8 @@ const handleFileSuccess = (response, file, fileList) => {
   proxy.$refs["uploadRef"].handleRemove(file);
   proxy.$alert(
     "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
-    response.msg +
-    "</div>",
+      response.msg +
+      "</div>",
     "导入结果",
     { dangerouslyUseHTMLString: true }
   );

+ 267 - 49
src/views/business/contracts/standardCpmpany/form.vue

@@ -1,88 +1,194 @@
 <template>
   <!-- 添加或修改菜单对话框 -->
-  <el-dialog title="客户表单" v-model="visible" width="680px" append-to-body draggable>
-    <el-form ref="details" class="master-container" size="small" :model="form" :rules="rules" label-width="120px">
+  <el-dialog
+    title="客户详情"
+    v-model="visible"
+    width="500px"
+    append-to-body
+    draggable
+  >
+    <el-form
+      ref="details"
+      class="master-container"
+      size="small"
+      :model="form"
+      :rules="rules"
+      label-width="120px"
+    >
       <el-row>
         <div class="details-container" style="margin-top: 0px">
-          <el-row :gutter="30" style="margin-top: 5px">
-            <el-col :span="15">
+          <el-row :gutter="24" style="margin-top: 5px">
+            <el-col :span="24">
               <el-form-item label="客户名称:" required prop="name">
-                <el-input v-if="editStatus" v-model.trim="form.name" size="small" type="text" placeholder="客户名称"
-                  :clearable="true" />
+                <el-input
+                  v-if="editStatus"
+                  v-model.trim="form.name"
+                  size="small"
+                  type="text"
+                  placeholder="客户名称"
+                  :clearable="true"
+                />
                 <span v-else>{{ form.name }}</span>
               </el-form-item>
             </el-col>
 
-            <el-col :span="15">
+            <el-col :span="24">
               <el-form-item label="年收入:" prop="annualIncome">
-                <el-select v-if="editStatus" v-model="form.annualIncome" placeholder="请选择年收入">
-                  <el-option v-for="item in incomeDefault" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  style="width: 100%"
+                  v-if="editStatus"
+                  v-model="form.annualIncome"
+                  placeholder="请选择年收入"
+                >
+                  <el-option
+                    v-for="item in incomeDefault"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
                 <span v-else>{{ form.annualIncome }} </span>
               </el-form-item>
             </el-col>
-            <el-col :span="15">
+            <el-col :span="24">
               <el-form-item label="税号:" required prop="socialCreditCode">
-                <el-input v-if="editStatus" v-model.trim="form.socialCreditCode" size="small" type="text" placeholder="税号"
-                  :clearable="true" />
+                <el-input
+                  v-if="editStatus"
+                  v-model.trim="form.socialCreditCode"
+                  size="small"
+                  type="text"
+                  placeholder="税号"
+                  :clearable="true"
+                />
                 <span v-else>{{ form.socialCreditCode }}</span>
               </el-form-item>
             </el-col>
           </el-row>
 
-          <el-row :gutter="30" style="margin-top: 5px">
-            <el-col :span="15">
+          <el-row :gutter="24" style="margin-top: 5px">
+            <el-col :span="24">
               <el-form-item label="是否零申报:">
-                <el-select v-if="editStatus" v-model="zero" placeholder="请选择" style="width: 100%">
-                  <el-option v-for="item in yesOrNo" :key="item.label" :label="item.label" :value="item.value" />
+                <el-select
+                  v-if="editStatus"
+                  v-model="zero"
+                  placeholder="请选择"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in yesOrNo"
+                    :key="item.label"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
-                <span v-else>{{ form.isZero === 1 ? "是" : form.isZero === 0 ? "否" : '' }}</span>
+                <span v-else>{{
+                  form.isZero === 1 ? "是" : form.isZero === 0 ? "否" : ""
+                }}</span>
               </el-form-item>
             </el-col>
           </el-row>
 
-          <el-row :gutter="30" style="margin-top: 5px">
-            <el-col :span="15">
+          <el-row :gutter="24" style="margin-top: 5px">
+            <el-col :span="24">
               <el-form-item label="纳税性质:" required prop="taxType">
-                <el-select v-if="editStatus" v-model="form.taxType" placeholder="请选择纳税性质" size="small" :clearable="true"
-                  @change="taxTypeChange">
-                  <el-option v-for="item in taxTypes" :key="item.label" :label="item.label" :value="item.value" />
+                <el-select
+                  style="width: 100%"
+                  v-if="editStatus"
+                  v-model="form.taxType"
+                  placeholder="请选择纳税性质"
+                  size="small"
+                  :clearable="true"
+                  @change="taxTypeChange"
+                >
+                  <el-option
+                    v-for="item in taxTypes"
+                    :key="item.label"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
                 <span v-else>{{ form.taxType }} </span>
               </el-form-item>
             </el-col>
-            <el-col :span="15">
+            <el-col :span="24">
               <el-form-item label="征收方式:" required prop="collectionMethod">
-                <el-select v-if="editStatus" v-model="form.collectionMethod" placeholder="请选择征收方式" size="small"
-                  :clearable="true">
-                  <el-option v-for="item in collectionMethods" :key="item.label" :label="item.label"
-                    :value="item.value" />
+                <el-select
+                  style="width: 100%"
+                  v-if="editStatus"
+                  v-model="form.collectionMethod"
+                  placeholder="请选择征收方式"
+                  size="small"
+                  :clearable="true"
+                >
+                  <el-option
+                    v-for="item in collectionMethods"
+                    :key="item.label"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
                 <span v-else>{{ form.collectionMethod }}</span>
               </el-form-item>
             </el-col>
-            <el-col v-if="form.collectionMethod === '定期定额'" :span="10">
+            <el-col v-if="form.collectionMethod === '定期定额'" :span="15">
               <el-form-item label="定额金额:" required>
-                <el-input-number v-if="editStatus" v-model="form.quotaAmount" placeholder="请输入定额金额" :min="0"
-                  :precision="2" controls-position="right" :controls="false" size="small" />
+                <el-input-number
+                  v-if="editStatus"
+                  style="width: 100%"
+                  v-model="form.quotaAmount"
+                  placeholder="请输入定额金额"
+                  :min="0"
+                  :precision="2"
+                  controls-position="right"
+                  :controls="false"
+                  size="small"
+                />
                 <span v-else>{{ form.quotaAmount }}</span>
               </el-form-item>
             </el-col>
           </el-row>
-          <el-row>
-            <el-col :span="15">
+          <el-row :gutter="24" style="margin-top: 5px">
+            <el-col :span="24">
               <el-form-item label="注册省市区:" required prop="provinceCode">
                 <template v-if="editStatus">
-                  <el-select v-model="form.provinceCode" placeholder="省份" style="width: 29%"
-                    @change="handleSelectProvince">
-                    <el-option v-for="item in provinces" :key="item.code" :label="item.name" :value="item.code" />
+                  <el-select
+                    v-model="form.provinceCode"
+                    placeholder="省份"
+                    style="width: 33%"
+                    @change="handleSelectProvince"
+                  >
+                    <el-option
+                      v-for="item in provinces"
+                      :key="item.code"
+                      :label="item.name"
+                      :value="item.code"
+                    />
                   </el-select>
-                  <el-select v-model="form.cityCode" placeholder="城市" style="width: 29%" @change="handleSelectCity">
-                    <el-option v-for="item in cities" :key="item.code" :label="item.name" :value="item.code" />
+                  <el-select
+                    v-model="form.cityCode"
+                    placeholder="城市"
+                    style="width: 33%"
+                    @change="handleSelectCity"
+                  >
+                    <el-option
+                      v-for="item in cities"
+                      :key="item.code"
+                      :label="item.name"
+                      :value="item.code"
+                    />
                   </el-select>
-                  <el-select v-model="form.districtCode" placeholder="行政区" style="width: 30%"
-                    @change="handleSelectDistrict">
-                    <el-option v-for="item in districts" :key="item.code" :label="item.name" :value="item.code" />
+                  <el-select
+                    v-model="form.districtCode"
+                    placeholder="行政区"
+                    style="width: 34%"
+                    @change="handleSelectDistrict"
+                  >
+                    <el-option
+                      v-for="item in districts"
+                      :key="item.code"
+                      :label="item.name"
+                      :value="item.code"
+                    />
                   </el-select>
                 </template>
                 <span v-else>{{
@@ -92,6 +198,74 @@
                 }}</span>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="负责人:">
+                <template v-if="editStatus">
+                  <el-autocomplete
+                    :fetch-suggestions="querySearchAsync"
+                    style="width: 100%"
+                    v-model="form.leaderName"
+                    placeholder="请选择负责人"
+                    popper-class="my-autocomplete"
+                    @select="handleSelectEmployee"
+                  >
+                    <template #default="{ item }">
+                      <div
+                        style="
+                          display: flex;
+                          flex-direction: row;
+                          justify-content: space-between;
+                        "
+                      >
+                        <div class="name" style="font-size: 12px">
+                          {{ item.nickName }}
+                        </div>
+                        <span
+                          class="code"
+                          style="font-size: 10px; color: darkgrey"
+                          >{{ item.userName }}</span
+                        >
+                      </div>
+                    </template>
+                  </el-autocomplete>
+                </template>
+                <span v-else>{{ form.leaderName }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="客服:">
+                <template v-if="editStatus">
+                  <el-autocomplete
+                    :fetch-suggestions="querySearchAsync"
+                    style="width: 100%"
+                    v-model="form.adviserName"
+                    placeholder="请选择客服"
+                    popper-class="my-autocomplete"
+                    @select="handleSelect"
+                  >
+                    <template #default="{ item }">
+                      <div
+                        style="
+                          display: flex;
+                          flex-direction: row;
+                          justify-content: space-between;
+                        "
+                      >
+                        <div class="name" style="font-size: 12px">
+                          {{ item.nickName }}
+                        </div>
+                        <span
+                          class="code"
+                          style="font-size: 10px; color: darkgrey"
+                          >{{ item.userName }}</span
+                        >
+                      </div>
+                    </template>
+                  </el-autocomplete>
+                </template>
+                <span v-else>{{ form.adviserName }}</span>
+              </el-form-item>
+            </el-col>
           </el-row>
         </div>
       </el-row>
@@ -99,12 +273,33 @@
     <template #footer>
       <div class="dialog-footer">
         <el-button-group>
-          <el-button v-if="editStatus" type="primary" size="small" icon="Finished" @click="submitForm">保存</el-button>
-          <el-button v-else type="warning" size="small" icon="Edit" @click="editStatus = true">编辑</el-button>
-          <el-button v-if="form.id && editStatus" type="info" size="small" icon="Close"
-            @click="editStatus = false">取消编辑</el-button>
-          <el-button v-if="form.id" type="success" size="small" @click="getForm"><i class="fa fa-refresh"
-              aria-hidden="true" /> 刷新</el-button>
+          <el-button
+            v-if="editStatus"
+            type="primary"
+            size="small"
+            icon="Finished"
+            @click="submitForm"
+            >保存</el-button
+          >
+          <el-button
+            v-else
+            type="warning"
+            size="small"
+            icon="Edit"
+            @click="editStatus = true"
+            >修改</el-button
+          >
+          <el-button
+            v-if="form.id && editStatus"
+            type="info"
+            size="small"
+            icon="Close"
+            @click="editStatus = false"
+            >取消修改</el-button
+          >
+          <el-button v-if="form.id" type="success" size="small" @click="getForm"
+            ><i class="fa fa-refresh" aria-hidden="true" /> 刷新</el-button
+          >
         </el-button-group>
       </div>
     </template>
@@ -120,6 +315,7 @@ import {
 } from "@/api/business/standardCompany";
 import useUserStore from "@/store/modules/user";
 import { deepClone } from "@/utils";
+import { listUser } from "@/api/system/user";
 import {
   incomeDefault,
   taxTypes,
@@ -132,7 +328,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   getList: {
     type: Function,
-    default: () => { },
+    default: () => {},
   },
 });
 const { getList } = toRefs(props);
@@ -266,6 +462,7 @@ function open(id) {
   if (id) {
     getStandardCompany(id).then((response) => {
       form.value = response.data;
+      console.log(response.data);
       editStatus.value = false;
       title.value = "修改客户";
       zero.value = form.value.isZero;
@@ -277,6 +474,26 @@ function open(id) {
   }
 }
 
+/** 输入框输出建议 */
+function querySearchAsync(queryString, cb) {
+  const query = { keyword: queryString };
+  listUser(query).then((res) => {
+    cb(res.rows);
+  });
+}
+
+//设置负责人
+function handleSelectEmployee(item) {
+  form.value.leaderId = item.userId;
+  form.value.leaderName = item.nickName;
+}
+
+//设置客服
+function handleSelect(item) {
+  form.value.adviserId = item.userId;
+  form.value.adviserName = item.nickName;
+}
+
 /**  取消按钮 */
 function cancel() {
   visible.value = false;
@@ -496,10 +713,11 @@ defineExpose({
 </script>
 
 <style>
-.radio-scroll .el-radio-button__orig-radio:checked+.el-radio-button__inner {
+.radio-scroll .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-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;

+ 222 - 109
src/views/business/contracts/standardCpmpany/index.vue

@@ -2,95 +2,244 @@
   <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="primary"
+        size="small"
+        icon="Plus"
+        @click="handleAdd"
+        v-hasPermi="['business:standardCompany:add']"
+        >新增</el-button
+      >
 
-      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
-        v-hasPermi="['business:company:remove']">删除</el-button>
-
-      <el-button type="warning" size="small" icon="Download" @click="handleExport"
-        v-hasPermi="['business:company:export']">导出</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>
+        <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-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" 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 v-model="queryParams.socialCreditCode" placeholder="请输入统一社会信用码" clearable
-            @keyup.enter="handleQuery" />
+        <el-form-item label="税号:" prop="socialCreditCode">
+          <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 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-dropdown>
-          <el-button type="primary">
-            其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
-          </el-button>
-          <template #dropdown>
-            <el-dropdown-menu>
-              <el-dropdown-item @click="handleCommand(true)">设置客服</el-dropdown-item>
-              <el-dropdown-item @click="handleCommand(false)">设置负责人</el-dropdown-item>
-            </el-dropdown-menu>
-          </template>
-        </el-dropdown>
       </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="序号" align="center" type="index" />
-      <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>
         </template>
       </el-table-column>
-      <el-table-column label="年收入" align="center" prop="annualIncome" />
-      <el-table-column label="纳税类型" align="center" 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>{{
+            scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
+          }}</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="操作" align="center" class-name="small-padding fixed-width">
+      <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" icon="info" @click="handleInfo(scope.row)"
-            v-hasPermi="['business:project:info']">详细信息</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>
+    <set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" />
+    <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>
+    <el-dialog
+      :title="title"
+      v-model="open"
+      width="500px"
+      append-to-body
+      draggable
+    >
       <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>
@@ -105,11 +254,15 @@
   
 <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";
@@ -123,6 +276,7 @@ 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("");
@@ -130,69 +284,19 @@ 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,
-  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,
+  orderByColumn: "create_time",
 });
 
 /** 用户对象 */
@@ -249,6 +353,16 @@ function createFilter(queryString) {
   };
 }
 
+function setEntrustHandle() {
+  setEntrustDialogRef.value.open({
+    selections: selections.value,
+  });
+}
+
+function handleOneEnrust(row) {
+  setOneEntrustDialogRef.value.open(row);
+}
+
 /** 对话框确定按钮操作 */
 function submitForm() {
   const id = ids.value;
@@ -278,6 +392,10 @@ function submitForm() {
   }
 }
 
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;
@@ -296,6 +414,7 @@ function resetQuery() {
 // 多选框选中数据
 function handleSelectionChange(selection) {
   ids.value = selection.map((item) => item.id);
+  selections.value = selection;
   single.value = selection.length != 1;
   multiple.value = !selection.length;
 }
@@ -343,18 +462,12 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
 function handleExport() {
-  proxy.download(
-    "business/company/export",
-    {
-      ...queryParams.value,
-    },
-    `company_${new Date().getTime()}.xlsx`
-  );
+  exportCompany(queryParams.value);
 }
 
 function handleInfo(row) {

+ 244 - 0
src/views/business/contracts/standardCpmpany/setEntrustDialog.vue

@@ -0,0 +1,244 @@
+<template>
+  <el-dialog
+    title="生成委托"
+    v-model="formOpen"
+    width="900px"
+    append-to-body
+    draggable
+    @close="cancel"
+  >
+    <el-form ref="dictRef" :model="form" label-width="100">
+      <el-form-item label="起始月:">
+        <el-date-picker
+          v-model="startMonth"
+          size="small"
+          placeholder="起始月"
+          :clearable="true"
+          value-format="YYYY-MM-DD"
+          format="YYYY年MM月"
+          type="month"
+        />
+      </el-form-item>
+      <el-form-item label="服务项目:">
+        <el-checkbox-group
+          v-model="loops"
+          @change="(arg) => changeDetails(arg)"
+        >
+          <el-checkbox
+            v-for="(item, index) in loopTasks"
+            :key="index"
+            :label="item.id"
+            >{{ item.name }}</el-checkbox
+          >
+        </el-checkbox-group>
+      </el-form-item>
+      <el-form-item label="委托客户:">
+        <el-table
+          :data="list"
+          size="small"
+          border
+          height="100%"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            label="客户名称"
+            align="center"
+            min-width="250"
+            prop="name"
+          />
+          <el-table-column
+            label="税号"
+            align="center"
+            prop="socialCreditCode"
+            min-width="180"
+          />
+          <el-table-column label="操作" align="center" width="50">
+            <template #default="scope">
+              <el-button
+                type="danger"
+                size="small"
+                link
+                @click="delWorkOrderHandler(scope.$index)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button
+          type="primary"
+          icon="Finished"
+          size="small"
+          @click="submitForm"
+          >确 定</el-button
+        >
+        <el-button @click="cancel" icon="close" size="small">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+  <el-dialog
+    title="客户信息编辑"
+    v-model="visible"
+    :width="500"
+    append-to-body
+    draggable
+    @close="closeIsZero"
+  >
+    <!-- 功能按钮 -->
+    <div style="padding: 8px 24px 16px 24px">
+      <el-form size="small" label-width="100px" v-model="form">
+        <el-form-item label="是否零申报">
+          <el-select
+            v-model="form.isZero"
+            placeholder="请选择"
+            style="width: 100%"
+          >
+            <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="closeIsZero"
+        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>
+</template>
+<script setup>
+import {
+  addEntrust,
+  getFactories,
+} from "@/api/business/entrust/currentWorkOrder";
+import { initTaskTypes } from "@/api/business/crm/contract";
+import { ref } from "vue";
+
+import { setLoopEntrust } from "@/api/business/standardCompany";
+import { set } from "@vueuse/core";
+import { yesOrNo } from "@/utils/default";
+
+const { proxy } = getCurrentInstance();
+
+const visible = ref(false);
+const loopTasks = ref([]);
+const factories = ref([]);
+const emit = defineEmits(["choice"]);
+const loops = ref([]);
+
+const list = ref([]);
+
+const props = defineProps({
+  getList: {
+    type: Function,
+    default: () => {},
+  },
+});
+
+const { getList } = toRefs(props);
+const startMonth = ref(proxy.moment().format("YYYY-MM-01"));
+
+const formOpen = ref(false);
+const form = ref({});
+const rules = ref({});
+const content = ref("请输入员工姓名");
+const ids = ref([]);
+
+function submitForm() {
+  console.log(loops.value);
+  let type = loops.value.findIndex((v) => v == 1);
+  form.value.taskTypeIds = loops.value;
+  form.value.companies = list.value;
+  form.value.startMonth = startMonth.value;
+  if (loops.value.length == 0) {
+    proxy.$modal.msgError("请选择服务项目");
+  } else if (type > -1) {
+    visible.value = true;
+  } else {
+    setLoopEntrust(form.value).then((response) => {
+      proxy.$modal.msgSuccess("保存成功!");
+      formOpen.value = false;
+      getList.value();
+    });
+  }
+}
+
+function closeIsZero() {
+  form.value.isZero = null;
+  visible.value = false;
+}
+
+function handleSave() {
+  console.log(form.value.isZero);
+  if (form.value.isZero == null) {
+    proxy.$modal.msgError("请选择是否零申报!");
+  } else {
+    setLoopEntrust(form.value).then((response) => {
+      proxy.$modal.msgSuccess("保存成功!");
+      visible.value = false;
+      formOpen.value = false;
+      getList.value();
+    });
+  }
+}
+
+function cancel() {
+  formOpen.value = false;
+  reset();
+}
+
+function open(options) {
+  const { selections } = options;
+  initTaskTypes().then((res) => {
+    loopTasks.value = res.data.loopTasks;
+  });
+  list.value = proxy.deepClone(selections);
+  formOpen.value = true;
+}
+
+function delWorkOrderHandler(index) {
+  proxy.$modal.confirm("是否确认删除选中的数据项?").then(() => {
+    list.value.splice(index, 1);
+  });
+}
+
+function reset() {
+  list.value = [];
+  startMonth.value = proxy.moment().format("YYYY-MM-01");
+  form.value = {};
+}
+
+function changeDetails(type, arg) {}
+
+function initFactories() {
+  getFactories().then((res) => {
+    factories.value = res.data;
+  });
+}
+initFactories();
+// 暴露给父组件的方法
+defineExpose({
+  open,
+  cancel,
+});
+</script>

+ 407 - 0
src/views/business/contracts/standardCpmpany/setOneEntrustDialog.vue

@@ -0,0 +1,407 @@
+<template>
+  <el-dialog
+    title="单次委托"
+    v-model="formOpen"
+    width="800px"
+    append-to-body
+    draggable
+    @close="cancel"
+  >
+    <el-form ref="dictRef" :model="form" label-width="100">
+      <el-form-item label="客户:"> {{ company.name }} </el-form-item>
+      <el-form-item label="税号:">
+        {{ company.socialCreditCode }}
+      </el-form-item>
+      <el-form-item>
+        <el-checkbox-group v-model="onces" @change="changeDetails">
+          <el-checkbox
+            v-for="(item, index) in onceTasks"
+            :key="index"
+            :label="item.id"
+            >{{ item.name }}</el-checkbox
+          >
+        </el-checkbox-group>
+        <el-col :span="24">
+          <el-row
+            v-for="(item, index) in onceDetails"
+            :key="index"
+            style="
+              border-radius: 5px;
+              border-color: rgba(0, 0, 0, 20%);
+              border-style: solid;
+              border-width: 1px;
+              margin-bottom: 10px;
+            "
+          >
+            <el-col :span="10" style="padding-top: 18px">
+              <el-form-item label="服务项目">
+                {{ item.taskTypeName }}
+              </el-form-item>
+            </el-col>
+            <el-col
+              v-if="item.payAddress === 0"
+              :span="9"
+              style="
+                padding-top: 18px;
+                display: flex;
+                flex-direction: column;
+                margin-bottom: 18px;
+              "
+            >
+              <el-form-item v-if="item.taskTypeId === '6'" label="变更类型">
+                <el-select v-model="item.alterType" style="width: 280px">
+                  <el-option
+                    v-for="alter in alterTypes"
+                    :label="alter.label"
+                    :key="alter.value"
+                    :value="alter.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <div
+                v-if="item.alterType === '跨区变更'"
+                style="margin-left: 60px"
+              ></div>
+            </el-col>
+            <el-col
+              :span="24"
+              style="padding-top: 5px; padding-left: 33px; margin-bottom: 0px"
+            >
+              <el-checkbox-group
+                v-model="item.processes"
+                @change="(arg) => changeProcesses(item, arg)"
+                style="display: block; flex-direction: row"
+              >
+                <el-checkbox
+                  v-for="(process, index) in item.defaultProcesses"
+                  :key="index"
+                  :label="process"
+                >
+                  <template #default>
+                    <div
+                      style="
+                        display: block;
+                        flex-direction: row;
+                        width: 45px;
+                        justify-content: space-between;
+                      "
+                    >
+                      <div
+                        style="
+                          display: inline-block;
+                          height: 24px;
+                          line-height: 24px;
+                          margin-right: 10px;
+                          width: 80px;
+                        "
+                      >
+                        {{ process.taskTypeDetailName }}
+                      </div>
+                    </div>
+                  </template>
+                </el-checkbox>
+              </el-checkbox-group>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button
+          type="primary"
+          icon="Finished"
+          size="small"
+          @click="submitForm"
+          >确 定</el-button
+        >
+        <el-button @click="cancel" icon="close" size="small">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+<script setup>
+import {
+  addEntrust,
+  getFactories,
+} from "@/api/business/entrust/currentWorkOrder";
+import { initTaskTypes } from "@/api/business/crm/contract";
+
+import { rowNum } from "@/utils/index";
+import { ref } from "vue";
+import { setOneEntrust } from "@/api/business/standardCompany";
+import { set } from "@vueuse/core";
+// import { fa } from "element-plus/es/locale";
+
+const { proxy } = getCurrentInstance();
+const loopTasks = ref([]);
+const onces = ref([]);
+const onceTasks = ref([]);
+
+const factories = ref([]);
+const emit = defineEmits(["choice"]);
+const loops = ref([]);
+const provinces = ref(proxy.region.getProvinces());
+provinces.value.unshift({ code: "", name: "全部" });
+const cities = ref([]);
+const districts = ref([]);
+const toTenantId = ref(null);
+
+const alterTypes = ref([
+  {
+    value: "普通变更",
+    label: "普通变更",
+  },
+  {
+    value: "股权变更",
+    label: "股权变更",
+  },
+  {
+    value: "减资",
+    label: "减资",
+  },
+  {
+    value: "跨区变更",
+    label: "跨区变更",
+  },
+]);
+
+//地址数组
+const provincesArr = ref([]);
+const citiesArr = ref([]);
+const districtsArr = ref([]);
+
+// 单次任务明细
+const onceDetails = ref([]);
+const detailEmpty = {
+  id: null,
+  taskTypeName: "",
+  taskTypeId: null,
+  serviceNum: undefined,
+  freeNum: undefined,
+  price: undefined,
+  amount: undefined,
+  addressStyle: undefined,
+  address: undefined,
+  fictionAddressId: undefined,
+  tenantId: undefined,
+  province: "",
+  city: "",
+  district: "",
+  addressStyle: 1,
+  provinceId: undefined,
+  processes: [],
+  defaultProcesses: [],
+};
+
+const list = ref([]);
+
+const props = defineProps({
+  getList: {
+    type: Function,
+    default: () => {},
+  },
+});
+
+const { getList } = toRefs(props);
+const startMonth = ref(proxy.moment().format("YYYY-MM-01"));
+
+const formOpen = ref(false);
+const company = ref({});
+const form = ref({});
+const rules = ref({});
+const content = ref("请输入员工姓名");
+const ids = ref([]);
+
+function submitForm() {
+  const formValue = form.value;
+  formValue.details = onceDetails.value;
+  formValue.formDate = proxy.moment().format("YYYY-MM-DD");
+  formValue.companyId = company.value.id;
+  formValue.companyName = company.value.name;
+  formValue.socialCreditCode = company.value.socialCreditCode;
+  if (onceDetails.value.length == 0) {
+    proxy.$modal.msgError("请选择服务项目");
+  } else {
+    setOneEntrust(formValue).then((response) => {
+      proxy.$modal.msgSuccess("保存成功!");
+      formOpen.value = false;
+      getList.value();
+    });
+  }
+}
+
+function checkedProcess(processId, item) {
+  const processes = item.processes;
+  return processes.findIndex((v) => v.taskTypeDetailId == processId) < 0;
+}
+
+function changeProcesses(item) {
+  computedItem(item);
+  computedService();
+}
+
+function computedItem(parent) {
+  let amount = 0;
+  amount +=
+    parent.payAddress === 1 && parent.addressStyle === 2 && parent.addressAmount
+      ? Number(parent.addressAmount)
+      : 0;
+  amount +=
+    parent.taskTypeId === "6" &&
+    parent.alterType === "跨区变更" &&
+    parent.addressStyle === 2 &&
+    parent.addressAmount
+      ? Number(parent.addressAmount)
+      : 0;
+  parent.processes.forEach((l) => {
+    amount += l.amount ? Number(l.amount) : 0;
+  });
+  parent.amount = amount;
+}
+function inputChangeHandler(type, field, item, value, parent) {
+  let amount = 0;
+  switch (type) {
+    case "loop":
+      switch (field) {
+        case "price":
+          amount =
+            (item.serviceNum ? Number(item.serviceNum) : 0) *
+            (value ? Number(value) : 0);
+          item.amount = amount;
+          break;
+        case "serviceNum":
+          amount =
+            (item.price ? Number(item.price) : 0) * (value ? Number(value) : 0);
+          item.amount = amount;
+
+          break;
+        case "freeNum":
+          amount =
+            (item.price ? Number(item.price) : 0) *
+            (item.serviceNum ? Number(item.serviceNum) : 0);
+          item.amount = amount;
+          break;
+      }
+      break;
+    case "once":
+      computedItem(item);
+      break;
+    case "process":
+      computedItem(parent);
+      break;
+    default:
+      break;
+  }
+  computedService();
+}
+
+function computedService() {
+  let amount = 0;
+
+  onceDetails.value.forEach((l) => {
+    amount +=
+      l.payAddress === 1 && l.addressStyle === 2 && l.addressAmount
+        ? Number(l.addressAmount)
+        : 0;
+    l.processes.forEach((v) => {
+      amount += v.amount ? Number(v.amount) : 0;
+    });
+  });
+
+  form.value.amount = amount;
+  form.value.trueAmount =
+    amount -
+    (form.value.discountAmount ? Number(form.value.discountAmount) : 0);
+}
+
+function cancel() {
+  formOpen.value = false;
+  reset();
+}
+
+function open(options) {
+  company.value = options;
+  initTaskTypes().then((res) => {
+    onceTasks.value = res.data.onceTasks;
+  });
+  formOpen.value = true;
+}
+
+function handleSelectDistrict(item, index) {
+  const _districtCode = item.districtCode;
+  const _district = districtsArr.value[index].find((i) => {
+    return i.code === _districtCode;
+  });
+  item.district = _district.name;
+}
+
+function delWorkOrderHandler(index) {
+  proxy.$modal.confirm("是否确认删除选中的数据项?").then(() => {
+    list.value.splice(index, 1);
+  });
+}
+
+function reset() {
+  list.value = [];
+  startMonth.value = proxy.moment().format("YYYY-MM-01");
+  toTenantId.value = null;
+}
+
+function changeDetails() {
+  onces.value.forEach((e) => {
+    const taskType = onceTasks.value.find((v) => v.id == e);
+    if (onceDetails.value.findIndex((v) => v.taskTypeId == e) < 0) {
+      const newDetail = JSON.parse(JSON.stringify(detailEmpty));
+      newDetail.taskTypeId = e;
+      newDetail.taskTypeName = taskType.name;
+      newDetail.payAddress = taskType.payAddress;
+      (newDetail.alterType = e === "6" ? "普通变更" : ""),
+        (newDetail.defaultProcesses = taskType.processes.map((v) => ({
+          taskTypeId: e,
+          taskTypeDetailId: v.id,
+          taskTypeDetailName: v.name,
+          fictionAddressId: null,
+          fictionAddress: "",
+          addressStyle: 0,
+          checked: false,
+          amount: undefined,
+        })));
+      newDetail.processes = [];
+      onceDetails.value.push(newDetail);
+    }
+  });
+  onceDetails.value = onceDetails.value.filter(
+    (v) => onces.value.findIndex((e) => e == v.taskTypeId) > -1
+  );
+
+  let provincesLength = provincesArr.value.length;
+
+  if (onceDetails.value.length > provincesLength) {
+    for (let i = 0; i < onceDetails.value.length - provincesLength; i++) {
+      provincesArr.value.push(provinces.value);
+      citiesArr.value.push(cities.value);
+      districtsArr.value.push(districts.value);
+    }
+  } else if (onceDetails.value.length < provincesLength) {
+    for (let i = 0; i < provincesLength - onceDetails.value.length; i++) {
+      provincesArr.value.length--;
+      citiesArr.value.length--;
+      districtsArr.value.length--;
+    }
+  }
+}
+
+function initFactories() {
+  getFactories().then((res) => {
+    factories.value = res.data;
+  });
+}
+initFactories();
+// 暴露给父组件的方法
+defineExpose({
+  open,
+  cancel,
+});
+</script>

+ 30 - 11
src/views/business/crm/ZeroChangeDialog.vue

@@ -1,9 +1,12 @@
 <template>
-  <el-dialog title="客户信息编辑" v-model="visible" :width="width" append-to-body draggable @close="close">
-    <!-- <div slot="title" class="dialog-title-container">
-      <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
-      <i class="el-icon-close" @click="close" />
-    </div> -->
+  <el-dialog
+    title="客户信息编辑"
+    v-model="visible"
+    :width="width"
+    append-to-body
+    draggable
+    @close="close"
+  >
     <!-- 功能按钮 -->
     <div style="padding: 8px 24px 16px 24px">
       <el-form size="small" label-width="100px" v-model="form">
@@ -15,8 +18,17 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="是否零申报">
-              <el-select v-model="form.isZero" placeholder="请选择" style="width: 100%">
-                <el-option v-for="item in yesOrNo" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                v-model="form.isZero"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in yesOrNo"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -25,9 +37,16 @@
     </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
+      >
+      <el-button
+        type="primary"
+        icon="Finished"
+        size="small"
+        style="float: right; margin-left: 12px; margin-right: 12px"
+        @click="handleSave"
+        >保存</el-button
+      >
     </div>
   </el-dialog>
 </template>
@@ -48,7 +67,7 @@ const defaultIsZero = ref(null);
 const props = defineProps({
   saveCallBack: {
     type: Function,
-    default: () => { },
+    default: () => {},
   },
 });
 const { saveCallBack } = toRefs(props);

+ 2 - 2
src/views/business/crm/bin/index.vue

@@ -22,14 +22,14 @@
         >删除</el-button
       >
 
-      <el-button
+      <!-- <el-button
         type="info"
         size="small"
         icon="Download"
         @click="handleExport"
         v-hasPermi="['business:bin:export']"
         >导出</el-button
-      >
+      > -->
       <!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
     </div>
     <!-- 搜索区 -->

+ 118 - 3
src/views/business/crm/company/add.vue

@@ -27,15 +27,72 @@
           </el-form-item>
         </el-col>
         <el-col v-if="addType === 1" :span="24">
-          <el-form-item label="客户来源" prop="sourceCategoryName" required>
+          <el-form-item label="客户来源" prop="sourceCategoryName">
             <CustomerFormCom
-              ref="addComRef"
               :edit-status="true"
               :form-data="form"
               :source-categories="sourceCategories"
             />
           </el-form-item>
         </el-col>
+
+        <el-col v-if="addType === 1" :span="24">
+          <el-form-item label="负责人">
+            <el-autocomplete
+              :fetch-suggestions="querySearchAsync"
+              style="width: 100%"
+              v-model="form.leaderName"
+              placeholder="请选择负责人"
+              popper-class="my-autocomplete"
+              @select="handleSelectEmployee"
+            >
+              <template #default="{ item }">
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.nickName }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.userName
+                  }}</span>
+                </div>
+              </template>
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item label="客服">
+            <el-autocomplete
+              :fetch-suggestions="querySearchAsync"
+              style="width: 100%"
+              v-model="form.adviserName"
+              placeholder="请选择客服"
+              popper-class="my-autocomplete"
+              @select="handleSelect"
+            >
+              <template #default="{ item }">
+                <div
+                  style="
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                  "
+                >
+                  <div class="name" style="font-size: 12px">
+                    {{ item.nickName }}
+                  </div>
+                  <span class="code" style="font-size: 10px; color: darkgrey">{{
+                    item.userName
+                  }}</span>
+                </div>
+              </template>
+            </el-autocomplete>
+          </el-form-item>
+        </el-col>
+
         <el-col v-if="addType === 2" :span="24">
           <el-form-item label="上传">
             <el-upload
@@ -94,11 +151,18 @@
 
 <script setup>
 import { getToken, getTenant } from "@/utils/auth";
-import { addCompany, importCompanyTemplate } from "@/api/business/crm/company";
+import {
+  addCompany,
+  importCompanyTemplate,
+  listCompany,
+} from "@/api/business/crm/company";
 import CustomerFormCom from "@/components/CustomerFormCom";
+import { listChannel } from "@/api/business/channel";
 import useUserStore from "@/store/modules/user";
+import { listUser } from "@/api/system/user";
 import { listSource } from "@/api/settings/source";
 import { deepClone } from "@/utils";
+import { ref } from "vue";
 // import { incomeDefault, taxTypes, confirmDefault } from "@/utils/default"
 const { proxy } = getCurrentInstance();
 /** 父组件传参 */
@@ -116,8 +180,11 @@ const title = ref("");
 const loading = ref(false);
 const multiple = ref(true);
 const visible = ref(false);
+
 const editStatus = ref(false);
+const sourceCategoryId = ref("");
 const isFullscreen = ref(false);
+const currentSource = ref({});
 const addDetailNum = ref(1);
 const currentMember = {};
 const provinces = ref(proxy.region.getProvinces());
@@ -185,6 +252,52 @@ function sourceValidator(rule, value, callback) {
   return callback();
 }
 
+//设置负责人
+function handleSelectEmployee(item) {
+  form.value.leaderId = item.userId;
+  form.value.leaderName = item.nickName;
+}
+
+//设置客服
+function handleSelect(item) {
+  form.value.adviserId = item.userId;
+  form.value.adviserName = item.nickName;
+}
+
+function handlerChangeCategory(value) {
+  form.value.sourceId = null;
+  form.value.sourceName = "";
+  handlerSelectCategory();
+}
+
+function handlerSelectCategory() {
+  form.value.sourceCategoryId = sourceCategoryId.value;
+  // formData.value.referrerDataSource = currentSource.value.referrerDataSource
+  const index = sourceCategories.value.findIndex(
+    (l) => l.id === sourceCategoryId.value
+  );
+  currentSource.value = index >= 0 ? sourceCategories.value[index] : {};
+  var item = sourceCategories.value.find(
+    (emp) => emp.id === sourceCategoryId.value
+  );
+  if (item) {
+    form.value.sourceCategoryName = item.title;
+    form.value.referrerDataSource = item.referrerDataSource;
+    // placeholderValue.value = item.title + "名称";
+  }
+
+  // // 咋整都要清理 右侧
+  // sourceName.value = "";
+}
+
+/** 输入框输出建议 */
+function querySearchAsync(queryString, cb) {
+  const query = { keyword: queryString };
+  listUser(query).then((res) => {
+    cb(res.rows);
+  });
+}
+
 const contactorEmptyData = {
   id: null,
   name: "",
@@ -269,6 +382,8 @@ const { form, rules, followData } = toRefs(data);
 /** 抽屉打开 */
 function open() {
   reset();
+  form.value.leaderName = useUserStore().user.nickName;
+  form.value.leaderId = useUserStore().user.id;
   visible.value = true;
 }
 

+ 213 - 48
src/views/business/crm/company/index.vue

@@ -2,112 +2,271 @@
   <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:company:remove']">删除</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:company:remove']"
+        >删除</el-button
+      >
       <el-dropdown>
         <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="handleAdviser()" v-hasPermi="['business:company:edit']" icon="Operation">
-              设置客服</el-dropdown-item>
-            <el-dropdown-item @click="handleLeader()" v-hasPermi="['business:company:edit']" icon="Operation">
-              设置负责人</el-dropdown-item>
-            <el-dropdown-item type="warning" size="small" icon="Download" @click="handleExport"
-              v-hasPermi="['business:company:export']">
-              导出</el-dropdown-item>
+            <el-dropdown-item
+              @click="handleAdviser()"
+              v-hasPermi="['business:company:edit']"
+              icon="Operation"
+            >
+              设置客服</el-dropdown-item
+            >
+            <el-dropdown-item
+              @click="handleLeader()"
+              v-hasPermi="['business:company:edit']"
+              icon="Operation"
+            >
+              设置负责人</el-dropdown-item
+            >
+            <el-dropdown-item
+              type="warning"
+              size="small"
+              icon="Download"
+              @click="handleExport"
+              v-hasPermi="['business:company: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-item label="客户名称:" prop="name">
-        <el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery"
-          style="width: 200px" />
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入客户名称"
+          clearable
+          @keyup.enter="handleQuery"
+          style="width: 200px"
+        />
       </el-form-item>
       <el-form-item label="税号:" prop="socialCreditCode">
-        <el-input v-model="queryParams.socialCreditCode" style="width: 200px" placeholder="税号" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.socialCreditCode"
+          style="width: 200px"
+          placeholder="税号"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="客户负责人:" prop="leader">
-        <el-input v-model="queryParams.leader" style="width: 200px" placeholder="请输入客户负责人" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.leader"
+          style="width: 200px"
+          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-column type="selection" width="55" :resizable="false" align="center" />
+    <el-table
+      v-loading="loading"
+      :data="list"
+      size="small"
+      border
+      height="100%"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column
+        type="selection"
+        width="55"
+        :resizable="false"
+        align="center"
+      />
 
-      <el-table-column label="公司名称" :resizable="false" width="300" align="center">
+      <el-table-column
+        label="公司名称"
+        :resizable="false"
+        width="300"
+        align="center"
+      >
         <template #default="scope">
-          <el-button link type="primary" size="small" @click="handleInfo(scope.row)"
-            v-hasPermi="['business:company:info']">{{ scope.row.name }}
+          <el-button
+            link
+            type="primary"
+            size="small"
+            @click="handleInfo(scope.row)"
+            v-hasPermi="['business:company:info']"
+            >{{ scope.row.name }}
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="所属区域" prop="provinceCode" :resizable="false" min-width="150" align="center">
+      <el-table-column
+        label="所属区域"
+        prop="provinceCode"
+        :resizable="false"
+        min-width="150"
+        align="center"
+      >
         <template #default="scope">
           <span>{{
             scope.row.province + "-" + scope.row.city + "-" + scope.row.district
           }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="年收入" :resizable="false" prop="annualIncome" align="center" />
-      <el-table-column label="纳税性质" prop="taxType" min-width="90" :resizable="false" align="center" />
-      <el-table-column label="是否零申报" prop="isZero" :resizable="false" width="80" align="center">
+      <el-table-column
+        label="年收入"
+        :resizable="false"
+        prop="annualIncome"
+        align="center"
+      />
+      <el-table-column
+        label="纳税性质"
+        prop="taxType"
+        min-width="90"
+        :resizable="false"
+        align="center"
+      />
+      <el-table-column
+        label="是否零申报"
+        prop="isZero"
+        :resizable="false"
+        width="80"
+        align="center"
+      >
         <template #default="scope">
           {{
             scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
           }}
         </template>
       </el-table-column>
-      <el-table-column label="税号" prop="socialCreditCode" min-width="200" :resizable="false" align="center" />
-      <el-table-column label="负责人" prop="leaderName" :resizable="false" min-width="85" align="center" />
-      <el-table-column label="客服" min-width="85" prop="adviserName" :resizable="false" align="center" />
-      <el-table-column label="客户跟进" :resizable="false" width="65" align="center" fixed="right">
+      <el-table-column
+        label="税号"
+        prop="socialCreditCode"
+        min-width="200"
+        :resizable="false"
+        align="center"
+      />
+      <el-table-column
+        label="负责人"
+        prop="leaderName"
+        :resizable="false"
+        min-width="85"
+        align="center"
+      />
+      <el-table-column
+        label="客服"
+        min-width="85"
+        prop="adviserName"
+        :resizable="false"
+        align="center"
+      />
+      <el-table-column
+        label="客户跟进"
+        :resizable="false"
+        width="65"
+        align="center"
+        fixed="right"
+      >
         <template #default="scope">
-          <el-button link type="primary" size="small" @click="handleFollow(scope.row)"
-            v-hasPermi="['business:company:follow']">跟进</el-button>
+          <el-button
+            link
+            type="primary"
+            size="small"
+            @click="handleFollow(scope.row)"
+            v-hasPermi="['business:company:follow']"
+            >跟进</el-button
+          >
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="80" :resizable="false" fixed="right">
+      <el-table-column
+        label="操作"
+        align="center"
+        width="80"
+        :resizable="false"
+        fixed="right"
+      >
         <template #default="scope">
-          <el-button link type="primary" size="small" @click="handleInfo(scope.row)"
-            v-hasPermi="['business:company:info']">详细信息</el-button>
+          <el-button
+            link
+            type="primary"
+            size="small"
+            @click="handleInfo(scope.row)"
+            v-hasPermi="['business:company:info']"
+            >详细信息</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <!-- 分页 -->
     <!-- <div class="pagination-container"> -->
-    <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> -->
     <!-- 表单 -->
     <company-form ref="companyRef" :get-list="getList"></company-form>
     <exportColumn ref="exportColumnRef"></exportColumn>
     <add ref="addRef" :get-list="getList"></add>
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable @close="cancel">
+    <el-dialog
+      :title="title"
+      v-model="open"
+      width="500px"
+      append-to-body
+      draggable
+      @close="cancel"
+    >
       <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="selectionName"
-            :placeholder="content" popper-class="my-autocomplete" @select="handleSelectEmployee">
+          <el-autocomplete
+            style="width: 100%"
+            :fetch-suggestions="querySearchAsync"
+            :trigger-on-focus="true"
+            v-model="selectionName"
+            :placeholder="content"
+            popper-class="my-autocomplete"
+            @select="handleSelectEmployee"
+          >
             <template #default="{ item }">
-              <div style="
+              <div
+                style="
                   display: flex;
                   flex-direction: row;
                   justify-content: space-between;
-                ">
+                "
+              >
                 <div class="name" style="font-size: 12px">
                   {{ item.nickName }}
                 </div>
@@ -121,8 +280,14 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
+          <el-button
+            type="primary"
+            size="small"
+            icon="Finished"
+            @click="submitForm"
+            >确 定</el-button
+          >
+          <el-button size="small" icon="Close" @click="cancel">取 消</el-button>
         </div>
       </template>
     </el-dialog>
@@ -227,7 +392,7 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */

+ 165 - 38
src/views/business/crm/dict/data.vue

@@ -1,50 +1,116 @@
 <template>
   <div class="page-container list-container">
     <div :gutter="10" class="list-btns-container">
-      <el-button type="primary" icon="Plus" size="small" @click="handleAdd"
-        v-hasPermi="['business:crm:dict:add']">新增</el-button>
+      <el-button
+        type="primary"
+        icon="Plus"
+        size="small"
+        @click="handleAdd"
+        v-hasPermi="['business:crm:dict:add']"
+        >新增</el-button
+      >
 
-      <el-button type="warning" size="small" icon="Edit" :disabled="single" @click="handleUpdate"
-        v-hasPermi="['business:crm:dict:edit']">修改</el-button>
+      <el-button
+        type="warning"
+        size="small"
+        icon="Edit"
+        :disabled="single"
+        @click="handleUpdate"
+        v-hasPermi="['business:crm:dict:edit']"
+        >修改</el-button
+      >
 
-      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
-        v-hasPermi="['business:crm:dict:remove']">删除</el-button>
+      <el-button
+        type="danger"
+        size="small"
+        icon="Delete"
+        :disabled="multiple"
+        @click="handleDelete"
+        v-hasPermi="['business:crm:dict:remove']"
+        >删除</el-button
+      >
 
-      <el-button type="info" size="small" icon="Download" @click="handleExport"
-        v-hasPermi="['business:crm:dict:export']">导出</el-button>
+      <el-button
+        type="info"
+        size="small"
+        icon="Download"
+        @click="handleExport"
+        v-hasPermi="['business:crm:dict:export']"
+        >导出</el-button
+      >
       <el-button size="small" icon="Close" @click="handleClose">关闭</el-button>
     </div>
-    <el-form :model="queryParams" class="list-search-container" ref="queryRef" size="small" :inline="true"
-      v-show="showSearch">
+    <el-form
+      :model="queryParams"
+      class="list-search-container"
+      ref="queryRef"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+    >
       <el-form-item label="字典名称" prop="dictType">
         <el-select v-model="queryParams.dictType" style="width: 200px">
-          <el-option v-for="item in typeOptions" :key="item.dictId" :label="item.dictName" :value="item.dictType" />
+          <el-option
+            v-for="item in typeOptions"
+            :key="item.dictId"
+            :label="item.dictName"
+            :value="item.dictType"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="字典标签" prop="dictLabel">
-        <el-input v-model="queryParams.dictLabel" placeholder="请输入字典标签" clearable style="width: 200px"
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.dictLabel"
+          placeholder="请输入字典标签"
+          clearable
+          style="width: 200px"
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="数据状态" clearable style="width: 200px">
-          <el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
+        <el-select
+          v-model="queryParams.status"
+          placeholder="数据状态"
+          clearable
+          style="width: 200px"
+        >
+          <el-option
+            v-for="dict in sys_normal_disable"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.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="dataList" size="small" border height="100%"
-      @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="dataList"
+      size="small"
+      border
+      height="100%"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="字典编码" align="center" prop="dictCode" />
       <el-table-column label="字典标签" align="center" prop="dictLabel">
         <template #default="scope">
-          <span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{ scope.row.dictLabel }}</span>
-          <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{ scope.row.dictLabel
-          }}</el-tag>
+          <span
+            v-if="scope.row.listClass == '' || scope.row.listClass == 'default'"
+            >{{ scope.row.dictLabel }}</span
+          >
+          <el-tag
+            v-else
+            :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass"
+            >{{ scope.row.dictLabel }}</el-tag
+          >
         </template>
       </el-table-column>
       <el-table-column label="字典键值" align="center" prop="dictValue" />
@@ -54,27 +120,65 @@
           <dict-tag :options="sys_normal_disable" :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" prop="createTime" width="180">
+      <el-table-column
+        label="备注"
+        align="center"
+        prop="remark"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
         <template #default="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        width="160"
+        class-name="small-padding fixed-width"
+      >
         <template #default="scope">
-          <el-button link type="primary" size="small" @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:crm:dict:edit']">修改</el-button>
-          <el-button link type="danger" size="small" @click="handleDelete(scope.row)"
-            v-hasPermi="['business:crm:dict:remove']">删除</el-button>
+          <el-button
+            link
+            type="primary"
+            size="small"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:crm:dict:edit']"
+            >修改</el-button
+          >
+          <el-button
+            link
+            type="danger"
+            size="small"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['business:crm:dict: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"
+    />
 
     <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable>
+    <el-dialog
+      :title="title"
+      v-model="open"
+      width="500px"
+      append-to-body
+      draggable
+    >
       <el-form ref="dataRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="字典类型">
           <el-input v-model="form.dictType" :disabled="true" />
@@ -89,26 +193,49 @@
           <el-input v-model="form.cssClass" placeholder="请输入样式属性" />
         </el-form-item>
         <el-form-item label="显示排序" prop="dictSort">
-          <el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
+          <el-input-number
+            v-model="form.dictSort"
+            controls-position="right"
+            :min="0"
+          />
         </el-form-item>
         <el-form-item label="回显样式" prop="listClass">
           <el-select v-model="form.listClass">
-            <el-option v-for="item in listClassOptions" :key="item.value" :label="item.label + '(' + item.value + ')'"
-              :value="item.value"></el-option>
+            <el-option
+              v-for="item in listClassOptions"
+              :key="item.value"
+              :label="item.label + '(' + item.value + ')'"
+              :value="item.value"
+            ></el-option>
           </el-select>
         </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" placeholder="请输入内容"></el-input>
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          ></el-input>
         </el-form-item>
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" size="small" icon="Finished" @click="submitForm">确 定</el-button>
+          <el-button
+            type="primary"
+            size="small"
+            icon="Finished"
+            @click="submitForm"
+            >确 定</el-button
+          >
           <el-button @click="cancel" size="small" icon="close">取 消</el-button>
         </div>
       </template>
@@ -297,7 +424,7 @@ function handleDelete(row) {
       proxy.$modal.msgSuccess("删除成功");
       useDictStore().removeDict(queryParams.value.dictType);
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 /** 导出按钮操作 */
 function handleExport() {

+ 115 - 46
src/views/business/crm/noContractWorkOrder/index.vue

@@ -2,8 +2,14 @@
   <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> -->
@@ -13,38 +19,71 @@
         </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 type="warning" size="small" icon="Download" @click="handleArea"
-              v-hasPermi="['business:workOrder:export']"> area</el-dropdown-item> -->
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-hasPermi="['business:workOrder:export']"
+            >
+              导出</el-dropdown-item
+            >
           </el-dropdown-menu>
         </template>
       </el-dropdown>
-      <!-- <el-button type="warning" size="small" icon="Download" @click="handleExport"
-        v-hasPermi="['business:workOrder:export']">导出</el-button> -->
-      <!--<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="请输入客户名称" 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" prop="workOrderNo" width="200" /> -->
-      <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>
@@ -53,24 +92,39 @@
         <template #default="scope">{{ getTransactor(scope.row) }}</template>
       </el-table-column>
     </el-table>
-    <!-- <workorder-form ref="workOrderRef" :get-list="getList" /> -->
-    <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 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>
@@ -80,8 +134,16 @@
               </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>
 
@@ -90,14 +152,27 @@
       </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>
@@ -109,6 +184,7 @@ import {
   delWorkOrder,
   exportWorkOrder,
   addWorkOrder,
+  exportNoContract,
 } from "@/api/business/crm/workOrder";
 import { listCompany } from "@/api/business/crm/company";
 import AddCompanyDialog from "../AddCompanyDialog.vue";
@@ -230,19 +306,12 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportWorkOrder(queryParams.value);
+  exportNoContract(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {
@@ -260,11 +329,11 @@ function querySearchCompanyAsync(queryString, cb) {
   const query =
     queryString.length > 0
       ? {
-        keyword: queryString,
-        pageSize: 20,
-        pageNum: 1,
-        orderByColumn: "create_time",
-      }
+          keyword: queryString,
+          pageSize: 20,
+          pageNum: 1,
+          orderByColumn: "create_time",
+        }
       : { pageSize: 20, pageNum: 1, orderByColumn: "create_time" };
   listCompany(query).then((res) => {
     cb(res.rows);

+ 59 - 39
src/views/business/crm/order/form.vue

@@ -402,6 +402,7 @@
                         :span="9"
                         style="
                           padding-top: 18px;
+                          padding-left: 35px;
                           display: flex;
                           flex-direction: column;
                           margin-bottom: 18px;
@@ -437,7 +438,7 @@
                                     :disabled="item.addressStyle === 2"
                                     v-model="item.provinceCode"
                                     placeholder="省份"
-                                    style="width: 33.33%"
+                                    style="width: 36%"
                                     @change="handleSelectProvince(item, index)"
                                   >
                                     <el-option
@@ -452,7 +453,7 @@
                                     :disabled="item.addressStyle === 2"
                                     v-model="item.cityCode"
                                     placeholder="城市"
-                                    style="width: 33.33%"
+                                    style="width: 37%"
                                     @change="handleSelectCity(item, index)"
                                   >
                                     <el-option
@@ -466,7 +467,7 @@
                                     :disabled="item.addressStyle === 2"
                                     v-model="item.districtCode"
                                     placeholder="行政区"
-                                    style="width: 33.33%"
+                                    style="width: 37%"
                                     @change="handleSelectDistrict(item, index)"
                                   >
                                     <el-option
@@ -486,7 +487,7 @@
                                 style="
                                   display: flex;
                                   flex-direction: row;
-                                  width: 300px;
+                                  width: 325px;
                                   justify-content: space-between;
                                 "
                               >
@@ -1431,14 +1432,13 @@ function submitForm() {
   const query = { userId: form.value.signerId };
   const users = [];
   listUser(query).then((res) => {
-    console.log(res);
     users.value = res.rows;
+    console.log(form.value.signerId);
     if (users.value.length == 1) {
       if (
         form.value.signerId == users.value[0].userId &&
         form.value.signerName == users.value[0].nickName
       ) {
-        // console.log("正确");
       } else {
         proxy.$modal.msgError("请选择有效签单人");
         return;
@@ -1447,45 +1447,65 @@ function submitForm() {
       proxy.$modal.msgError("请选择有效签单人");
       return;
     }
-  });
+    const companyQuery = { id: form.value.companyId };
+    const companys = [];
+    listCompany(companyQuery).then((res) => {
+      companys.value = res.rows;
+      if (companys.value.length == 1) {
+        if (
+          form.value.companyId == companys.value[0].id &&
+          form.value.companyName == companys.value[0].name
+        ) {
+        } else {
+          proxy.$modal.msgError("请选择有效客户");
+          return;
+        }
+      } else {
+        proxy.$modal.msgError("请选择有效客户");
+        return;
+      }
 
-  proxy.$refs["orderRef"].validate((valid) => {
-    if (valid && detailValid() && amountValid()) {
-      const formValue = form.value;
-      formValue.details =
-        form.value.serviceType === 1 ? loopDetails.value : onceDetails.value;
-      if (formValue.id != null) {
-        if (formValue.companyId !== null) {
-          if (type.value == "") {
-            updateOrder(formValue).then((response) => {
-              proxy.$modal.msgSuccess("修改成功");
-              visible.value = false;
-              getList.value();
-            });
-          } else if (type.value == "alterOrder") {
-            alterOrder(formValue).then((response) => {
-              proxy.$modal.msgSuccess("修改成功");
-              visible.value = false;
-              getList.value();
-            });
-          } else if (type.value == "dissolutionOrder") {
-            dissolutionOrder(formValue).then((response) => {
-              proxy.$modal.msgSuccess("修改成功");
+      proxy.$refs["orderRef"].validate((valid) => {
+        if (valid && detailValid() && amountValid()) {
+          const formValue = form.value;
+          formValue.details =
+            form.value.serviceType === 1
+              ? loopDetails.value
+              : onceDetails.value;
+          if (formValue.id != null) {
+            if (formValue.companyId !== null) {
+              if (type.value == "") {
+                updateOrder(formValue).then((response) => {
+                  proxy.$modal.msgSuccess("修改成功");
+                  visible.value = false;
+                  getList.value();
+                });
+              } else if (type.value == "alterOrder") {
+                alterOrder(formValue).then((response) => {
+                  proxy.$modal.msgSuccess("修改成功");
+                  visible.value = false;
+                  getList.value();
+                });
+              } else if (type.value == "dissolutionOrder") {
+                dissolutionOrder(formValue).then((response) => {
+                  proxy.$modal.msgSuccess("修改成功");
+                  visible.value = false;
+                  getList.value();
+                });
+              } else {
+                proxy.$modal.msgError("请选择有效客户");
+              }
+            }
+          } else {
+            addOrder(formValue).then((response) => {
+              proxy.$modal.msgSuccess("新增成功");
               visible.value = false;
               getList.value();
             });
-          } else {
-            proxy.$modal.msgError("请选择有效客户");
           }
         }
-      } else {
-        addOrder(formValue).then((response) => {
-          proxy.$modal.msgSuccess("新增成功");
-          visible.value = false;
-          getList.value();
-        });
-      }
-    }
+      });
+    });
   });
 }
 

+ 188 - 173
src/views/business/crm/order/importExcelDialog.vue

@@ -1,7 +1,19 @@
 <template>
   <!-- 添加或修改菜单对话框 -->
-  <el-dialog title="合同导入" v-model="visible" width="680px" append-to-body draggable>
-    <el-form ref="menuRef" :model="form" size="small" :rules="rules" label-width="100px">
+  <el-dialog
+    title="合同导入"
+    v-model="visible"
+    width="680px"
+    append-to-body
+    draggable
+  >
+    <el-form
+      ref="menuRef"
+      :model="form"
+      size="small"
+      :rules="rules"
+      label-width="100px"
+    >
       <el-row>
         <el-col :span="24">
           <el-radio-group v-model="addType">
@@ -11,24 +23,49 @@
         </el-col>
         <el-col :span="24">
           <el-form-item label="上传">
-            <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls"
+            <el-upload
+              ref="uploadRef"
+              :limit="1"
+              accept=".xlsx, .xls"
               :headers="addType === 1 ? uploadLoop.headers : uploadOnce.headers"
-              :action="(addType === 1 ? uploadLoop.url : uploadOnce.url) + '?updateSupport=' + (addType === 1 ? uploadLoop.updateSupport : uploadOnce.updateSupport)"
-              :fileList="fileList" :before-upload="handleBeforeUpload"
-              :disabled="(addType === 1 ? uploadLoop.isUploading : uploadOnce.isUploading)"
-              :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
+              :action="
+                (addType === 1 ? uploadLoop.url : uploadOnce.url) +
+                '?updateSupport=' +
+                (addType === 1
+                  ? uploadLoop.updateSupport
+                  : uploadOnce.updateSupport)
+              "
+              :fileList="fileList"
+              :before-upload="handleBeforeUpload"
+              :disabled="
+                addType === 1 ? uploadLoop.isUploading : uploadOnce.isUploading
+              "
+              :on-progress="handleFileUploadProgress"
+              :on-success="handleFileSuccess"
+              :auto-upload="false"
+              drag
+            >
               <el-icon class="el-icon--upload">
                 <upload-filled />
               </el-icon>
-              <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+              <div class="el-upload__text">
+                将文件拖到此处,或<em>点击上传</em>
+              </div>
               <template #tip>
                 <div class="el-upload__tip text-center">
                   <!-- <div class="el-upload__tip">
                     <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
                   </div> -->
-                  <span>仅允许导入xls、xlsx格式文件。文件大小限制为&lt;50Mb</span>
-                  <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
-                    @click="importTemplate">下载模板</el-link>
+                  <span
+                    >仅允许导入xls、xlsx格式文件。文件大小限制为&lt;50Mb</span
+                  >
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    style="font-size: 12px; vertical-align: baseline"
+                    @click="importTemplate"
+                    >下载模板</el-link
+                  >
                 </div>
               </template>
             </el-upload>
@@ -47,135 +84,139 @@
 
 
 <script setup>
-import { getToken, getTenant } from '@/utils/auth'
-import useUserStore from '@/store/modules/user'
-import { deepClone } from '@/utils'
+import { getToken, getTenant } from "@/utils/auth";
+import useUserStore from "@/store/modules/user";
+import { deepClone } from "@/utils";
 // import { incomeDefault, taxTypes, confirmDefault } from "@/utils/default"
-import { exportLoopTemplate, exportOnceTemplate, importLoop, importOnce } from '@/api/business/crm/contract'
-const { proxy } = getCurrentInstance()
+import {
+  exportLoopTemplate,
+  exportOnceTemplate,
+  importLoop,
+  importOnce,
+} from "@/api/business/crm/contract";
+const { proxy } = getCurrentInstance();
 /** 父组件传参 */
 const props = defineProps({
   getList: {
     type: Function,
-    default: () => { }
-  }
-})
-const { getList } = toRefs(props)
+    default: () => {},
+  },
+});
+const { getList } = toRefs(props);
 /** 字典数组区 */
 /** 表单抽屉 页变量 */
-const fileList = ref([])
-const visible = ref(false)
+const fileList = ref([]);
+const visible = ref(false);
 
-const addType = ref(1)
-const webHost = import.meta.env.VITE_APP_BASE_API
+const addType = ref(1);
+const webHost = import.meta.env.VITE_APP_BASE_API;
 
 const setHeaders = {
-  Authorization: getToken()
-}
+  Authorization: getToken(),
+};
 
 const data = reactive({
   form: {},
-  followData: {}
-})
-const addComRef = ref(null)
-
+  followData: {},
+});
+const addComRef = ref(null);
 
 /*** 客户导入参数 */
 const uploadLoop = reactive({
   // 是否禁用上传
   isUploading: false,
   // 设置上传的请求头部
-  headers: { Authorization: 'Bearer ' + getToken(), tenantId: getTenant() },
+  headers: { Authorization: "Bearer " + getToken(), tenantId: getTenant() },
   // 上传的地址
-  url: '/ezhizao-yzbh-crm/business/archive/order/importLoop'
-})
+  url: "/ezhizao-yzbh-crm/business/archive/order/importLoop",
+});
 const uploadOnce = reactive({
   // 是否禁用上传
   isUploading: false,
   // 设置上传的请求头部
-  headers: { Authorization: 'Bearer ' + getToken(), tenantId: getTenant() },
+  headers: { Authorization: "Bearer " + getToken(), tenantId: getTenant() },
   // 上传的地址
-  url: '/ezhizao-yzbh-crm/business/archive/order/importOnce'
-})
+  url: "/ezhizao-yzbh-crm/business/archive/order/importOnce",
+});
 
 const contactorEmptyData = {
   id: null,
-  name: '',
-  position: '',
-  gender: '男',
-  phone: '',
-  email: '',
-  isMain: '是',
-  remark: ''
-}
+  name: "",
+  position: "",
+  gender: "男",
+  phone: "",
+  email: "",
+  isMain: "是",
+  remark: "",
+};
 
 const companyEmptyData = {
   id: null,
-  code: '',
-  name: '',
-  oldName: '',
-  shortName: '',
-  ownerId: '',
-  ownerName: '',
-  sourceCategoryId: '',
-  sourceCategoryName: '',
-  sourceId: '',
-  sourceName: '',
-  stageId: '',
-  stageName: '',
-  phone: '',
-  email: '',
-  contactAddress: '',
-  remark: '',
-  socialCreditCode: '',
-  mainBusinessId: '',
-  mainBusinessName: '',
-  typeId: '',
-  typeName: '',
-  legalRepresentative: '',
-  foundationDate: '',
-  licenceDate: '',
-  businessStartDate: '',
-  collectionMethod: '',
-  businessEndDate: '',
-  isPermanentlyEffective: '',
-  registerMoney: '',
-  registerMoneyUnitId: '',
-  registerMoneyUnitName: '',
-  provinceCode: '',
-  province: '',
-  cityCode: '',
-  city: '',
-  districtCode: '',
-  district: '',
-  address: '',
-  businessField: '',
-  taxTypeId: '',
-  taxTypeName: '',
-  taxDeclarationCategoryId: '',
-  taxDeclarationCategoryName: '',
-  isZero: '',
-  taxDishId: '',
-  taxDishName: '',
-  competentTaxAuthority: '',
-  annualIncome: '',
-  taxType: '',
-  taxCollectorName: '',
-  taxCollectorPhone: '',
-  taxMonth: '',
-  openingBank: '',
-  bankAccount: '',
+  code: "",
+  name: "",
+  oldName: "",
+  shortName: "",
+  ownerId: "",
+  ownerName: "",
+  sourceCategoryId: "",
+  sourceCategoryName: "",
+  sourceId: "",
+  sourceName: "",
+  stageId: "",
+  stageName: "",
+  phone: "",
+  email: "",
+  contactAddress: "",
+  remark: "",
+  socialCreditCode: "",
+  mainBusinessId: "",
+  mainBusinessName: "",
+  typeId: "",
+  typeName: "",
+  legalRepresentative: "",
+  foundationDate: "",
+  licenceDate: "",
+  businessStartDate: "",
+  collectionMethod: "",
+  businessEndDate: "",
+  isPermanentlyEffective: "",
+  registerMoney: "",
+  registerMoneyUnitId: "",
+  registerMoneyUnitName: "",
+  provinceCode: "",
+  province: "",
+  cityCode: "",
+  city: "",
+  districtCode: "",
+  district: "",
+  address: "",
+  businessField: "",
+  taxTypeId: "",
+  taxTypeName: "",
+  taxDeclarationCategoryId: "",
+  taxDeclarationCategoryName: "",
+  isZero: "",
+  taxDishId: "",
+  taxDishName: "",
+  competentTaxAuthority: "",
+  annualIncome: "",
+  taxType: "",
+  taxCollectorName: "",
+  taxCollectorPhone: "",
+  taxMonth: "",
+  openingBank: "",
+  bankAccount: "",
   companyTags: [],
   companyTagIds: [],
   contactors: [],
   serviceTeams: [],
   companyFiles: [],
   stores: [],
-  creatorId: useUserStore().user.id
-}
+  creatorId: useUserStore().user.id,
+};
 
-const followQuery = ref({})
-const { form, rules, followData } = toRefs(data)
+const followQuery = ref({});
+const { form, rules, followData } = toRefs(data);
 
 /***********************  表单页方法 ****************************/
 
@@ -186,113 +227,87 @@ function open() {
 }
 
 function reset() {
-  form.value = deepClone(companyEmptyData)
+  form.value = deepClone(companyEmptyData);
   // console.log(addComRef.value)
-  if (addComRef.value != null) addComRef.value.reset()
+  if (addComRef.value != null) addComRef.value.reset();
 }
 
 function cancel() {
-  visible.value = false
+  visible.value = false;
 }
 
 function submitForm() {
-  // if (addType.value === 1) {
-  //   submitFileForm()
-  // } else {
-  //   submitFileForm()
-  // }
-  // if (fileList.value.length === 0) {
-  //   proxy.$modal.msgError('请选择导入文件')
-  //   return
-  // }
-  submitFileForm()
+  submitFileForm();
 }
 
 const importTemplate = () => {
   if (addType.value === 1) {
     // 循环
-    // proxy.download('/business/order/importTemplate', {}, `company_template${new Date().getTime()}.xlsx`)
-    exportLoopTemplate()
-
+    exportLoopTemplate();
   } else if (addType.value === 2) {
     // 单次
-    // proxy.download('/business/company/importTemplate', {}, `company_template${new Date().getTime()}.xlsx`)
-    exportOnceTemplate()
+    exportOnceTemplate();
   }
-}
+};
 
 function handleBeforeUpload(file) {
-  console.log(file)
-  if (file.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' && file.type !== 'application/vnd.ms-excel') {
-    proxy.$modal.msgError('请选择excel文件')
-    return false
+  console.log(file);
+  if (
+    file.type !==
+      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
+    file.type !== "application/vnd.ms-excel"
+  ) {
+    proxy.$modal.msgError("请选择excel文件");
+    return false;
   }
-  return true
+  return true;
 }
 
-// function uploadFile(param) {
-//   const formData = new FormData();
-//   formData.append("file", param.file);
-//   if (addType.value === 1) {
-//     importLoop(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;
-//         fileList.value.push(file);
-//       }
-//     });
-//   } else if (addType.value === 2) {
-//     importOnce(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;
-//         fileList.value.push(file);
-//       }
-//     });
-
-//   }
-// }
-
 /**文件上传中处理 */
 const handleFileUploadProgress = (event, file, fileList) => {
   if (addType === 1) {
-    uploadLoop.isUploading = true
+    uploadLoop.isUploading = true;
   } else {
-    uploadOnce.isUploading = true
+    uploadOnce.isUploading = true;
   }
-}
+};
 /** 文件上传成功处理 */
 const handleFileSuccess = (response, file, fileList) => {
   if (addType === 1) {
-    uploadLoop.open = false
-    uploadLoop.isUploading = false
-    proxy.$refs['uploadRef'].handleRemove(file)
-    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
-    getList.value()
+    uploadLoop.open = false;
+    uploadLoop.isUploading = false;
+    proxy.$refs["uploadRef"].handleRemove(file);
+    proxy.$alert(
+      "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+        response.msg +
+        "</div>",
+      "导入结果",
+      { dangerouslyUseHTMLString: true }
+    );
+    getList.value();
   } else {
-    uploadOnce.open = false
-    uploadOnce.isUploading = false
-    proxy.$refs['uploadRef'].handleRemove(file)
-    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
-    getList.value()
-
+    uploadOnce.open = false;
+    uploadOnce.isUploading = false;
+    proxy.$refs["uploadRef"].handleRemove(file);
+    proxy.$alert(
+      "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+        response.msg +
+        "</div>",
+      "导入结果",
+      { dangerouslyUseHTMLString: true }
+    );
+    getList.value();
   }
-}
+};
 /** 提交上传文件 */
 function submitFileForm() {
-  proxy.$refs['uploadRef'].submit()
+  proxy.$refs["uploadRef"].submit();
 }
 
 // 暴露给父组件的方法
 defineExpose({
-  open
-})
+  open,
+});
 </script>
 
 <style></style>

+ 166 - 56
src/views/business/crm/workorder/index.vue

@@ -13,53 +13,117 @@
         </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" 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" prop="workOrderNo" width="200" /> -->
-      <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="120">
+      <el-table-column
+        label="项目"
+        align="center"
+        prop="taskTypeName"
+        :resizable="false"
+        min-width="120"
+      >
         <template #default="scope">
           {{ scope.row.taskTypeName }}
           {{
             scope.row.taskTypeDetailName
-            ? `-${scope.row.taskTypeDetailName}`
-            : ""
+              ? `-${scope.row.taskTypeDetailName}`
+              : ""
           }}
         </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>
@@ -80,76 +144,131 @@
           </el-select> -->
         </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月")
-                  : ""
+                    ? moment(scope.row.startMonth).format("YYYY年MM月")
+                    : ""
                 }}
               </div>
-              <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="() => {
+              <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="
+                  () => {
                     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.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" />
   </div>
 </template>
 
 <script setup name="Company">
-// import contractForm from "./form";
 import {
   listWorkOrder,
   delWorkOrder,
@@ -157,7 +276,6 @@ import {
   updateWorkOrder,
 } from "@/api/business/crm/workOrder";
 import ZeroChangeDialog from "../ZeroChangeDialog";
-// import companyForm from "./form"
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
@@ -256,24 +374,16 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
   exportWorkOrder(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {
   if (startDate) {
-    // console.log(startDate)
     row.endMonth = proxy
       .moment(startDate)
       .add(row.monthNum - 1, "M")
@@ -297,7 +407,7 @@ function saveHandler(row, field) {
             getList();
           });
         })
-        .catch((_) => { });
+        .catch((_) => {});
     }
   }
 }
@@ -310,7 +420,7 @@ function thenSave(row) {
         getList();
       });
     })
-    .catch((_) => { });
+    .catch((_) => {});
 }
 
 function getTransactor(row) {

+ 1 - 8
src/views/business/deduction/index.vue

@@ -698,14 +698,7 @@ function handleDelete(row) {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportDeposit(queryParams.value);
+  exportDeposition(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {

+ 0 - 21
src/views/business/entrust/deduct/index.vue

@@ -44,24 +44,10 @@
             >
               导出</el-dropdown-item
             >
-            <!-- <el-dropdown-item type="warning" size="small" icon="Download" @click="handleArea"
-              v-hasPermi="['business:workOrder:export']"> area</el-dropdown-item> -->
           </el-dropdown-menu>
         </template>
       </el-dropdown>
-      <!-- <el-button type="warning" size="small" icon="Download" @click="handleExport"
-        v-hasPermi="['business:workOrder:export']">导出</el-button> -->
-      <!--<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-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"
@@ -230,13 +216,6 @@ function handleDelete(row) {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
   exportDeduct(queryParams.value);
 }
 

+ 89 - 20
src/views/business/entrust/deductOfFactory/index.vue

@@ -2,45 +2,101 @@
   <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>
         <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-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"
+      >
       </el-table-column>
-      <el-table-column label="结余金额" prop="remainAmount" align="center" width="100">
+      <el-table-column
+        label="结余金额"
+        prop="remainAmount"
+        align="center"
+        width="100"
+      >
       </el-table-column>
       <el-table-column label="备注" prop="remark" align="center">
       </el-table-column>
@@ -52,8 +108,13 @@
     </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>
 
@@ -65,6 +126,7 @@ import {
   confirmEntrustOrder,
   finishedEntrustOrder,
 } from "@/api/business/entrust/entrustOrder";
+import useUserStore from "@/store/modules/user";
 import entrustOrderForm from "./form";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
@@ -76,6 +138,8 @@ 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);
@@ -107,6 +171,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;
@@ -153,7 +222,7 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 function handleConfirm(row) {
@@ -182,7 +251,7 @@ function handleFinished(row) {
     });
 }
 
-function handleViewAccountment(row) { }
+function handleViewAccountment(row) {}
 
 getList();
 </script>

+ 12 - 26
src/views/business/entrust/deposit/index.vue

@@ -24,7 +24,7 @@
         size="small"
         icon="Refresh"
         @click="getList"
-        v-hasPermi="['business:entrustOrder:remove']"
+        v-hasPermi="['business:deposit:list']"
         >刷新</el-button
       >
       <el-dropdown>
@@ -36,30 +36,14 @@
             <el-dropdown-item
               icon="Download"
               @click="handleExport"
-              v-hasPermi="['business:deposit:export']"
+              v-if="viewAdviser('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-menu>
         </template>
       </el-dropdown>
-      <!-- <el-button type="warning" size="small" icon="Download" @click="handleExport"
-        v-hasPermi="['business:deposit:export']">导出</el-button> -->
-      <!--<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-item label="客户名称:" prop="companyName">
-        <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 icon="Refresh" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form> -->
 
     <!-- 列表区 -->
     <el-table
@@ -187,6 +171,7 @@
             <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"
@@ -224,6 +209,7 @@
           <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"
@@ -347,6 +333,7 @@ import {
 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();
@@ -364,7 +351,8 @@ 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({
@@ -410,6 +398,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;
@@ -467,13 +460,6 @@ function handleDelete(row) {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
   exportDeposit(queryParams.value);
 }
 

+ 193 - 55
src/views/business/entrust/depositOfFactory/index.vue

@@ -2,48 +2,82 @@
   <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>
         <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-if="viewAdviser('business:deposit:export')"
+            >
+              导出</el-dropdown-item
+            >
           </el-dropdown-menu>
         </template>
       </el-dropdown>
-      <!-- <el-button type="warning" size="small" icon="Download" @click="handleExport"
-        v-hasPermi="['business:deposit:export']">导出</el-button> -->
-      <!--<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-item label="客户名称:" prop="companyName">
-        <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 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 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" />
       <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">
@@ -51,32 +85,73 @@
           <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">
+    <el-dialog
+      title="存款信息"
+      v-model="formOpen"
+      width="500px"
+      append-to-body
+      draggable
+      @close="formCancel"
+    >
       <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>
@@ -98,30 +173,75 @@
           </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>
@@ -139,10 +259,20 @@
       </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>
 
@@ -162,6 +292,7 @@ import {
 import freeAmountDialog from "./freeAmountDialog.vue";
 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();
@@ -174,6 +305,8 @@ 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);
@@ -229,6 +362,11 @@ function handleQuery() {
   getList();
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 重置按钮操作 */
 function resetQuery() {
   proxy.resetForm("queryRef");
@@ -275,7 +413,7 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */

+ 8 - 30
src/views/business/entrust/entrustOrder/form.vue

@@ -25,36 +25,14 @@
         <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="签约主体" required>
-              <el-autocomplete
-                v-if="form.status == 0 && view"
-                :fetch-suggestions="querySearchSigningSubjectAsync"
-                :trigger-on-focus="true"
-                v-model="form.signingSubject"
-                placeholder="请输入签约主体"
-                popper-class="my-autocomplete"
-                @select="handleSelectSingingSubject"
-              >
-                <template #default="{ item }">
-                  <div
-                    style="
-                      display: flex;
-                      flex-direction: row;
-                      justify-content: space-between;
-                    "
-                  >
-                    <div class="name" style="font-size: 12px">
-                      {{ item.accountName }}
-                    </div>
-                  </div>
-                </template>
-              </el-autocomplete>
-              <span v-else>{{ form.signingSubject }}</span>
+              <span>{{ form.signingSubject }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="往来单位" required>
               <el-autocomplete
-                v-if="form.status == 0 && view"
+                v-if="form.id == null && view"
+                style="width: 100%"
                 :fetch-suggestions="querySearchContactCompanyAsync"
                 :trigger-on-focus="true"
                 v-model="form.contactCompany"
@@ -82,7 +60,7 @@
           <el-col :span="12">
             <el-form-item label="合同日期" required>
               <el-date-picker
-                v-if="form.status == 0 && view"
+                v-if="form.id == null && view"
                 clearable
                 v-model="form.formDate"
                 type="date"
@@ -98,7 +76,7 @@
               <el-input
                 v-model="form.formNo"
                 placeholder="请输入合同编号"
-                v-if="form.status == 0 && view"
+                v-if="form.id == null && view"
               />
               <span v-else>{{ form.formNo }}</span>
             </el-form-item>
@@ -187,15 +165,15 @@ function viewable() {
 function open(id) {
   visible.value = true;
   view.value = viewable();
-  console.log("权限", view.value);
+
   reset();
   form.value.id = id;
+  form.value.signingSubject = useUserStore().tenant.accountName;
+  form.value.tenantId = useUserStore().tenant.id;
   if (id != null) {
-    //   loadData();
     getEntrustOrder(form.value.id).then((res) => {
       if (res.data != null) {
         form.value = res.data;
-        console.log("form", form.value);
       }
     });
   }

+ 12 - 1
src/views/business/entrust/entrustOrder/index.vue

@@ -7,6 +7,7 @@
         size="small"
         icon="Plus"
         @click="handleAdd"
+        v-show="handleVerifi()"
         v-hasPermi="['business:entrustOrder:add']"
         >新增</el-button
       >
@@ -81,7 +82,6 @@
       @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"
@@ -211,7 +211,10 @@ import {
   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();
 /** 字典数组区 */
 /** 查询 对象 */
@@ -266,6 +269,14 @@ function resetQuery() {
   handleQuery();
 }
 
+//验证当前版本
+function handleVerifi() {
+  return (
+    permissions.includes(all_permission) ||
+    useUserStore().tenant.versionId == "4"
+  );
+}
+
 // 多选框选中数据
 function handleSelectionChange(selection) {
   ids.value = selection.map((item) => item.id);

+ 2 - 1
src/views/business/entrust/statementAccount/form.vue

@@ -21,7 +21,7 @@
             >保存</el-button
           >
           <el-button
-            v-else-if="form.entrustOrderStatus !== 2"
+            v-else-if="form.entrustOrderStatus !== 2 && form.status !== 2"
             type="warning"
             size="small"
             icon="Edit"
@@ -577,6 +577,7 @@ function open(id) {
   visible.value = true;
   if (id) {
     getDeduct(id).then((response) => {
+      console.log(response);
       form.value = response.data;
       editStatus.value = false;
       title.value = "修改客户";

+ 104 - 29
src/views/business/entrust/statementAccount/index.vue

@@ -1,26 +1,59 @@
 <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">
@@ -33,25 +66,67 @@
       </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="info.status !== 2" link size="small" type="warning" @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:deduct:edit']">修改</el-button>
-          <el-button v-show="info.status !== 2" link size="small" type="danger" @click="handleDelete(scope.row)"
-            v-hasPermi="['business:deduct:remove']">删除</el-button>
-          <el-button v-show="info.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>
 
@@ -82,8 +157,8 @@ 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;
@@ -188,7 +263,7 @@ function handleAdd() {
   // 判断上月委托是否已做对账单
   // 假设已做对账单 则询问是否做本月对账单
   // 假设做本月对账单 传入本月信息到dialog
-  choiceMonthDialogRef.value.open(queryParams.value.entrustOrderId)
+  choiceMonthDialogRef.value.open(queryParams.value.entrustOrderId);
   // checkStatementAccount(queryParams.value.entrustOrderId).then((res) => {
   //   const currentDate = res.msg;
   //   statementAccountFormRef.value.add({
@@ -245,16 +320,16 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 function monthConfirmHandler(daterange) {
-  const startMonth = daterange[0]
-  const endMonth = daterange[1]
+  const startMonth = daterange[0];
+  const endMonth = daterange[1];
   statementAccountFormRef.value.add({
     entrustOrderId: queryParams.value.entrustOrderId,
     startMonth: startMonth,
-    endMonth: endMonth
+    endMonth: endMonth,
   });
 }
 

+ 147 - 43
src/views/business/entrust/workOrder/currentMonth/index.vue

@@ -2,91 +2,174 @@
   <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="success" size="small" icon="Refresh" @click="transEntrustHandler"
-        v-hasPermi="['business:entrust:workOrder:current:trans']">委托流转</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-button
+        type="success"
+        size="small"
+        icon="Refresh"
+        @click="transEntrustHandler"
+        v-hasPermi="['business:entrust:workOrder:current:trans']"
+        >委托流转</el-button
+      >
       <el-dropdown>
         <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:entrust:workOrder:current:export']">
-              导出</el-dropdown-item>
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-if="viewAdviser('business:entrust:workOrder:current: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="当前月:">{{
         currentMonth == null
-        ? "未设定本月"
-        : moment(currentMonth).format("YYYY年MM月")
+          ? "未设定本月"
+          : moment(currentMonth).format("YYYY年MM月")
       }}</el-form-item>
       <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>
-        <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="80">
+      <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="80"
+      >
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <el-table-column v-if="list.findIndex((v) => v.tenantId !== tenantId) >= 0" label="来源" align="center"
-        prop="fromCompanyName" min-width="80">
+      <el-table-column
+        v-if="list.findIndex((v) => v.tenantId !== tenantId) >= 0"
+        label="来源"
+        align="center"
+        prop="fromCompanyName"
+        min-width="80"
+      >
       </el-table-column>
-      <el-table-column label="项目" align="center" prop="taskTypeName" min-width="140">
+      <el-table-column
+        label="项目"
+        align="center"
+        prop="taskTypeName"
+        min-width="140"
+      >
         <template #default="scope">
           {{ scope.row.taskTypeName }}
           {{
             scope.row.taskTypeDetailName
-            ? `-${scope.row.taskTypeDetailName}`
-            : ""
+              ? `-${scope.row.taskTypeDetailName}`
+              : ""
           }}
         </template>
       </el-table-column>
-      <el-table-column label="起始月" align="center" width="90" min-prop="startMonth">
+      <el-table-column
+        label="起始月"
+        align="center"
+        width="90"
+        min-prop="startMonth"
+      >
         <template #default="scope">
           {{
             scope.row.type === 1
-            ? scope.row.startMonth
-              ? moment(scope.row.startMonth).format("YYYY年MM月")
-              : ""
-            : "-"
+              ? 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.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>
@@ -95,19 +178,32 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? 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" />
-    <init-month-dialog ref="initMonthDialogRef" :get-list="checkCurrentMonthHandle" :setCurrentMonth="setCurrentMonth" />
+    <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" />
+    <set-entrust-dialog
+      ref="setEntrustDialogRef"
+      :get-list="getList"
+      @submit="handleAddEntrust"
+    />
   </div>
 </template>
 
@@ -123,6 +219,7 @@ import {
   addEntrust,
 } 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);
@@ -139,6 +236,8 @@ 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);
@@ -190,6 +289,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;

+ 132 - 39
src/views/business/entrust/workOrder/nextMonth/index.vue

@@ -2,86 +2,158 @@
   <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>
         <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: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="当前月:">{{
         currentMonth == null
-        ? "未设定本月"
-        : moment(currentMonth).format("YYYY年MM月")
+          ? "未设定本月"
+          : moment(currentMonth).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>
-        <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}`
+              : ""
           }}
         </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.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.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>
@@ -90,17 +162,30 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? scope.row.entrust.toAccountName
+              : scope.row.serviceName
           }}
         </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" />
-    <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>
 
@@ -114,6 +199,7 @@ import {
   addEntrust,
 } from "@/api/business/entrust/nextWorkOrder";
 import SetEntrustDialog from "../setEntrustDialog";
+import useUserStore from "@/store/modules/user";
 const { proxy } = getCurrentInstance();
 const currentMonth = ref(null);
 /** 字典数组区 */
@@ -128,6 +214,8 @@ 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);
@@ -161,6 +249,11 @@ function checkCurrentMonthHandle() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 function showInitMonthDialog() {
   initMonthDialogRef.value.open();
 }

+ 99 - 25
src/views/business/entrust/workOrder/once/index.vue

@@ -2,56 +2,113 @@
   <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>
         <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:entrust:workOrder:current: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" prop="socialCreditCode" min-width="160" />
-      <el-table-column label="工单类型" align="center" prop="amount" min-width="80">
+      <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"
+      >
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <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.taskTypeDetailName
-            ? `-${scope.row.taskTypeDetailName}`
-            : ""
+              ? `-${scope.row.taskTypeDetailName}`
+              : ""
           }}
         </template>
       </el-table-column>
@@ -59,17 +116,26 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? 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>
 
@@ -83,6 +149,7 @@ import {
   addEntrust,
 } from "@/api/business/entrust/onceWorkOrder";
 import SetEntrustDialog from "../setEntrustDialog";
+import useUserStore from "@/store/modules/user";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
@@ -95,6 +162,8 @@ 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);
@@ -126,6 +195,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;

+ 62 - 13
src/views/business/entrust/workOrder/setEntrustDialog.vue

@@ -1,34 +1,77 @@
 <template>
-  <el-dialog title="设置委托" v-model="formOpen" width="900px" append-to-body draggable @close="cancel">
+  <el-dialog
+    title="设置委托"
+    v-model="formOpen"
+    width="900px"
+    append-to-body
+    draggable
+    @close="cancel"
+  >
     <el-form ref="dictRef" :model="form" label-width="100">
       <el-form-item label="受委托方:">
         <el-select placeholder="请选择受委托方" v-model="toTenantId">
-          <el-option v-for="(item, index) in factories" :key="index" :label="item.accountName"
-            :value="item.id"></el-option>
+          <el-option
+            v-for="(item, index) in factories"
+            :key="index"
+            :label="item.accountName"
+            :value="item.id"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="委托工单:">
-        <el-table :data="list" size="small" border height="100%" @selection-change="handleSelectionChange">
-          <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" />
-          <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="180" />
-          <el-table-column label="工单类型" align="center" prop="amount" width="80">
+        <el-table
+          :data="list"
+          size="small"
+          border
+          height="100%"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            label="客户名称"
+            align="center"
+            min-width="250"
+            prop="companyName"
+          />
+          <el-table-column
+            label="税号"
+            align="center"
+            prop="socialCreditCode"
+            min-width="180"
+          />
+          <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="150">
+          <el-table-column
+            label="项目"
+            align="center"
+            prop="taskTypeName"
+            width="150"
+          >
             <template #default="scope">
               {{ scope.row.taskTypeName }}
               {{
                 scope.row.taskTypeDetailName
-                ? `-${scope.row.taskTypeDetailName}`
-                : ""
+                  ? `-${scope.row.taskTypeDetailName}`
+                  : ""
               }}
             </template>
           </el-table-column>
           <el-table-column label="操作" align="center" width="50">
             <template #default="scope">
-              <el-button type="danger" size="small" link @click="delWorkOrderHandler(scope.$index)">删除</el-button>
+              <el-button
+                type="danger"
+                size="small"
+                link
+                @click="delWorkOrderHandler(scope.$index)"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -36,7 +79,13 @@
     </el-form>
     <template #footer>
       <div class="dialog-footer">
-        <el-button type="primary" icon="Finished" size="small" @click="submitForm">确 定</el-button>
+        <el-button
+          type="primary"
+          icon="Finished"
+          size="small"
+          @click="submitForm"
+          >确 定</el-button
+        >
         <el-button @click="cancel" icon="close" size="small">取 消</el-button>
       </div>
     </template>
@@ -61,7 +110,7 @@ const list = ref([]);
 const props = defineProps({
   getList: {
     type: Function,
-    default: () => { },
+    default: () => {},
   },
 });
 

+ 100 - 32
src/views/business/entrust/workOrderForFactory/currentMonth/index.vue

@@ -2,69 +2,118 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button type="success" size="small" icon="Refresh" @click="transEntrustHandler"
-        v-hasPermi="['business:entrust:workOrder:current:trans']">委托流转</el-button>
+      <el-button
+        type="success"
+        size="small"
+        icon="Refresh"
+        @click="transEntrustHandler"
+        v-hasPermi="['business:entrust:workOrder:current:trans']"
+        >委托流转</el-button
+      >
       <el-dropdown>
         <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:entrust:workOrder:current:export']">
-              导出</el-dropdown-item>
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-if="viewAdviser('business:entrust:workOrder:current: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="当前月:">{{
         currentMonth == null
-        ? "未设定本月"
-        : moment(currentMonth).format("YYYY年MM月")
+          ? "未设定本月"
+          : moment(currentMonth).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>
-        <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="fromCompanyName" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" width="150" />
+      <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" 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}`
+              : ""
           }}
         </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.startMonth
+                ? moment(scope.row.startMonth).format("YYYY年MM月")
+                : ""
+              : "-"
           }}
         </template>
       </el-table-column>
@@ -72,14 +121,19 @@
         <template #default="scope">
           {{
             scope.row.type === 1
-            ? scope.row.endMonth
-              ? moment(scope.row.endMonth).format("YYYY年MM月")
-              : ""
-            : "-"
+              ? 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>
@@ -88,16 +142,21 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? 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>
 
@@ -110,6 +169,8 @@ import {
   delEntrust,
   transNextForFactory,
 } from "@/api/business/entrust/currentWorkOrder";
+import useUserStore from "@/store/modules/user";
+
 const { proxy } = getCurrentInstance();
 const currentMonth = ref(null);
 /** 字典数组区 */
@@ -121,6 +182,8 @@ 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([]);
 
@@ -173,6 +236,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;

+ 93 - 29
src/views/business/entrust/workOrderForFactory/nextMonth/index.vue

@@ -8,60 +8,104 @@
         </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-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="当前月:">{{
         currentMonth == null
-        ? '未设定本月'
-        : moment(currentMonth).format("YYYY年MM月")
+          ? "未设定本月"
+          : moment(currentMonth).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>
-        <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="fromCompanyName" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" width="150" />
+      <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}`
+              : ""
           }}
         </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.startMonth
+                ? moment(scope.row.startMonth).format("YYYY年MM月")
+                : ""
+              : "-"
           }}
         </template>
       </el-table-column>
@@ -69,14 +113,19 @@
         <template #default="scope">
           {{
             scope.row.type === 1
-            ? scope.row.endMonth
-              ? moment(scope.row.endMonth).format("YYYY年MM月")
-              : ""
-            : "-"
+              ? 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>
@@ -85,19 +134,26 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? scope.row.entrust.toAccountName
+              : scope.row.serviceName
           }}
         </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"
+    />
   </div>
 </template>
 
 <script setup name="Company">
+import { getToken, getTenant } from "@/utils/auth";
+import useUserStore from "@/store/modules/user";
 import {
   listFactoryNextWorkOrder,
   checkCurrent,
@@ -116,6 +172,8 @@ 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([]);
 
@@ -132,6 +190,7 @@ const queryParams = ref({
   pageSize: 20,
   companyName: "",
   noContract: 0,
+  toTenantId: getTenant(),
   type: 1,
 });
 
@@ -167,6 +226,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;

+ 70 - 18
src/views/business/entrust/workOrderForFactory/once/index.vue

@@ -8,46 +8,84 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item icon="Download" @click="handleExport"
-              v-hasPermi="['business:entrust:workOrder:current: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="150" />
-      <el-table-column label="来源" align="center" 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}`
+              : ""
           }}
         </template>
       </el-table-column>
@@ -55,21 +93,28 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? 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,
@@ -87,6 +132,8 @@ 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([]);
@@ -120,6 +167,11 @@ function getList() {
   });
 }
 
+//判断是否有权限
+function viewAdviser(quer) {
+  return permissions.includes(all_permission) || permissions.includes(quer);
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;

+ 1 - 0
src/views/business/financial/collection/form.vue

@@ -678,6 +678,7 @@ function submitForm() {
       saveCollection(formValue).then((res) => {
         open(form.value.id);
         getList.value();
+        proxy.$modal.msgSuccess("保存成功");
       });
     }
   });

+ 0 - 38
src/views/business/financial/collection/importExcelDialog.vue

@@ -240,7 +240,6 @@ function open() {
 
 function reset() {
   form.value = deepClone(companyEmptyData);
-  // console.log(addComRef.value)
   if (addComRef.value != null) addComRef.value.reset();
 }
 
@@ -249,55 +248,19 @@ function cancel() {
 }
 
 function submitForm() {
-  // if (addType.value === 1) {
-  //   submitFileForm()
-  // } else {
-  //   submitFileForm()
-  // }
   submitFileForm();
 }
 
 const importTemplate = () => {
   if (addType.value === 1) {
     // 循环
-    // proxy.download('/business/order/importTemplate', {}, `company_template${new Date().getTime()}.xlsx`)
     exportLoopTemplate();
   } else if (addType.value === 2) {
     // 单次
-    // proxy.download('/business/company/importTemplate', {}, `company_template${new Date().getTime()}.xlsx`)
     exportOnceTemplate();
   }
 };
 
-// function uploadFile(param) {
-//   const formData = new FormData();
-//   formData.append("file", param.file);
-//   if (addType.value === 1) {
-//     importLoop(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;
-//         fileList.value.push(file);
-//       }
-//     });
-//   } else if (addType.value === 2) {
-//     importOnce(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;
-//         fileList.value.push(file);
-//       }
-//     });
-
-//   }
-// }
-
 /**文件上传中处理 */
 const handleFileUploadProgress = (event, file, fileList) => {
   if (addType === 1) {
@@ -336,7 +299,6 @@ const handleFileSuccess = (response, file, fileList) => {
 };
 
 function handleBeforeUpload(file) {
-  console.log(file);
   if (
     file.type !==
       "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&

+ 7 - 10
src/views/business/financial/collection/index.vue

@@ -97,16 +97,13 @@
         align="center"
       >
         <template #default="scope">
-          {{ 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
-        v-if="getShowStatus(4)"
-        label="收款日期"
-        prop="arriveDate"
-        width="100"
-        align="center"
-      /> -->
       <el-table-column
         v-if="getShowStatus(5)"
         label="收款时间"
@@ -221,6 +218,7 @@ import contractForm from "./form";
 import {
   listCollection,
   delCollection,
+  exportCllection,
 } from "@/api/business/financial/collection";
 import importExcelDialog from "./importExcelDialog.vue";
 const { proxy } = getCurrentInstance();
@@ -348,7 +346,6 @@ function numberToCurrencyNo(value) {
     // 有小数部分
 
     floatPart = valueArray[1].toString(); // 取得小数部分
-    console.log("整数部分", intPartFormat + "." + floatPart, "小数部分");
     return intPartFormat + "." + floatPart;
   }
   return intPartFormat + floatPart;
@@ -429,7 +426,7 @@ function handleDissolution() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  exportOrder(queryParams.value);
+  exportCllection(queryParams.value);
 }
 
 function handleImport() {

+ 11 - 9
src/views/business/financial/contract/form.vue

@@ -98,6 +98,7 @@
               <el-form-item label="收款流水号:">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.flowNo"
                   readonly
                   size="small"
@@ -112,6 +113,7 @@
               <el-form-item label="收款账户:" prop="subsidiaryName">
                 <el-autocomplete
                   v-if="editStatus"
+                  style="width: 100%"
                   :fetch-suggestions="querySearchAccountAsync"
                   :trigger-on-focus="true"
                   v-model="form.subsidiaryName"
@@ -145,6 +147,7 @@
               <el-form-item label="收款开户行:" prop="subsidiaryBankName">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.subsidiaryBankName"
                   size="small"
                   type="text"
@@ -159,6 +162,7 @@
               <el-form-item label="收款账号:" prop="subsidiaryBankAccount">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.subsidiaryBankAccount"
                   size="small"
                   type="text"
@@ -173,6 +177,7 @@
               <el-form-item label="付款名称:" prop="applyName">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.applyName"
                   size="small"
                   type="text"
@@ -187,6 +192,7 @@
               <el-form-item label="付款账号:" prop="appyAccount">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.appyAccount"
                   size="small"
                   type="text"
@@ -200,6 +206,7 @@
               <el-form-item label="到账日期:" prop="arriveDate">
                 <el-date-picker
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.arriveDate"
                   size="small"
                   :clearable="true"
@@ -216,6 +223,7 @@
               <el-form-item label="到账时间:" prop="arriveTime">
                 <el-time-select
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.arriveTime"
                   :picker-options="timeOptions"
                   placeholder="选择时间"
@@ -247,6 +255,7 @@
               <el-form-item label="收款金额:" required>
                 <el-input-number
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.arriveAmount"
                   size="small"
                   placeholder="收款金额"
@@ -263,6 +272,7 @@
               <el-form-item label="备注:">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.remark"
                   size="small"
                   type="text"
@@ -553,7 +563,6 @@ function open(row) {
   reset();
   archiveInput.value = row;
   visible.value = true;
-  // console.log(virtual_address.value)
   getCollectionByContract(row).then((res) => {
     form.value = res.data;
     editStatus.value = true;
@@ -588,8 +597,6 @@ function reset() {
   loopDetails.value = [];
   onceDetails.value = [];
   type.value = "";
-  // console.log(form)
-  // proxy.resetForm("orderRef");
 }
 
 /** 全屏缩放 */
@@ -609,7 +616,6 @@ function submitForm() {
       saveCollection(formValue).then((res) => {
         if (res.code === 200) {
           archiveInput.value.collectionStatus = 1;
-          console.log(archiveInput.value);
           setCollectionStatus(archiveInput.value);
           proxy.$message.success("保存成功");
         }
@@ -717,12 +723,8 @@ function amountChange() {
     for (let i = 0; i < form.value.details.length; i++) {
       amount = amount + form.value.details[i].arriveAmount;
     }
-    // 判断到款状态
+
     form.value.arriveAmount = amount;
-    // if (form.value.arriveAmount > 0)
-    //   form.value.arriveStatus =
-    //     form.value.arriveAmount === form.value.contractAmount ? 1 : 2;
-    // else form.value.arriveStatus = 0;
   }
 }
 

+ 2 - 25
src/views/business/financial/contract/index.vue

@@ -1,29 +1,6 @@
 <template>
   <div class="page-container list-container">
-    <!-- 功能按钮区 -->
-    <div class="list-btns-container">
-      <!-- <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
-        v-hasPermi="['business:waitForcollection:add']">新增</el-button> -->
-
-      <!-- <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
-        v-hasPermi="['business:archive:order:remove']">删除</el-button> -->
-      <el-dropdown>
-        <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:collection:export']"
-            >
-              导出</el-dropdown-item
-            >
-          </el-dropdown-menu>
-        </template>
-      </el-dropdown>
-    </div>
+    <div class="list-btns-container"></div>
     <!-- 搜索区 -->
     <el-form
       class="list-search-container"
@@ -121,7 +98,7 @@
       <el-table-column
         label="合同来源"
         align="center"
-        prop="sourceName"
+        prop="sourceCategoryName"
         min-width="130"
       />
       <el-table-column

+ 20 - 23
src/views/business/financial/payment/form.vue

@@ -95,6 +95,7 @@
               <el-form-item label="支出流水号:">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.flowNo"
                   readonly
                   size="small"
@@ -109,6 +110,7 @@
               <el-form-item label="支出日期:" prop="formDate" required>
                 <el-date-picker
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model="form.formDate"
                   size="small"
                   :clearable="true"
@@ -125,6 +127,7 @@
               <el-form-item label="支出类目:">
                 <el-select
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.paymentCauseId"
                   placeholder="支出类目"
                   size="small"
@@ -145,6 +148,7 @@
               <el-form-item label="支出科目:">
                 <el-select
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.paymentSubjectId"
                   placeholder="支出科目"
                   size="small"
@@ -165,6 +169,7 @@
               <el-form-item label="收款账户名:">
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.acceptAccount"
                   size="small"
                   type="text"
@@ -181,7 +186,7 @@
                     v-model.trim="form.acceptAccountNo"
                     size="small"
                     type="text"
-                    style="width: 66.67%"
+                    style="width: 100%"
                     placeholder="收款账号"
                     :clearable="true"
                   />
@@ -194,9 +199,10 @@
             </el-col>
 
             <el-col :span="6">
-              <el-form-item label="客户名称" prop="companyName" required>
+              <el-form-item label="客户名称" prop="companyName" required>
                 <el-autocomplete
                   v-if="editStatus"
+                  style="width: 100%"
                   :fetch-suggestions="querySearchCompanyAsync"
                   :trigger-on-focus="true"
                   v-model="form.companyName"
@@ -226,6 +232,7 @@
               <el-form-item label="合同:" required>
                 <el-input
                   v-if="editStatus"
+                  style="width: 100%"
                   v-model.trim="form.contractNo"
                   size="small"
                   type="text"
@@ -273,7 +280,10 @@
                 <span v-else>{{ rowNum(form.amount) }}</span>
               </el-form-item>
             </el-col>
-            <el-col v-if="form.verifyStatus === 2" :span="6">
+            <el-col
+              v-if="form.verifyStatus === 2 || form.verifyStatus === 4"
+              :span="6"
+            >
               <el-form-item label="驳回原因:" required>
                 <span>{{ form.verifyComment }}</span>
               </el-form-item>
@@ -542,10 +552,10 @@
         </el-form-item> -->
         <el-form-item
           :label="cashierForm.verifyStatus == 4 ? '驳回原因' : '审核意见'"
-          :prop="cashierVerifyComment"
+          :prop="verifyComment"
         >
           <el-input
-            v-model.trim="cashierForm.cashierVerifyComment"
+            v-model.trim="cashierForm.verifyComment"
             type="textarea"
             maxlength="200"
             show-word-limit
@@ -754,8 +764,6 @@ function cancel() {
 function reset() {
   form.value = JSON.parse(JSON.stringify(paymentEmpty));
   paymentSubjects.value = [];
-  // console.log(form)
-  // proxy.resetForm("orderRef");
 }
 
 /** 全屏缩放 */
@@ -813,19 +821,12 @@ function handleServiceTypeClick(tab) {
 }
 
 function verifyHandler() {
-  // proxy.$modal
-  //   .confirm("是否确认审核?")
-  //   .then((_) => {
-  //     verifyUpload(1);
-  //   })
-  //   .catch((_) => {
-  //     proxy.$modal.msg("取消审核");
-  //   });
   rejectHandler();
 }
 
 function cashierVerifyHandler() {
   cashierOpen.value = true;
+  cashierForm.value = proxy.deepClone(form.value);
 }
 
 function rejectHandler() {
@@ -840,7 +841,7 @@ function rejectCancel() {
 
 function cashierVerifyCancel() {
   cashierOpen.value = false;
-  cashierForm.value = proxy.deepClone(form.value);
+  cashierForm.value = {};
 }
 
 function rejectSubmitHandler() {
@@ -851,9 +852,6 @@ function rejectSubmitHandler() {
 }
 
 function verifyUpload() {
-  // const formValue = proxy.deepClone(form.value);
-  // formValue.verifyStatus = status;
-  // formValue.status = status;
   if (rejectForm.value.verifyStatus === 0) {
     proxy.$modal.msgError("请选择审核结果");
     return;
@@ -866,12 +864,11 @@ function verifyUpload() {
     proxy.$modal.msgError("请输入审核意见");
     return;
   }
-  // rejectForm.value.paymentStatus = rejectForm.value.verifyStatus === 1 ? 1 : 0;
   verifyPayment(rejectForm.value).then((res) => {
     open(form.value.id);
     getList.value();
     rejectCancel();
-    proxy.$modal.msg("保存成功");
+    proxy.$modal.msgSuccess("保存成功");
   });
 }
 
@@ -887,6 +884,7 @@ function cashierVerifyUpload() {
     proxy.$modal.msgError("0");
     return;
   }
+
   if (
     cashierForm.value.verifyStatus === 4 &&
     (cashierForm.value.verifyComment == null ||
@@ -901,7 +899,7 @@ function cashierVerifyUpload() {
     open(cashierForm.value.id);
     getList.value();
     cashierVerifyCancel();
-    proxy.$modal.msg("保存成功");
+    proxy.$modal.msgSuccess("保存成功");
   });
 }
 
@@ -1049,7 +1047,6 @@ function checkPermission(templatePermission) {
       all_permission === permission || templatePermission.includes(permission)
     );
   });
-  console.log(hasPermissions);
   return hasPermissions;
 }
 

+ 3 - 16
src/views/business/financial/payment/index.vue

@@ -128,12 +128,6 @@
           <span>{{ rowNum(scope.row.sumAmount) }}</span>
         </template>
       </el-table-column>
-      <!-- <el-table-column label="支出状态" prop="paymentStatus" width="90" align="center">
-            <template #default="scope"> {{ scope.row.paymentStatus === 0 ? '未支出' : '已支出' }} </template>
-          </el-table-column>
-          <el-table-column label="审核状态" prop="verifyStatus" width="90" align="center">
-            <template #default="scope"> {{ scope.row.verifyStatus === 0 ? '待审核' : scope.row.verifyStatus === 1 ? '审核通过' : '审核驳回' }} </template>
-          </el-table-column> -->
       <el-table-column
         v-if="getShowStatus(15)"
         label="审核日期"
@@ -149,7 +143,6 @@
         align="center"
       >
         <template #header>
-          <!-- <el-badge v-if="unVerifiedNum > 0" is-dot>审核状态</el-badge> -->
           <div>审核状态</div>
         </template>
         <template #default="scope">
@@ -203,13 +196,7 @@
         width="90"
         align="center"
       />
-      <el-table-column
-        v-if="getShowStatus(12)"
-        label="等待审核"
-        prop="waitForVerify"
-        min-width="90"
-        align="center"
-      />
+
       <el-table-column
         v-if="getShowStatus(13)"
         label="申请人"
@@ -249,7 +236,7 @@
 
 <script setup name="Company">
 import paymentForm from "./form";
-import { listPayment } from "@/api/business/financial/payment";
+import { listPayment, exportPayment } from "@/api/business/financial/payment";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
@@ -400,7 +387,7 @@ function handleDissolution() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  exportOrder(queryParams.value);
+  exportPayment(queryParams.value);
 }
 
 function handleImport() {}

+ 221 - 0
src/views/business/housingFund/confirm/importExcelDialog.vue

@@ -0,0 +1,221 @@
+<template>
+  <!-- 添加或修改菜单对话框 -->
+  <el-dialog
+    title="公积金导入"
+    v-model="visible"
+    width="680px"
+    append-to-body
+    draggable
+  >
+    <el-form
+      ref="menuRef"
+      :model="form"
+      size="small"
+      :rules="rules"
+      label-width="100px"
+    >
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="选择导入月份" prop="year">
+            <el-date-picker
+              v-model="currentMonth"
+              type="month"
+              format="YYYY年MM月"
+              style="width: 150px"
+              :clearable="false"
+              value-format="YYYY-MM-01"
+              :disabled-date="disabledDateHandler"
+              @change="monthChangeHandler"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="上传">
+            <el-upload
+              ref="uploadRef"
+              :limit="1"
+              accept=".xlsx, .xls"
+              :headers="upload.headers"
+              :action="upload.url + `?year=${year}&month=${month}`"
+              :fileList="fileList"
+              :before-upload="handleBeforeUpload"
+              :disabled="upload.isUploading"
+              :on-progress="handleFileUploadProgress"
+              :on-success="handleFileSuccess"
+              :auto-upload="false"
+              drag
+            >
+              <el-icon class="el-icon--upload">
+                <upload-filled />
+              </el-icon>
+              <div class="el-upload__text">
+                将文件拖到此处,或<em>点击上传</em>
+              </div>
+              <template #tip>
+                <div class="el-upload__tip text-center">
+                  <span
+                    >仅允许导入xls、xlsx格式文件。文件大小限制为&lt;50Mb</span
+                  >
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    style="font-size: 12px; vertical-align: baseline"
+                    @click="importTemplate"
+                    >下载模板</el-link
+                  >
+                </div>
+              </template>
+            </el-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+
+<script setup>
+import { exportHousingFundTemplate } from "@/api/business/production/housingFundConfirm";
+import { getToken, getTenant } from "@/utils/auth";
+import useUserStore from "@/store/modules/user";
+import { deepClone } from "@/utils";
+
+const { proxy } = getCurrentInstance();
+/** 父组件传参 */
+const props = defineProps({
+  getList: {
+    type: Function,
+    default: () => {},
+  },
+});
+const { getList } = toRefs(props);
+/** 字典数组区 */
+/** 表单抽屉 页变量 */
+const fileList = ref([]);
+const visible = ref(false);
+const currentMonth = ref(proxy.moment().subtract("month").format("YYYY-MM-01"));
+const year = ref(proxy.moment().format("YYYY"));
+const month = ref(proxy.moment().format("MM"));
+
+const addType = ref(1);
+const webHost = import.meta.env.VITE_APP_BASE_API;
+
+const setHeaders = {
+  Authorization: getToken(),
+};
+
+const data = reactive({
+  form: {
+    year: proxy.moment().format("YYYY"),
+    month: proxy.moment().format("MM"),
+  },
+  followData: {},
+});
+const addComRef = ref(null);
+
+/*** 客户导入参数 */
+const upload = reactive({
+  // 是否禁用上传
+  isUploading: false,
+  // 设置上传的请求头部
+  headers: { Authorization: "Bearer " + getToken(), tenantId: getTenant() },
+  // 上传的地址
+  url: `/ezhizao-yzbh-production/business/housingFundConfirm/importData`,
+});
+
+/** 查询对象 */
+const queryParams = ref({});
+
+const followQuery = ref({});
+const { form, rules, followData } = toRefs(data);
+
+/***********************  表单页方法 ****************************/
+
+/** 抽屉打开 */
+function open() {
+  // reset();
+  visible.value = true;
+}
+
+//下载模板
+const importTemplate = () => {
+  exportHousingFundTemplate();
+};
+
+function reset() {
+  // console.log(addComRef.value)
+  if (addComRef.value != null) addComRef.value.reset();
+}
+
+function cancel() {
+  visible.value = false;
+}
+
+function submitForm() {
+  submitFileForm();
+}
+
+function handleBeforeUpload(file) {
+  console.log(file);
+  if (
+    file.type !==
+      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
+    file.type !== "application/vnd.ms-excel"
+  ) {
+    proxy.$modal.msgError("请选择excel文件");
+    return false;
+  }
+  return true;
+}
+
+/**文件上传中处理 */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+/** 文件上传成功处理 */
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  proxy.$alert(
+    "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+      response.msg +
+      "</div>",
+    "导入结果",
+    { dangerouslyUseHTMLString: true }
+  );
+  getList.value();
+};
+/** 提交上传文件 */
+function submitFileForm() {
+  proxy.$refs["uploadRef"].submit();
+}
+
+function monthChangeHandler(arg) {
+  year.value = proxy.moment(arg).format("YYYY");
+  month.value = proxy.moment(arg).format("MM");
+}
+
+function disabledDateHandler(date) {
+  if (date <= proxy.moment().subtract("month")) {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+// 暴露给父组件的方法
+defineExpose({
+  open,
+});
+</script>
+
+<style></style>

+ 260 - 62
src/views/business/housingFund/confirm/index.vue

@@ -8,49 +8,123 @@
         </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:housingFundConfirm:export']"
+            >
+              导出</el-dropdown-item
+            >
+            <el-dropdown-item
+              icon="Upload"
+              @click="handleImport"
+              v-hasPermi="['business:housingFundConfirm: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="78px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="78px"
+    >
       <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="月份:">
-        <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" style="width: 130px"
-          @change="handleQuery" :clearable="false">
-          <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.month"
+          size="small"
+          placeholder="月份"
+          style="width: 130px"
+          @change="handleQuery"
+          :clearable="false"
+        >
+          <el-option
+            v-for="item in selectMonths"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="状态:">
-        <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-          :clearable="true" style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          prop="status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="operation" @click="moreSearch = true">更多</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="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100" />
-      <el-table-column label="纳税性质" width="120" align="center" prop="taxType" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        prop="companyName"
+        min-width="250"
+      />
+      <el-table-column
+        label="来源"
+        align="center"
+        prop="fromCompanyName"
+        min-width="100"
+      />
+      <el-table-column
+        label="纳税性质"
+        width="120"
+        align="center"
+        prop="taxType"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="200"
+      />
       <el-table-column label="当前期间" min-width="90" align="center">
         <template #default="scope">
           <!-- {{ scope.row.currentDate != null && scope.row.currentDate > scope.row.checkoutDate ? scope.row.currentDate :
@@ -60,84 +134,185 @@
       </el-table-column>
       <el-table-column align="center">
         <template #header>
-          <div style="
+          <div
+            style="
               display: flex;
               flex-direction: row;
               justify-content: space-between;
-            ">
+            "
+          >
             <div style="display: flex; flex-direction: row">
-              <el-button link type="primary" size="small" icon="ArrowLeft" @click="prevYear" />
+              <el-button
+                link
+                type="primary"
+                size="small"
+                icon="ArrowLeft"
+                @click="prevYear"
+              />
               <el-link style="margin: 0 40px" :underline="false">{{
                 queryParams.year
               }}</el-link>
-              <el-button link type="primary" icon="ArrowRight" size="small" @click="nextYear" />
+              <el-button
+                link
+                type="primary"
+                icon="ArrowRight"
+                size="small"
+                @click="nextYear"
+              />
             </div>
             <div style="display: flex; flex-direction: row; margin-right: 20px">
-              <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
+                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="
                     display: inline-block;
                     margin-left: 10px;
                     line-height: 36px;
-                  ">
+                  "
+                >
                   {{ item.label }}
                 </div>
               </div>
             </div>
           </div>
         </template>
-        <el-table-column v-for="item in selectMonths" :key="item.value" min-width="50" :label="item.label" align="center">
+        <el-table-column
+          v-for="item in selectMonths"
+          :key="item.value"
+          min-width="50"
+          :label="item.label"
+          align="center"
+        >
           <template #default="scope">
-            <el-button size="small" :style="monthStatusStyle(scope.row, item.value)" circle
-              @click="openDetail(scope.row, item)" style="width: 12px; height: 12px" />
+            <el-button
+              size="small"
+              :style="monthStatusStyle(scope.row, item.value)"
+              circle
+              @click="openDetail(scope.row, item)"
+              style="width: 12px; height: 12px"
+            />
           </template>
         </el-table-column>
       </el-table-column>
-      <el-table-column label="工单执行人" align="center" prop="serviceName" width="100">
+      <el-table-column
+        label="执行人"
+        align="center"
+        prop="serviceName"
+        width="100"
+      >
       </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"
+    />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
+    <import-excel-dialog ref="importExcelDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable>
-      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      append-to-body
+      size="small"
+      draggable
+    >
+      <el-form
+        :model="queryParams"
+        ref="queryRef"
+        size="small"
+        label-width="100"
+      >
         <el-row :gutter="20">
           <el-col :span="12">
             <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="taxType">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <el-option
+                  v-for="item in taxTypes"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
-            <el-form-item v-if="tenant.versionId === '4'" label="来源:" prop="fromCompanyName">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+            <el-form-item
+              v-if="tenant.versionId === '4'"
+              label="来源:"
+              prop="fromCompanyName"
+            >
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                type="text"
+                placeholder="客户来源"
+                :clearable="true"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="月份:">
-              <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="false">
-                <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.month"
+                size="small"
+                placeholder="月份"
+                :clearable="false"
+              >
+                <el-option
+                  v-for="item in selectMonths"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
             <el-form-item label="状态:">
-              <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-                :clearable="true" @clear="clearStatus">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.status"
+                prop="status"
+                size="small"
+                type="text"
+                placeholder="状态"
+                :clearable="true"
+                @clear="clearStatus"
+              >
+                <el-option
+                  v-for="item in selectStatus"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -145,8 +320,16 @@
       </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>
@@ -155,17 +338,22 @@
 
 <script setup>
 import useUserStore from "@/store/modules/user";
-import { listHousingFundConfirm } from "@/api/business/production/housingFundConfirm";
+import {
+  listHousingFundConfirm,
+  exportHoisngFundConfirm,
+} from "@/api/business/production/housingFundConfirm";
 import { listCompany } from "@/api/business/crm/company";
 import { reactive, ref, toRefs } from "vue";
 import { taxTypes } from "@/utils/default";
+import importExcelDialog from "./importExcelDialog.vue";
 import formDialog from "./form";
 import viewDialog from "./view";
 // import workorderForm from "./form"
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const tenant = useUserStore().tenant;
+const importExcelDialogRef = ref(null);
 const list = ref([]);
 const loading = ref(true);
 const oneself = ref(false);
@@ -235,6 +423,11 @@ const data = reactive({
       value: 0,
       color: "#fff",
     },
+    {
+      label: "待确认",
+      value: 1,
+      color: "#ffb836",
+    },
     {
       label: "待审核",
       value: 2,
@@ -310,6 +503,11 @@ function handleOneself() {
   getList();
 }
 
+//导入按钮操作
+function handleImport() {
+  importExcelDialogRef.value.open();
+}
+
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;
@@ -367,13 +565,13 @@ function openDetail(row, month) {
 
 function directDialog(detail) {
   // 判断是否有权限
-  if (detail.status === 0 || detail.status == null) {
+  if (detail.status === 1 || detail.status === 0 || detail.status == null) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else {
       proxy.$modal.msgError("没有权限");
     }
-  } else if (detail.status === 1 || detail.status === 4) {
+  } else if (detail.status === 4) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else if (viewable() || verifiable()) {
@@ -413,7 +611,7 @@ function verifiable() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  exportHoisngFundConfirm(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {

+ 233 - 70
src/views/business/housingFund/declare/index.vue

@@ -8,8 +8,13 @@
         </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-menu>
@@ -17,61 +22,133 @@
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
-      label-width="78px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="78px"
+    >
       <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 label="所属月:">
-        <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月" :clearable="false" value-format="YYYY-MM-01"
-          @change="currentMonthChange" :disabled-date="disabledDateHandler" />
+        <el-date-picker
+          v-model="currentMonth"
+          type="month"
+          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="状态"
-          :clearable="true" style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          prop="status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="operation" @click="moreSearch = true">更多</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="客户名称" min-width="250" align="center" prop="companyName" />
-      <el-table-column label="来源" min-width="100" align="center" prop="fromCompanyName" />
-      <el-table-column label="纳税性质" width="100" align="center" prop="taxType" />
+      <el-table-column
+        label="客户名称"
+        min-width="250"
+        align="center"
+        prop="companyName"
+      />
+      <el-table-column
+        label="来源"
+        min-width="100"
+        align="center"
+        prop="fromCompanyName"
+      />
+      <el-table-column
+        label="纳税性质"
+        width="100"
+        align="center"
+        prop="taxType"
+      />
       <el-table-column label="人员信息" width="100" align="center" prop="">
         <template #default="scope">
-          <el-button v-if="scope.row.detail != null" link type="primary" size="small"
-            @click="showMember(scope.row)">查看</el-button>
+          <el-button
+            v-if="scope.row.detail != null"
+            link
+            type="primary"
+            size="small"
+            @click="showMember(scope.row)"
+            >查看</el-button
+          >
         </template>
       </el-table-column>
       <el-table-column label="申报填写" width="100" align="center" prop="">
         <template #default="scope">
-          <el-button link type="primary" size="small" v-hasPermi="['business:housingFundConfirm:verify']"
-            @click="fillIn(scope.row)">{{
+          <el-button
+            link
+            type="primary"
+            size="small"
+            v-hasPermi="['business:housingFundConfirm:verify']"
+            @click="fillIn(scope.row)"
+            >{{
               scope.row.detail == null
-              ? "填写"
-              : scope.row.detail.status === 1
+                ? "填写"
+                : scope.row.detail.status === 1
                 ? "进行中"
                 : "已填写"
-            }}</el-button>
+            }}</el-button
+          >
         </template>
       </el-table-column>
       <el-table-column label="申报附件" width="100" align="center" prop="">
         <template #default="scope">
-          <el-button size="small" type="primary" link :disabled="scope.row.detail == null || scope.row.detail.status <= 1"
-            @click="showFiles(scope.row)">查看文件</el-button>
+          <el-button
+            size="small"
+            type="primary"
+            link
+            :disabled="scope.row.detail == null || scope.row.detail.status <= 1"
+            @click="showFiles(scope.row)"
+            >查看文件</el-button
+          >
         </template>
       </el-table-column>
       <el-table-column label="状态" width="110" align="center" prop="">
@@ -80,28 +157,36 @@
             {{ 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',
-                    margin: 'auto',
-                    borderRadius: '50%',
-                    border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                  }" />
-                  <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="
                       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;
@@ -111,55 +196,131 @@
                     height: 14px;
                     background-color: #ccc;
                     border-radius: 50%;
-                  ">?</span>
+                  "
+                  >?</span
+                >
               </template>
             </el-popover>
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="执行人" width="80" align="center" prop="" />
+      <el-table-column
+        label="执行人"
+        width="80"
+        align="center"
+        prop="serviceName"
+      />
       <el-table-column label="操作" width="80" align="center" prop="">
         <template #default="scope">
-          <el-button size="small" type="primary" link :disabled="scope.row.detail == null || scope.row.detail.status !== 3
-            " v-hasPermi="['business:housingFundConfirm:verify']" @click="turnBack(scope.row.detail)">退回</el-button>
+          <el-button
+            size="small"
+            type="primary"
+            link
+            :disabled="
+              scope.row.detail == null || scope.row.detail.status !== 3
+            "
+            v-hasPermi="['business:housingFundConfirm:verify']"
+            @click="turnBack(scope.row.detail)"
+            >退回</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"
+    />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
     <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>
-      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      append-to-body
+      size="small"
+      draggable
+    >
+      <el-form
+        :model="queryParams"
+        ref="queryRef"
+        size="small"
+        label-width="100"
+      >
         <el-row :gutter="20">
           <el-col :span="12">
             <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="taxType">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <el-option
+                  v-for="item in taxTypes"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
-            <el-form-item v-if="tenant.versionId === '4'" label="来源:" prop="fromCompanyName">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+            <el-form-item
+              v-if="tenant.versionId === '4'"
+              label="来源:"
+              prop="fromCompanyName"
+            >
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                type="text"
+                placeholder="客户来源"
+                :clearable="true"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="所属月:">
-              <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月" :clearable="false"
-                value-format="YYYY-MM-01" @change="currentMonthChange" :disabled-date="disabledDateHandler" />
+              <el-date-picker
+                v-model="currentMonth"
+                type="month"
+                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="状态"
-                :clearable="true" @clear="clearStatus">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.status"
+                prop="status"
+                size="small"
+                type="text"
+                placeholder="状态"
+                :clearable="true"
+                @clear="clearStatus"
+              >
+                <el-option
+                  v-for="item in selectStatus"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -167,8 +328,16 @@
       </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>
@@ -180,6 +349,7 @@ import useUserStore from "@/store/modules/user";
 import {
   listHousingFundDeclare,
   turnBackDetail,
+  exportHoisngFundDeclare,
 } from "@/api/business/production/housingFundDeclare";
 import { uploadFile } from "@/api/tool/file";
 import { listCompany } from "@/api/business/crm/company";
@@ -192,7 +362,7 @@ import FileListDialog from "../fileListDialog.vue";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const tenant = useUserStore().tenant;
 const orderList = ref([]);
 const loading = ref(true);
 const ids = ref([]);
@@ -319,14 +489,7 @@ function handleSelectionChange(selection) {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportSocialSecurityDeclare(queryParams.value);
+  exportHoisngFundDeclare(queryParams.value);
 }
 
 function openFollowFile(arg) {

+ 1 - 1
src/views/business/housingFund/memberDialog.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-dialog v-model="visible" width="680px" append-to-body draggable>
+  <el-dialog v-model="visible" width="900px" append-to-body draggable>
     <template #header>
       <div class="dialog-title-container">
         <span class="title-label" style="color: #fff">

+ 6 - 0
src/views/business/production/IndividualIncomeTaxIs/MemberDialog.vue

@@ -22,6 +22,12 @@
               show-summary
               :summary-method="getSummaries"
             >
+              <el-table-column
+                type="index"
+                label="序号"
+                width="50"
+                align="center"
+              />
               <el-table-column label="员工姓名" width="80" align="center">
                 <template #default="scope">
                   <span>{{ scope.row.employeeName }}</span>

+ 349 - 315
src/views/business/production/IndividualIncomeTaxIs/index.vue

@@ -1,335 +1,364 @@
 <template>
   <div class="page-container list-container">
-    <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="78px"
-    >
-      <el-form-item label="客户名称:">
-        <el-input
-          v-model="queryParams.companyName"
-          type="text"
-          placeholder="请输入客户名称"
-          :clearable="true"
-          style="width: 220px"
-        />
-      </el-form-item>
-      <el-form-item label="个税所属期:" prop="year">
-        <el-date-picker
-          v-model="currentMonth"
-          type="month"
-          format="YYYY年MM月"
-          style="width: 120px"
-          :clearable="false"
-          value-format="YYYY-MM-01"
-          :disabled-date="disabledDateHandler"
-          @change="monthChangeHandler"
-        />
-      </el-form-item>
-      <el-form-item label="个税状态:">
-        <el-select
-          v-model="queryParams.status"
-          type="text"
-          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 v-if="tenant.versionId !== '4'" label="是否自己负责:">
-        <el-switch v-model="oneself" @change="handleOneself" />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="Operation" @click="moreSearch = true">更多</el-button>
-        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+    <!-- 功能按钮区 -->
+    <div class="list-btns-container">
+      <el-dropdown>
+        <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:tax:export']"
+            >
+              导出</el-dropdown-item
+            >
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
+    </div>
 
-    <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="detailList"
-      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="fromCompanyName"
-        width="180"
-      />
-      <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">
-        <template #default="scope">
-          <el-button
-            v-show="scope.row.detail != null"
-            link
-            type="primary"
-            size="small"
-            @click="showMember(scope.row)"
-            v-hasPermi="['business:tax:wageList']"
-            >查看</el-button
+    <div class="page-container list-container">
+      <!-- 搜索区 -->
+      <el-form
+        class="list-search-container"
+        size="small"
+        :model="queryParams"
+        ref="queryRef"
+        :inline="true"
+        label-width="78px"
+      >
+        <el-form-item label="客户名称:">
+          <el-input
+            v-model="queryParams.companyName"
+            type="text"
+            placeholder="请输入客户名称"
+            :clearable="true"
+            style="width: 220px"
+          />
+        </el-form-item>
+        <el-form-item label="个税所属期:" prop="year">
+          <el-date-picker
+            v-model="currentMonth"
+            type="month"
+            format="YYYY年MM月"
+            style="width: 120px"
+            :clearable="false"
+            value-format="YYYY-MM-01"
+            :disabled-date="disabledDateHandler"
+            @change="monthChangeHandler"
+          />
+        </el-form-item>
+        <el-form-item label="个税状态:">
+          <el-select
+            v-model="queryParams.status"
+            type="text"
+            placeholder="状态"
+            :clearable="true"
+            style="width: 130px"
           >
-        </template>
-      </el-table-column>
-      <el-table-column label="个税填写" align="center" prop="evidenceFile">
-        <template #default="scope">
-          <el-button
-            type="primary"
-            link
-            size="small"
-            v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']"
-            @click="fillIn(scope.row)"
-            >{{
-              scope.row.detail == null
-                ? "填写"
-                : scope.row.detail.status === 1
-                ? "进行中"
-                : "已填写"
-            }}</el-button
+            <el-option
+              v-for="item in selectStatus"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
+          <el-switch v-model="oneself" @change="handleOneself" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="Search" @click="handleQuery"
+            >搜索</el-button
           >
-        </template>
-      </el-table-column>
-      <el-table-column label="个税附件" align="center" prop="content">
-        <template #default="scope">
-          <el-button
-            type="primary"
-            link
-            size="small"
-            v-hasPermi="['business:individualIncomeTaxDetail:query']"
-            :disabled="
-              scope.row.detail == null || scope.row.detail.evidenceFile === ''
-            "
-            @click="showFiles(scope.row)"
-            >查看文件</el-button
+          <el-button icon="Operation" @click="moreSearch = true"
+            >更多</el-button
           >
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" 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',
-                      margin: 'auto',
-                      borderRadius: '50%',
-                      border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                    }"
-                  />
+          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+
+      <!-- 列表区 -->
+      <el-table
+        v-loading="loading"
+        :data="detailList"
+        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="fromCompanyName"
+          width="180"
+        />
+        <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">
+          <template #default="scope">
+            <el-button
+              v-show="scope.row.detail != null"
+              link
+              type="primary"
+              size="small"
+              @click="showMember(scope.row)"
+              v-hasPermi="['business:tax:wageList']"
+              >查看</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="个税填写" align="center" prop="evidenceFile">
+          <template #default="scope">
+            <el-button
+              type="primary"
+              link
+              size="small"
+              v-hasPermi="['business:individualIncomeTaxDetail: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
+              type="primary"
+              link
+              size="small"
+              v-hasPermi="['business:individualIncomeTaxDetail:query']"
+              :disabled="
+                scope.row.detail == null || scope.row.detail.evidenceFile === ''
+              "
+              @click="showFiles(scope.row)"
+              >查看文件</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" align="center" 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: inline-block;
-                      margin-left: 10px;
-                      line-height: 36px;
-                      font-size: 10px;
+                      display: flex;
+                      flex-direction: row;
+                      margin-right: 10px;
                     "
                   >
-                    {{ item.label }}
+                    <div
+                      :style="{
+                        backgroundColor: item.color,
+                        width: '14px',
+                        height: '14px',
+                        margin: 'auto',
+                        borderRadius: '50%',
+                        border:
+                          item.color === '#fff' ? '1px solid #ddd' : 'none',
+                      }"
+                    />
+                    <div
+                      style="
+                        display: inline-block;
+                        margin-left: 10px;
+                        line-height: 36px;
+                        font-size: 10px;
+                      "
+                    >
+                      {{ item.label }}
+                    </div>
                   </div>
                 </div>
-              </div>
-              <template #reference>
-                <span
-                  style="
-                    color: #fff;
-                    font-size: 12px;
-                    text-align: center;
-                    display: inline-block;
-                    line-height: 14px;
-                    width: 14px;
-                    height: 14px;
-                    background-color: #ccc;
-                    border-radius: 50%;
-                  "
-                  >?</span
-                >
-              </template>
-            </el-popover>
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column label="执行人" align="center" prop="serviceName" />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
-        <template #default="scope">
-          <el-button
-            size="small"
-            type="text"
-            :disabled="
-              scope.row.detail == null || scope.row.detail.status !== 3
-            "
-            @click="turnBack(scope.row.detail)"
-            v-hasPermi="[
-              'business:individualIncomeTaxDetail:deductionTurnBack',
-            ]"
-            >退回</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+                <template #reference>
+                  <span
+                    style="
+                      color: #fff;
+                      font-size: 12px;
+                      text-align: center;
+                      display: inline-block;
+                      line-height: 14px;
+                      width: 14px;
+                      height: 14px;
+                      background-color: #ccc;
+                      border-radius: 50%;
+                    "
+                    >?</span
+                  >
+                </template>
+              </el-popover>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="执行人" align="center" prop="serviceName" />
+        <el-table-column
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+        >
+          <template #default="scope">
+            <el-button
+              size="small"
+              type="text"
+              :disabled="
+                scope.row.detail == null || scope.row.detail.status !== 3
+              "
+              @click="turnBack(scope.row.detail)"
+              v-hasPermi="[
+                'business:individualIncomeTaxDetail:deductionTurnBack',
+              ]"
+              >退回</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"
+      />
 
-    <!-- 表单 -->
-    <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
-    <FormDialog ref="fromDialog" :get-list="getList"></FormDialog>
+      <!-- 表单 -->
+      <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
+      <FormDialog ref="fromDialog" :get-list="getList"></FormDialog>
 
-    <!-- 更多搜索弹窗 -->
-    <el-dialog
-      title="更多搜索"
-      v-model="moreSearch"
-      width="620px"
-      append-to-body
-      size="small"
-      draggable
-    >
-      <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-dialog
+        title="更多搜索"
+        v-model="moreSearch"
+        width="620px"
+        append-to-body
+        size="small"
+        draggable
+      >
+        <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-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-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-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 v-if="tenant.versionId === '4'" label="来源:">
-              <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-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-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>
   </div>
 </template>
 
@@ -338,6 +367,7 @@ import {
   listDetail,
   delDetail,
   updateIndividualIncomeTaxDetail,
+  exportIndividualIncome,
 } from "@/api/business/production/detail";
 import { selectMonths, selectStatus, taxTypes } from "@/utils/default";
 import MemberDialog from "./MemberDialog.vue";
@@ -423,6 +453,10 @@ function getStatusColor(status) {
   const index = selectStatus.findIndex((v) => v.value === status);
   return index >= 0 ? selectStatus[index].color : "#fff";
 }
+/** 导出按钮操作 */
+function handleExport() {
+  exportIndividualIncome(queryParams.value);
+}
 
 /** 填写按钮操作 */
 function fillIn(row) {

+ 6 - 0
src/views/business/production/IndividualIncomeTaxIsZero/MemberDialog.vue

@@ -22,6 +22,12 @@
               show-summary
               :summary-method="getSummaries"
             >
+              <el-table-column
+                type="index"
+                label="序号"
+                width="50"
+                align="center"
+              />
               <el-table-column label="员工姓名" width="80" align="center">
                 <template #default="scope">
                   <span>{{ scope.row.employeeName }}</span>

+ 355 - 349
src/views/business/production/IndividualIncomeTaxIsZero/index.vue

@@ -1,364 +1,373 @@
 <template>
-  <!-- 功能按钮区 -->
-  <!-- <div class="list-btns-container">
-    <el-dropdown>
-      <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:archive:order:export']"
+  <div class="page-container list-container">
+    <!-- 功能按钮区 -->
+    <div class="list-btns-container">
+      <el-dropdown>
+        <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:tax:export']"
+            >
+              导出</el-dropdown-item
+            >
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
+    </div>
+
+    <div class="page-container list-container">
+      <!-- 搜索区 -->
+      <el-form
+        class="list-search-container"
+        size="small"
+        :model="queryParams"
+        ref="queryRef"
+        :inline="true"
+        label-width="80px"
+      >
+        <el-form-item label="客户名称:">
+          <el-input
+            v-model="queryParams.companyName"
+            placeholder="请输入客户名称"
+            :clearable="true"
+            style="width: 220px"
+          />
+        </el-form-item>
+        <el-form-item label="个税所属期:" prop="year">
+          <el-date-picker
+            v-model="currentMonth"
+            type="month"
+            format="YYYY年MM月"
+            style="width: 120px"
+            value-format="YYYY-MM-01"
+            :disabled-date="disabledDateHandler"
+            @change="monthChangeHandler"
+            :clearable="false"
+          />
+        </el-form-item>
+        <el-form-item label="个税状态:">
+          <el-select
+            v-model="queryParams.status"
+            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 v-if="tenant.versionId !== '4'" label="是否自己负责:">
+          <el-switch v-model="oneself" @change="handleOneself" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="Search" @click="handleQuery"
+            >搜索</el-button
           >
-            导出</el-dropdown-item
+          <el-button icon="operation" @click="moreSearch = true"
+            >更多</el-button
           >
-        </el-dropdown-menu>
-      </template>
-    </el-dropdown>
-  </div> -->
+          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
 
-  <div class="page-container list-container">
-    <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="80px"
-    >
-      <el-form-item label="客户名称:">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          :clearable="true"
-          style="width: 220px"
+      <!-- 列表区 -->
+      <el-table
+        v-loading="loading"
+        :data="detailList"
+        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="fromCompanyName"
+          min-width="100"
         />
-      </el-form-item>
-      <el-form-item label="个税所属期:" prop="year">
-        <el-date-picker
-          v-model="currentMonth"
-          type="month"
-          format="YYYY年MM月"
-          style="width: 120px"
-          value-format="YYYY-MM-01"
-          :disabled-date="disabledDateHandler"
-          @change="monthChangeHandler"
-          :clearable="false"
+        <el-table-column
+          label="税号"
+          align="center"
+          prop="socialCreditCode"
+          min-width="180"
         />
-      </el-form-item>
-      <el-form-item label="个税状态:">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="状态"
-          :clearable="true"
-          style="width: 130px"
+        <el-table-column
+          label="纳税性质"
+          align="center"
+          width="100"
+          prop="taxType"
+        />
+        <el-table-column label="人员信息" min-width="60" align="center">
+          <template #default="scope">
+            <el-button
+              v-show="scope.row.detail != null"
+              link
+              type="primary"
+              size="small"
+              @click="showMember(scope.row)"
+              v-hasPermi="['business:tax:wageList']"
+              >查看</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="个税填写"
+          align="center"
+          min-width="80"
+          prop="evidenceFile"
         >
-          <el-option
-            v-for="item in selectStatus"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
-      </el-form-item>
-
-      <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
-        <el-switch v-model="oneself" @change="handleOneself" />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
+          <template #default="scope">
+            <el-button
+              link
+              type="primary"
+              size="small"
+              @click="fillIn(scope.row)"
+              v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']"
+              >{{
+                scope.row.detail == null
+                  ? "填写"
+                  : scope.row.detail.status === 1
+                  ? "进行中"
+                  : "已填写"
+              }}</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="个税附件"
+          align="center"
+          min-width="90"
+          prop="content"
         >
-        <el-button icon="operation" @click="moreSearch = true">更多</el-button>
-        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="detailList"
-      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="fromCompanyName"
-        min-width="100"
-      />
-      <el-table-column
-        label="税号"
-        align="center"
-        prop="socialCreditCode"
-        min-width="180"
-      />
-      <el-table-column
-        label="纳税性质"
-        align="center"
-        width="100"
-        prop="taxType"
-      />
-      <el-table-column label="人员信息" min-width="60" align="center">
-        <template #default="scope">
-          <el-button
-            v-show="scope.row.detail != null"
-            link
-            type="primary"
-            size="small"
-            @click="showMember(scope.row)"
-            v-hasPermi="['business:tax:wageList']"
-            >查看</el-button
-          >
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="个税填写"
-        align="center"
-        min-width="80"
-        prop="evidenceFile"
-      >
-        <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            @click="fillIn(scope.row)"
-            v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']"
-            >{{
-              scope.row.detail == null
-                ? "填写"
-                : scope.row.detail.status === 1
-                ? "进行中"
-                : "已填写"
-            }}</el-button
-          >
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="个税附件"
-        align="center"
-        min-width="90"
-        prop="content"
-      >
-        <template #default="scope">
-          <el-button
-            size="small"
-            link
-            type="primary"
-            v-hasPermi="['business:individualIncomeTaxDetail:query']"
-            :disabled="
-              scope.row.detail == null || scope.row.detail.evidenceFile === ''
-            "
-            @click="showFiles(scope.row)"
-            >查看文件</el-button
-          >
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" min-width="80" prop="">
-        <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',
-                      margin: 'auto',
-                      borderRadius: '50%',
-                      border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                    }"
-                  />
+          <template #default="scope">
+            <el-button
+              size="small"
+              link
+              type="primary"
+              v-hasPermi="['business:individualIncomeTaxDetail:query']"
+              :disabled="
+                scope.row.detail == null || scope.row.detail.evidenceFile === ''
+              "
+              @click="showFiles(scope.row)"
+              >查看文件</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" align="center" min-width="80" prop="">
+          <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: inline-block;
-                      margin-left: 10px;
-                      line-height: 36px;
-                      font-size: 10px;
+                      display: flex;
+                      flex-direction: row;
+                      margin-right: 10px;
                     "
                   >
-                    {{ item.label }}
+                    <div
+                      :style="{
+                        backgroundColor: item.color,
+                        width: '14px',
+                        height: '14px',
+                        margin: 'auto',
+                        borderRadius: '50%',
+                        border:
+                          item.color === '#fff' ? '1px solid #ddd' : 'none',
+                      }"
+                    />
+                    <div
+                      style="
+                        display: inline-block;
+                        margin-left: 10px;
+                        line-height: 36px;
+                        font-size: 10px;
+                      "
+                    >
+                      {{ item.label }}
+                    </div>
                   </div>
                 </div>
-              </div>
-              <template #reference>
-                <span
-                  style="
-                    color: #fff;
-                    font-size: 12px;
-                    text-align: center;
-                    display: inline-block;
-                    line-height: 14px;
-                    width: 14px;
-                    height: 14px;
-                    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"
-        min-width="80"
-        fixed="right"
-        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
-            "
-            @click="turnBack(scope.row)"
-            v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']"
-            >退回</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+                <template #reference>
+                  <span
+                    style="
+                      color: #fff;
+                      font-size: 12px;
+                      text-align: center;
+                      display: inline-block;
+                      line-height: 14px;
+                      width: 14px;
+                      height: 14px;
+                      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"
+          min-width="80"
+          fixed="right"
+          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
+              "
+              @click="turnBack(scope.row)"
+              v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']"
+              >退回</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"
+      />
 
-    <!-- 表单 -->
-    <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
-    <FormDialog ref="fromDialog" :get-list="getList"></FormDialog>
-    <!-- 更多搜索弹窗 -->
-    <el-dialog
-      title="更多搜索"
-      v-model="moreSearch"
-      width="620px"
-      size="small"
-      append-to-body
-      draggable
-    >
-      <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"
+      <!-- 表单 -->
+      <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
+      <FormDialog ref="fromDialog" :get-list="getList"></FormDialog>
+      <!-- 更多搜索弹窗 -->
+      <el-dialog
+        title="更多搜索"
+        v-model="moreSearch"
+        width="620px"
+        size="small"
+        append-to-body
+        draggable
+      >
+        <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"
+                  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"
+                  placeholder="请输入客户名称"
+                  :clearable="true"
                 />
-              </el-select>
-            </el-form-item>
-            <el-form-item label="个税状态:">
-              <el-select
-                size="small"
-                v-model="queryParams.status"
-                placeholder="状态"
-                :clearable="true"
-              >
-                <el-option
-                  v-for="item in selectStatus"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+              </el-form-item>
+              <el-form-item label="来源:" v-if="tenant.versionId === 4">
+                <el-input
+                  v-model="queryParams.fromCompanyName"
+                  size="small"
+                  placeholder="请输入客户来源"
+                  :clearable="true"
                 />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="关键字:">
-              <el-input
-                size="small"
-                v-model="queryParams.companyName"
-                placeholder="请输入客户名称"
-                :clearable="true"
-              />
-            </el-form-item>
-            <el-form-item label="来源:" v-if="tenant.versionId === 4">
-              <el-input
-                v-model="queryParams.fromCompanyName"
-                size="small"
-                placeholder="请输入客户来源"
-                :clearable="true"
-              />
-            </el-form-item>
-            <el-form-item label="税号:">
-              <el-input
-                size="small"
-                v-model="queryParams.socialCreditCode"
-                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 @click="moreSearch = false" icon="close" size="small"
-            >取 消</el-button
-          >
-        </div>
-      </template>
-    </el-dialog>
+              </el-form-item>
+              <el-form-item label="税号:">
+                <el-input
+                  size="small"
+                  v-model="queryParams.socialCreditCode"
+                  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 @click="moreSearch = false" icon="close" size="small"
+              >取 消</el-button
+            >
+          </div>
+        </template>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
@@ -367,9 +376,9 @@ import {
   listDetail,
   delDetail,
   updateIndividualIncomeTaxDetail,
-  exportDetail,
+  exportIndividualIncome,
 } from "@/api/business/production/detailIsZero";
-import { selectMonths, taxTypes } from "@/utils/default";
+import { taxTypes } from "@/utils/default";
 import useUserStore from "@/store/modules/user";
 import MemberDialog from "./MemberDialog.vue";
 import FormDialog from "./FormDialog";
@@ -430,11 +439,10 @@ const queryParams = ref({
 
 /** 导出按钮操作 */
 function handleExport() {
-  exportDetail(queryParams.value);
+  exportIndividualIncome(queryParams.value);
 }
 
 function showMember(row) {
-  console.log(row);
   proxy.$refs.memberDialog.open(row);
 }
 
@@ -502,12 +510,10 @@ function handleOneself() {
 
 /** 打开弹窗 */
 function openByPermission(detailItem, row, item) {
-  console.log(detailItem);
   if (detailItem == null) {
     proxy.$refs.fromDialog.open(null, row, item);
   } else {
     proxy.$refs.fromDialog.open(detailItem, row, item);
-    console.log(detailItem.id);
   }
 }
 

+ 28 - 2
src/views/business/production/financialReportTax/index.vue

@@ -1,7 +1,24 @@
 <template>
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
-    <div class="list-btns-container"></div>
+    <div class="list-btns-container">
+      <el-dropdown>
+        <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:tax:export']"
+            >
+              导出</el-dropdown-item
+            >
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
+    </div>
     <!-- 搜索区 -->
     <el-form
       class="list-search-container"
@@ -360,7 +377,11 @@ import {
   confirmDefault,
 } from "@/utils/default";
 import useUserStore from "@/store/modules/user";
-import { listTax, deductionTurnBack } from "@/api/business/production/tax";
+import {
+  listTax,
+  deductionTurnBack,
+  exportFinalTax,
+} from "@/api/business/production/tax";
 import FormDialog from "./FormDialog.vue";
 
 const { proxy } = getCurrentInstance();
@@ -405,6 +426,11 @@ function getList() {
   });
 }
 
+/** 导出按钮操作 */
+function handleExport() {
+  exportFinalTax(queryParams.value);
+}
+
 /** 是否为自己负责 */
 function handleOneself() {
   if (oneself.value) {

+ 24 - 2
src/views/business/production/financialReportTaxIsZero/index.vue

@@ -1,7 +1,24 @@
 <template>
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
-    <div class="list-btns-container"></div>
+    <div class="list-btns-container">
+      <el-dropdown>
+        <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:tax:export']"
+            >
+              导出</el-dropdown-item
+            >
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
+    </div>
     <!-- 搜索区 -->
     <el-form
       class="list-search-container"
@@ -336,6 +353,7 @@ import {
 import {
   listTax,
   deductionTurnBack,
+  exportFinalTax,
 } from "@/api/business/production/taxIsZero";
 import useUserStore from "@/store/modules/user";
 import FormDialog from "./FormDialog.vue";
@@ -381,7 +399,6 @@ function getList() {
     taxList.value = response.rows;
     total.value = response.total;
     loading.value = false;
-    console.log(response);
   });
 }
 
@@ -402,6 +419,11 @@ function handleOneself() {
   getList();
 }
 
+/** 导出按钮操作 */
+function handleExport() {
+  exportFinalTax(queryParams.value);
+}
+
 /** 重置按钮操作 */
 function resetQuery() {
   proxy.resetForm("queryRef");

+ 239 - 61
src/views/business/production/keepAccount/index.vue

@@ -8,29 +8,69 @@
         </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="78px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="78px"
+    >
       <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="月份:">
-        <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="false" style="width: 130px"
-          @change="handleQuery">
-          <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.month"
+          size="small"
+          placeholder="月份"
+          :clearable="false"
+          style="width: 130px"
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in selectMonths"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="状态:">
-        <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-          :clearable="true" style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          prop="status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
 
@@ -38,20 +78,48 @@
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="operation" @click="moreSearch = true">更多</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="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100" />
-      <el-table-column label="纳税性质" min-width="100" align="center" prop="taxType" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        prop="companyName"
+        min-width="250"
+      />
+      <el-table-column
+        label="来源"
+        align="center"
+        prop="fromCompanyName"
+        min-width="100"
+      />
+      <el-table-column
+        label="纳税性质"
+        min-width="100"
+        align="center"
+        prop="taxType"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="200"
+      />
       <el-table-column label="当前期间" width="90" align="center">
         <template #default="scope">
           <!-- {{ scope.row.currentDate != null && scope.row.currentDate > scope.row.checkoutDate ? scope.row.currentDate :
@@ -61,85 +129,184 @@
       </el-table-column>
       <el-table-column align="center">
         <template #header>
-          <div style="
+          <div
+            style="
               display: flex;
               flex-direction: row;
               justify-content: space-between;
-            ">
+            "
+          >
             <div style="display: flex; flex-direction: row">
-              <el-button link type="primary" size="small" icon="ArrowLeft" @click="prevYear" />
+              <el-button
+                link
+                type="primary"
+                size="small"
+                icon="ArrowLeft"
+                @click="prevYear"
+              />
               <el-link style="margin: 0 40px" :underline="false">{{
                 queryParams.year
               }}</el-link>
-              <el-button link type="primary" icon="ArrowRight" size="small" @click="nextYear" />
+              <el-button
+                link
+                type="primary"
+                icon="ArrowRight"
+                size="small"
+                @click="nextYear"
+              />
             </div>
             <div style="display: flex; flex-direction: row; margin-right: 20px">
-              <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
+                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="
                     display: inline-block;
                     margin-left: 10px;
                     line-height: 36px;
-                  ">
+                  "
+                >
                   {{ item.label }}
                 </div>
               </div>
             </div>
           </div>
         </template>
-        <el-table-column v-for="item in selectMonths" :key="item.value" width="50" :label="item.label" align="center">
+        <el-table-column
+          v-for="item in selectMonths"
+          :key="item.value"
+          width="50"
+          :label="item.label"
+          align="center"
+        >
           <template #default="scope">
-            <el-button size="small" :style="monthStatusStyle(scope.row, item.value)" circle
-              @click="openDetail(scope.row, item)" style="width: 12px; height: 12px" />
+            <el-button
+              size="small"
+              :style="monthStatusStyle(scope.row, item.value)"
+              circle
+              @click="openDetail(scope.row, item)"
+              style="width: 12px; height: 12px"
+            />
           </template>
         </el-table-column>
       </el-table-column>
-      <el-table-column label="执行人" align="center" prop="serviceName" width="100">
+      <el-table-column
+        label="执行人"
+        align="center"
+        prop="serviceName"
+        width="100"
+      >
       </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"
+    />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body draggable>
-      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      append-to-body
+      draggable
+    >
+      <el-form
+        :model="queryParams"
+        ref="queryRef"
+        size="small"
+        label-width="100"
+      >
         <el-row :gutter="20">
           <el-col :span="12">
             <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="taxType">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <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="来源:" prop="fromCompanyName" v-if="tenant.versionId === '4'">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+            <el-form-item
+              label="来源:"
+              prop="fromCompanyName"
+              v-if="tenant.versionId === '4'"
+            >
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                type="text"
+                placeholder="客户来源"
+                :clearable="true"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="月份:">
-              <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="false"
-                @change="handleQuery">
-                <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.month"
+                size="small"
+                placeholder="月份"
+                :clearable="false"
+                @change="handleQuery"
+              >
+                <el-option
+                  v-for="item in selectMonths"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
             <el-form-item label="状态:">
-              <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-                :clearable="true" @clear="clearStatus">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.status"
+                prop="status"
+                size="small"
+                type="text"
+                placeholder="状态"
+                :clearable="true"
+                @clear="clearStatus"
+              >
+                <el-option
+                  v-for="item in selectStatus"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -147,8 +314,16 @@
       </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>
@@ -158,7 +333,10 @@
 <script setup name="Company">
 import useUserStore from "@/store/modules/user";
 import { taxTypes } from "@/utils/default";
-import { listKeepAccount } from "@/api/business/production/keepAccount";
+import {
+  listKeepAccount,
+  exportKeepAccount,
+} from "@/api/business/production/keepAccount";
 import { listCompany } from "@/api/business/crm/company";
 import { reactive, ref, toRefs } from "vue";
 import formDialog from "./form";
@@ -327,7 +505,7 @@ function resetQuery() {
     pageNum: 1,
     pageSize: 20,
     orderByColumn: "create_time",
-    year: proxy.moment().format("yyyy"),
+    year: proxy.moment().subtract(1, "month").format("yyyy"),
     month: proxy.moment().subtract(1, "month").format("MM"),
     companyName: "",
   };
@@ -422,7 +600,7 @@ function verifiable() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  exportKeepAccount(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {

+ 103 - 42
src/views/business/production/onceWork/index.vue

@@ -8,49 +8,87 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item icon="Download" @click="handleExport"
-              v-hasPermi="['business:entrust:workOrder:current:export']">
-              导出</el-dropdown-item>
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-hasPermi="['business:entrust:workOrder:current: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="78px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="78px"
+    >
       <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 v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="150" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        min-width="250"
+        prop="companyName"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="150"
+      />
       <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="200">
+      <el-table-column
+        label="项目"
+        align="center"
+        prop="taskTypeName"
+        width="200"
+      >
         <template #default="scope">
           {{ scope.row.noContract === 1 ? scope.row.remark : "" }}
           {{ scope.row.taskTypeName }}
           {{
             scope.row.taskTypeDetailName
-            ? `-${scope.row.taskTypeDetailName}`
-            : ""
+              ? `-${scope.row.taskTypeDetailName}`
+              : ""
           }}
         </template>
       </el-table-column>
@@ -58,8 +96,8 @@
         <template #default="scope">
           {{
             scope.row.entrust != null
-            ? scope.row.entrust.toAccountName
-            : scope.row.serviceName
+              ? scope.row.entrust.toAccountName
+              : scope.row.serviceName
           }}
         </template>
       </el-table-column>
@@ -69,28 +107,36 @@
             {{ 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',
-                    margin: 'auto',
-                    borderRadius: '50%',
-                    border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                  }" />
-                  <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="
                       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;
@@ -100,7 +146,9 @@
                     height: 14px;
                     background-color: #ccc;
                     border-radius: 50%;
-                  ">?</span>
+                  "
+                  >?</span
+                >
               </template>
             </el-popover>
           </div>
@@ -108,15 +156,27 @@
       </el-table-column>
       <el-table-column label="操作" width="80" align="center" prop="">
         <template #default="scope">
-          <el-button v-show="scope.row.record == null || scope.row.record.status !== 3" size="small" type="primary" link
-            v-hasPermi="['business:production:onceWork:finished']" @click="finishedHandle(scope.row)">完成</el-button>
+          <el-button
+            v-show="scope.row.record == null || scope.row.record.status !== 3"
+            size="small"
+            type="primary"
+            link
+            v-hasPermi="['business:production:onceWork:finished']"
+            @click="finishedHandle(scope.row)"
+            >完成</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>
 
@@ -124,6 +184,7 @@
 import {
   listOnceWorkOrder,
   saveDetail,
+  exportOnceWork,
 } from "@/api/business/production/onceWorkOrder";
 import { toRefs } from "vue";
 import useUserStore from "@/store/modules/user";
@@ -148,7 +209,7 @@ const { selectStatus } = toRefs(data);
 
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const tenant = useUserStore().tenant;
 const list = ref([]);
 const loading = ref(true);
 const ids = ref([]);
@@ -220,7 +281,7 @@ function handleSelectionChange(selection) {
 
 /** 导出按钮操作 */
 function handleExport() {
-  exportCurrentWorkOrder(queryParams.value);
+  exportOnceWork(queryParams.value);
 }
 
 function getStatusStyle(row) {
@@ -253,11 +314,11 @@ function finishedHandle(row) {
         row.record != null
           ? row.record
           : {
-            companyId: row.companyId,
-            workOrderId: row.id,
-            tenantId: row.tenantId,
-            status: 3,
-          };
+              companyId: row.companyId,
+              workOrderId: row.id,
+              tenantId: row.tenantId,
+              status: 3,
+            };
       saveDetail(finishedValue).then((res) => getList());
     })
     .catch((_) => {

+ 16 - 1
src/views/business/production/receiveTicket/form.vue

@@ -182,7 +182,6 @@
                 v-model="form.saveStatus"
                 @change="saveStatusChangeHandle"
               >
-                <el-radio :label="1">待确认</el-radio>
                 <el-radio
                   v-if="
                     salaryDetail != null &&
@@ -253,6 +252,15 @@
         @click="close"
         >取消</el-button
       >
+      <el-button
+        type="warning"
+        size="small"
+        icon="Edit"
+        style="float: right"
+        @click="handleConfirmed"
+      >
+        待确认</el-button
+      >
       <el-button
         size="small"
         type="primary"
@@ -471,6 +479,12 @@ function getSummaries(param) {
   return sums;
 }
 
+//待确认
+function handleConfirmed() {
+  form.value.saveStatus = 1;
+  handleSave();
+}
+
 function handleSave() {
   if (form.value.saveStatus == null || form.value.saveStatus === "") {
     proxy.$modal.msgError("请选择节点状态");
@@ -511,6 +525,7 @@ function handleSave() {
       proxy.$modal.msg("取消保存");
     });
 }
+
 function saveStatusChangeHandle() {
   if (form.value.saveStatus === 2) {
     form.value.feeTicket = 0;

+ 347 - 82
src/views/business/production/receiveTicket/index.vue

@@ -8,49 +8,117 @@
         </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="77px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="77px"
+    >
       <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="月份:">
-        <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="false" style="width: 130px"
-          @change="handleQuery">
-          <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.month"
+          size="small"
+          placeholder="月份"
+          :clearable="false"
+          style="width: 130px"
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in selectMonths"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="状态:">
-        <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-          :clearable="true" style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          prop="status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="operation" @click="moreSearch = true">更多</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="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="90" />
-      <el-table-column label="纳税性质" min-width="90" align="center" prop="taxType" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        prop="companyName"
+        min-width="250"
+      />
+      <el-table-column
+        label="来源"
+        align="center"
+        prop="fromCompanyName"
+        min-width="90"
+      />
+      <el-table-column
+        label="纳税性质"
+        min-width="90"
+        align="center"
+        prop="taxType"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="180"
+      />
       <el-table-column label="当前期间" width="90" align="center">
         <template #default="scope">
           <!-- {{ scope.row.currentDate != null && scope.row.currentDate > scope.row.checkoutDate ? scope.row.currentDate :
@@ -60,135 +128,321 @@
       </el-table-column>
       <el-table-column align="center">
         <template #header>
-          <div style="
+          <div
+            style="
               display: flex;
               flex-direction: row;
               justify-content: space-between;
-            ">
+            "
+          >
             <div style="display: flex; flex-direction: row">
-              <el-button link type="primary" size="small" icon="ArrowLeft" @click="prevYear" />
+              <el-button
+                link
+                type="primary"
+                size="small"
+                icon="ArrowLeft"
+                @click="prevYear"
+              />
               <el-link style="margin: 0 40px" :underline="false">{{
                 queryParams.year
               }}</el-link>
-              <el-button link type="primary" icon="ArrowRight" size="small" @click="nextYear" />
+              <el-button
+                link
+                type="primary"
+                icon="ArrowRight"
+                size="small"
+                @click="nextYear"
+              />
             </div>
             <div style="display: flex; flex-direction: row; margin-right: 20px">
-              <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
+                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="
                     display: inline-block;
                     margin-left: 10px;
                     line-height: 36px;
-                  ">
+                  "
+                >
                   {{ item.label }}
                 </div>
               </div>
             </div>
           </div>
         </template>
-        <el-table-column v-for="item in selectMonths" :key="item.value" min-width="50" :label="item.label" align="center">
+        <el-table-column
+          v-for="item in selectMonths"
+          :key="item.value"
+          min-width="50"
+          :label="item.label"
+          align="center"
+        >
           <template #default="scope">
-            <el-button size="small" :style="monthStatusStyle(scope.row, item.value)" circle
-              @click="openDetail(scope.row, item)" style="width: 12px; height: 12px" />
+            <el-button
+              size="small"
+              :style="monthStatusStyle(scope.row, item.value)"
+              circle
+              @click="openDetail(scope.row, item)"
+              style="width: 12px; height: 12px"
+            />
           </template>
         </el-table-column>
       </el-table-column>
-      <el-table-column label="执行人" align="center" prop="serviceName" min-width="100">
+      <el-table-column
+        label="执行人"
+        align="center"
+        prop="serviceName"
+        min-width="100"
+      >
       </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"
+    />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body draggable>
-      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      append-to-body
+      draggable
+    >
+      <el-form
+        :model="queryParams"
+        ref="queryRef"
+        size="small"
+        label-width="100"
+      >
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="客户名称:" prop="companyName">
-              <el-input v-model="queryParams.companyName" size="small" placeholder="请输入客户名称" clearable
-                @keyup.enter="handleQuery" />
+              <el-input
+                v-model="queryParams.companyName"
+                size="small"
+                placeholder="请输入客户名称"
+                clearable
+                @keyup.enter="handleQuery"
+              />
             </el-form-item>
             <el-form-item label="来源:" v-if="tenant.versionId === '4'">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                type="text"
+                placeholder="客户来源"
+                :clearable="true"
+              />
             </el-form-item>
             <el-form-item label="收票状态:">
-              <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-                :clearable="true" @clear="clearStatus">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.status"
+                prop="status"
+                size="small"
+                type="text"
+                placeholder="状态"
+                :clearable="true"
+                @clear="clearStatus"
+              >
+                <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="收入票:">
-              <el-select size="small" v-model="queryParams.hasIncomeTicket" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.hasIncomeTicket"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.feeTicket" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.feeTicket"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.bankSlips" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.bankSlips"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.hasSsafTicket" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.hasSsafTicket"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.sumNumber" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.sumNumber"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="月份:">
-              <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="false">
-                <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.month"
+                size="small"
+                placeholder="月份"
+                :clearable="false"
+              >
+                <el-option
+                  v-for="item in selectMonths"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
             <el-form-item label="纳税性质:">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <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.saveStatus" placeholder="请选择纳税性质" :clearable="true">
-                <el-option v-for="item in delivery" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.saveStatus"
+                placeholder="请选择纳税性质"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in delivery"
+                  :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.hasCostTicket" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.hasCostTicket"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.payroll" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.payroll"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.bankCopy" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.bankCopy"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :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.others" :clearable="true">
-                <el-option v-for="item in haveOrNot" :key="item.label" :label="item.label" :value="item.value" />
+              <el-select
+                size="small"
+                v-model="queryParams.others"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in haveOrNot"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -196,8 +450,16 @@
       </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>
@@ -207,7 +469,10 @@
 <script setup name="Company">
 import useUserStore from "@/store/modules/user";
 
-import { listReceiveTicket } from "@/api/business/production/receiveTicket";
+import {
+  listReceiveTicket,
+  exportReceiveTicket,
+} from "@/api/business/production/receiveTicket";
 import { taxTypes } from "@/utils/default";
 import { listCompany } from "@/api/business/crm/company";
 import { reactive, ref, toRefs } from "vue";
@@ -217,7 +482,7 @@ import viewDialog from "./view";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const tenant = useUserStore().tenant;
 const list = ref([]);
 const loading = ref(true);
 const ids = ref([]);
@@ -293,7 +558,7 @@ const data = reactive({
       color: "#0F8BFF",
     },
     {
-      label: "进行中",
+      label: "待确认",
       value: 1,
       color: "#FFB836",
     },
@@ -389,7 +654,7 @@ function resetQuery() {
   queryParams.value = {
     pageNum: 1,
     pageSize: 20,
-    year: proxy.moment().format("yyyy"),
+    year: proxy.moment().subtract(1, "month").format("yyyy"),
     month: proxy.moment().subtract(1, "month").format("MM"),
     companyName: "",
   };
@@ -484,7 +749,7 @@ function verifiable() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  exportReceiveTicket(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {

+ 181 - 42
src/views/business/production/receiveTicketFeedback/index.vue

@@ -8,8 +8,13 @@
         </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-menu>
@@ -20,32 +25,55 @@
       <!--<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="78px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="78px"
+    >
       <el-form-item>
-        <el-radio-group v-model="queryRadio" size="small" @change="radioChangeHandler">
+        <el-radio-group
+          v-model="queryRadio"
+          size="small"
+          @change="radioChangeHandler"
+        >
           <el-radio-button label="全部" />
           <el-radio-button label="流转反馈" />
           <el-radio-button label="驳回反馈" />
         </el-radio-group>
       </el-form-item>
       <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 v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="operation" @click="moreSearch = true">更多</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"
@@ -53,33 +81,90 @@
         label="序号"
         width="50"
       ></el-table-column> -->
-      <el-table-column label="客户名称" prop="companyName" min-width="250" align="center" />
-      <el-table-column label="来源" min-width="90" align="center" prop="fromCompanyName" />
-      <el-table-column label="纳税性质" prop="taxType" align="center" min-width="90" />
-      <el-table-column label="收票月份" prop="provinceCode" min-width="80" align="center">
+      <el-table-column
+        label="客户名称"
+        prop="companyName"
+        min-width="250"
+        align="center"
+      />
+      <el-table-column
+        label="来源"
+        min-width="90"
+        align="center"
+        prop="fromCompanyName"
+      />
+      <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">
           <span>{{ scope.row.year + "-" + scope.row.month }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="反馈信息" prop="remark" min-width="150" align="center" />
-      <el-table-column label="回复信息" prop="feedbackContent" min-width="150" align="center" />
-      <el-table-column label="回复时间" prop="feedbackTime" min-width="80" align="center" />
+      <el-table-column
+        label="反馈信息"
+        prop="remark"
+        min-width="150"
+        align="center"
+      />
+      <el-table-column
+        label="回复信息"
+        prop="feedbackContent"
+        min-width="150"
+        align="center"
+      />
+      <el-table-column
+        label="回复时间"
+        prop="feedbackTime"
+        min-width="80"
+        align="center"
+      />
       <el-table-column label="操作" fixed="right" width="80" align="center">
         <template #default="scope">
-          <el-button v-show="scope.row.status === 1" link type="warning" size="small"
-            v-hasPermi="['business:archiveReceiveTicket:edit']" @click="handleInfo(scope.row)">回复</el-button>
+          <el-button
+            v-show="scope.row.status === 1"
+            link
+            type="warning"
+            size="small"
+            v-hasPermi="['business:archiveReceiveTicket:edit']"
+            @click="handleInfo(scope.row)"
+            >回复</el-button
+          >
           <span v-if="scope.row.status !== 1">--</span>
         </template>
       </el-table-column>
     </el-table>
     <!-- <Deposit-form ref="DepositRef" :get-list="getList" /> -->
-    <el-dialog title="反馈回复" width="500px" v-model="formOpen" append-to-body draggable @close="formCancel">
+    <el-dialog
+      title="反馈回复"
+      width="500px"
+      v-model="formOpen"
+      append-to-body
+      draggable
+      @close="formCancel"
+    >
       <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 v-if="form.status === 1" v-model.trim="form.feedbackContent" size="small" type="textarea"
-                maxlength="200" show-word-limit placeholder="请输入回复信息" :clearable="true" />
+              <el-input
+                v-if="form.status === 1"
+                v-model.trim="form.feedbackContent"
+                size="small"
+                type="textarea"
+                maxlength="200"
+                show-word-limit
+                placeholder="请输入回复信息"
+                :clearable="true"
+              />
               <div v-else>{{ form.feedbackContent }}</div>
             </el-form-item>
           </el-col>
@@ -87,43 +172,97 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" icon="Finished" size="small" @click="saveHandler">确 定</el-button>
-          <el-button icon="close" size="small" @click="formCancel">取 消</el-button>
+          <el-button
+            type="primary"
+            icon="Finished"
+            size="small"
+            @click="saveHandler"
+            >确 定</el-button
+          >
+          <el-button icon="close" size="small" @click="formCancel"
+            >取 消</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"
+    />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" size="small" append-to-body draggable>
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      size="small"
+      append-to-body
+      draggable
+    >
       <el-form :model="queryParams" ref="queryRef" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="反馈月份:" prop="feedbackMonth">
-              <el-date-picker v-model="feedbackMonth" size="small" :clearable="true" value-format="YYYY-MM"
-                format="YYYY-MM" type="month" />
+              <el-date-picker
+                v-model="feedbackMonth"
+                size="small"
+                :clearable="true"
+                value-format="YYYY-MM"
+                format="YYYY-MM"
+                type="month"
+              />
             </el-form-item>
             <el-form-item label="纳税性质:" prop="taxType">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <el-option
+                  v-for="item in taxTypes"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="来源:" prop="fromCompanyName">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                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>
@@ -150,7 +289,7 @@ import { ref } from "vue";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const tenant = useUserStore().tenant;
 const list = ref([]);
 const loading = ref(true);
 const oneself = ref(false);
@@ -279,7 +418,7 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
@@ -358,8 +497,8 @@ function radioChangeHandler(arg) {
   const query = {
     // mainAccountSetsId: store.getters.accountSets.id,
     total: 0,
-    size: 15,
-    pn: 1,
+    pageSize: 20,
+    pageNum: 1,
   };
   switch (arg) {
     case "全部":
@@ -379,7 +518,7 @@ function radioChangeHandler(arg) {
   handleQuery();
 }
 
-function edit(row) { }
+function edit(row) {}
 
 getList();
 </script>

+ 12 - 3
src/views/business/production/salary/form.vue

@@ -390,10 +390,19 @@
         size="small"
         style="float: right"
         icon="Finished"
-        @click="handleSave"
+        @click="handleSave(2)"
       >
         保存</el-button
       >
+      <el-button
+        type="warning"
+        size="small"
+        icon="Edit"
+        style="float: right"
+        @click="handleSave(1)"
+      >
+        待确认</el-button
+      >
     </div>
     <!-- <feedback-dialog ref="feedbackDialogView" :parent="this" />
     <print-dialog ref="printDialog" :parent="this" /> -->
@@ -580,7 +589,7 @@ function getSummaries(param) {
   return sums;
 }
 
-function handleSave() {
+function handleSave(status) {
   for (let i = 0; i < form.value.details.length; i++) {
     const l = form.value.details[i];
     // 数据校验
@@ -609,7 +618,7 @@ function handleSave() {
     .confirm("确认保存么?")
     .then(() => {
       const saveValue = proxy.deepClone(form.value);
-      saveValue.status = 2;
+      saveValue.status = status;
       if (saveValue.id == null) {
         saveDetail(saveValue).then((res) => {
           proxy.$modal.msgSuccess("保存成功");

+ 184 - 0
src/views/business/production/salary/importExcelDialog.vue

@@ -0,0 +1,184 @@
+<template>
+  <!-- 添加或修改菜单对话框 -->
+  <el-dialog title="工资导入" v-model="visible" width="680px" append-to-body draggable>
+    <el-form ref="menuRef" :model="form" size="small" :rules="rules" label-width="100px">
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="选择导入月份" prop="year">
+            <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月" style="width: 150px" :clearable="false"
+              value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="上传">
+            <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
+              :action="upload.url + `?year=${year}&month=${month}`" :fileList="fileList"
+              :before-upload="handleBeforeUpload" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress"
+              :on-success="handleFileSuccess" :auto-upload="false" drag>
+              <el-icon class="el-icon--upload">
+                <upload-filled />
+              </el-icon>
+              <div class="el-upload__text">
+                将文件拖到此处,或<em>点击上传</em>
+              </div>
+              <template #tip>
+                <div class="el-upload__tip text-center">
+                  <span>仅允许导入xls、xlsx格式文件。文件大小限制为&lt;50Mb</span>
+                  <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
+                    @click="importTemplate">下载模板</el-link>
+                </div>
+              </template>
+            </el-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+
+<script setup>
+import { exportSalaryTemplate } from "@/api/business/production/salary";
+import { getToken, getTenant } from "@/utils/auth";
+import useUserStore from "@/store/modules/user";
+import { deepClone } from "@/utils";
+
+const { proxy } = getCurrentInstance();
+/** 父组件传参 */
+const props = defineProps({
+  getList: {
+    type: Function,
+    default: () => { },
+  },
+});
+const { getList } = toRefs(props);
+/** 字典数组区 */
+/** 表单抽屉 页变量 */
+const fileList = ref([]);
+const visible = ref(false);
+const currentMonth = ref(proxy.moment().subtract("month").format("YYYY-MM-01"));
+const year = ref(proxy.moment().format("YYYY"));
+const month = ref(proxy.moment().format("MM"));
+
+const addType = ref(1);
+const webHost = import.meta.env.VITE_APP_BASE_API;
+
+const setHeaders = {
+  Authorization: getToken(),
+};
+
+const data = reactive({
+  form: {
+    year: proxy.moment().format("YYYY"),
+    month: proxy.moment().format("MM"),
+  },
+  followData: {},
+});
+const addComRef = ref(null);
+
+/*** 客户导入参数 */
+const upload = reactive({
+  // 是否禁用上传
+  isUploading: false,
+  // 设置上传的请求头部
+  headers: { Authorization: "Bearer " + getToken(), tenantId: getTenant() },
+  // 上传的地址
+  url: `/ezhizao-yzbh-production/business/salary/importData`,
+});
+
+/** 查询对象 */
+const queryParams = ref({});
+
+const followQuery = ref({});
+const { form, rules, followData } = toRefs(data);
+
+/***********************  表单页方法 ****************************/
+
+/** 抽屉打开 */
+function open() {
+  // reset();
+  visible.value = true;
+}
+
+//下载模板
+const importTemplate = () => {
+  exportSalaryTemplate();
+};
+
+function reset() {
+  // console.log(addComRef.value)
+  if (addComRef.value != null) addComRef.value.reset();
+}
+
+function cancel() {
+  visible.value = false;
+}
+
+function submitForm() {
+  submitFileForm();
+}
+
+function handleBeforeUpload(file) {
+  console.log(file);
+  if (
+    file.type !==
+    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
+    file.type !== "application/vnd.ms-excel"
+  ) {
+    proxy.$modal.msgError("请选择excel文件");
+    return false;
+  }
+  return true;
+}
+
+/**文件上传中处理 */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+/** 文件上传成功处理 */
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  proxy.$alert(
+    "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+    response.msg +
+    "</div>",
+    "导入结果",
+    { dangerouslyUseHTMLString: true }
+  );
+  getList.value();
+};
+/** 提交上传文件 */
+function submitFileForm() {
+  proxy.$refs["uploadRef"].submit();
+}
+
+function monthChangeHandler(arg) {
+  year.value = proxy.moment(arg).format("YYYY");
+  month.value = proxy.moment(arg).format("MM");
+}
+
+function disabledDateHandler(date) {
+  if (date <= proxy.moment().subtract("month")) {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+// 暴露给父组件的方法
+defineExpose({
+  open,
+});
+</script>
+
+<style></style>

+ 269 - 68
src/views/business/production/salary/index.vue

@@ -8,49 +8,123 @@
         </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:salary:export']"
+            >
+              导出</el-dropdown-item
+            >
           </el-dropdown-menu>
+          <el-dropdown-item
+            icon="Upload"
+            @click="handleImport"
+            v-hasPermi="['business:salary:Import']"
+            >导入</el-dropdown-item
+          >
         </template>
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
-      label-width="77px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="77px"
+    >
       <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="月份:">
-        <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" style="width: 130px" :clearable="false"
-          @change="handleQuery">
-          <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.month"
+          size="small"
+          placeholder="月份"
+          style="width: 130px"
+          :clearable="false"
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in selectMonths"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="状态:">
-        <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-          :clearable="true" style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          prop="status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
         <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
           <el-switch v-model="oneself" @change="handleOneself" />
         </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="operation" @click="moreSearch = true">更多</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="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" min-width="80" prop="fromCompanyName" />
-      <el-table-column label="纳税性质" min-width="100" align="center" prop="taxType" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        prop="companyName"
+        min-width="250"
+      />
+      <el-table-column
+        label="来源"
+        align="center"
+        min-width="80"
+        prop="fromCompanyName"
+      />
+      <el-table-column
+        label="纳税性质"
+        min-width="100"
+        align="center"
+        prop="taxType"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="200"
+      />
       <el-table-column label="当前期间" min-width="90" align="center">
         <template #default="scope">
           <!-- {{
@@ -64,92 +138,198 @@
       </el-table-column>
       <el-table-column align="center">
         <template #header>
-          <div style="
+          <div
+            style="
               display: flex;
               flex-direction: row;
               justify-content: space-between;
-            ">
+            "
+          >
             <div style="display: flex; flex-direction: row">
-              <el-button link type="primary" size="small" icon="ArrowLeft" @click="prevYear" />
+              <el-button
+                link
+                type="primary"
+                size="small"
+                icon="ArrowLeft"
+                @click="prevYear"
+              />
               <el-link style="margin: 0 40px" :underline="false">{{
                 queryParams.year
               }}</el-link>
-              <el-button link type="primary" icon="ArrowRight" size="small" @click="nextYear" />
+              <el-button
+                link
+                type="primary"
+                icon="ArrowRight"
+                size="small"
+                @click="nextYear"
+              />
             </div>
             <div style="display: flex; flex-direction: row; margin-right: 20px">
-              <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
+                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="
                     display: inline-block;
                     margin-left: 10px;
                     line-height: 36px;
-                  ">
+                  "
+                >
                   {{ item.label }}
                 </div>
               </div>
             </div>
           </div>
         </template>
-        <el-table-column v-for="item in selectMonths" :key="item.value" min-width="50" :label="item.label" align="center">
+        <el-table-column
+          v-for="item in selectMonths"
+          :key="item.value"
+          min-width="50"
+          :label="item.label"
+          align="center"
+        >
           <template #default="scope">
-            <el-button size="small" :style="monthStatusStyle(scope.row, item.value)" circle
-              @click="openDetail(scope.row, item)" style="width: 12px; height: 12px" />
+            <el-button
+              size="small"
+              :style="monthStatusStyle(scope.row, item.value)"
+              circle
+              @click="openDetail(scope.row, item)"
+              style="width: 12px; height: 12px"
+            />
           </template>
         </el-table-column>
       </el-table-column>
-      <el-table-column label="执行人" align="center" prop="serviceName" min-width="100">
+      <el-table-column
+        label="执行人"
+        align="center"
+        prop="serviceName"
+        min-width="100"
+      >
       </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"
+    />
     <form-dialog ref="formDialogRef" :get-list="getList" />
+    <import-excel-dialog ref="importExcelDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body draggable>
-      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      append-to-body
+      draggable
+    >
+      <el-form
+        :model="queryParams"
+        ref="queryRef"
+        size="small"
+        label-width="100"
+      >
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="客户名称:" prop="companyName">
-              <el-input v-model="queryParams.companyName" size="small" placeholder="请输入客户名称" clearable
-                @keyup.enter="handleQuery" />
+              <el-input
+                v-model="queryParams.companyName"
+                size="small"
+                placeholder="请输入客户名称"
+                clearable
+                @keyup.enter="handleQuery"
+              />
             </el-form-item>
             <el-form-item label="月份:">
-              <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" @change="handleQuery"
-                :clearable="false">
-                <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.month"
+                size="small"
+                placeholder="月份"
+                @change="handleQuery"
+                :clearable="false"
+              >
+                <el-option
+                  v-for="item in selectMonths"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
             <el-form-item label="状态:">
-              <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-                :clearable="true" @clear="clearStatus">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.status"
+                prop="status"
+                size="small"
+                type="text"
+                placeholder="状态"
+                :clearable="true"
+                @clear="clearStatus"
+              >
+                <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="来源:" v-if="tenant.versionId === '4'">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                type="text"
+                placeholder="客户来源"
+                :clearable="true"
+              />
             </el-form-item>
             <el-form-item label="纳税性质:">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <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 v-model.trim="queryParams.hasIndividualIncomeTax" placeholder="请选择" size="small"
-                style="width: 100%" @change="changeIndividual">
-                <el-option v-for="item in confirmChoices" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.hasIndividualIncomeTax"
+                placeholder="请选择"
+                size="small"
+                style="width: 100%"
+                @change="changeIndividual"
+              >
+                <el-option
+                  v-for="item in confirmChoices"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -157,8 +337,16 @@
       </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>
@@ -168,8 +356,9 @@
 <script setup name="Company">
 import useUserStore from "@/store/modules/user";
 import { taxTypes } from "@/utils/default";
-import { listSalary } from "@/api/business/production/salary";
+import { listSalary, exportSalary } from "@/api/business/production/salary";
 import { listCompany } from "@/api/business/crm/company";
+import importExcelDialog from "./importExcelDialog.vue";
 import { reactive, ref, toRefs } from "vue";
 import formDialog from "./form";
 import viewDialog from "./view";
@@ -177,7 +366,7 @@ import viewDialog from "./view";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const tenant = useUserStore().tenant;
 const list = ref([]);
 const loading = ref(true);
 const ids = ref([]);
@@ -185,6 +374,7 @@ const single = ref(true);
 const moreSearch = ref(false);
 const oneself = ref(false);
 const multiple = ref(true);
+const importExcelDialogRef = ref(null);
 const total = ref(0);
 const prev = ref([]);
 const permissions = useUserStore().permissions;
@@ -247,6 +437,11 @@ const data = reactive({
       value: 0,
       color: "#fff",
     },
+    {
+      label: "待确认",
+      value: 1,
+      color: "#ffb836",
+    },
     {
       label: "待审核",
       value: 2,
@@ -348,7 +543,8 @@ function resetQuery() {
   queryParams.value = {
     pageNum: 1,
     pageSize: 20,
-    year: proxy.moment().format("yyyy"),
+    orderByColumn: "create_time",
+    year: proxy.moment().subtract(1, "month").format("yyyy"),
     month: proxy.moment().subtract(1, "month").format("MM"),
     companyName: "",
   };
@@ -392,13 +588,13 @@ function openDetail(row, month) {
 
 function directDialog(detail) {
   // 判断是否有权限
-  if (detail.status === 0 || detail.status == null) {
+  if (detail.status === 1 || detail.status === 0 || detail.status == null) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else {
       proxy.$modal.msgError("没有权限");
     }
-  } else if (detail.status === 1 || detail.status === 4) {
+  } else if (detail.status === 4) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else if (viewable() || verifiable()) {
@@ -439,7 +635,7 @@ function verifiable() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  exportSalary(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {
@@ -467,6 +663,11 @@ function nextYear() {
   handleQuery();
 }
 
+//导入按钮操作
+function handleImport() {
+  importExcelDialogRef.value.open();
+}
+
 function monthStatusStyle(row, month) {
   const index = row.details.findIndex((v) => v.month === month);
   if (index >= 0) {
@@ -485,7 +686,7 @@ function monthStatusStyle(row, month) {
     };
   }
 }
-
+queryParams;
 function getStatusColor(status) {
   const index = selectStatus.value.findIndex((v) => v.value === status);
   return index >= 0 ? selectStatus.value[index].color : "#fff";

+ 13 - 3
src/views/business/production/salaryZero/form.vue

@@ -387,10 +387,19 @@
         size="small"
         icon="Finished"
         style="float: right"
-        @click="handleSave"
+        @click="handleSave(2)"
       >
         保存</el-button
       >
+      <el-button
+        type="warning"
+        size="small"
+        icon="Edit"
+        style="float: right"
+        @click="handleSave(1)"
+      >
+        待确认</el-button
+      >
     </div>
     <!-- <feedback-dialog ref="feedbackDialogView" :parent="this" />
     <print-dialog ref="printDialog" :parent="this" /> -->
@@ -467,6 +476,7 @@ const emptyForm = {
 function open(detail) {
   visible.value = true;
   form.value = detail;
+  console.log(form.value);
   loadData();
 }
 
@@ -577,7 +587,7 @@ function getSummaries(param) {
   return sums;
 }
 
-function handleSave() {
+function handleSave(status) {
   for (let i = 0; i < form.value.details.length; i++) {
     const l = form.value.details[i];
     // 数据校验
@@ -607,7 +617,7 @@ function handleSave() {
     .confirm("确认保存么?")
     .then(() => {
       const saveValue = proxy.deepClone(form.value);
-      saveValue.status = 2;
+      saveValue.status = status;
       if (saveValue.id == null) {
         saveDetail(saveValue).then((res) => {
           proxy.$modal.msgSuccess("保存成功");

+ 218 - 0
src/views/business/production/salaryZero/importExcelDialog.vue

@@ -0,0 +1,218 @@
+<template>
+  <!-- 添加或修改菜单对话框 -->
+  <el-dialog
+    title="工资导入"
+    v-model="visible"
+    width="680px"
+    append-to-body
+    draggable
+  >
+    <el-form
+      ref="menuRef"
+      :model="form"
+      size="small"
+      :rules="rules"
+      label-width="100px"
+    >
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="选择导入月份" prop="year">
+            <el-date-picker
+              v-model="currentMonth"
+              type="month"
+              format="YYYY年MM月"
+              style="width: 150px"
+              :clearable="false"
+              value-format="YYYY-MM-01"
+              :disabled-date="disabledDateHandler"
+              @change="monthChangeHandler"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="上传">
+            <el-upload
+              ref="uploadRef"
+              :limit="1"
+              accept=".xlsx, .xls"
+              :headers="upload.headers"
+              :action="upload.url + `?year=${year}&month=${month}`"
+              :fileList="fileList"
+              :before-upload="handleBeforeUpload"
+              :disabled="upload.isUploading"
+              :on-progress="handleFileUploadProgress"
+              :on-success="handleFileSuccess"
+              :auto-upload="false"
+              drag
+            >
+              <el-icon class="el-icon--upload">
+                <upload-filled />
+              </el-icon>
+              <div class="el-upload__text">
+                将文件拖到此处,或<em>点击上传</em>
+              </div>
+              <template #tip>
+                <div class="el-upload__tip text-center">
+                  <span
+                    >仅允许导入xls、xlsx格式文件。文件大小限制为&lt;50Mb</span
+                  >
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    style="font-size: 12px; vertical-align: baseline"
+                    @click="importTemplate"
+                    >下载模板</el-link
+                  >
+                </div>
+              </template>
+            </el-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+
+<script setup>
+import { exportSalaryTemplate } from "@/api/business/production/salaryZero";
+import { getToken, getTenant } from "@/utils/auth";
+import useUserStore from "@/store/modules/user";
+import { deepClone } from "@/utils";
+
+const { proxy } = getCurrentInstance();
+/** 父组件传参 */
+const props = defineProps({
+  getList: {
+    type: Function,
+    default: () => {},
+  },
+});
+const { getList } = toRefs(props);
+/** 字典数组区 */
+/** 表单抽屉 页变量 */
+const fileList = ref([]);
+const visible = ref(false);
+const currentMonth = ref(proxy.moment().subtract("month").format("YYYY-MM-01"));
+const year = ref(proxy.moment().format("YYYY"));
+const month = ref(proxy.moment().format("MM"));
+
+const addType = ref(1);
+const webHost = import.meta.env.VITE_APP_BASE_API;
+
+const setHeaders = {
+  Authorization: getToken(),
+};
+
+const data = reactive({
+  form: {},
+  followData: {},
+});
+const addComRef = ref(null);
+
+/*** 客户导入参数 */
+const upload = reactive({
+  // 是否禁用上传
+  isUploading: false,
+  // 设置上传的请求头部
+  headers: { Authorization: "Bearer " + getToken(), tenantId: getTenant() },
+  // 上传的地址
+  url: `/ezhizao-yzbh-production/business/salaryZero/importData`,
+});
+
+/** 查询对象 */
+const queryParams = ref({});
+
+const followQuery = ref({});
+const { form, rules, followData } = toRefs(data);
+
+/***********************  表单页方法 ****************************/
+
+/** 抽屉打开 */
+function open() {
+  // reset();
+  visible.value = true;
+}
+
+//下载模板
+const importTemplate = () => {
+  exportSalaryTemplate();
+};
+
+function reset() {
+  // console.log(addComRef.value)
+  if (addComRef.value != null) addComRef.value.reset();
+}
+
+function cancel() {
+  visible.value = false;
+}
+
+function submitForm() {
+  submitFileForm();
+}
+
+function handleBeforeUpload(file) {
+  console.log(file);
+  if (
+    file.type !==
+      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
+    file.type !== "application/vnd.ms-excel"
+  ) {
+    proxy.$modal.msgError("请选择excel文件");
+    return false;
+  }
+  return true;
+}
+
+/**文件上传中处理 */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+/** 文件上传成功处理 */
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  proxy.$alert(
+    "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+      response.msg +
+      "</div>",
+    "导入结果",
+    { dangerouslyUseHTMLString: true }
+  );
+  getList.value();
+};
+/** 提交上传文件 */
+function submitFileForm() {
+  proxy.$refs["uploadRef"].submit();
+}
+
+function monthChangeHandler(arg) {
+  year.value = proxy.moment(arg).format("YYYY");
+  month.value = proxy.moment(arg).format("MM");
+}
+
+function disabledDateHandler(date) {
+  if (date <= proxy.moment().subtract("month")) {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+// 暴露给父组件的方法
+defineExpose({
+  open,
+});
+</script>
+
+<style></style>

+ 28 - 7
src/views/business/production/salaryZero/index.vue

@@ -11,10 +11,16 @@
             <el-dropdown-item
               icon="Download"
               @click="handleExport"
-              v-hasPermi="['business:workOrder:export']"
+              v-hasPermi="['business:salaryZero:export']"
             >
               导出</el-dropdown-item
             >
+            <el-dropdown-item
+              icon="Upload"
+              @click="handleImport"
+              v-hasPermi="['business:salaryZero:Import']"
+              >导入</el-dropdown-item
+            >
           </el-dropdown-menu>
         </template>
       </el-dropdown>
@@ -120,7 +126,7 @@
         min-width="200"
       />
       <el-table-column label="当前期间" min-width="90" align="center">
-        <template>
+        <template #default="scope">
           {{ moment().subtract(1, "month").format("YYYY年MM月") }}
         </template>
       </el-table-column>
@@ -217,6 +223,7 @@
     />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
+    <import-excel-dialog ref="importExcelDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
     <el-dialog
       title="更多搜索"
@@ -242,6 +249,7 @@
                 @keyup.enter="handleQuery"
               />
             </el-form-item>
+
             <el-form-item v-if="tenant.versionId === '4'" label="来源:">
               <el-input
                 size="small"
@@ -327,9 +335,11 @@
 <script setup name="Company">
 import useUserStore from "@/store/modules/user";
 import { taxTypes } from "@/utils/default";
-import { listSalary } from "@/api/business/production/salaryZero";
+import { listSalary, exportSalary } from "@/api/business/production/salaryZero";
 import { listCompany } from "@/api/business/crm/company";
+import importExcelDialog from "./importExcelDialog.vue";
 import { compile, reactive, ref, toRefs } from "vue";
+
 import formDialog from "./form";
 import viewDialog from "./view";
 // import workorderForm from "./form"
@@ -339,6 +349,7 @@ const { proxy } = getCurrentInstance();
 const tenant = useUserStore().tenant;
 const list = ref([]);
 const oneself = ref(false);
+const importExcelDialogRef = ref(null);
 const loading = ref(true);
 const ids = ref([]);
 const single = ref(true);
@@ -406,6 +417,11 @@ const data = reactive({
       value: 0,
       color: "#fff",
     },
+    {
+      label: "待确认",
+      value: 1,
+      color: "#ffb836",
+    },
     {
       label: "待审核",
       value: 2,
@@ -494,7 +510,7 @@ function resetQuery() {
   queryParams.value = {
     pageNum: 1,
     pageSize: 20,
-    year: proxy.moment().format("yyyy"),
+    year: proxy.moment().subtract(1, "month").format("yyyy"),
     month: proxy.moment().subtract(1, "month").format("MM"),
     companyName: "",
   };
@@ -538,13 +554,13 @@ function openDetail(row, month) {
 
 function directDialog(detail) {
   // 判断是否有权限
-  if (detail.status === 0 || detail.status == null) {
+  if (detail.status === 0 || detail.status == null || detail.status === 1) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else {
       proxy.$modal.msgError("没有权限");
     }
-  } else if (detail.status === 1 || detail.status === 4) {
+  } else if (detail.status === 4) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else if (viewable() || verifiable()) {
@@ -584,7 +600,12 @@ function verifiable() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  exportSalary(queryParams.value);
+}
+
+//导入按钮操作
+function handleImport() {
+  importExcelDialogRef.value.open();
 }
 
 function startDateChangeHandler(row, startDate) {

+ 5 - 5
src/views/business/service/loop/housingFundView.vue

@@ -8,10 +8,6 @@
     @close="close"
     class="dialog-form"
   >
-    <!-- <div slot="title" class="dialog-title-container">
-      <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
-      <i class="el-icon-close" @click="close" />
-    </div> -->
     <!-- 功能按钮 -->
     <div style="padding: 8px 24px 16px 24px">
       <el-form size="small" label-width="120px" v-model="form">
@@ -28,7 +24,11 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="服务状态">
-              <el-select v-model="form.status" placeholder="请选择">
+              <el-select
+                v-model="form.status"
+                :disabled="form.status === 3"
+                placeholder="请选择"
+              >
                 <el-option
                   v-for="item in selectStatus"
                   :key="item.value"

+ 202 - 65
src/views/business/service/loop/index.vue

@@ -5,55 +5,133 @@
       <!-- <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
         v-hasPermi="['business:workOrder:remove']">删除</el-button> -->
       <el-dropdown>
-        <el-button type="primary" size="small"
-          v-if="hasPermi(['business:customer:service:loop:export', 'business:customer:service:loop:transactor'])">
+        <el-button
+          type="primary"
+          size="small"
+          v-if="
+            hasPermi([
+              'business:customer:service:loop:export',
+              'business:customer:service:loop:transactor',
+            ])
+          "
+        >
           其它<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="hasPermi(['business:customer:service:loop:export'])">
-              导出</el-dropdown-item>
-            <el-dropdown-item icon="Operation" @click="setServiceHandler"
-              v-if="hasPermi(['business:customer:service:loop:transactor'])">
-              设置执行人</el-dropdown-item>
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-if="hasPermi(['business:customer:service:loop:exportLoop'])"
+            >
+              导出</el-dropdown-item
+            >
+            <el-dropdown-item
+              icon="Operation"
+              @click="setServiceHandler"
+              v-if="hasPermi(['business:customer:service:loop:transactor'])"
+            >
+              设置执行人</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 style="width: 150px" v-model="queryParams.companyName" placeholder="请输入客户名称" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          style="width: 150px"
+          v-model="queryParams.companyName"
+          placeholder="请输入客户名称"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="月份:" prop="month">
-        <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="true" style="width: 130px"
-          @change="handleQuery">
-          <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.month"
+          size="small"
+          placeholder="月份"
+          :clearable="true"
+          style="width: 130px"
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in selectMonths"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="状态:" prop="status">
-        <el-select v-model.trim="queryParams.status" size="small" type="text" placeholder="状态" :clearable="true"
-          style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :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="serviceList" size="small" border height="100%"
-      @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="serviceList"
+      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="纳税性质" min-width="100" align="center" prop="taxType" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="180" />
-      <el-table-column label="项目" align="center" prop="taskTypeName" min-width="90">
+      <el-table-column
+        label="客户名称"
+        align="center"
+        min-width="250"
+        prop="companyName"
+      />
+      <el-table-column
+        label="纳税性质"
+        min-width="100"
+        align="center"
+        prop="taxType"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="180"
+      />
+      <el-table-column
+        label="项目"
+        align="center"
+        prop="taskTypeName"
+        min-width="90"
+      >
         <template #default="scope">
           {{ scope.row.taskTypeName }}
         </template>
@@ -65,51 +143,82 @@
 
           {{
             scope.row.taskTypeId === "1"
-            ? moment().subtract(1, "month").format("YYYY年MM月")
-            : moment().format("YYYY年MM月")
+              ? moment().subtract(1, "month").format("YYYY年MM月")
+              : moment().format("YYYY年MM月")
           }}
         </template>
       </el-table-column>
       <el-table-column align="center">
         <template #header>
-          <div style="
+          <div
+            style="
               display: flex;
               flex-direction: row;
               justify-content: space-between;
-            ">
+            "
+          >
             <div style="display: flex; flex-direction: row">
-              <el-button link type="primary" size="small" icon="ArrowLeft" @click="prevYear" />
+              <el-button
+                link
+                type="primary"
+                size="small"
+                icon="ArrowLeft"
+                @click="prevYear"
+              />
               <el-link style="margin: 0 40px" :underline="false">{{
                 queryParams.year
               }}</el-link>
-              <el-button link type="primary" icon="ArrowRight" size="small" @click="nextYear" />
+              <el-button
+                link
+                type="primary"
+                icon="ArrowRight"
+                size="small"
+                @click="nextYear"
+              />
             </div>
             <div style="display: flex; flex-direction: row; margin-right: 20px">
-              <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
+                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="
                     display: inline-block;
                     margin-left: 10px;
                     line-height: 36px;
-                  ">
+                  "
+                >
                   {{ item.label }}
                 </div>
               </div>
             </div>
           </div>
         </template>
-        <el-table-column v-for="item in selectMonths" :key="item.value" min-width="50" :label="item.label" align="center">
+        <el-table-column
+          v-for="item in selectMonths"
+          :key="item.value"
+          min-width="50"
+          :label="item.label"
+          align="center"
+        >
           <template #default="scope">
-            <el-button size="small" :style="monthStatusStyle(scope.row, item.value)" circle
-              @click="handleByRow(scope.row, item.value)" />
+            <el-button
+              size="small"
+              :style="monthStatusStyle(scope.row, item.value)"
+              circle
+              @click="handleByRow(scope.row, item.value)"
+            />
           </template>
         </el-table-column>
       </el-table-column>
@@ -120,20 +229,33 @@
     <!-- </div>
     </div> -->
     <!-- <workorder-form ref="workOrderRef" :get-list="getList" /> -->
-    <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">
         <el-row :gutter="30">
           <el-col :span="24">
             <el-form-item label="客户名称" prop="companyName">
-              <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>
@@ -145,8 +267,14 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="备注:">
-              <el-input v-model.trim="form.remark" type="textarea" width="100%" size="small" placeholder="备注"
-                :clearable="true" />
+              <el-input
+                v-model.trim="form.remark"
+                type="textarea"
+                width="100%"
+                size="small"
+                placeholder="备注"
+                :clearable="true"
+              />
             </el-form-item>
           </el-col>
         </el-row>
@@ -159,8 +287,13 @@
       </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"
+    />
     <service-form ref="serviceRef" :get-list="getList" />
     <housing-fund-form ref="housingFundFormRef" :get-list="getList" />
     <housing-fund-view ref="housingFundViewRef" :get-list="getList" />
@@ -173,8 +306,8 @@
 
 <script setup name="Company">
 // import contractForm from "./form";
-import auth from '@/plugins/auth'
-import { listLoop } from "@/api/business/crm/serviceWorkOrder";
+import auth from "@/plugins/auth";
+import { listLoop, exportLoop } from "@/api/business/crm/serviceWorkOrder";
 import { listCompany } from "@/api/business/crm/company";
 import serviceForm from "../serviceForm";
 import { reactive, ref, toRefs } from "vue";
@@ -365,7 +498,11 @@ function handleUpdate(row) {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  if (queryParams.value.month) {
+    exportLoop(queryParams.value);
+  } else {
+    proxy.$modal.msgError("请选择导出月份");
+  }
 }
 
 function startDateChangeHandler(row, startDate) {
@@ -382,11 +519,11 @@ function querySearchCompanyAsync(queryString, cb) {
   const query =
     queryString.length > 0
       ? {
-        keyword: queryString,
-        pageSize: 20,
-        pageNum: 1,
-        orderByColumn: "create_time",
-      }
+          keyword: queryString,
+          pageSize: 20,
+          pageNum: 1,
+          orderByColumn: "create_time",
+        }
       : { pageSize: 20, pageNum: 1, orderByColumn: "create_time" };
   listCompany(query).then((res) => {
     cb(res.rows);
@@ -609,7 +746,7 @@ function handleByRow(row, item) {
 }
 
 function hasPermi(arr) {
-  return auth.hasPermiOr(arr)
+  return auth.hasPermiOr(arr);
 }
 getList();
 </script>

+ 5 - 5
src/views/business/service/loop/keepAccountView.vue

@@ -7,10 +7,6 @@
     draggable
     @close="close"
   >
-    <!-- <div slot="title" class="dialog-title-container">
-      <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
-      <i class="el-icon-close" @click="close" />
-    </div> -->
     <!-- 功能按钮 -->
     <div style="padding: 8px 24px 16px 24px">
       <el-form size="small" label-width="140px" v-model="form">
@@ -27,7 +23,11 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="服务状态">
-              <el-select v-model="form.status" placeholder="请选择">
+              <el-select
+                v-model="form.status"
+                :disabled="form.status === 3"
+                placeholder="请选择"
+              >
                 <el-option
                   v-for="item in selectStatus"
                   :key="item.value"

+ 5 - 5
src/views/business/service/loop/socialSecurityView.vue

@@ -8,10 +8,6 @@
     @close="close"
     class="dialog-form"
   >
-    <!-- <div slot="title" class="dialog-title-container">
-      <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
-      <i class="el-icon-close" @click="close" />
-    </div> -->
     <!-- 功能按钮 -->
     <div style="padding: 8px 24px 16px 24px">
       <el-form size="small" label-width="120px" v-model="form">
@@ -28,7 +24,11 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="服务状态">
-              <el-select v-model="form.status" placeholder="请选择">
+              <el-select
+                v-model="form.status"
+                :disabled="form.status === 3"
+                placeholder="请选择"
+              >
                 <el-option
                   v-for="item in selectStatus"
                   :key="item.value"

+ 139 - 70
src/views/business/service/once/index.vue

@@ -2,64 +2,122 @@
   <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="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
-        v-hasPermi="['business:workOrder:remove']">删除</el-button> -->
       <el-dropdown>
-        <el-button type="primary" size="small"
-          v-if="hasPermi(['business:customer:service:once:export', 'business:customer:service:once:transactor'])">
+        <el-button
+          type="primary"
+          size="small"
+          v-if="
+            hasPermi([
+              'business:customer:service:once:export',
+              'business:customer:service:once:transactor',
+            ])
+          "
+        >
           其它<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="hasPermi(['business:customer:service:once:export'])">
-              导出</el-dropdown-item>
-            <el-dropdown-item icon="Operation" @click="setServiceHandler"
-              v-if="hasPermi(['business:customer:service:once:transactor'])">
-              设置执行人</el-dropdown-item>
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-if="hasPermi(['business:customer:service:once:exportOnce'])"
+            >
+              导出</el-dropdown-item
+            >
+            <el-dropdown-item
+              icon="Operation"
+              @click="setServiceHandler"
+              v-if="hasPermi(['business:customer:service:once:transactor'])"
+            >
+              设置执行人</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 style="width: 150px" v-model="queryParams.companyName" placeholder="请输入客户名称" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          style="width: 150px"
+          v-model="queryParams.companyName"
+          placeholder="请输入客户名称"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="状态:" prop="status">
-        <el-select v-model.trim="queryParams.status" size="small" type="text" placeholder="状态" :clearable="true"
-          style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :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" prop="workOrderNo" width="200" /> -->
-      <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" min-width="480" prop="remark">
+      <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"
+        min-width="480"
+        prop="remark"
+      >
         <template #default="scope">
           <div>
             {{
               scope.row.noContract === 1
-              ? scope.row.remark
-              : `${scope.row.taskTypeName}${scope.row.taskTypeDetailName
-                ? `-${scope.row.taskTypeDetailName}`
-                : ""
-                }`
+                ? scope.row.remark
+                : `${scope.row.taskTypeName}${
+                    scope.row.taskTypeDetailName
+                      ? `-${scope.row.taskTypeDetailName}`
+                      : ""
+                  }`
             }}
           </div>
         </template>
@@ -70,28 +128,36 @@
             {{ 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',
-                    margin: 'auto',
-                    borderRadius: '50%',
-                    border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                  }" />
-                  <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="
                       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;
@@ -101,7 +167,9 @@
                     height: 14px;
                     background-color: #ccc;
                     border-radius: 50%;
-                  ">?</span>
+                  "
+                  >?</span
+                >
               </template>
             </el-popover>
           </div>
@@ -109,10 +177,17 @@
       </el-table-column>
       <el-table-column label="操作" align="center" min-width="60">
         <template #default="scope">
-          <el-button size="small" link type="primary" v-hasPermi="[
-            'business:customer:service:once:view',
-            'business:customer:service:once:edit',
-          ]" @click="handleByRow(scope.row)">查看</el-button>
+          <el-button
+            size="small"
+            link
+            type="primary"
+            v-hasPermi="[
+              'business:customer:service:once:view',
+              'business:customer:service:once:edit',
+            ]"
+            @click="handleByRow(scope.row)"
+            >查看</el-button
+          >
         </template>
       </el-table-column>
       <el-table-column label="工单执行人" align="center" width="110">
@@ -125,8 +200,13 @@
       </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"
+    />
     <service-form ref="serviceRef" :get-list="getList" />
     <form-dialog ref="formRef" :get-list="getList" />
     <view-dialog ref="viewRef" :get-list="getList" />
@@ -134,9 +214,8 @@
 </template>
 
 <script setup name="Company">
-// import contractForm from "./form";
-import { listOnce } from "@/api/business/crm/serviceWorkOrder";
-import auth from '@/plugins/auth'
+import { listOnce, exportOnce } from "@/api/business/crm/serviceWorkOrder";
+import auth from "@/plugins/auth";
 import useUserStore from "@/store/modules/user";
 const permissions = useUserStore().permissions;
 const all_permission = "*:*:*";
@@ -253,7 +332,6 @@ function handleSelectionChange(selection) {
 
 /** 新增按钮操作 */
 function handleAdd() {
-  // proxy.$refs.workOrderRef.open();
   formOpen.value = true;
 }
 
@@ -267,10 +345,7 @@ function reset() {
 }
 
 /** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.workOrderRef.open(id);
-}
+function handleUpdate(row) {}
 
 /** 删除按钮操作 */
 function handleDelete(row) {
@@ -283,19 +358,13 @@ function handleDelete(row) {
     .then(() => {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
-    }).catch(() => { });
+    })
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
 function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportWorkOrder(queryParams.value);
+  exportOnce(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {
@@ -415,11 +484,11 @@ function getTransactor(row) {
 }
 
 function clearStatus() {
-  queryParams.value.status = null
+  queryParams.value.status = null;
 }
 
 function hasPermi(arr) {
-  return auth.hasPermiOr(arr)
+  return auth.hasPermiOr(arr);
 }
 getList();
 </script>

+ 9 - 7
src/views/business/service/once/view.vue

@@ -8,10 +8,6 @@
     @close="close"
     class="dialog-form"
   >
-    <!-- <div slot="title" class="dialog-title-container">
-      <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
-      <i class="el-icon-close" @click="close" />
-    </div> -->
     <!-- 功能按钮 -->
     <div style="padding: 8px 24px 16px 24px">
       <el-form size="small" label-width="120px" v-model="form">
@@ -23,7 +19,11 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="服务状态">
-              <el-select v-model="form.status" placeholder="请选择">
+              <el-select
+                v-model="form.status"
+                :disabled="isDisabled"
+                placeholder="请选择"
+              >
                 <el-option
                   v-for="item in selectStatus"
                   :key="item.value"
@@ -47,8 +47,6 @@
       @close="closeImages"
       :initial-index="showIndex"
     />
-    <!-- <feedback-dialog ref="feedbackDialogView" :parent="this" />
-    <print-dialog ref="printDialog" :parent="this" /> -->
   </el-dialog>
 </template>
 <script setup>
@@ -111,6 +109,10 @@ const emptyForm = {
   housingFundDeclare: {},
 };
 
+function isDisabled() {
+  return form.value.status === 3;
+}
+
 function open(detail) {
   visible.value = true;
   form.value = { ...emptyForm, ...detail };

+ 1 - 0
src/views/business/service/serviceForm.vue

@@ -10,6 +10,7 @@
     <el-form ref="dictRef" :model="form" :rules="rules" label-width="100">
       <el-form-item :label="title" :prop="content">
         <el-autocomplete
+          style="width: 100%"
           :fetch-suggestions="querySearchAsync"
           :trigger-on-focus="true"
           v-model="selectionName"

+ 153 - 57
src/views/business/setting/account/index.vue

@@ -2,105 +2,208 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
-        v-hasPermi="['business:account:add']">新增</el-button>
-      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
-        v-hasPermi="['business:account:remove']">删除</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        icon="Plus"
+        @click="handleAdd"
+        v-hasPermi="['business:account:add']"
+        >新增</el-button
+      >
+      <el-button
+        type="danger"
+        size="small"
+        icon="Delete"
+        :disabled="multiple"
+        @click="handleDelete"
+        v-hasPermi="['business:account:remove']"
+        >删除</el-button
+      >
       <el-dropdown>
         <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:account:export']">
-              导出</el-dropdown-item>
+            <el-dropdown-item
+              icon="Download"
+              @click="handleExport"
+              v-hasPermi="['business:account: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="name">
-        <el-input v-model="queryParams.name" placeholder="请输入账户名称" style="width: 150px" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入账户名称"
+          style="width: 150px"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="账号:" prop="accountNum">
-        <el-input v-model="queryParams.accountNum" placeholder="请输入账号" style="width: 150px" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.accountNum"
+          placeholder="请输入账号"
+          style="width: 150px"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="开户行:" prop="accountOpen">
-        <el-input v-model="queryParams.accountOpen" placeholder="请输入开户行" style="width: 150px" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.accountOpen"
+          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="accountList" size="small" border height="100%"
-      @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="accountList"
+      size="small"
+      border
+      height="100%"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="账户名称" align="center" prop="name">
         <template #default="scope">
-          <el-input v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.name" size="small"
-            placeholder="请输入内容"></el-input>
+          <el-input
+            v-if="scope.row.isAdd || scope.row.isEdit"
+            v-model="scope.row.name"
+            size="small"
+            placeholder="请输入内容"
+          ></el-input>
           <span v-else>{{ scope.row.name }}</span>
         </template>
       </el-table-column>
       <el-table-column label="账号" align="center" prop="accountNum">
         <template #default="scope">
-          <el-input v-if="scope.row.isAdd || scope.row.isEdit" size="small" v-model="scope.row.accountNum"
-            placeholder="请输入内容"></el-input>
+          <el-input
+            v-if="scope.row.isAdd || scope.row.isEdit"
+            size="small"
+            v-model="scope.row.accountNum"
+            placeholder="请输入内容"
+          ></el-input>
           <span v-else>{{ scope.row.accountNum }}</span>
         </template>
       </el-table-column>
       <el-table-column label="开户行" align="center" prop="accountOpen">
         <template #default="scope">
-          <el-input v-if="scope.row.isAdd || scope.row.isEdit" size="small" v-model="scope.row.accountOpen"
-            placeholder="请输入内容"></el-input>
+          <el-input
+            v-if="scope.row.isAdd || scope.row.isEdit"
+            size="small"
+            v-model="scope.row.accountOpen"
+            placeholder="请输入内容"
+          ></el-input>
           <span v-else>{{ scope.row.accountOpen }}</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 &&
-            scope.row.referrerDataSource == isReferrerDataSource
-            ">
-            <el-button v-show="!scope.row.isAdd &&
+          <template
+            v-if="
+              !scope.row.isAdd &&
               !scope.row.isEdit &&
               scope.row.referrerDataSource == isReferrerDataSource
-              " link type="warning" size="small" @click="handleUpdate(scope.row)"
-              v-hasPermi="['business:account:edit']">修改</el-button>
-            <el-button v-show="!scope.row.isAdd &&
-              !scope.row.isEdit &&
-              scope.row.referrerDataSource == isReferrerDataSource
-              " link type="danger" size="small" @click="handleDelete(scope.row)"
-              v-hasPermi="['business:account:remove']">删除</el-button>
+            "
+          >
+            <el-button
+              v-show="
+                !scope.row.isAdd &&
+                !scope.row.isEdit &&
+                scope.row.referrerDataSource == isReferrerDataSource
+              "
+              link
+              type="warning"
+              size="small"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['business:account:edit']"
+              >修改</el-button
+            >
+            <el-button
+              v-show="
+                !scope.row.isAdd &&
+                !scope.row.isEdit &&
+                scope.row.referrerDataSource == isReferrerDataSource
+              "
+              link
+              type="danger"
+              size="small"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['business:account:remove']"
+              >删除</el-button
+            >
           </template>
-          <template v-if="scope.row.isAdd ||
-            (scope.row.isEdit &&
-              scope.row.referrerDataSource == isReferrerDataSource)
-            ">
-            <el-button v-show="scope.row.isAdd ||
+          <template
+            v-if="
+              scope.row.isAdd ||
               (scope.row.isEdit &&
                 scope.row.referrerDataSource == isReferrerDataSource)
-              " link type="primary" size="small" v-hasPermi="['business:account:edit', 'business:account:add']"
-              @click="handleSave(scope.row)">保存</el-button>
-            <el-button v-show="scope.row.isEdit || scope.row.isAdd" link size="small"
-              @click="handCancel(scope.row)">取消</el-button>
+            "
+          >
+            <el-button
+              v-show="
+                scope.row.isAdd ||
+                (scope.row.isEdit &&
+                  scope.row.referrerDataSource == isReferrerDataSource)
+              "
+              link
+              type="primary"
+              size="small"
+              v-hasPermi="['business:account:edit', 'business:account:add']"
+              @click="handleSave(scope.row)"
+              >保存</el-button
+            >
+            <el-button
+              v-show="scope.row.isEdit || scope.row.isAdd"
+              link
+              size="small"
+              @click="handCancel(scope.row)"
+              >取消</el-button
+            >
           </template>
         </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"
+    />
 
     <!-- 表单 -->
     <account-form ref="accountRef" :get-list="getList"></account-form>
@@ -113,6 +216,7 @@ import {
   delAccount,
   addAccount,
   updateAccount,
+  exportAccount,
 } from "@/api/business/account";
 import accountForm from "./form";
 const { proxy } = getCurrentInstance();
@@ -241,19 +345,11 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
-function handleExport() {
-  proxy.download(
-    "business/account/export",
-    {
-      ...queryParams.value,
-    },
-    `account_${new Date().getTime()}.xlsx`
-  );
-}
+function handleExport() {}
 
 getList();
 </script>

+ 24 - 0
src/views/business/socialSecurity/confirm/form.vue

@@ -320,6 +320,30 @@
                       >
                     </template>
                   </el-table-column>
+                  <el-table-column label="采暖费" width="100" align="center">
+                    <template #default="scope">
+                      <div>
+                        <el-input-number
+                          v-model="scope.row.heatingFee"
+                          :precision="2"
+                          :controls="false"
+                          style="width: 100%; align: left"
+                          size="small"
+                          placeholder="采暖费"
+                        />
+                      </div>
+                      <!-- <span
+                        style="
+                          color: red;
+                          position: absolute;
+                          z-index: 10;
+                          top: 4px;
+                          right: 12px;
+                        "
+                        >*</span
+                      > -->
+                    </template>
+                  </el-table-column>
                   <el-table-column label="基数" width="100" align="center">
                     <template #default="scope">
                       <div>

+ 221 - 0
src/views/business/socialSecurity/confirm/importExcelDialog.vue

@@ -0,0 +1,221 @@
+<template>
+  <!-- 添加或修改菜单对话框 -->
+  <el-dialog
+    title="社保导入"
+    v-model="visible"
+    width="680px"
+    append-to-body
+    draggable
+  >
+    <el-form
+      ref="menuRef"
+      :model="form"
+      size="small"
+      :rules="rules"
+      label-width="100px"
+    >
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="选择导入月份" prop="year">
+            <el-date-picker
+              v-model="currentMonth"
+              type="month"
+              format="YYYY年MM月"
+              style="width: 150px"
+              :clearable="false"
+              value-format="YYYY-MM-01"
+              :disabled-date="disabledDateHandler"
+              @change="monthChangeHandler"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="上传">
+            <el-upload
+              ref="uploadRef"
+              :limit="1"
+              accept=".xlsx, .xls"
+              :headers="upload.headers"
+              :action="upload.url + `?year=${year}&month=${month}`"
+              :fileList="fileList"
+              :before-upload="handleBeforeUpload"
+              :disabled="upload.isUploading"
+              :on-progress="handleFileUploadProgress"
+              :on-success="handleFileSuccess"
+              :auto-upload="false"
+              drag
+            >
+              <el-icon class="el-icon--upload">
+                <upload-filled />
+              </el-icon>
+              <div class="el-upload__text">
+                将文件拖到此处,或<em>点击上传</em>
+              </div>
+              <template #tip>
+                <div class="el-upload__tip text-center">
+                  <span
+                    >仅允许导入xls、xlsx格式文件。文件大小限制为&lt;50Mb</span
+                  >
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    style="font-size: 12px; vertical-align: baseline"
+                    @click="importTemplate"
+                    >下载模板</el-link
+                  >
+                </div>
+              </template>
+            </el-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+
+<script setup>
+import { exportSocialSecurityTemplate } from "@/api/business/production/socialSecurityConfirm";
+import { getToken, getTenant } from "@/utils/auth";
+import useUserStore from "@/store/modules/user";
+import { deepClone } from "@/utils";
+
+const { proxy } = getCurrentInstance();
+/** 父组件传参 */
+const props = defineProps({
+  getList: {
+    type: Function,
+    default: () => {},
+  },
+});
+const { getList } = toRefs(props);
+/** 字典数组区 */
+/** 表单抽屉 页变量 */
+const fileList = ref([]);
+const visible = ref(false);
+const currentMonth = ref(proxy.moment().subtract("month").format("YYYY-MM-01"));
+const year = ref(proxy.moment().format("YYYY"));
+const month = ref(proxy.moment().format("MM"));
+
+const addType = ref(1);
+const webHost = import.meta.env.VITE_APP_BASE_API;
+
+const setHeaders = {
+  Authorization: getToken(),
+};
+
+const data = reactive({
+  form: {
+    year: proxy.moment().format("YYYY"),
+    month: proxy.moment().format("MM"),
+  },
+  followData: {},
+});
+const addComRef = ref(null);
+
+/*** 客户导入参数 */
+const upload = reactive({
+  // 是否禁用上传
+  isUploading: false,
+  // 设置上传的请求头部
+  headers: { Authorization: "Bearer " + getToken(), tenantId: getTenant() },
+  // 上传的地址
+  url: `/ezhizao-yzbh-production/business/socialSecurityConfirm/importData`,
+});
+
+/** 查询对象 */
+const queryParams = ref({});
+
+const followQuery = ref({});
+const { form, rules, followData } = toRefs(data);
+
+/***********************  表单页方法 ****************************/
+
+/** 抽屉打开 */
+function open() {
+  // reset();
+  visible.value = true;
+}
+
+//下载模板
+const importTemplate = () => {
+  exportSocialSecurityTemplate();
+};
+
+function reset() {
+  // console.log(addComRef.value)
+  if (addComRef.value != null) addComRef.value.reset();
+}
+
+function cancel() {
+  visible.value = false;
+}
+
+function submitForm() {
+  submitFileForm();
+}
+
+function handleBeforeUpload(file) {
+  console.log(file);
+  if (
+    file.type !==
+      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
+    file.type !== "application/vnd.ms-excel"
+  ) {
+    proxy.$modal.msgError("请选择excel文件");
+    return false;
+  }
+  return true;
+}
+
+/**文件上传中处理 */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+/** 文件上传成功处理 */
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  proxy.$alert(
+    "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+      response.msg +
+      "</div>",
+    "导入结果",
+    { dangerouslyUseHTMLString: true }
+  );
+  getList.value();
+};
+/** 提交上传文件 */
+function submitFileForm() {
+  proxy.$refs["uploadRef"].submit();
+}
+
+function monthChangeHandler(arg) {
+  year.value = proxy.moment(arg).format("YYYY");
+  month.value = proxy.moment(arg).format("MM");
+}
+
+function disabledDateHandler(date) {
+  if (date <= proxy.moment().subtract("month")) {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+// 暴露给父组件的方法
+defineExpose({
+  open,
+});
+</script>
+
+<style></style>

+ 261 - 62
src/views/business/socialSecurity/confirm/index.vue

@@ -8,49 +8,123 @@
         </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:socialSecurityConfirm:export']"
+            >
+              导出</el-dropdown-item
+            >
+            <el-dropdown-item
+              icon="Upload"
+              @click="handleImport"
+              v-hasPermi="['business:socialSecurityConfirm: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="78px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="78px"
+    >
       <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="月份:">
-        <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" style="width: 130px"
-          @change="handleQuery" :clearable="false">
-          <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.month"
+          size="small"
+          placeholder="月份"
+          style="width: 130px"
+          @change="handleQuery"
+          :clearable="false"
+        >
+          <el-option
+            v-for="item in selectMonths"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="状态:">
-        <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-          :clearable="true" style="width: 130px" @clear="clearStatus">
-          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        <el-select
+          v-model.trim="queryParams.status"
+          prop="status"
+          size="small"
+          type="text"
+          placeholder="状态"
+          :clearable="true"
+          style="width: 130px"
+          @clear="clearStatus"
+        >
+          <el-option
+            v-for="item in selectStatus"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </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="operation" @click="moreSearch = true">更多</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="companyName" min-width="250" />
-      <el-table-column label="来源" align="center" prop="fromCompanyName" width="100" />
-      <el-table-column label="纳税性质" width="100" align="center" prop="taxType" />
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        prop="companyName"
+        min-width="250"
+      />
+      <el-table-column
+        label="来源"
+        align="center"
+        prop="fromCompanyName"
+        width="100"
+      />
+      <el-table-column
+        label="纳税性质"
+        width="100"
+        align="center"
+        prop="taxType"
+      />
+      <el-table-column
+        label="税号"
+        align="center"
+        prop="socialCreditCode"
+        min-width="200"
+      />
       <el-table-column label="当前期间" min-width="90" align="center">
         <template #default="scope">
           <!-- {{ scope.row.currentDate != null && scope.row.currentDate > scope.row.checkoutDate ? scope.row.currentDate :
@@ -60,84 +134,185 @@
       </el-table-column>
       <el-table-column align="center">
         <template #header>
-          <div style="
+          <div
+            style="
               display: flex;
               flex-direction: row;
               justify-content: space-between;
-            ">
+            "
+          >
             <div style="display: flex; flex-direction: row">
-              <el-button link type="primary" size="small" icon="ArrowLeft" @click="prevYear" />
+              <el-button
+                link
+                type="primary"
+                size="small"
+                icon="ArrowLeft"
+                @click="prevYear"
+              />
               <el-link style="margin: 0 40px" :underline="false">{{
                 queryParams.year
               }}</el-link>
-              <el-button link type="primary" icon="ArrowRight" size="small" @click="nextYear" />
+              <el-button
+                link
+                type="primary"
+                icon="ArrowRight"
+                size="small"
+                @click="nextYear"
+              />
             </div>
             <div style="display: flex; flex-direction: row; margin-right: 20px">
-              <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
+                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="
                     display: inline-block;
                     margin-left: 10px;
                     line-height: 36px;
-                  ">
+                  "
+                >
                   {{ item.label }}
                 </div>
               </div>
             </div>
           </div>
         </template>
-        <el-table-column v-for="item in selectMonths" :key="item.value" min-width="50" :label="item.label" align="center">
+        <el-table-column
+          v-for="item in selectMonths"
+          :key="item.value"
+          min-width="50"
+          :label="item.label"
+          align="center"
+        >
           <template #default="scope">
-            <el-button size="small" :style="monthStatusStyle(scope.row, item.value)" circle
-              @click="openDetail(scope.row, item)" style="width: 12px; height: 12px" />
+            <el-button
+              size="small"
+              :style="monthStatusStyle(scope.row, item.value)"
+              circle
+              @click="openDetail(scope.row, item)"
+              style="width: 12px; height: 12px"
+            />
           </template>
         </el-table-column>
       </el-table-column>
-      <el-table-column label="执行人" align="center" prop="serviceName" min-width="100">
+      <el-table-column
+        label="执行人"
+        align="center"
+        prop="serviceName"
+        min-width="100"
+      >
       </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"
+    />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
+    <import-excel-dialog ref="importExcelDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable>
-      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
+    <el-dialog
+      title="更多搜索"
+      v-model="moreSearch"
+      width="620px"
+      append-to-body
+      size="small"
+      draggable
+    >
+      <el-form
+        :model="queryParams"
+        ref="queryRef"
+        size="small"
+        label-width="100"
+      >
         <el-row :gutter="20">
           <el-col :span="12">
             <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 v-if="tenant.versionId === '4'" label="来源:" prop="fromCompanyName">
-              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
-                :clearable="true" />
+            <el-form-item
+              v-if="tenant.versionId === '4'"
+              label="来源:"
+              prop="fromCompanyName"
+            >
+              <el-input
+                size="small"
+                v-model="queryParams.fromCompanyName"
+                type="text"
+                placeholder="客户来源"
+                :clearable="true"
+              />
             </el-form-item>
             <el-form-item label="纳税性质:" prop="taxType">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
-                @change="taxTypeChange">
-                <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"
+                @change="taxTypeChange"
+              >
+                <el-option
+                  v-for="item in taxTypes"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="状态:">
-              <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
-                :clearable="true" @clear="clearStatus">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.status"
+                prop="status"
+                size="small"
+                type="text"
+                placeholder="状态"
+                :clearable="true"
+                @clear="clearStatus"
+              >
+                <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="月份:">
-              <el-select v-model.trim="queryParams.month" size="small" placeholder="月份" :clearable="false">
-                <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model.trim="queryParams.month"
+                size="small"
+                placeholder="月份"
+                :clearable="false"
+              >
+                <el-option
+                  v-for="item in selectMonths"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -145,8 +320,16 @@
       </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>
@@ -155,9 +338,13 @@
 
 <script setup>
 import useUserStore from "@/store/modules/user";
-import { listSocialSecurityConfirm } from "@/api/business/production/socialSecurityConfirm";
+import {
+  listSocialSecurityConfirm,
+  exportSociaSecurity,
+} from "@/api/business/production/socialSecurityConfirm";
 import { listCompany } from "@/api/business/crm/company";
 import { taxTypes } from "@/utils/default";
+import importExcelDialog from "./importExcelDialog.vue";
 import { reactive, ref, toRefs } from "vue";
 import formDialog from "./form";
 import viewDialog from "./view";
@@ -165,7 +352,8 @@ import viewDialog from "./view";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
-const tenant = useUserStore().tenant
+const importExcelDialogRef = ref(null);
+const tenant = useUserStore().tenant;
 const list = ref([]);
 const loading = ref(true);
 const ids = ref([]);
@@ -235,6 +423,11 @@ const data = reactive({
       value: 0,
       color: "#fff",
     },
+    {
+      label: "待确认",
+      value: 1,
+      color: "#ffb836",
+    },
     {
       label: "待审核",
       value: 2,
@@ -324,6 +517,7 @@ function resetQuery() {
   queryParams.value = {
     pageNum: 1,
     pageSize: 20,
+    orderByColumn: "create_time",
     year: proxy.moment().format("yyyy"),
     month: proxy.moment().format("MM"),
     companyName: "",
@@ -331,6 +525,11 @@ function resetQuery() {
   handleQuery();
 }
 
+//导入按钮操作
+function handleImport() {
+  importExcelDialogRef.value.open();
+}
+
 // 多选框选中数据
 function handleSelectionChange(selection) {
   ids.value = selection.map((item) => item.id);
@@ -368,13 +567,13 @@ function openDetail(row, month) {
 
 function directDialog(detail) {
   // 判断是否有权限
-  if (detail.status === 0 || detail.status == null) {
+  if (detail.status === 1 || detail.status === 0 || detail.status == null) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else {
       proxy.$modal.msgError("没有权限");
     }
-  } else if (detail.status === 1 || detail.status === 4) {
+  } else if (detail.status === 4) {
     if (editable()) {
       formDialogRef.value.open(detail);
     } else if (viewable() || verifiable()) {
@@ -418,7 +617,7 @@ function verifiable() {
 
 /** 导出按钮操作 */
 function handleExport() {
-  // exportWorkOrder(queryParams.value)
+  exportSociaSecurity(queryParams.value);
 }
 
 function startDateChangeHandler(row, startDate) {

+ 7 - 0
src/views/business/socialSecurity/confirm/view.vue

@@ -237,6 +237,13 @@
                       >
                     </template>
                   </el-table-column>
+                  <el-table-column label="采暖费" width="100" align="center">
+                    <template #default="scope">
+                      <div>
+                        {{ rowNum(scope.row.heatingFee) }}
+                      </div>
+                    </template>
+                  </el-table-column>
                   <el-table-column label="基数" width="100" align="center">
                     <template #default="scope">
                       <div>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff