Explorar el Código

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/program/registered/ContactForm.vue
#	src/views/program/registered/ProjectFormUpdate.vue
#	src/views/program/registered/RegisItemForm.vue
lizhenhao hace 2 años
padre
commit
fbb7c7b7ad
Se han modificado 100 ficheros con 10340 adiciones y 826 borrados
  1. 2 2
      datav.html
  2. 5 2
      index.html
  3. 4 4
      package.json
  4. BIN
      public/favicon.ico
  5. 2 0
      src/api/AppPath.js
  6. 51 0
      src/api/flowable/NoticeService.js
  7. 7 0
      src/api/flowable/taskService.js
  8. 17 16
      src/api/materialManagement/CollectService.js
  9. 7 6
      src/api/materialManagement/ContractService.js
  10. 1 0
      src/api/materialManagement/MaterialManagementService.js
  11. 8 7
      src/api/materialManagement/MaterialTypeService.js
  12. 7 6
      src/api/materialManagement/SupplierService.js
  13. 150 141
      src/api/materialManagement/WareHouseService.js
  14. 6 0
      src/api/program/ProgramProjectListInfoService.js
  15. 9 2
      src/api/sys/OSSService.js
  16. 15 0
      src/api/sys/userService.js
  17. 76 0
      src/api/zs/reimbursement/ReimbursementService.js
  18. 47 0
      src/api/zs/reimbursement/ReimbursementTypeService.js
  19. BIN
      src/assets/img/login/login2.png
  20. 122 20
      src/assets/img/logo.svg
  21. 1 1
      src/components/footer/index.vue
  22. 5 4
      src/components/userSelect/UserSelectDialog.vue
  23. 1 1
      src/components/userSelectButton/UserSelectDialog.vue
  24. 444 0
      src/components/userSelectV2/UserSelectDialog.vue
  25. 101 0
      src/components/userSelectV2/index.vue
  26. 2 2
      src/config/index.js
  27. 14 13
      src/layout/components/userbar.vue
  28. 13 0
      src/utils/index.js
  29. 8 1
      src/views/common/UpLoadComponent.vue
  30. 6 5
      src/views/common/UpLoadComponentDialog.vue
  31. 5 5
      src/views/common/UpLoadComponentV2.vue
  32. 5 5
      src/views/common/UpLoadComponentV3.1.vue
  33. 61 38
      src/views/cw/invoice/InvoiceForm.vue
  34. 30 20
      src/views/cw/invoice/InvoiceFormTask.vue
  35. 8 5
      src/views/cw/invoice/InvoiceList.vue
  36. 2 2
      src/views/cw/invoice/ProgramPageForm.vue
  37. 1 1
      src/views/cw/projectRecords/ProjectMembersEditForm.vue
  38. 11 13
      src/views/cw/projectRecords/ProjectMembersList.vue
  39. 26 21
      src/views/cw/projectRecords/ProjectRecordsAddForm.vue
  40. 5 5
      src/views/cw/projectRecords/ProjectRecordsChooseCom.vue
  41. 4 4
      src/views/cw/projectRecords/ProjectRecordsForm.vue
  42. 4 4
      src/views/cw/projectRecords/ProjectRecordsList.vue
  43. 1 1
      src/views/cw/projectRecords/ProjectRecordsTaskForm.vue
  44. 8 8
      src/views/cw/projectReportArchive/ProjectReportArchiveDetailList.vue
  45. 1 1
      src/views/cw/projectReportArchive/ProjectReportArchiveForm.vue
  46. 5 5
      src/views/cw/projectReportArchive/ProjectReportArchiveList.vue
  47. 29 19
      src/views/cw/projectReportArchive/ProjectReportArchiveTaskForm.vue
  48. 10 4
      src/views/cw/reimbursementApproval/info/InfoList.vue
  49. 7 6
      src/views/cw/reimbursementApproval/info/ReimbursementForm.vue
  50. 6 6
      src/views/cw/reportCancellApply/ReportCancellApplyList.vue
  51. 3 3
      src/views/cw/reportCancellApplyArchived/ReportCancellApplyArchivedForm.vue
  52. 4 4
      src/views/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList.vue
  53. 1 1
      src/views/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue
  54. 8 6
      src/views/cw/reportManagement/ReportManagementAddForm.vue
  55. 21 17
      src/views/cw/reportManagement/ReportManagementForm.vue
  56. 14 6
      src/views/cw/reportManagement/ReportManagementList.vue
  57. 6 4
      src/views/cw/reportManagement/ReportManagementSignatureForm.vue
  58. 14 14
      src/views/cw/reportManagement/reportReview/ReportReviewForm.vue
  59. 15 9
      src/views/cw/workClientInfo/WorkClientAddForm.vue
  60. 1 1
      src/views/cw/workClientInfo/WorkClientBillingChooseRadio.vue
  61. 16 16
      src/views/cw/workClientInfo/WorkClientForm.vue
  62. 4 4
      src/views/cw/workClientInfo/WorkClientList.vue
  63. 14 14
      src/views/cw/workClientInfo/WorkClientListForm.vue
  64. 123 0
      src/views/cw/workClientInfo/clientUserSelect/AccountantUserIndex.vue
  65. 123 0
      src/views/cw/workClientInfo/clientUserSelect/AccountantUserIndex2.vue
  66. 488 0
      src/views/cw/workClientInfo/clientUserSelect/AccountantUserSelectDialog.vue
  67. 488 0
      src/views/cw/workClientInfo/clientUserSelect/AccountantUserSelectDialog2.vue
  68. 165 153
      src/views/cw/workClientInfo/clientUserSelect/UserSelectDialog.vue
  69. 117 102
      src/views/cw/workClientInfo/clientUserSelect/index.vue
  70. 6 4
      src/views/cw/workClientInfo/manageLevelType/ManageLevelTypeListForm.vue
  71. 6 4
      src/views/cw/workClientInfo/organizationType/OrganizationTypeListForm.vue
  72. 1 0
      src/views/cw/workContract/ContractFilePaperForm.vue
  73. 5 2
      src/views/cw/workContract/ContractNameForm.vue
  74. 19 16
      src/views/cw/workContract/ContractRegistration.vue
  75. 4 4
      src/views/cw/workContract/ContractRegistrationForm.vue
  76. 10 5
      src/views/cw/workContract/CwWorkContractBorrowForm.vue
  77. 8 8
      src/views/cw/workContract/contractRegisitionAddForm/ContractAddForm.vue
  78. 192 0
      src/views/dashboard/widgets/components/MyNoticePageList.vue
  79. 3 3
      src/views/dashboard/widgets/components/MyNotifyList.vue
  80. 78 2
      src/views/dashboard/widgets/components/TodoList.vue
  81. 237 0
      src/views/flowable/task/NoticePageList.vue
  82. 8 2
      src/views/flowable/task/TaskForm.vue
  83. 2 2
      src/views/flowable/task/TaskFormEdit.vue
  84. 14 14
      src/views/home/index.vue
  85. 800 0
      src/views/materialManagement/collect/CollectForm.vue
  86. 666 0
      src/views/materialManagement/collect/CollectList.vue
  87. 842 0
      src/views/materialManagement/collect/CollectReturnForm.vue
  88. 166 0
      src/views/materialManagement/collect/PurchasePageForm.vue
  89. 558 0
      src/views/materialManagement/collect/UpdateCollectInfoForm.vue
  90. 167 0
      src/views/materialManagement/contract/ContractChooseForm.vue
  91. 668 0
      src/views/materialManagement/contract/ContractForm.vue
  92. 381 0
      src/views/materialManagement/contract/ContractList.vue
  93. 554 0
      src/views/materialManagement/contract/UpdateContractInfoForm.vue
  94. 91 0
      src/views/materialManagement/file/MaterialManagementDialog.vue
  95. 674 0
      src/views/materialManagement/file/MaterialManagementV2.vue
  96. 134 0
      src/views/materialManagement/info/MaterialTypePullForm.vue
  97. 744 0
      src/views/materialManagement/info/UpdateInfoForm.vue
  98. 169 0
      src/views/materialManagement/materialType/TypeForm.vue
  99. 148 0
      src/views/materialManagement/materialType/TypeList.vue
  100. 0 0
      src/views/materialManagement/purchase/PurchaseForm.vue

+ 2 - 2
datav.html

@@ -15,7 +15,7 @@
   <script src="/datav/cdn/echarts/5.4.0/echarts.min.js"></script>
   <script src="/datav/cdn/echarts-wordcloud.min.js"></script>
   <!-- <script src="./datav/cdn/avue/avue.min.js"></script> -->
-  <title>JeePlus</title>
+  <title>兴光</title>
 </head>
 
 <body>
@@ -65,4 +65,4 @@
   <script type="module" src="/src/datav/main.js"></script>
 </body>
 
-</html>
+</html>

+ 5 - 2
index.html

@@ -4,9 +4,12 @@
 		<meta charset="utf-8">
 		<meta http-equiv="X-UA-Compatible" content="IE=edge">
 		<meta name="viewport" content="width=device-width,initial-scale=1.0">
+		<!--清除浏览器中的缓存 -->
+		<meta http-equiv="pragram" content="no-cache">
+		<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
 		<link rel="icon" href="/favicon.ico">
-		<title>JeePlus</title>
-	
+		<title>兴光</title>
+
 	</head>
 	<body>
 		<noscript>

+ 4 - 4
package.json

@@ -14,9 +14,11 @@
     "@smallwei/avue": "^3.2.0",
     "@tinymce/tinymce-vue": "4.0.5",
     "@vueup/vue-quill": "^1.0.0-beta.8",
+    "@vueuse/core": "^8.5.0",
     "@wangeditor/editor": "^5.1.23",
     "@wangeditor/editor-for-vue": "^5.1.12",
     "ace-builds": "^1.4.14",
+    "ali-oss": "^6.17.1",
     "animate.css": "4.1.1",
     "axios": "^0.26.1",
     "bpmn-js-cli": "^1.2.0",
@@ -28,9 +30,9 @@
     "diagram-js": "6.8.2",
     "echarts": "^5.3.3",
     "element-plus": "^2.2.22",
+    "jeeplus-devtools-v3": "^2.1.2",
     "jeeplus-flowable-v3": "^2.1.0",
     "jeeplus-form-v3": "^2.1.0",
-    "jeeplus-devtools-v3": "^2.1.2",
     "jquery": "^3.6.0",
     "js-cookie": "3.0.0",
     "lodash": "^4.17.21",
@@ -70,9 +72,7 @@
     "webpack": "^5.65.0",
     "xe-utils": "^3.5.4",
     "xgplayer": "2.31.4",
-    "xgplayer-hls": "2.4.32-3",
-    "@vueuse/core": "^8.5.0",
-  	"ali-oss": "^6.17.1"
+    "xgplayer-hls": "2.4.32-3"
   },
   "devDependencies": {
     "@vitejs/plugin-vue": "^3.0.3",

BIN
public/favicon.ico


+ 2 - 0
src/api/AppPath.js

@@ -9,3 +9,5 @@ export const TEST_PATH = "/test-server";
 export const ASSESS_PATH = "/assess-server";
 export const FINANCE_PATH = "/finance-server";
 export const PUBLIC_MODULES_PATH = "/public-modules-server";
+//中审
+export const CENTRECAREFUL_PATH = "/centrecareful-server";

+ 51 - 0
src/api/flowable/NoticeService.js

@@ -0,0 +1,51 @@
+import request from "@/utils/httpRequest";
+import { FLOW_PATH as prefix } from "../AppPath";
+
+export default {
+  list: function (params) {
+    return request({
+      url: prefix + '/flowable/notice/list',
+      method: 'get',
+      params: params
+    })
+  },
+
+  addInfo: function (params) {
+    return request({
+      url: prefix + '/flowable/notice/add',
+      method: 'get',
+      params: params
+    })
+  },
+
+  update: function (params) {
+    return request({
+      url: prefix + '/flowable/notice/update',
+      method: 'get',
+      params: params
+    })
+  },
+
+  stockUpdate: function (params) {
+    return request({
+      url: prefix + '/flowable/notice/stockUpdate',
+      method: 'get',
+      params: params
+    })
+  },
+
+  portionRead: function (ids) {
+    return request({
+      url: prefix + '/flowable/notice/portionRead',
+      method: 'post',
+      params: {ids: ids}
+    })
+  },
+
+  readAll: function () {
+    return request({
+      url: prefix + '/flowable/notice/readAll',
+      method: 'post'
+    })
+  }
+}

+ 7 - 0
src/api/flowable/taskService.js

@@ -2,6 +2,13 @@ import request from "@/utils/httpRequest";
 import { FLOW_PATH as prefix } from "../AppPath";
 
 export default {
+	list: function (params) {
+		return request({
+			url: prefix + "/flowable/task/list",
+			method: "get",
+			params: params,
+		});
+	},
 	start: function (data) {
 		return request({
 			url: prefix + "/flowable/task/start",

+ 17 - 16
src/api/materialManagement/CollectService.js

@@ -1,107 +1,108 @@
-import request from '@/utils/httpRequest'
+import request from "@/utils/httpRequest";
+import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class CollectService {
   updateStatusById (param) {
     return request({
-      url: '/material/collect/updateStatusById',
+      url: prefix + '/material/collect/updateStatusById',
       method: 'post',
       data: param
     })
   }
   remove (id) {
     return request({
-      url: '/material/collect/remove',
+      url: prefix + '/material/collect/remove',
       method: 'get',
       params: {id: id}
     })
   }
   save (param) {
     return request({
-      url: '/material/collect/save',
+      url: prefix + '/material/collect/save',
       method: 'post',
       data: param
     })
   }
   findById (id) {
     return request({
-      url: '/material/collect/findById',
+      url: prefix + '/material/collect/findById',
       method: 'get',
       params: {id: id}
     })
   }
   list (param) {
     return request({
-      url: '/material/collect/list',
+      url: prefix + '/material/collect/list',
       method: 'get',
       params: param
     })
   }
   wareHouseList (params) {
     return request({
-      url: '/material/collect/wareHouseList',
+      url: prefix + '/material/collect/wareHouseList',
       method: 'get',
       params: params
     })
   }
   createReturnData (param) {
     return request({
-      url: '/material/collect/createReturnData',
+      url: prefix + '/material/collect/createReturnData',
       method: 'post',
       data: param
     })
   }
   saveReturn (param) {
     return request({
-      url: '/material/collect/saveReturn',
+      url: prefix + '/material/collect/saveReturn',
       method: 'post',
       data: param
     })
   }
   saveReturnAgree (param) {
     return request({
-      url: '/material/collect/saveReturnAgree',
+      url: prefix + '/material/collect/saveReturnAgree',
       method: 'post',
       data: param
     })
   }
   updateStatusByIdReturn (param) {
     return request({
-      url: '/material/collect/updateStatusByIdReturn',
+      url: prefix + '/material/collect/updateStatusByIdReturn',
       method: 'post',
       data: param
     })
   }
   findByReturnId (id) {
     return request({
-      url: '/material/collect/findByReturnId',
+      url: prefix + '/material/collect/findByReturnId',
       method: 'get',
       params: {returnId: id}
     })
   }
   returnRequest (param) {
     return request({
-      url: '/material/collect/returnRequest',
+      url: prefix + '/material/collect/returnRequest',
       method: 'post',
       data: param
     })
   }
   findHiById (id) {
     return request({
-      url: '/material/collect/findHiById',
+      url: prefix + '/material/collect/findHiById',
       method: 'get',
       params: {collectId: id}
     })
   }
   findHiByHiId (id) {
     return request({
-      url: '/material/collect/findHiByHiId',
+      url: prefix + '/material/collect/findHiByHiId',
       method: 'get',
       params: {id: id}
     })
   }
   findLastHiByid (id) {
     return request({
-      url: '/material/collect/findLastHiByid',
+      url: prefix + '/material/collect/findLastHiByid',
       method: 'get',
       params: {collectId: id}
     })

+ 7 - 6
src/api/materialManagement/ContractService.js

@@ -1,37 +1,38 @@
-import request from '@/utils/httpRequest'
+import request from "@/utils/httpRequest";
+import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class ContractService {
   save (param) {
     return request({
-      url: '/material/contract/save',
+      url: prefix + '/material/contract/save',
       method: 'post',
       data: param
     })
   }
   list (param) {
     return request({
-      url: '/material/contract/list',
+      url: prefix + '/material/contract/list',
       method: 'get',
       params: param
     })
   }
   findById (id) {
     return request({
-      url: '/material/contract/findById',
+      url: prefix + '/material/contract/findById',
       method: 'get',
       params: {id: id}
     })
   }
   updateStatusById (param) {
     return request({
-      url: '/material/contract/updateStatusById',
+      url: prefix + '/material/contract/updateStatusById',
       method: 'post',
       data: param
     })
   }
   remove (id) {
     return request({
-      url: '/material/contract/remove',
+      url: prefix + '/material/contract/remove',
       method: 'get',
       params: {id: id}
     })

+ 1 - 0
src/api/materialManagement/MaterialManagementService.js

@@ -1,4 +1,5 @@
 import request from "@/utils/httpRequest";
+import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class MaterialManagementService {
   list (param) {

+ 8 - 7
src/api/materialManagement/MaterialTypeService.js

@@ -1,44 +1,45 @@
-import request from '@/utils/httpRequest'
+import request from "@/utils/httpRequest";
+import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class MaterialTypeService {
   list (param) {
     return request({
-      url: '/material/materialType/list',
+      url: prefix + '/material/materialType/list',
       method: 'get',
       params: param
     })
   }
   bxList (param) {
     return request({
-      url: '/material/materialType/bxList',
+      url: prefix + '/material/materialType/bxList',
       method: 'get',
       params: param
     })
   }
   cgList (param) {
     return request({
-      url: '/material/materialType/cgList',
+      url: prefix + '/material/materialType/cgList',
       method: 'get',
       params: param
     })
   }
   save (param) {
     return request({
-      url: '/material/materialType/save',
+      url: prefix + '/material/materialType/save',
       method: 'post',
       data: param
     })
   }
   findById (id) {
     return request({
-      url: '/material/materialType/findById',
+      url: prefix + '/material/materialType/findById',
       method: 'get',
       params: {id: id}
     })
   }
   remove (id) {
     return request({
-      url: '/material/materialType/deleteById',
+      url: prefix + '/material/materialType/deleteById',
       method: 'get',
       params: {id: id}
     })

+ 7 - 6
src/api/materialManagement/SupplierService.js

@@ -1,37 +1,38 @@
-import request from '@/utils/httpRequest'
+import request from "@/utils/httpRequest";
+import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class SupplierService {
   save (param) {
     return request({
-      url: '/material/supplier/save',
+      url: prefix + '/material/supplier/save',
       method: 'post',
       data: param
     })
   }
   queryById (id) {
     return request({
-      url: '/material/supplier/queryById',
+      url: prefix + '/material/supplier/queryById',
       method: 'get',
       params: {id: id}
     })
   }
   list (param) {
     return request({
-      url: '/material/supplier/list',
+      url: prefix + '/material/supplier/list',
       method: 'get',
       params: param
     })
   }
   delete (ids) {
     return request({
-      url: '/material/supplier/delete',
+      url: prefix + '/material/supplier/delete',
       method: 'delete',
       params: {ids: ids}
     })
   }
   findByName (name) {
     return request({
-      url: '/material/supplier/findByName',
+      url: prefix + '/material/supplier/findByName',
       method: 'get',
       params: {name: name}
     })

+ 150 - 141
src/api/materialManagement/WareHouseService.js

@@ -1,144 +1,153 @@
-import request from '@/utils/httpRequest'
+import request from "@/utils/httpRequest";
+import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class WareHouseService {
-  list (params) {
-    return request({
-      url: '/material/management/wareHouse/list',
-      method: 'get',
-      params: params
-    })
-  }
-  reimbursementList (params) {
-    return request({
-      url: '/material/management/wareHouse/reimbursementList',
-      method: 'get',
-      params: params
-    })
-  }
-  wareHouseList (param) {
-    return request({
-      url: '/material/management/wareHouse/wareHouseList',
-      method: 'get',
-      params: param
-    })
-  }
-  wareHouseHistoryList (param) {
-    return request({
-      url: '/material/management/wareHouse/wareHouseHistoryList',
-      method: 'get',
-      params: param
-    })
-  }
-  collectHistoryList (param) {
-    return request({
-      url: '/material/management/wareHouse/collectHistoryList',
-      method: 'get',
-      params: param
-    })
-  }
-  wareHouseSummaryList (param) {
-    return request({
-      url: '/material/management/wareHouse/wareHouseSummaryList',
-      method: 'get',
-      params: param
-    })
-  }
-  wareHouseSummaryList2 (param) {
-    return request({
-      url: '/material/management/wareHouse/wareHouseSummaryList2',
-      method: 'get',
-      params: param
-    })
-  }
-  save (param) {
-    return request({
-      url: '/material/management/wareHouse/save',
-      method: 'post',
-      data: param
-    })
-  }
-  findById (id, status) {
-    return request({
-      url: '/material/management/wareHouse/findById',
-      method: 'get',
-      params: {id: id, status: status}
-    })
-  }
-  remove (id) {
-    return request({
-      url: '/material/management/wareHouse/remove',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  findRequestId (purchaseNo) {
-    return request({
-      url: '/material/management/wareHouse/findRequestId',
-      method: 'get',
-      params: {purchaseNo: purchaseNo}
-    })
-  }
-  updateStatusById (data) {
-    return request({
-      url: '/material/management/wareHouse/updateStatusById',
-      method: 'post',
-      data: data
-    })
-  }
-  backSourceData (id) {
-    return request({
-      url: '/material/management/wareHouse/backSourceData',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  findHiById (id) {
-    return request({
-      url: '/material/management/wareHouse/findHiById',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  findHiByHiId (id) {
-    return request({
-      url: '/material/management/wareHouse/findHiByHiId',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  findLastHiByid (id) {
-    return request({
-      url: '/material/management/wareHouse/findLastHiByid',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  updateWarnFlagByTradeNameAndType (tradeName, wareHouseType) {
-    return request({
-      url: `/material/management/wareHouse/updateWarnFlagByTradeNameAndType`,
-      method: 'post',
-      data: {tradeName: tradeName, wareHouseType: wareHouseType}
-    })
-  }
-  updateWarnNumByTradeNameAndType (tradeName, wareHouseType, warnNum) {
-    return request({
-      url: `/material/management/wareHouse/updateWarnNumByTradeNameAndType`,
-      method: 'post',
-      data: {tradeName: tradeName, wareHouseType: wareHouseType, warnNum: warnNum}
-    })
-  }
-  saveTradeName (oldTradeName, tradeName, type) {
-    return request({
-      url: `/material/management/wareHouse/saveTradeName`,
-      method: 'post',
-      data: {oldTradeName: oldTradeName, tradeName: tradeName, wareHouseType: type}
-    })
-  }
-  findTradeByTypeId (typeId) {
-    return request({
-      url: '/material/management/wareHouse/findTradeByTypeId',
-      method: 'get',
-      params: {typeId: typeId}
-    })
-  }
+	list(params) {
+		return request({
+			url: prefix + "/material/management/wareHouse/list",
+			method: "get",
+			params: params,
+		});
+	}
+	reimbursementList(params) {
+		return request({
+			url: prefix + "/material/management/wareHouse/reimbursementList",
+			method: "get",
+			params: params,
+		});
+	}
+	wareHouseList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseList",
+			method: "get",
+			params: param,
+		});
+	}
+	wareHouseHistoryList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseHistoryList",
+			method: "get",
+			params: param,
+		});
+	}
+	collectHistoryList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/collectHistoryList",
+			method: "get",
+			params: param,
+		});
+	}
+	wareHouseSummaryList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseSummaryList",
+			method: "get",
+			params: param,
+		});
+	}
+	wareHouseSummaryList2(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseSummaryList2",
+			method: "get",
+			params: param,
+		});
+	}
+	save(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/save",
+			method: "post",
+			data: param,
+		});
+	}
+	findById(id, status) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findById",
+			method: "get",
+			params: { id: id, status: status },
+		});
+	}
+	remove(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/remove",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findRequestId(purchaseNo) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findRequestId",
+			method: "get",
+			params: { purchaseNo: purchaseNo },
+		});
+	}
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/material/management/wareHouse/updateStatusById",
+			method: "post",
+			data: data,
+		});
+	}
+	backSourceData(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/backSourceData",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findHiById(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findHiById",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findHiByHiId(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findHiByHiId",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findLastHiByid(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findLastHiByid",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	updateWarnFlagByTradeNameAndType(tradeName, wareHouseType) {
+		return request({
+			url: prefix + `/material/management/wareHouse/updateWarnFlagByTradeNameAndType`,
+			method: "post",
+			data: { tradeName: tradeName, wareHouseType: wareHouseType },
+		});
+	}
+	updateWarnNumByTradeNameAndType(tradeName, wareHouseType, warnNum) {
+		return request({
+			url: prefix + `/material/management/wareHouse/updateWarnNumByTradeNameAndType`,
+			method: "post",
+			data: {
+				tradeName: tradeName,
+				wareHouseType: wareHouseType,
+				warnNum: warnNum,
+			},
+		});
+	}
+	saveTradeName(oldTradeName, tradeName, type) {
+		return request({
+			url: prefix + `/material/management/wareHouse/saveTradeName`,
+			method: "post",
+			data: {
+				oldTradeName: oldTradeName,
+				tradeName: tradeName,
+				wareHouseType: type,
+			},
+		});
+	}
+	findTradeByTypeId(typeId) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findTradeByTypeId",
+			method: "get",
+			params: { typeId: typeId },
+		});
+	}
 }

+ 6 - 0
src/api/program/ProgramProjectListInfoService.js

@@ -2,6 +2,12 @@ import request from '@/utils/httpRequest'
 import { ASSESS_PATH as prefix } from "../AppPath";
 
 export default class ProgramProjectListInfoService {
+	getOverArchiveFlag () {
+		return request({
+			url: prefix + "/program/projectList/getOverArchiveFlag",
+			method: "get",
+		})
+	}
   list (params) {
     return request({
       url: prefix + '/program/projectList/list',

+ 9 - 2
src/api/sys/OSSService.js

@@ -4,6 +4,13 @@ import request from '@/utils/httpRequest'
 import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";
 
 export default class OSSSerive {
+	queryById (id) {
+		return request({
+			url: prefix + '/oss/file/queryById',
+			method: 'get',
+			params: { id: id },
+		})
+	}
   saveMsg (param) {
     return request({
       url: prefix + '/oss/file/saveMsg',
@@ -199,12 +206,12 @@ export async function openWindowOnUrl (row) {
   if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
     await getTemporaryByUrl(row.url).then((data) => {
       // eslint-disable-next-line no-undef
-      onPreview(data.data)
+      onPreview(data)
     })
     return
   }
   await getTemporaryByUrl(row.url).then((data) => {
-    rowUrl = data.data
+    rowUrl = data
   })
   if (suffix === 'pdf') {
     window.open('https://view.xdocin.com/xdoc?_xdoc=' + encodeURIComponent(rowUrl), '_blank')

+ 15 - 0
src/api/sys/userService.js

@@ -2,6 +2,14 @@ import request from "@/utils/httpRequest";
 import { SYS_PATH as prefix } from "../AppPath";
 
 export default {
+	saveCertList (inputForm) {
+		return request({
+			url: prefix + `/sys/user/saveCertList`,
+			method: 'post',
+			headers: {arrayFormat: 'repeat'},
+			data: inputForm
+		})
+	},
 	save: function (inputForm) {
 		return request({
 			url: prefix + "/sys/user/save",
@@ -65,6 +73,13 @@ export default {
 			params: params,
 		});
 	},
+	userList: function (params) {
+		return request({
+			url: prefix + "/sys/user/userList",
+			method: "get",
+			params: params,
+		});
+	},
 	exportTemplate: function () {
 		return request({
 			url: prefix + "/sys/user/import/template",

+ 76 - 0
src/api/zs/reimbursement/ReimbursementService.js

@@ -0,0 +1,76 @@
+import request from '@/utils/httpRequest'
+import {CENTRECAREFUL_PATH as prefix} from "../../AppPath";
+
+export default class ReimbursementService {
+  list (param) {
+    return request({
+      url: prefix + '/zsReimbursement/info/list',
+      method: 'get',
+      params: param
+    })
+  }
+  reportNoList (param) {
+    return request({
+      url: prefix +  '/zsReimbursement/info/reportNoList',
+      method: 'get',
+      params: param
+    })
+  }
+  projectList (params) {
+    return request({
+      url: prefix + '/zsReimbursement/info/projectList',
+      method: 'get',
+      params: params
+    })
+  }
+  save (param) {
+    return request({
+      url: prefix + '/zsReimbursement/info/save',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: prefix + '/zsReimbursement/info/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  remove (id) {
+    return request({
+      url: prefix + '/zsReimbursement/info/remove',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  updateStatusById (param) {
+    return request({
+      url: prefix + '/zsReimbursement/info/updateStatusById',
+      method: 'post',
+      data: param
+    })
+  }
+  checkNumber (number) {
+    return request({
+      url: prefix + '/zsReimbursement/info/checkNumber',
+      method: 'get',
+      params: {number: number}
+    })
+  }
+  userTree (name) {
+    return request({
+      url: prefix + '/zsReimbursement/info/userTree',
+      method: 'get',
+      params: {name: name}
+    })
+  }
+  exportFile (params) {
+    return request({
+      url: prefix + '/zsReimbursement/info/exportFile',
+      method: 'get',
+      params: params,
+      responseType: 'blob'
+    })
+  }
+}

+ 47 - 0
src/api/zs/reimbursement/ReimbursementTypeService.js

@@ -0,0 +1,47 @@
+import request from '@/utils/httpRequest'
+import {CENTRECAREFUL_PATH as prefix} from "../../AppPath";
+
+export default class ReimbursementTypeService {
+  list (param) {
+    return request({
+      url: prefix + '/zsReimbursement/type/list',
+      method: 'get',
+      params: param
+    })
+  }
+  bxList (param) {
+    return request({
+      url: prefix + '/zsReimbursement/type/bxList',
+      method: 'get',
+      params: param
+    })
+  }
+  cgList (param) {
+    return request({
+      url: prefix + '/zsReimbursement/type/cgList',
+      method: 'get',
+      params: param
+    })
+  }
+  save (param) {
+    return request({
+      url: prefix + '/zsReimbursement/type/save',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: prefix + '/zsReimbursement/type/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  remove (id) {
+    return request({
+      url: prefix + '/zsReimbursement/type/deleteById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

BIN
src/assets/img/login/login2.png


+ 122 - 20
src/assets/img/logo.svg

@@ -1,20 +1,122 @@
-<svg width="33" height="33" xmlns="http://www.w3.org/2000/svg">
- <defs>
-  <clipPath id="clip0">
-   <rect id="svg_1" x="3.5" y="7" fill="white" height="19" width="26"/>
-  </clipPath>
- </defs>
- <g>
-  <title>background</title>
-  <rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
- </g>
- <g>
-  <title>Layer 1</title>
-  <g stroke="null" id="svg_2" clip-path="url(#clip0)">
-   <path stroke="null" id="svg_3" fill="#12D2AC" d="m5.37754,17.08485l7.37226,-7.54923c1.9665,-2.01364 5.193,-2.0519 7.2066,-0.08545c0.0288,0.02815 0.0573,0.05663 0.0854,0.08545l0.0803,0.08216c1.9828,2.03047 1.9828,5.27227 0,7.30277l-7.3723,7.5492c-1.9664,2.0136 -5.19294,2.0519 -7.20658,0.0854c-0.02882,-0.0281 -0.0573,-0.0566 -0.08545,-0.0854l-0.08023,-0.0822c-1.98286,-2.0304 -1.98286,-5.2723 0,-7.3027z" clip-rule="evenodd" fill-rule="evenodd"/>
-   <path stroke="null" id="svg_4" fill="#307AF2" d="m20.0479,9.53569l7.292,7.46706c2.0275,2.0761 2.0275,5.3909 0,7.467c-1.9664,2.0137 -5.1929,2.0519 -7.2066,0.0855c-0.0288,-0.0282 -0.0573,-0.0566 -0.0854,-0.0855l-7.2921,-7.467c-2.0274,-2.0761 -2.0274,-5.3909 0,-7.46706c1.9665,-2.01364 5.193,-2.0519 7.2066,-0.08545c0.0288,0.02815 0.0573,0.05663 0.0855,0.08545z" clip-rule="evenodd" fill-rule="evenodd"/>
-   <path stroke="null" id="svg_5" fill="#7f00ff" d="m20.239036,21.894629l3.553,3.63827l-7.292,7.4671l-7.29207,-7.4671l3.55307,-3.63827c2.0166,-2.06499 5.3253,-2.10423 7.3903,-0.08763c0.0296,0.02886 0.0588,0.05807 0.0877,0.08763z" clip-rule="evenodd" fill-rule="evenodd"/>
-  </g>
-  <path d="m18.24999,24.824163c-0.166666,0 -0.333332,0 -0.333332,0.166666c0,0.166666 0,0.499996 0,0.833328c0,0.666662 0.094917,1.355492 0.333332,1.999987c0.258596,0.699053 0.576464,1.115564 0.666662,1.333324c0.06378,0.15398 0.102884,0.346016 0.166664,0.499996c0.090199,0.21776 0.166666,0.333332 0.166666,0.499996l0.166666,0l0,0" id="svg_6" fill-opacity="null" stroke-opacity="null" stroke-width="null" stroke="null" fill="none"/>
- </g>
-</svg>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve">  <image id="image0" width="200" height="200" x="0" y="0"
+    href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
+AAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAABmJLR0QA/wD/AP+gvaeTAAAA
+CXBIWXMAAAsTAAALEwEAmpwYAAAZCUlEQVR42u3dd3wUdf7H8dfMluwm2YTepNhAUU8EUUARleJx
+6omicILtROxn9+d5tuMOPfWnZ6/YFQuIiD+sCChKs4InIAhSAkoIhLRNNtky8/vju6HkkiG7mW3J
+5/l47IOEnf3OzGbfO/Od73e+X800TYQQ9dNTvQFCpDMJiBAWJCBCWJCACGFBAiKEBQmIEBYkIEJY
+kIAIYUECIoQFCYgQFiQgQliQgAhhQQIihAUJiBAWJCBCWJCACGFBAiKEBQmIEBYkIEJYkIAIYUEC
+IoQFCYgQFiQgQliQgAhhQQIihAUJiBAWJCBCWJCACGFBAiKEBQmIEBYkIEJYkIAIYUECIoQFCYgQ
+FiQgQliQgAhhQQIihAUJiBAWJCBCWJCACGFBAiKEBQmIEBYkIEJYkIAIYUECIoQFCYgQFiQgQliQ
+gAhhwZnqDWiMjuf/lupNSBCNgNPDRx+fzvHbFlsteAtwOfA9cAlQXneBF3v9mauOf5z8YDmZZNvU
+LqneBEtyBEkpE800uLfPLZRktWpooa7Av4ADgXOAU+susMPTlhcOmYAnXJ3qHWp2JCAp5onUML/L
+yZw5fCa/5B1Y3yJ57P13arXnk2XufMafPJXlbfvgMWpSvTvNjgQkDfhCfr5tfzR/HDGLpR0G1H3a
+BIw9ft/1c5k7j/NOepUvOw4mN+THREv1rjQ7EpA04QtVsCWnK6OHz+CdA0bvc/kKl48LTnqFuV2G
+khfKrHpHJpGApAkTDW8kQMCRxYQTpvBU7ysaXLbGkcWlg5/hk/1GkC/hSCgJSJpxGyFcRpibB9zP
+pH53YqJV7fl8wOkNXDb4ad7dfxStgmWp3txmLyMu87Y0DjOSlROuyru3z60dq5zZ/e//+jZNwwTg
+0cOvuWDqQeNPaFdTnA/kAB7Agfqy04BI9BEAqlCXhHcCpUAJsAMoArZFHxXR5UU9JCCplQf0AA4B
+DgYOBQ4COuim0c4Tqc6f3/lkh6HpOEz1GS7M7jTCZYTtWHcQFZjtwBZgFbBmj8c2iKayBZOAJE82
+0As4EugH9Af2BzrTwKmuhoknsnfbhtMIo9nzuXUDHaOPI4CRezwXBjYAy4BFwNfAStTRpkWRgCRO
+FvA7YBBwItAXOACSfi02zO7TrTLUh7wSqAZqos8bqKOFDrhQp24+4ChgSHSbC4EVqMAsAX6hBQRG
+AmKvDsAJwO9RH6xD7F5BA20dpcBm1Ld+QfTn9cBW1GlUGeBndyhikYUKTJvo/rVGnQ52BH6gmZ+K
+SUCariNwCnAWMBhob2fhdQNhaPr2aodnWV6ofCXqFGgV8CuqLpGIynZN9LETWFfnOY1mHA6QgMTL
+C4wAzgWGY3MoakU03UDjVw2zC+pKFZeueeEfy9v2eXJJhwHkBytI8ecz7pVHNAfVDk8qt71RpB0k
+Nr2AScBy4D1gHPaHowT40ND0G020vtevePwM3TR2dS85rGRVzew5Z3Lh2qmUuX1EtMz7EwZ1N24j
+yN+XTU71puyTHEEaZxhwGXA66mqU3XYA84B3gS+B3ypcPv76wwOM2TCjF3t/kem5IT9TFl5Jr7K1
+TO57O4YZwW2EMuJcJ6S7cJphnll4NWcUzAYeTPUmWZKANEwDzgSuBU5KQPk1wBxgGjAXVdlFw6Tc
+lcfILZ9w5/J7IHpqVZ+bf3yIAyo2cs2gh/G7fWSHq9K6w2JId6GZJs9/cVk0HOlPAlK/M4CbUVek
+7PYL8Fb0saLukwGHh26Vm3l88fU4G9EgePbGmXSr3MyEE55jQ94B5Ib8KX7r6hfSXZhoPLP4akZl
+SDhA6iB1nQR8iqpf2B2OL4DzUG0Ld1BPOCKaA800eWLxtXSr3Nzogo/d/g0fzBnFwKKvKHPlpeit
+a1hId6GbBs8tvJyx699O9ebERAKiHIr6Rv8MdVXKLgbwf9EyTwTeQLVH1MvvzGHS95MZ8eu8mFfU
+w7+JmXPHcNamWZS689PmVKv2tOrZhVdxzoaZqd6cmLX0U6xs4Ebgf1D9ouz0LvAAqtXZkgaUuvIY
+u2EG1698LO4V5gfLeG3BxXSpKuTp3peTHa7a1YcrFUK6C4BnF13F2RszLxzQso8gw1FXjCZjbzg+
+Q131Gk0jwgFQ5fDQu2w1D311c5NX7jTC/Pur/+Geb++kxuEmrKfmO1DVOYgeOd5JyTbYoSUGJBd4
+CHUFqZ+N5a4BxgNDgfmNfVFEc+AyQjy5+FraVRfbtjE3rHiUpxZdA6h2h2SecAV1F5pp8NzCKxmz
+YUYS12y/lhaQ/sAC4Abs6zQYBO4HBgJvxvpivzOHu5bdw3HbGnWwickF617nlQUXR+9U9NjVC9iS
+qpCbPL/wiow+ctRqSQG5EnX6Y+dR4yvgZOBWVIfBRlPtHT5Gb3yXa1c+kbCdPr3gQ6bPG0eHQBGV
+zpyEhqS2Qj5l4RWctXFWwtaTTC0hIB5gCvAU6vTKDgZwD+rK1OJ4Cgg4vPQsX8cjS29K+Df74G2L
+mDl3DD38m6hw5iZkfbsr5Fdy9sZ3E7o/ydTcA9IJ+BC41MYyNwOnodoy4hqIKqLpaJg8uuQGOlRv
+T8ob8buSFcz69Gx6l62mwuXDzk6OwWg7x5SFV2bkpVwrzTkgh6L6N51sY5nzUQ2IHzelEL8zlzuW
+/YuTty5ozOJubPo7HVz+C7M+PYcjd/5Iqbs11Y4sAk7vXo9qh4dqRxZBh5ug7iKsO4loDkyt/ipb
+bSPg819e3izqHHU113aQAcBMwM6BX58BrkNVyuNS295xzsaZ3PTjw419WRtsvAuxa+UWZs4dw/UD
+H2JTbjfyg+V7nXIFHF4MTafa4SHocFPl8FLt9FDlyCbodGNoOoamo5nqNd5wgOcWXsGZm96z8a1O
+H80xIIOA2UBbG8u8C9VeEjcNE78zlz47f+TRJTfGUg/oavcb1LlqK9PmjyOku3AZob2eqz1ahDQX
+Ed1BtSOLMnc+Je7WlGS1psjbnm3ejmzM7cHavJ5MXPMio5tJhbw+zS0g/VBdO+wMx7XA400tJODw
+0ClQyMsLJtC2Jqb2jp72vkW71Q0HoFreTXAShgjkhvy2ts9kmuYUkIOAWUA7G8u8EnVq1STVDg/u
+SA0vfnEpvctWx/rygTbuj4hRc6mkt0f1fepmY5nX0IRwRDQHlc4cKlw+2lbv4KnF1zKk8MtYi2kD
+HG37uyUarTkcQRzAq6ghduwyGYip9c5EI6w7qXFkYaLRIVDEyVs/54xNsxm5ZQ7t47ucOxQVEpEi
+zSEg/2TvQc+a6k1UpXyfTE0jqLup0d24jRDd/QX0K17O8F/ncmLhF3T3N/6ejgZclKD3TDRSpgfk
+FOBvNpa3AjXVmaWg7qba4SE7UsWhpasZ+ttnDPvtM/rv+NbOKdAOj+6fSKFMDkgrVB3BrjaCStQ3
+doOjBdbWK3qWr+OPBe9zesEHHL3je9xG3E0jVm5DNRKKFMrkgExGDeVplztQk2TWy+/KxRes4JYf
+H+TaFY/TtmZnIvdtMPCnRK5ANE6mBmQQcEWTS9ltKQ20dQR1NzWOLP6w+SPuWnYPfXb+J9H75gWe
+xGI0E5E8mRgQDXX/hV3bbqBuud3r3lQTjQqXj26VW7h9+b+4aO1rydq/J1EjwIs0kIkBORV7RxyZ
+BSzc8z+CDjchzcW566cx6ft/0sNfkKx9uxW4OFkrE/uWiQH5q41lGcB9e/5HhctH18ot/OO7fzBu
+/bRk7tdfgHuTuUKxb5kWkEHYe/T4DPgGIKw5qXJm88eC2Tzw9a3JPGoA3A7cncwVisbJtIBMsLm8
+FwCqnF5ywlXc981tXLeyyf0SY9EReBg1CLZIQ5kUkDzUkKB2KQY+Lnfn0af4Bx5fcj3HbP82mfsz
+DnXbrp2XqoXNMikgg1EzHNnC0PS5Fa7ckrM2vscTi6+LtQt6vDTUmFk3o2ahEmkukwLSpG4XAaeX
+iKaaFgxNx2mEZ96+/D5uX3YvOkZTit4XF+r231NQjX/HJOn9EjbIlIDoNKFyHtJdDC5cRLfKLQDU
+6G7OKJjda/TGWYlorXaiJsDsjJo9tjfqpqdMea/FHjLlj9YBNXFkzCqd2Uz4+WUeW3JD3afSf3oj
+kXKZcsPUgcQ5fq6h6Zy2+aNUb7/IUJkSkF7xvtBhRph68HjK03DeDJH+MuUUq3u8L8wOB5jd/XRW
+tepN++odRDQHvlDFkkeW3nR99+Q2BtplLGrI00xmAt+iJkTdkeqNsZIpAWnSKCVZkRrW+w5kbb4a
+IKRGzyouyO329bT54zmofH2q9y1WE4BjU70RNhiAuvfGzhvebJcpp1jephbgNoJ4wwG84QCtgyU5
+P7U6lFHD32FF68NTvW+xSug16SQLNb2IxMqUI4it0ySZaHm+kJ9Nvv05a/gMXl1wMYOKlqZ6H1Op
+EihEzbRbic3vdz1MYBlqnpa0likBse1G76gOJlp2TriyqsjbgXOGTePpRVdzRsH7qd7PZDFQnTTn
+Ap8Da1HhqE71hqWbTDnF2mpzeZ2A7iYa3kg1Vc5sLjzxJR454rpU72eilQNPo+owA1G3Gc8FNiHh
+qFemBMTumrQL6APqWO82gjjNCH/rP5mrj3uMSmdOqvc3EV5EzbB1FfBdqjcmU2RKQH4GwjaXOWzP
+XxxmBF/IzwuHTGDUiJn8nJ+wIXGTbQ2qY+QlqFMpEYNMCUgB9p9mnY7qM7WLhkl+sIwlHQcw8vcf
+MO3AMane76aajerDNifVG5KpMiUgVaiGJTt1BkbU94Qv5KckqzUTT5jCDQP/namt8K+gpqJOzhRW
+zVSmBATg0wSUWe/QQSbarnaTp3tfzsiRH7C446BU738sXkEN/mD3aWmLk0kB+Zg45wS0MAyL6QVq
+T7l+bHM4o0bMZFK/O/E77ZoHNGHmAROxcxLCFiyTArIBdc3e7v2ftK+FssMBTDTu6/NXRo58n2cP
+vZRVrXrvugErjWwFLkSOHLbRTDP9v2g6nv9b7Y9nAzMSsIqzUXMa7pOa4DKLVjWl9Cxfx8CipQwo
++oa+xcvo4S9QMzQl1lOoiX3qMxZ4O9EbYKs0//xlWkCygOWoW1jttAk1fVujB9w1NJ2g7iaku9Aw
+aVOzk/0rNnFEyUr6Fi/j0NI19CxfR/vq7TgNW7/QGwrIx8AfbH5fEi/NP3+ZFhCAPwMvJWA1bwLj
+431xRHMQ0l2EdCcmGllGkLbVxXQOFNLdX8BhJT+xv38TPcvWMmD7103ZzvoCYgDHkYnd4NP885eJ
+AXGhBpvul4BV/Y06Iy3Gy0QjojmI6A7CmpOI7gDTxGEavPTFJYyJf07x+gIylwYuWSdDSHdR6m7F
+ptzubPAdwLq8g1jR5giO27aY89e9bj1nSpp//jIxIABDgPnYPwK6CZwLTE/UvgR1FznhKj7++DSO
+KFkZTxH1BWQ0ao7GhAjpLqocXoo9bSnM7sRWbye2ZnemILcb6/IOZpu3A9s97SnOakO1U82zrpsG
+hqZzaOkaLl39POeve4O8UD1BSfPPX6YGBOBB4KYErC4AnAV8koh90VADSRxRspIPPzmd1jWlsRZR
+NyCFqFFT/PFsT40ji+KsNmzO7cZWbyeKvB0od+ezzdOeIm9HtnvaUebOp9SdT7k7D78zl5Duil7B
+M3GYEZxmBEf0odX5PNU4sqhxZNG79Ccmrn6R8b+8Satg2e4F0vzzl8kB8QKLgL4JWKUfGIOq+NpO
+w6TUnc/YDTN45fMJaLE1WdQNyHTimGwn4PBwe/+7+bzzEEqzWlHqbkVQd2NoOoamoZsmGga6aeAw
+1b+1jxi3F9gdlENK13DZ6ucZvXEWeaFyskOViXiLbZPJAQE1j99C1HRsdgugWtpfTdR+lbnzuG35
+/dy1LKZxq+sG5AbgkVgKKPJ2YOIJz/BR15HkhKtwGNFv/yS0LdY4sgjpLvar/JXckJ/v303vcfQy
+qaGwPitRV7UScRuqF9Vl4++J2nhfyM/9R97M6wc1aezqH2NZeHNOV0YPm86cLiNoU1NCVqQGpxlO
+SjhAjQ+QG/JT7GnLBl/6D0uc6QEBeA/1LZook4BpJGC+ct00yDJquGnAA3zb7uh4iggBGxu78Mbc
+HowePoPv2/alVaissS9LCKcRTtTkp7ZqDgEBeAw1K2yijAW+BIbbXbDLCFPlzGbiCc+yNbtTrC/3
+o+4h36dNud0ZM+wtVrXuTV64AtO2yYGbt+YSEFCzM92awPIPQ91X8TA2H02yI1Wsye/FxMFTqHZk
+xfLSELDPr+GNvv0ZM2waq1ofhi8k4YhFcwoIqMk9ryBxnfU04Hrga+B8uwo10cgLVTBvv6FcN/Dh
+WD7A+6w4bM3uzJihb7FSwhGX5hYQgGdRDWdFCVzHQcBrwALUpKK2yAuW8XKvC5nc9w5byiv0dmLs
+0DdY1bo3vpBfwhGH5hgQULeaDgEWJ3g9Q4APUDdznQZN+wRqQF6ogvuPvJmXe13UpA0r8nZg7LA3
++K7d0dFwiHg014CAGqxgOKrOkGjDgfdRDZeXAK3jLUg3DTxGNTcd+798ut+wuMoodbfiwhNf5Jt2
+x5AXqkhFOFxAdvJXa7/mHBBQjX03or7dVydhfYOA54EfUME8ljiOKk4jTETXmXjCFJa37RPTa3dm
+teHcoa+zoNMQ8kLlyQ7HYcB5qDs1PclddWI094DU+hB1a+39JGeAtG6oyvxXqAr9ncBRxPB+eyI1
+lGS15oKTXuGXvAMb9ZqSrNaMP/k1FnQeQl6oIgm7iY4aX+w2VGfJv6DaZT4lhntr0llLCQhAGeoy
+8HGoxsVk6Q/8EzVY23eobiGnokZVaZCJRna4ivW5B3D+ia+y3dPeciXbPe13hyNo90ituzhQc7WM
+Qx0p16Lah/qjxtm9CnWamfDbKpMlU8bmtdMy4EzUYGq3AEOTtF4ddRQ5CrgO9Q27HBWaxcAq1Phf
+u45wJhq+cAXL2x7JRSe+wNvzziUnXPVfBW/zdmTM0Df5pv0xdoZDR4X4AFQA+qE6hh4Rfb4a1U/t
+CWLs7pJJWmJAan0SfZwKXAOMTPL626DCWRvQGmAzqq60FvgJ+NlEK8wLVeyY32Vo2ZXHPxl+etHV
+oT1CYhbkdis/76TX+K5dP/Jjr3O4gXygHWoeyF7AIahQ9AR68N9T3/0HeAHV/WZbkt+zpMv03rx2
+Oh41XM6ZJKZ3cLyCqEGntxV72m6d+vmFB537y/QDAPyuHP9pp8y+++v2x2zPD5VXm6plPYI6FXKg
+riZ5gVzUBz0PFYi20Uf76MMXXbYhhah63JvAZ9h4CrVtapdUv7+WWvIRpK5F0cck1Cgn41CnFqnm
+Rn3Dt3Ma4cOrnLuvnlY5snM353a9LztSlYirVSWo+sXbqCNtixyhUQLy3zahKpwPo6YJG4Uax/eI
+phRqBw0T3TT2+t1l2DpJ0xbU/TXvo44USTl0pzMJSMNM1OAQS4G7UEeTYajK/ZHEOS11mtmJujgw
+DxWMb1BX+0SUBKRxQsCS6ONuVDvHANQl40GoCm2TJhpNggjqCPFTdD9qLzsXpnrD0pkEJD6bo4/a
+UR47om7/PRx1dDkc6Iq6MhRT//V92bPDYe3QQnWEgWLUMKS/oK46rUYdKTbQyPtHhCIBsce26GP+
+Hv+XC3RBzfHeLfpzN1Rw2qBO0XJQfZayUFeRaq8+aahTPCP6iIAZCuruQLRcH4DbCFZ7I4E3Cx2d
+1ruMUKGJ9iuqDvUb6lQp/S9RpjkJSOL4UTNj/dzA807UFSo3KiCe6M8uVCOdiTotCmuYwQqXLzCg
+6Oua32+Z8yBwKUCrYFnplC+vvHzCkOdCBTnd8IWlS7vdJCCpE44+qqwW0jCpcObSq/Rn3vpsPF2q
+tu55B6E2qGipb/acs3ZecOJLLG97VP2Ds4m4taS+WBlHw6TSmcP+/k289dn5dPdvhnr+ZgeXr+O9
+T89m+G/zKHXnp3qzmxUJSJqqDUe3yi3MmPcnDilbY7l8h+oips8fx4Vrp1LqzsfQ5E9rB3kX05CG
+SaUjm06BQt6cfx69Sxt3K4s3HOC5hVdw2w/3E3B4CetyBt1UEpA0o2FS5cimY6CI6fPG0Wfnf2Iu
+4+/fT+bJxdfgMCJUOzxJGxSuOZKApJHacLSv3s70+ePoW7w87rIuWvsa0+ePo2NgGxVOX9zltHQS
+kDRRG47aukS/4mUNL9pIJ21dwPufjKL/jm8pczeHnjHJJwFJE0HdReeqrbwzdyxH7/jeatE9xyF2
+sY9xiXuVr+X9OaO4YO0bBBzN4jbxpJKApIka3cOdy+9pTJ3jPVTX852oXrf7bPjwhfxMWXgFx+z4
+lmoJSUwy4oYpIVJFjiBCWJCACGFBAiKEBQmIEBYkIEJYkIAIYUECIoQFCYgQFiQgQliQgAhhQQIi
+hAUJiBAWJCBCWJCACGFBAiKEBQmIEBYkIEJYkIAIYUECIoQFCYgQFiQgQliQgAhhQQIihAUJiBAW
+JCBCWJCACGFBAiKEBQmIEBYkIEJYkIAIYUECIoQFCYgQFiQgQliQgAhhQQIihAUJiBAWJCBCWJCA
+CGFBAiKEBQmIEBYkIEJYkIAIYUECIoQFCYgQFiQgQliQgAhhQQIihAUJiBAW/h8Vm2hXc+TV0QAA
+ACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wNy0yMVQwMjozNjowMCswMDowMPEu4qIAAAAldEVYdGRh
+dGU6bW9kaWZ5ADIwMjMtMDctMjFUMDI6MzY6MDArMDA6MDCAc1oeAAAAKHRFWHRkYXRlOnRpbWVz
+dGFtcAAyMDIzLTA3LTIxVDAyOjM2OjAwKzAwOjAw12Z7wQAAAABJRU5ErkJggg==" />
+</svg>

+ 1 - 1
src/components/footer/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<el-footer class="footer"
-		>Copyright © 2022 JeePlus All Rights Reserved</el-footer
+		><!--Copyright © 2022 JeePlus All Rights Reserved--></el-footer
 	>
 </template>
 

+ 5 - 4
src/components/userSelect/UserSelectDialog.vue

@@ -232,11 +232,11 @@ export default {
 	},
 	methods: {
 		//打开赋值
-		open(data) {
+		async open(data) {
 			this.value = data || [];
 			this.selected = JSON.parse(JSON.stringify(data || []));
 			this.dialogVisible = true;
-			this.getGroup();
+			await this.getGroup();
 			this.getUser();
 		},
 		//获取组织
@@ -248,9 +248,10 @@ export default {
 			// })
 			var res = await officeService.treeData({ tenantId: this.tenantId });
 			this.showGrouploading = false;
-			var allNode = { id: "", type: "1", name: "所有" };
-			res.unshift(allNode);
+			// var allNode = { id: "", type: "1", name: "所有" };
+			// res.unshift(allNode);
 			this.group = res;
+			this.searchForm.companyDTO.id = this.group[0].id;
 		},
 		//获取用户
 		async getUser() {

+ 1 - 1
src/components/userSelectButton/UserSelectDialog.vue

@@ -324,7 +324,7 @@
         }
         this.loading = true
         this.$http({
-          url: '/system-server/sys/user/list',
+          url: '/system-server/sys/user/list2',
           method: 'get',
           params: {
             'current': this.pageNo,

+ 444 - 0
src/components/userSelectV2/UserSelectDialog.vue

@@ -0,0 +1,444 @@
+<template>
+  <div>
+    <el-dialog
+    title="用户选择"
+    width="1000px"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+	draggable
+     class="userDialog"
+    v-model="visible">
+    <el-container style="height: 500px">
+      <el-aside width="200px">
+
+        <el-card class="org">
+          <div slot="header" class="clearfix">
+            <el-input
+              placeholder="请输入组织机构过滤"
+              size="small"
+              v-model="filterText">
+            </el-input>
+          </div>
+           <el-tree
+            :data="officeTreeData"
+            :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+            default-expand-all
+            highlight-current
+            node-key="id"
+            :render-content="renderContent"
+            :filter-node-method="filterNode"
+            :expand-on-click-node="false"
+            @node-click="handleNodeClick"
+            ref="officeTree">
+          </el-tree>
+        </el-card>
+      </el-aside>
+
+    <el-container>
+      <el-header style="text-align: left; font-size: 12px;height:30px">
+        <el-form :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+            <el-form-item prop="loginName">
+              <el-input v-model="searchForm.loginName" placeholder="登录名" clearable></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button  type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+              <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+            </el-form-item>
+          </el-form>
+      </el-header>
+
+      <el-main>
+        <el-table
+          :data="dataList"
+          v-loading="loading"
+          size="small"
+          border
+          ref="userTable"
+          @selection-change="selectionChangeHandle"
+          @sort-change="sortChangeHandle"
+          height="calc(100% - 40px)"
+          style="width: 100%;">
+          <el-table-column
+            header-align="center"
+            align="center"
+            v-if="limit <= 1"
+            width="50">
+              <template #default="scope">
+                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>
+              </template>
+          </el-table-column>
+          <el-table-column
+            type="selection"
+            header-align="center"
+            v-if="limit > 1"
+            align="center"
+            width="50">
+          </el-table-column>
+          <el-table-column
+            prop="photo"
+            header-align="center"
+            align="center"
+            label="头像">
+            <template #default="scope">
+              <img :src="scope.row.photo === ''?'/static/img/avatar.png':scope.row.photo" style="height:35px"/>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="loginName"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="90"
+            label="登录名">
+          </el-table-column>
+          <el-table-column
+            prop="name"
+            header-align="center"
+            align="真实姓名"
+            sortable="custom"
+            min-width="90"
+            label="用户名">
+          </el-table-column>
+          <el-table-column
+            prop="companyDTO.name"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="110"
+            label="所属机构">
+          </el-table-column>
+          <el-table-column
+            prop="officeDTO.name"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="110"
+            label="所属部门">
+          </el-table-column>
+          <el-table-column
+            prop="loginFlag"
+            header-align="center"
+            align="center"
+            min-width="100"
+            label="状态">
+            <template #default="scope">
+              <el-tag v-if="scope.row.loginFlag === '1'" size="small" type="success">正常</el-tag>
+              <el-tag v-else-if="scope.row.loginFlag === '0'" size="small" type="danger">禁用</el-tag>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+          @size-change="sizeChangeHandle"
+          @current-change="currentChangeHandle"
+          :current-page="pageNo"
+          :page-sizes="[5, 10, 50, 100]"
+          :page-size="pageSize"
+          :total="total"
+          layout="total, sizes, prev, pager, next, jumper">
+        </el-pagination>
+      </el-main>
+    </el-container>
+
+    <el-aside width="200px">
+      <el-tag
+        :key="tag.id"
+        v-for="tag in dataListAllSelections"
+        closable
+        :disable-transitions="false"
+        @close="del(tag)">
+        {{tag.name}}
+      </el-tag>
+  </el-aside>
+</el-container>
+		<template #footer>
+			<span  class="dialog-footer">
+			  <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        searchForm: {
+          loginName: '',
+          companyDTO: {
+            id: ''
+          },
+          officeDTO: {
+            id: ''
+          },
+          name: ''
+        },
+        filterText: '',
+        dataListAllSelections: [],   // 所有选中的数据包含跨页数据
+        dataListSelections: [],
+        idKey: 'id', // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+        dataList: [],
+        dynamicTags: [],
+        officeTreeData: [],
+        pageNo: 1,
+        pageSize: 10,
+        total: 0,
+        orders: [],
+        loading: false,
+        visible: false
+      }
+    },
+    props: {
+      selectData: {
+        type: Array,
+        default: () => { return [] }
+      },
+      limit: {
+        type: Number,
+        default: 999999
+      }
+    },
+    watch: {
+      filterText (val) {
+        this.$refs.officeTree.filter(val)
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.$nextTick(() => {
+          this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData))
+          this.refreshTree()
+          this.resetSearch()
+        })
+      },
+      renderContent (h, { node, data }) {
+        return (
+              <span class="custom-tree-node">
+                {
+                  data.type === '1' ? <i class="fa fa-sitemap"></i> : <i class="fa fa-users"></i>
+                }
+                <span class="text">{node.label}</span>
+              </span>
+        )
+      },
+      getTemplateRow (index, row) {                                 // 获取选中数据
+        this.dataListSelections = [row]
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+           // 设置选中的方法
+      setSelectRow () {
+        if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+          this.$refs.userTable.clearSelection()
+          return
+        }
+                // 标识当前行的唯一键的名称
+        let idKey = this.idKey
+        let selectAllIds = []
+        this.dataListAllSelections.forEach(row => {
+          selectAllIds.push(row[idKey])
+        })
+        this.$refs.userTable.clearSelection()
+        for (var i = 0; i < this.dataList.length; i++) {
+          if (selectAllIds.indexOf(this.dataList[i][idKey]) >= 0) {
+                        // 设置选中,记住table组件需要使用ref="table"
+            this.$refs.userTable.toggleRowSelection(this.dataList[i], true)
+          }
+        }
+      },
+            // 记忆选择核心方法
+      changePageCoreRecordData () {
+                // 标识当前行的唯一键的名称
+        let idKey = this.idKey
+        let that = this
+              // 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
+        if (this.dataListAllSelections.length <= 0) {
+          this.dataListSelections.forEach(row => {
+            that.dataListAllSelections.push(row)
+          })
+          return
+        }
+                // 总选择里面的key集合
+        let selectAllIds = []
+        this.dataListAllSelections.forEach(row => {
+          selectAllIds.push(row[idKey])
+        })
+        let selectIds = []
+                // 获取当前页选中的id
+        this.dataListSelections.forEach(row => {
+          selectIds.push(row[idKey])
+                  // 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
+          if (selectAllIds.indexOf(row[idKey]) < 0) {
+            that.dataListAllSelections.push(row)
+          }
+        })
+        let noSelectIds = []
+              // 得到当前页没有选中的id
+        this.dataList.forEach(row => {
+          if (selectIds.indexOf(row[idKey]) < 0) {
+            noSelectIds.push(row[idKey])
+          }
+        })
+        noSelectIds.forEach(id => {
+          if (selectAllIds.indexOf(id) >= 0) {
+            for (let i = 0; i < that.dataListAllSelections.length; i++) {
+              if (that.dataListAllSelections[i][idKey] === id) {
+                                // 如果总选择中有未被选中的,那么就删除这条
+                that.dataListAllSelections.splice(i, 1)
+                break
+              }
+            }
+          }
+        })
+      },
+     // 得到选中的所有数据
+      getAllSelectionData () {
+         // 再执行一次记忆勾选数据匹配,目的是为了在当前页操作勾选后直接获取选中数据
+        this.changePageCoreRecordData()
+      },
+      filterNode (value, data) {
+        if (!value) return true
+        return data.name.indexOf(value) !== -1
+      },
+      del (tag) {
+        this.dataListAllSelections.splice(this.dataListAllSelections.indexOf(tag), 1)
+        this.$nextTick(() => {
+          this.setSelectRow()
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        if (this.commonJS.isEmpty(this.searchForm.officeDTO.id) && this.commonJS.isEmpty(this.searchForm.companyDTO.id)) {
+          this.searchForm.selectAll = 'true'
+        }
+        this.loading = true
+        this.$http({
+          url: '/system-server/sys/user/list2',
+          method: 'get',
+          params: {
+            'current': this.pageNo,
+            'size': this.pageSize,
+            'orders': this.orders,
+            ...this.searchForm
+          }
+        }).then((data) => {
+          this.dataList = data.records
+          this.total = data.total
+          this.pageNo = data.current
+          this.loading = false
+          this.$nextTick(() => {
+            this.setSelectRow()
+          })
+        })
+      },
+      refreshTree () {
+        this.$http({
+          url: `/system-server/sys/office/treeData`,
+          method: 'get'
+        }).then((data) => {
+          this.officeTreeData = data
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageNo = 1
+        this.refreshList()
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageNo = val
+        this.refreshList()
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+       // 排序
+      sortChangeHandle (column) {
+        if (column.prop === 'officeDTO.name') {
+          column.prop = 'o.name'
+        }
+        if (column.prop === 'companyDTO.name') {
+          column.prop = 'c.name'
+        }
+        this.orders = []
+        if (column.order != null) {
+          this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        }
+        this.refreshList()
+      },
+      handleNodeClick (data) {
+        if (data.type === '1') {
+          this.searchForm.companyDTO.id = data.id
+          this.searchForm.officeDTO.id = ''
+        } else {
+          this.searchForm.companyDTO.id = ''
+          this.searchForm.officeDTO.id = data.id
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.searchForm.companyDTO.id = ''
+        this.searchForm.officeDTO.id = ''
+        this.$refs.officeTree.setCurrentKey(null)
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      doSubmit () {
+        if (this.limit < this.dataListAllSelections.length) {
+          this.$message.error(`你最多只能选择${this.limit}个用户`)
+          return
+        }
+        this.visible = false
+        this.$emit('doSubmit', this.dataListAllSelections)
+      }
+    }
+  }
+</script>
+<style lang="scss">
+.org {
+  height: 100%;
+  .el-card__header {
+    padding: 10px;
+  }
+  .el-card__body {
+    padding: 10px;
+    max-height: 520px;
+    overflow: auto;
+  }
+}
+.userDialog{
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+  .el-main {
+    padding: 20px 20px 5px 20px;
+    .el-pagination{
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 101 - 0
src/components/userSelectV2/index.vue

@@ -0,0 +1,101 @@
+<template>
+<div>
+    <el-input placeholder="请选择" :size="size" :disabled="disabled" @focus="showUserSelect"  :readonly="true" style="line-hight:40px" @change="changeName" v-model="name" class="input-with-select">
+    </el-input>
+    <user-select ref="userSelect" @doSubmit="selectUsersToInput" :limit="limit" :selectData="selectData"></user-select>
+</div>
+</template>
+<script>
+import userSelect from './UserSelectDialog'
+import userService from '@/api/sys/userService'
+export default {
+  data () {
+    return {
+      name: '',
+      labelValue: this.value,
+      selectData: []
+    }
+  },
+  props: {
+    limit: Number,
+    value: String,
+    userName: String,
+    size: {
+      type: String,
+      default: () => { return 'small' }
+    },
+    readonly: {
+      type: Boolean,
+      default: () => { return false }
+    },
+    disabled: {
+      type: Boolean,
+      default: () => { return false }
+    }
+  },
+  components: {
+    userSelect
+  },
+  userService: null,
+  beforeCreate () {
+    // this.userService = new UserService()
+  },
+  watch: {
+    value: {
+      handler (newVal) {
+        this.selectData = []
+        if (newVal) {
+          newVal.split(',').forEach((id) => {
+            userService.queryById(id).then((data) => {
+              if (data && data.id !== '') {
+                this.selectData.push(data)
+              }
+            })
+          })
+        }
+      },
+      immediate: true,
+      deep: false
+    },
+    selectData: {
+      handler (newVal) {
+        this.name = newVal.map(user => { return user.name }).join(',')
+      },
+      immediate: false,
+      deep: false
+    },
+    userName: {
+      handler (newVal) {
+        this.name = newVal
+      },
+      immediate: false,
+      deep: false
+    }
+  },
+  methods: {
+    selectUsersToInput (users) {
+      this.selectData = users
+      this.labelValue = users.map(user => { return user.id }).join(',')
+      this.name = users.map(user => { return user.name }).join(',')
+      this.$emit('getValue', this.labelValue, this.name)
+    },
+    changeName () {
+      this.$emit('getValue', null, this.name)
+    },
+    showUserSelect () {
+      this.$refs.userSelect.init()
+    }
+  }
+}
+</script>
+<style>
+  .el-form-item__content .el-input-group {
+      vertical-align: middle;
+  }
+ .el-tag + .el-tag {
+    margin-left: 5px;
+    margin-bottom: 5px;
+  }
+</style>
+
+

+ 2 - 2
src/config/index.js

@@ -1,8 +1,8 @@
 const DEFAULT_CONFIG = {
 	// APP NAME
-	APP_NAME: "JeePlus微服务平台",
+	APP_NAME: "兴光微服务平台",
 	//首页地址
-	DASHBOARD_URL: "/home",
+	DASHBOARD_URL: "/dashboard/index",
 
 	//内核版本号
 	CORE_VER: "1.0.0",

+ 14 - 13
src/layout/components/userbar.vue

@@ -3,15 +3,15 @@
 		<div>
 			<search></search>
 		</div>
-		<div class="screen panel-item hidden-sm-and-down" @click="screen">
-			<el-icon size="20px"><el-icon-full-screen /></el-icon>
-		</div>
-		<div class="screen panel-item hidden-sm-and-down" @click="showMsg">
-			<!-- <el-badge :hidden="msgList.length==0" :value="msgList.length"  type="danger"> -->
-			<el-icon size="20px"><bell></bell></el-icon>
-			<!-- </el-badge> -->
-		</div>
-		<el-dropdown class="user panel-item" trigger="hover">
+<!--		<div class="screen panel-item hidden-sm-and-down" @click="screen">-->
+<!--			<el-icon size="20px"><el-icon-full-screen /></el-icon>-->
+<!--		</div>-->
+<!--		<div class="screen panel-item hidden-sm-and-down" @click="showMsg">-->
+<!--			&lt;!&ndash; <el-badge :hidden="msgList.length==0" :value="msgList.length"  type="danger"> &ndash;&gt;-->
+<!--			<el-icon size="20px"><bell></bell></el-icon>-->
+<!--			&lt;!&ndash; </el-badge> &ndash;&gt;-->
+<!--		</div>-->
+		<!--<el-dropdown class="user panel-item" trigger="hover">
 			<div class="user-avatar">
 				<el-icon size="20px">
 					<svg
@@ -48,12 +48,13 @@
 					>
 				</el-dropdown-menu>
 			</template>
-		</el-dropdown>
+		</el-dropdown>-->
 
 		<el-dropdown
 			class="user panel-item"
 			trigger="hover"
 			@command="handleUser"
+			style="margin-right: 30px"
 		>
 			<div class="user-avatar">
 				<el-avatar :size="30" :src="photo"></el-avatar>
@@ -71,9 +72,9 @@
 				</el-dropdown-menu>
 			</template>
 		</el-dropdown>
-		<div class="panel-item hidden-sm-and-down" @click="openSetting">
-			<el-icon><MoreFilled style="transform: rotate(90deg)" /></el-icon>
-		</div>
+<!--		<div class="panel-item hidden-sm-and-down" @click="openSetting">-->
+<!--			<el-icon><MoreFilled style="transform: rotate(90deg)" /></el-icon>-->
+<!--		</div>-->
 		<el-drawer
 			title="新消息"
 			v-model="msg"

+ 13 - 0
src/utils/index.js

@@ -337,10 +337,23 @@ export function downloadExcel(data, filename) {
 	window.URL.revokeObjectURL(href); // 释放掉blob对象
 }
 
+export function downloadWord (data, filename) {
+	var blob = new Blob([data], {type: 'application/msword,charset=utf-8'}) // application/vnd.openxmlformats-officedocument.spreadsheetml.sheet这里表示xlsx类型
+	var downloadElement = document.createElement('a')
+	var href = window.URL.createObjectURL(blob) // 创建下载的链接
+	downloadElement.href = href
+	downloadElement.download = filename // 下载后文件名
+	document.body.appendChild(downloadElement)
+	downloadElement.click() // 点击下载
+	document.body.removeChild(downloadElement) // 下载完成移除元素
+	window.URL.revokeObjectURL(href) // 释放掉blob对象
+}
+
 export default {
 	getTenantColorById,
 	getTenantNameById,
 	downloadExcel,
+	downloadWord,
 	toLine,
 	escapeHTML,
 	hashCode,

+ 8 - 1
src/views/common/UpLoadComponent.vue

@@ -1,6 +1,6 @@
 <!--文件上传组件-->
 <template>
-  <div>
+  <div :key="uploadKey">
     <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
     <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
                :limit="999" :http-request="httpRequest"
@@ -82,6 +82,7 @@
   export default {
     data () {
       return {
+		  uploadKey: '',
         progressFlag: false,
         loadProgress: 0,
         fileList: [],
@@ -293,6 +294,7 @@
           }
         }
         this.tableKey = Math.random()
+        this.uploadKey = Math.random()
       },
       showFile (row) {
         openWindowOnUrl(row)
@@ -310,10 +312,15 @@
         toHref(row)
       },
       async deleteById (row, index) {
+      	console.log('row', row)
 	  	// this.$refs.upload.handleRemove(this.dataListNew[index])
         await this.dataListNew.splice(index, 1)
 		await this.dataList.splice(index, 1)
+		  if (this.commonJS.isNotEmpty(row.id)) {
+			  this.ossService.deleteMsgById(row.id)
+		  }
 		this.tableKey = Math.random()
+		this.uploadKey = Math.random()
       },
       /**
        * 关闭dialog时使用  清除el-upload中上传的文件

+ 6 - 5
src/views/common/UpLoadComponentDialog.vue

@@ -9,13 +9,14 @@
       height="500px"
       @close="close"
       append-to-body
-      @keyup.enter.native=""
 	  v-model="visible">
       <UpLoadComponentV2 ref="upLoadComponentV2"></UpLoadComponentV2>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
-    </span>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+		</template>
     </el-dialog>
 
   </div>

+ 5 - 5
src/views/common/UpLoadComponentV2.vue

@@ -31,7 +31,7 @@
         :data="dataListNew">
         <el-table-column type="seq" width="40"></el-table-column>
         <el-table-column label="文件名称" prop="name" align="center">
-          <template scope="scope">
+          <template #default="scope">
             <div v-if="ifName(scope.row) === true">
               <el-image
                 style="width: 30px; height: 30px;padding-top: 4px"
@@ -82,7 +82,7 @@
           </template>
         </el-table-column>
         <el-table-column label="操作" width="200px" fixed="right" align="center">
-          <template  scope="scope">
+          <template  #default="scope">
             <el-button text type="primary"  icon="el-icon-edit" size="small" @click="toHref(scope.row)" :disabled="false">下载</el-button>
             <el-button text type="primary" icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
             <!--<el-button size="small" type="text" icon="el-icon-edit"
@@ -391,8 +391,8 @@
         }
         for await (let item of fileList) {
           await this.ossService.getFileSizeByUrl(item.url).then((data) => {
-            item.lsUrl = data.data.url
-            item.size = data.data.size
+            item.lsUrl = data.url
+            item.size = data.size
             this.dataList.push(item)
             this.dataListNew.push(item)
             if (this.dataList.length === fileList.length) {
@@ -472,7 +472,7 @@
             item.url = item.raw.url
             if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
               await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
-                item.lsUrl = data.data
+                item.lsUrl = data
               })
             }
           }

+ 5 - 5
src/views/common/UpLoadComponentV3.1.vue

@@ -43,7 +43,7 @@
           </template>
         </el-table-column>
         <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
-        <el-table-column label="创建时间" prop="createDate" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
         <el-table-column label="文件大小" prop="size" align="center">
           <template #default="scope">
             {{getSize(scope.row.size)}}
@@ -321,8 +321,8 @@
         }
         for await (let item of fileList) {
           await this.ossService.getFileSizeByUrl(item.url).then((data) => {
-            item.lsUrl = data.data.url
-            item.size = data.data.size
+            item.lsUrl = data.url
+            item.size = data.size
             this.dataList.push(item)
             this.dataListNew.push(item)
             if (this.dataList.length === fileList.length) {
@@ -388,7 +388,7 @@
           this.dataListNew.push(item)
         })
         for (let item of fileList) {
-          item.createDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
           item.createBy = {
             id: '',
             name: ''
@@ -402,7 +402,7 @@
             item.url = item.raw.url
             if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
               await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
-                item.lsUrl = data.data
+                item.lsUrl = data
               })
             }
           }

+ 61 - 38
src/views/cw/invoice/InvoiceForm.vue

@@ -9,7 +9,7 @@
       @close="close"
       @keyup.enter.native="doSubmit"
       v-model="visible">
-      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
                label-width="160px" @submit.native.prevent>
         <el-divider content-position="left"><i class="el-icon-document"></i>
           基本信息
@@ -32,17 +32,17 @@
 			  >
 				  <vxe-table-column field="programName" title="项目名称" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.programName"/>
+						  <el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :disabled="method==='view'" :readonly="true" v-model="scope.row.programName"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="contractName" title="合同名称" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input @focus="openContractForm()" placeholder="请填写合同名称" :readonly="true" v-model="scope.row.contractName"/>
+						  <el-input @focus="openContractForm()" placeholder="请填写合同名称" :disabled="method==='view'" :readonly="true" v-model="scope.row.contractName"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="programNo" title="项目编号" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
+						  <el-input :readonly="true" :disabled="method==='view'" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
 					  </template>
 				  </vxe-table-column>
 				  <!--            <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
@@ -57,7 +57,7 @@
 				  <!--            </vxe-table-column>-->
 				  <vxe-table-column title="操作" width="100">
 					  <template v-slot="scope">
-						  <el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+						  <el-button type="danger" :disabled="method==='view'" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
 					  </template>
 				  </vxe-table-column>
 			  </vxe-table>
@@ -70,7 +70,7 @@
                           :rules="[
                           {required: true, message:'发票类型不能为空', trigger:'blur'}
                  ]">
-              <el-radio v-model="inputForm.type" v-for="item in $dictUtils.getDictList('invoice_type')" :label="item.value" style="margin-right: 20px">
+              <el-radio v-model="inputForm.type" :disabled="method==='view'" v-for="item in $dictUtils.getDictList('invoice_type')" :label="item.value" style="margin-right: 20px">
                 {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
@@ -86,7 +86,7 @@
                           :rules="[
                           {required: true, message:'开票类型不能为空', trigger:'blur'}
                  ]">
-              <el-radio v-model="inputForm.billingType" @change="changeRadio" v-for="item in $dictUtils.getDictList('invoice_billing_type')" :label="item.value" style="margin-right: 20px">
+              <el-radio v-model="inputForm.billingType" :disabled="method==='view'" @change="changeRadio" v-for="item in $dictUtils.getDictList('invoice_billing_type')" :label="item.value" style="margin-right: 20px">
                 {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
@@ -109,6 +109,7 @@
                 :value="inputForm.name"
                 :clearable="true"
                 :accordion="true"
+				:disabled="method==='view'"
                 @getValue="(value) => {inputForm.name=value}"/>
             </el-form-item>
           </el-col>
@@ -119,7 +120,7 @@
                           :rules="[
                           {required: true, message:'实际开票单位不能为空', trigger:'blur'},{required: true, message:'实际开票单位不能为空', trigger:'change'}
                  ]">
-              <el-input :readonly="true" placeholder="请填写实际开票单位" v-model="inputForm.billingWorkplaceReal" @focus="openWorkClientForm()" clearable></el-input>
+              <el-input :readonly="true" :disabled="method==='view'" placeholder="请填写实际开票单位" v-model="inputForm.billingWorkplaceReal" @focus="openWorkClientForm()" clearable></el-input>
             </el-form-item>
           </el-col>
           <template v-if="inputForm.type === '1'" style="width: 100%;">
@@ -128,7 +129,7 @@
                             :rules="[
                         {required: true, message:'纳税人识别号不能为空', trigger:'blur'},{required: true, message:'纳税人识别号不能为空', trigger:'change'}
                ]">
-                <el-input v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
+                <el-input :disabled="method==='view'" v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -136,7 +137,7 @@
                             :rules="[
                         {required: true, message:'地址不能为空', trigger:'blur'},{required: true, message:'地址不能为空', trigger:'change'}
                ]">
-                <el-input v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
+                <el-input :disabled="method==='view'" v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -144,7 +145,7 @@
                             :rules="[
                         {required: true, message:'电话不能为空', trigger:'blur'},{required: true, message:'电话不能为空', trigger:'change'}
                ]">
-                <el-input v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
+                <el-input :disabled="method==='view'" v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -152,7 +153,7 @@
                             :rules="[
                         {required: true, message:'开户银行不能为空', trigger:'blur'},{required: true, message:'开户银行不能为空', trigger:'change'}
                ]">
-                <el-select v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
+                <el-select :disabled="method==='view'" v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
                   <el-option
                     v-for="item in bankList"
                     :key="item.id"
@@ -176,28 +177,28 @@
               <el-form-item label="纳税人识别号" prop="taxpayerIdentificationNo"
                             :rules="[
                ]">
-                <el-input v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
+                <el-input :disabled="method==='view'" v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
               <el-form-item label="地址" prop="address"
                             :rules="[
                ]">
-                <el-input v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
+                <el-input :disabled="method==='view'" v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
               <el-form-item label="电话" prop="telPhone"
                             :rules="[
                ]">
-                <el-input v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
+                <el-input :disabled="method==='view'" v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
               <el-form-item label="开户银行" prop="openBank"
                             :rules="[
                ]">
-                <el-select v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
+                <el-select :disabled="method==='view'" v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
                   <el-option
                     v-for="item in bankList"
                     :key="item.id"
@@ -221,7 +222,7 @@
                           :rules="[
                           {required: true, message:'收款类型不能为空', trigger:'blur'}
                  ]">
-              <el-select v-model="inputForm.receivablesType" placeholder="请选择收款类型" clearable style="width: 100%;">
+              <el-select :disabled="method==='view'" v-model="inputForm.receivablesType" placeholder="请选择收款类型" clearable style="width: 100%;">
                 <el-option
                   v-for="item in $dictUtils.getDictList('invoice_receivables_type')"
                   :key="item.value"
@@ -236,7 +237,7 @@
                           :rules="[
                           {required: true, message:'开票内容不能为空', trigger:'blur'}
                  ]">
-              <el-select v-model="inputForm.billingContent" placeholder="请选择开票内容" clearable style="width: 100%;">
+              <el-select :disabled="method==='view'" v-model="inputForm.billingContent" placeholder="请选择开票内容" clearable style="width: 100%;">
                 <el-option
                   v-for="item in $dictUtils.getDictList('invoice_billing_content')"
                   :key="item.value"
@@ -252,6 +253,7 @@
                           {required: true, message:'发票金额不能为空', trigger:'blur'}
                  ]">
               <el-input-number
+				  :disabled="method==='view'"
                 v-model="inputForm.account"
                 controls-position="right"
                 :controls="false"
@@ -270,7 +272,7 @@
                           :rules="[
                         {required: true, message:'是否多张开票不能为空', trigger:'blur'}
                ]">
-              <el-radio v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" style="margin-right: 20px">
+              <el-radio :disabled="method==='view'" v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" style="margin-right: 20px">
                 {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
@@ -278,7 +280,7 @@
             <el-form-item label="开票内容要求" prop="billingContentTerms"
                           :rules="[
                  ]">
-              <el-input type="textarea" maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求" show-word-limit></el-input>
+              <el-input type="textarea" :disabled="method==='view'" maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求" show-word-limit></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -295,7 +297,7 @@
                 <el-date-picker
                   v-model="inputForm.billingDate"
                   type="date"
-                  value-format="yyyy-MM-dd"
+                  value-format="YYYY-MM-DD"
                   placeholder="选择开票时间"
                   style="width:100%"
 				  size="default"
@@ -312,7 +314,7 @@
                 <el-date-picker
                   v-model="inputForm.collectDate"
                   type="date"
-                  value-format="yyyy-MM-dd"
+                  value-format="YYYY-MM-DD"
                   placeholder="选择领票时间"
                   style="width:100%"
 				  size="default"
@@ -338,6 +340,7 @@
                 :value="inputForm.billingPeopleReal"
                 :clearable="true"
                 :accordion="true"
+				:disabled="method==='view'"
                 @getValue="(value) => {inputForm.billingPeopleReal=value}"/>
             </el-form-item>
           </el-col>
@@ -357,6 +360,7 @@
                 :value="inputForm.reconciliationPeople"
                 :clearable="true"
                 :accordion="true"
+				:disabled="method==='view'"
                 @getValue="(value) => {inputForm.reconciliationPeople=value}"/>
             </el-form-item>
           </el-col>
@@ -376,6 +380,7 @@
                 :clearable="true"
                 :accordion="true"
 				size="default"
+				:disabled="method==='view'"
                 @getValue="(value) => {inputForm.reconciliationArea=value}"/>
             </el-form-item>
           </el-col>
@@ -383,7 +388,7 @@
             <el-form-item label="备注" prop="remarks"
                           :rules="[
                  ]">
-              <el-input maxlength="500" type="textarea" placeholder="请填写备注" v-model="inputForm.remarks" show-word-limit></el-input>
+              <el-input maxlength="500" :disabled="method==='view'" type="textarea" placeholder="请填写备注" v-model="inputForm.remarks" show-word-limit></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -438,6 +443,7 @@
 					show-footer
 					ref="detailTable"
 					class="vxe-table-element"
+					:key="detailKey"
 					:data="inputForm.financeInvoiceDetailDTOList"
 					style="margin-left: 5em"
 					highlight-current-row
@@ -527,12 +533,18 @@
 			</el-col>
           </el-row>
         </el-form>
-        <el-divider content-position="left"><i class="el-icon-document"></i>
-          收款明细
-          <el-button style="margin-left: 20px" :disabled="receivablesFlag!==true" type="primary" @click="insertEvent('receivables')" plain>
-            新增
-          </el-button>
-        </el-divider>
+		  <el-divider content-position="left"><i class="el-icon-document"></i>
+			  收款明细
+			  <el-button style="margin-left: 20px" :disabled="receivablesFlag!==true" type="primary" @click="insertEvent('receivables')">
+				  新增
+			  </el-button>
+		  </el-divider>
+<!--        <el-divider content-position="left"><i class="el-icon-document"></i>-->
+<!--          收款明细-->
+<!--          <vxe-button style="margin-left: 20px" :disabled="receivablesFlag!==true" status="primary" @click="insertEvent('receivables')">-->
+<!--            新增-->
+<!--          </vxe-button>-->
+<!--        </el-divider>-->
         <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="receivablesFlag!==true"
                  label-width="160px" @submit.native.prevent>
         <el-row  :gutter="15">
@@ -546,6 +558,7 @@
 				  :data="inputForm.financeInvoiceReceivablesDTOList"
 				  style="margin-left: 5em"
 				  highlight-current-row
+				  :key="detailKey2"
 				  :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
 			  >
 				  <vxe-table-column field="remittanceUnit" title="汇款单位" :edit-render="{}">
@@ -641,7 +654,7 @@
           billingPeopleId: this.$store.state.user.id,
           billingDate: '',
           collectDate: '',
-          billingPeopleReal: this.$store.state.user.id,
+          billingPeopleReal: '',
           reconciliationPeople: '',
           reconciliationArea: '',
           remarks: '',
@@ -664,6 +677,8 @@
         receivablesFlag: '', // true为收款,false为非收款
         detailFlag: '', // true为修改发票明细
         importVisible: false,
+		  detailKey: '',
+		  detailKey2: '',
         yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}]
       }
     },
@@ -722,7 +737,7 @@
           billingPeopleId: this.$store.state.user.id,
           billingDate: '',
           collectDate: '',
-          billingPeopleReal: this.$store.state.user.id,
+          billingPeopleReal: '',
           reconciliationPeople: '',
           reconciliationArea: '',
           remarks: '',
@@ -753,6 +768,7 @@
           financeInvoiceService.queryById(this.inputForm.id).then((data) => {
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+			  console.log('this.inputForm ', this.inputForm)
             if (!this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
               this.bankList = []
               workClientService.queryById(this.inputForm.billingWorkplaceRealId).then((data) => {
@@ -766,6 +782,7 @@
                 }
               })
             }
+			  console.log('billingPeopleReal', this.inputForm.billingPeopleReal)
             if (this.commonJS.isEmpty(this.inputForm.financeInvoiceReceivablesDTOList) || this.inputForm.financeInvoiceReceivablesDTOList.length === 0) {
               this.inputForm.financeInvoiceReceivablesDTOList = []
             }
@@ -957,11 +974,15 @@
         if (type === 'detail') {
           this.$refs.detailTable.insert().then((data) => {
             this.inputForm.financeInvoiceDetailDTOList.push(data)
+			  this.detailKey  = Math.random()
           })
         }
         if (type === 'receivables') {
           this.$refs.receivablesTable.insert().then((data) => {
+          	console.log('data', data)
             this.inputForm.financeInvoiceReceivablesDTOList.push(data)
+			  console.log('this.inputForm.financeInvoiceReceivablesDTOList', this.inputForm.financeInvoiceReceivablesDTOList)
+			  this.detailKey2  = Math.random()
           })
         }
       },
@@ -1135,7 +1156,7 @@
         this.loading = true
         financeInvoiceService.exportTemplate().then((res) => {
           // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadExcel(res.data, '发票明细导入模板')
+          this.$utils.downloadExcel(res, '发票明细导入模板')
           this.loading = false
         }).catch(function (err) {
           this.loading = false
@@ -1150,6 +1171,7 @@
             this.getAmount(item)
             this.getTax(item)
             this.inputForm.financeInvoiceDetailDTOList.push(item)
+			  this.detailKey  = Math.random()
           })
         }
         this.$message.success('导入完成')
@@ -1159,12 +1181,12 @@
         formBody.append('file', file.raw)
         this.loading = true
         financeInvoiceService.importDetail(formBody).then(async (result) => {
-          if (this.commonJS.isEmpty(result.data)) {
+          if (this.commonJS.isEmpty(result)) {
             this.importVisible = false
             this.loading = false
             throw new Error()
           }
-          for await (let item of result.data) {
+          for await (let item of result) {
             this.inputForm.financeInvoiceDetailDTOList.forEach(detail => {
               if (item.number === detail.number) {
                 this.$message.error('上传的文件中存在与页面重复的发票号,请重新填写后上传')
@@ -1174,7 +1196,7 @@
               }
             })
           }
-          await this.detailPush(result.data)
+          await this.detailPush(result)
           this.importVisible = false
           this.loading = false
         }).catch(() => {
@@ -1194,12 +1216,12 @@
         formBody.append('file', file.raw)
         this.loading = true
         financeInvoiceService.importDetail(formBody).then(async result => {
-          if (this.commonJS.isEmpty(result.data)) {
+          if (this.commonJS.isEmpty(result)) {
             this.importVisible = false
             this.loading = false
             throw new Error()
           }
-          for await (let item of result.data) {
+          for await (let item of result) {
             await this.inputForm.financeInvoiceDetailDTOList.forEach(detail => {
               if (item.number === detail.number) {
                 this.$message.error('上传的文件中存在与页面重复的发票号,请重新填写后上传')
@@ -1209,7 +1231,7 @@
               }
             })
           }
-          this.detailPushCode(result.data)
+          this.detailPushCode(result)
           this.importVisible = false
           this.loading = false
         }).catch(() => {
@@ -1225,6 +1247,7 @@
                 this.getAmount(item)
                 this.getTax(item)
                 this.inputForm.financeInvoiceDetailDTOList.push(item)
+				  this.detailKey  = Math.random()
               }
             }
           })

+ 30 - 20
src/views/cw/invoice/InvoiceFormTask.vue

@@ -136,7 +136,10 @@
                       {required: true, message:'电话不能为空', trigger:'blur'},{required: true, message:'电话不能为空', trigger:'change'}
              ]">
               <el-input v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
-                <el-button slot="append" icon="el-icon-search" @click="openBillingChoose()"></el-button>
+				  <template #append>
+					  <el-button icon="el-icon-search" @click="openBillingChoose()"></el-button>
+				  </template>
+
               </el-input>
             </el-form-item>
           </el-col>
@@ -301,7 +304,7 @@
 				  <el-date-picker
 					  v-model="inputForm.billingDate"
 					  type="date"
-					  value-format="yyyy-MM-dd"
+					  value-format="YYYY-MM-DD"
 					  placeholder="选择开票时间"
 					  style="width:100%"
 					  :disabled="status !== 'audit'"
@@ -317,7 +320,7 @@
 				  <el-date-picker
 					  v-model="inputForm.billingDate"
 					  type="date"
-					  value-format="yyyy-MM-dd"
+					  value-format="YYYY-MM-DD"
 					  placeholder="选择开票时间"
 					  style="width:100%"
 					  :disabled="status !== 'audit'"
@@ -333,7 +336,7 @@
 				  <el-date-picker
 					  v-model="inputForm.collectDate"
 					  type="date"
-					  value-format="yyyy-MM-dd"
+					  value-format="YYYY-MM-DD"
 					  placeholder="选择领票时间"
 					  style="width:100%"
 					  :disabled="status !== 'audit'"
@@ -477,12 +480,12 @@
 				  :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
 			  >
 				  <vxe-table-column field="code" title="发票代码" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input v-model="scope.row.code" placeholder="请填写发票代码"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="number" title="发票号" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input
 							  oninput ="value=value.replace(/\D|^/g,'')"
 							  placeholder="请填写发票号"
@@ -494,7 +497,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="account" title="开票金额(元)" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input-number
 							  @blur="checkAccount(scope.row,scope.$rowIndex)"
 							  v-model="scope.row.account"
@@ -510,7 +513,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="rate" title="税率(%)" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input-number
 							  @blur="checkRate(scope.row, scope.$rowIndex)"
 							  v-model="scope.row.rate"
@@ -526,17 +529,17 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="amount" title="金额" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input :readonly="true" v-model="scope.row.amount" placeholder="请填写金额"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="tax" title="税额" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input :readonly="true" v-model="scope.row.tax" placeholder="请填写税额"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="allAmount" title="累计登记金额" :edit-render="{}">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input-number
 							  v-model="scope.row.allAmount"
 							  controls-position="right"
@@ -833,11 +836,12 @@
             this.$refs.uploadComponent.clearUpload()
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+			  console.log('this.inputForm', this.inputForm)
             if (!this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
               this.bankList = []
               workClientService.queryById(this.inputForm.billingWorkplaceRealId).then((data) => {
-                if (this.commonJS.isNotEmpty(data.data.cwWorkClientBillingDTOList)) {
-                  data.data.cwWorkClientBillingDTOList.forEach(i => {
+                if (this.commonJS.isNotEmpty(data.cwWorkClientBillingDTOList)) {
+                  data.cwWorkClientBillingDTOList.forEach(i => {
                     i.ourBank = i.accountHolder
                     this.bankList.push(i)
                   })
@@ -862,6 +866,7 @@
             if (this.commonJS.isEmpty(this.inputForm.billingPeopleId)) {
               this.inputForm.billingPeopleId = this.$store.state.user.id
             }
+            console.log('billingPeopleReal', this.inputForm.billingPeopleReal)
             if (this.commonJS.isEmpty(this.inputForm.billingPeopleReal)) {
               this.inputForm.billingPeopleReal = this.$store.state.user.id
             }
@@ -948,6 +953,7 @@
       },
       // 表单提交
       async doSubmit (status, callback) {
+		  console.log('this.inputForm.financeInvoiceDetailDTOList', this.inputForm.financeInvoiceDetailDTOList)
         this.loading = true
         if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
@@ -1142,7 +1148,9 @@
         if (type === 'detail') {
           this.$refs.detailTable.insert().then((data) => {
             this.inputForm.financeInvoiceDetailDTOList.push(data)
+			  this.detailKey  = Math.random()
           })
+			console.log('this.inputForm.financeInvoiceDetailDTOList', this.inputForm.financeInvoiceDetailDTOList)
         }
         if (type === 'receivables') {
           this.$refs.receivablesTable.insert().then((data) => {
@@ -1383,7 +1391,7 @@
         this.loading = true
         financeInvoiceService.exportTemplate().then((res) => {
           // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadExcel(res.data, '发票明细导入模板')
+          this.$utils.downloadExcel(res, '发票明细导入模板')
           this.loading = false
         }).catch(function (err) {
           this.loading = false
@@ -1398,6 +1406,7 @@
             this.getAmount(item)
             this.getTax(item)
             this.inputForm.financeInvoiceDetailDTOList.push(item)
+			  this.detailKey  = Math.random()
           })
         }
         this.$message.success('导入完成')
@@ -1407,12 +1416,12 @@
         formBody.append('file', file.raw)
         this.loading = true
         financeInvoiceService.importDetail(formBody).then(async (result) => {
-          if (this.commonJS.isEmpty(result.data)) {
+          if (this.commonJS.isEmpty(result)) {
             this.importVisible = false
             this.loading = false
             throw new Error()
           }
-          for await (let item of result.data) {
+          for await (let item of result) {
             this.inputForm.financeInvoiceDetailDTOList.forEach(detail => {
               if (item.number === detail.number) {
                 this.$message.error('上传的文件中存在与页面重复的发票号,请重新填写后上传')
@@ -1422,7 +1431,7 @@
               }
             })
           }
-          await this.detailPush(result.data)
+          await this.detailPush(result)
           this.importVisible = false
           this.loading = false
         }).catch(() => {
@@ -1442,12 +1451,12 @@
         formBody.append('file', file.raw)
         this.loading = true
         financeInvoiceService.importDetail(formBody).then(async result => {
-          if (this.commonJS.isEmpty(result.data)) {
+          if (this.commonJS.isEmpty(result)) {
             this.importVisible = false
             this.loading = false
             throw new Error()
           }
-          for await (let item of result.data) {
+          for await (let item of result) {
             await this.inputForm.financeInvoiceDetailDTOList.forEach(detail => {
               if (item.number === detail.number) {
                 this.$message.error('上传的文件中存在与页面重复的发票号,请重新填写后上传')
@@ -1457,7 +1466,7 @@
               }
             })
           }
-          this.detailPushCode(result.data)
+          this.detailPushCode(result)
           this.importVisible = false
           this.loading = false
         }).catch(() => {
@@ -1473,6 +1482,7 @@
                 this.getAmount(item)
                 this.getTax(item)
                 this.inputForm.financeInvoiceDetailDTOList.push(item)
+				  this.detailKey  = Math.random()
               }
             }
           })

+ 8 - 5
src/views/cw/invoice/InvoiceList.vue

@@ -41,10 +41,10 @@
           </el-input-number>
         </el-form-item>
         <el-form-item v-if="showHideItem" prop="reconciliationPeopleName" label="对账人">
-          <UserSelect :limit='1' :userName="searchForm.reconciliationPeopleName" @getValue='(value, label) => {searchForm.reconciliationPeopleName = label}'></UserSelect>
+          <UserSelect :limit='1' :modelValue="searchForm.reconciliationPeopleName" @update:modelValue='(value, label) => {searchForm.reconciliationPeopleName = label}'></UserSelect>
         </el-form-item>
         <el-form-item v-if="showHideItem" label="经办人" prop="operator">
-          <UserSelect :limit='1' :userName="searchForm.operator" @getValue='(value, label) => {searchForm.operator = label}'></UserSelect>
+          <UserSelect :limit='1' :modelValue="searchForm.operator" @update:modelValue='(value, label) => {searchForm.operator = label}'></UserSelect>
         </el-form-item>
         <el-form-item v-if="showHideItem" prop="operatorOffice" label="经办人部门">
           <SelectTree
@@ -126,7 +126,7 @@
             @change="changeBillingDateList"
             v-model="searchForm.billingDateList"
             type="daterange"
-            value-format="yyyy-MM-dd"
+            value-format="YYYY-MM-DD"
             range-separator="至"
             style="width: 100%  "
             start-placeholder="开始日期"
@@ -139,7 +139,7 @@
           <el-date-picker
             v-model="searchForm.remittanceDateList"
             type="daterange"
-            value-format="yyyy-MM-dd"
+            value-format="YYYY-MM-DD"
             range-separator="至"
             style="width: 100%  "
             start-placeholder="开始日期"
@@ -198,7 +198,7 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column type="checkbox" width="60" ></vxe-column>
           <vxe-column min-width="150" title="项目名称" align="center" field="programName">
             <template #default="scope">
               <el-link  type="primary" :underline="false" @click="viewProject(scope.row.id)">{{scope.row.programName}}</el-link>
@@ -799,6 +799,7 @@
       // 驳回后调整
       adjust (row) {
         financeInvoiceService.queryById(row.id).then((data) => {
+			console.log('data1', data)
           if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
             this.$message.error('数据已发生改变或不存在,请刷新数据')
             this.refreshList()
@@ -820,6 +821,7 @@
       },
       // 审核或重新调整跳转
       todo (row) {
+		  console.log('row.taskId', row.taskId)
         let cUser = false
         taskService.getTaskDefInfo({
           taskId: row.taskId
@@ -853,6 +855,7 @@
       // 驳回后调整
       adjustInvalid (row) {
         financeInvoiceService.queryById(row.id).then((data) => {
+			console.log('data2', data)
           if (data.status !== '8') { // status的值不等于“驳回”,就弹出提示
             this.$message.error('数据已发生改变或不存在,请刷新数据')
             this.refreshList()

+ 2 - 2
src/views/cw/invoice/ProgramPageForm.vue

@@ -59,12 +59,12 @@
             :checkbox-config="{trigger: 'row'}"
           >
             <vxe-column type="seq" width="60" title="序号"></vxe-column>
-            <vxe-column type="checkbox" width="40px"></vxe-column>
+            <vxe-column type="checkbox" width="60px"></vxe-column>
             <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
             <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
             <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
             <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
-            <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
 
           </vxe-table>
           <vxe-pager

+ 1 - 1
src/views/cw/projectRecords/ProjectMembersEditForm.vue

@@ -33,7 +33,7 @@
                   <el-form-item label="现场负责人" prop="projectLeaderId"
                                 :rules="[
                    ]">
-                    <UserSelect :disabled="true" :limit='1' :value="inputForm.projectLeaderId" @getValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
+                    <UserSelect :disabled="true" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">

+ 11 - 13
src/views/cw/projectRecords/ProjectMembersList.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="page">
-    <el-form size="small"  v-if="searchVisible" :inline="true" class="query-form m-b-10"  ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+    <el-form v-if="searchVisible" :inline="true" class="query-form m-b-10"  ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
       <!-- 搜索框-->
       <el-form-item label="项目名称" prop="projectName">
-        <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+        <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
       <el-form-item label="项目编号" prop="projectNumber">
-        <el-input size="small" v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
       </el-form-item>
       <el-form-item label="创建时间" prop="createDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.createDates"
           type="datetimerange"
           range-separator="至"
@@ -22,15 +22,15 @@
       </el-form-item>
 
       <el-form-item>
-        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
-        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
       </el-form-item>
     </el-form>
     <div class="jp-table top" style="">
       <vxe-toolbar :refresh="{query: refreshList}"  ref="toolbarRef" custom>
         <template #buttons>
-          <!--          <el-button v-if="hasPermission('cwProjectRecords:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>-->
-          <!--          <el-button v-if="hasPermission('klg:question:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+          <!--          <el-button v-if="hasPermission('cwProjectRecords:add')" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>-->
+          <!--          <el-button v-if="hasPermission('klg:question:del')" type="danger" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
         </template>
 		  <template #tools>
 			  <vxe-button
@@ -50,7 +50,6 @@
           resizable
           height="auto"
           :loading="loading"
-          size="small"
           ref="projectTable"
           show-header-overflow
           show-overflow
@@ -61,7 +60,7 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40" ></vxe-column>
+<!--          <vxe-column type="checkbox" width="60" ></vxe-column>-->
           <vxe-column min-width="230" align="center" title="项目名称" field="projectName">
             <template #default="scope">
               <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectRecords:view')" @click="view(scope.row.id)">{{scope.row.projectName}}</el-link>
@@ -83,7 +82,7 @@
           <vxe-column title="操作" width="70px" fixed="right" align="center">
             <template  #default="scope">
 <!--              项目创建人、项目组成员、管理员可编辑-->
-<!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>-->
+<!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text" @click="edit(scope.row.id)">编辑</el-button>-->
 <!--              项目创建人、管理员、项目现场负责人、项目经理1、项目经理2可编辑-->
               <el-button v-if="hasPermission('cwProjectRecords:edit')&&
               (
@@ -99,7 +98,6 @@
         </vxe-table>
         <vxe-pager
           background
-          size="small"
           :current-page="tablePage.currentPage"
           :page-size="tablePage.pageSize"
           :total="tablePage.total"

+ 26 - 21
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -208,19 +208,23 @@
                     <UserSelect :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
-                <el-col :span="12">
-                  <el-form-item label="项目经理1" prop="projectMasterId"
-                                :rules="[
+				  <el-col :span="12">
+					  <el-form-item label="项目经理1" prop="projectMasterId"
+									:rules="[
                    ]">
-                    <UserSelectSignatory ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.projectMasterId" @getValue='(value) => {changeSignatory1(value)}'></UserSelectSignatory>
+                    <UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
+										 :readonly="true" :limit='1' :modelValue="inputForm.projectMasterId"
+										 @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelectSignatory>
 
-                  </el-form-item>
-                </el-col>
-                <el-col :span="12">
+					  </el-form-item>
+				  </el-col>
+				  <el-col :span="12">
                   <el-form-item label="项目经理2" prop="realHeader"
                                 :rules="[
                    ]">
-                    <UserSelectSignatory ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.realHeader" @getValue='(value) => {changeSignatory2(value)}'></UserSelectSignatory>
+                    <UserSelectSignatory style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'"
+										 :readonly="true" :limit='1' :modelValue="inputForm.realHeader"
+										 @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelectSignatory>
                   </el-form-item>
                 </el-col>
 
@@ -308,19 +312,19 @@
                             <el-input v-model="scope.row.name" placeholder="姓名" clearable></el-input>
                           </template>
                         </vxe-table-column>
-                        <vxe-table-column align="center" field="sex" title="性别" :edit-render="{name: '$select', options: $dictUtils.getDictList('sex')}">
-                          <template v-slot:edit="scope">
-                            <vxe-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
-                              <vxe-option
-                                v-for="item in $dictUtils.getDictList('sex')"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
-                              </vxe-option>
-                            </vxe-select>
-                          </template>
-                        </vxe-table-column>
-                        <vxe-table-column align="center" field="officeId" title="部门" :edit-render="{}">
+						  <vxe-table-column align="center" field="sex" title="性别" :edit-render="{name: '$select', options: $dictUtils.getDictList('sex')}">
+							  <template v-slot:edit="scope">
+								  <vxe-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
+									  <vxe-option
+										  v-for="item in $dictUtils.getDictList('sex')"
+										  :key="item.value"
+										  :label="item.label"
+										  :value="item.value">
+									  </vxe-option>
+								  </vxe-select>
+							  </template>
+						  </vxe-table-column>
+						  <vxe-table-column align="center" field="officeId" title="部门" :edit-render="{}">
                           <template v-slot:edit="scope">
                             <el-input v-model="scope.row.officeId" placeholder="部门" clearable></el-input>
                           </template>
@@ -932,6 +936,7 @@
       },
       // 项目经理1改变事件
       changeSignatory1 (value) {
+      	console.log('项目经理1', value)
         if (this.inputForm.realHeader === value && this.commonJS.isNotEmpty(value)) {
           this.$message.warning('项目经理1和项目经理2不可以相同')
           this.$nextTick(() => {

+ 5 - 5
src/views/cw/projectRecords/ProjectRecordsChooseCom.vue

@@ -18,14 +18,14 @@
           <el-form-item label="项目编号" prop="projectNumber">
             <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
           </el-form-item>
-          <el-form-item label="项目经理" prop="projectMasterName">
-            <el-input v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>
+          <el-form-item label="项目经理" prop="projectMasterName2">
+            <el-input v-model="searchForm.projectMasterName2" placeholder="请输入项目经理" clearable></el-input>
           </el-form-item>
           <el-form-item label="创建时间" prop="createDates">
             <el-date-picker
               placement="bottom-start"
-              format="yyyy-MM-dd HH:mm:ss"
-              value-format="yyyy-MM-dd HH:mm:ss"
+              format="YYYY-MM-DD HH:mm:ss"
+              value-format="YYYY-MM-DD HH:mm:ss"
               v-model="searchForm.createDates"
               type="datetimerange"
               range-separator="至"
@@ -103,7 +103,7 @@
         },
         dataList: [],
         searchForm: {
-          projectMasterName: '',
+			projectMasterName2: '',
           projectNumber: '',
           projectName: '',
           createDates: [],

+ 4 - 4
src/views/cw/projectRecords/ProjectRecordsForm.vue

@@ -176,7 +176,7 @@
                     <el-date-picker
                       v-model="inputForm.auditYear"
                       type="year"
-                      value-format="yyyy"
+                      value-format="YYYY"
                       placeholder="选择评审计期间"
                       style="width:100%"
                       placement="bottom-start"
@@ -208,7 +208,7 @@
                   <el-form-item label="现场负责人" prop="projectLeaderId"
                                 :rules="[
                    ]">
-                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :value="inputForm.projectLeaderId" @getValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
+                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modleValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
@@ -217,14 +217,14 @@
                                 {required: true, message:'项目经理1不能为空', trigger:'blur'}
                    ]">
                     <!--                    <el-input v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>-->
-                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :value="inputForm.projectMasterId" @getValue='(value) => {inputForm.projectMasterId = value}'></UserSelect>
+                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.projectMasterId" @update:modelValue='(value) => {inputForm.projectMasterId = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
                   <el-form-item label="项目经理2" prop="realHeader"
                                 :rules="[
                    ]">
-                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :value="inputForm.realHeader" @getValue='(value) => {inputForm.realHeader = value}'></UserSelect>
+                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.realHeader" @update:modelValue='(value) => {inputForm.realHeader = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">

+ 4 - 4
src/views/cw/projectRecords/ProjectRecordsList.vue

@@ -10,17 +10,17 @@
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="projectMasterName">
 <!--        <el-input v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
-        <UserSelect :limit='1' :userName="searchForm.projectMasterName" @getValue='(value, label) => {searchForm.projectMasterName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.projectMasterName" @update:modelValue='(value, label) => {searchForm.projectMasterName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理2" prop="realHeaderName">
         <!--        <el-input v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
-        <UserSelect :limit='1' :userName="searchForm.realHeaderName" @getValue='(value, label) => {searchForm.realHeaderName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.realHeaderName" @update:modelValue='(value, label) => {searchForm.realHeaderName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.createDates"
           type="datetimerange"
           range-separator="至"

+ 1 - 1
src/views/cw/projectRecords/ProjectRecordsTaskForm.vue

@@ -228,7 +228,7 @@
                   <el-form-item label="现场负责人" prop="projectLeaderId"
                                 :rules="[
                    ]">
-                    <UserSelect size="medium" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :value="inputForm.projectLeaderId" @getValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
+                    <UserSelect size="medium" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">

+ 8 - 8
src/views/cw/projectReportArchive/ProjectReportArchiveDetailList.vue

@@ -5,7 +5,7 @@
       <el-form-item label="项目名称" prop="cwProjectRecordsDTO.projectName">
         <el-input v-model="searchForm.cwProjectRecordsDTO.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
-      <el-form-item label="创建人" prop="cwProjectRecordsDTO.projectMasterId">
+      <el-form-item label="项目经理" prop="cwProjectRecordsDTO.projectMasterId">
         <SelectUserTree
           ref="companyTree"
           :props="{
@@ -31,8 +31,8 @@
       <el-form-item v-if="showHideItem" label="报告时间" prop="reportDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.reportDates"
           type="datetimerange"
           range-separator="至"
@@ -45,8 +45,8 @@
       <el-form-item v-if="showHideItem" label="归档时间" prop="auditDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.auditDates"
           type="datetimerange"
           range-separator="至"
@@ -126,8 +126,8 @@
           </vxe-column>
           <vxe-column min-width="150" align="center" title="项目经理" field="cwProjectRecordsDTO.projectMasterName"></vxe-column>
           <vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
-          <vxe-column min-width="150" align="center" title="报告日期" :formatter="formatDate" field="reportDate"></vxe-column>
-          <vxe-column min-width="150" align="center" title="归档日期" :formatter="formatDate" field="auditDate"></vxe-column>
+          <vxe-column min-width="150" align="center" title="报告日期" field="reportDate"></vxe-column>
+          <vxe-column min-width="150" align="center" title="归档日期" field="auditDate"></vxe-column>
           <vxe-column min-width="150" align="center" title="归档状态" field="status">
             <template #default="scope">
               <span style="color:#5bc0de; font-weight: bold;" v-if="scope.row.status === '暂时未归档'">暂时未归档</span>
@@ -284,7 +284,7 @@
         }
       },
       formatDate ({ cellValue }) {
-        return XEUtils.toDateString(cellValue, 'yyyy-MM-dd')
+        return XEUtils.toDateString(cellValue, 'YYYY-MM-DD')
       },
       // 查看
       view (id) {

+ 1 - 1
src/views/cw/projectReportArchive/ProjectReportArchiveForm.vue

@@ -116,7 +116,7 @@
                     <el-date-picker
                       v-model="inputForm.year"
                       type="year"
-                      value-format="yyyy"
+                      value-format="YYYY"
                       placeholder="选择档案年度"
                       style="width:100%"
                       placement="bottom-start"

+ 5 - 5
src/views/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -13,17 +13,17 @@
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="cwProjectRecordsDTO.projectMasterName">
 <!--        <el-input v-model="searchForm.cwProjectRecordsDTO.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
-        <UserSelect :limit='1' :userName="searchForm.cwProjectRecordsDTO.projectMasterName" @update:modelValue='(value, label) => {searchForm.cwProjectRecordsDTO.projectMasterName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.cwProjectRecordsDTO.projectMasterName" @update:modelValue='(value, label) => {searchForm.cwProjectRecordsDTO.projectMasterName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理2" prop="cwProjectRecordsDTO.realHeaderName">
         <!--        <el-input v-model="searchForm.cwProjectRecordsDTO.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
-        <UserSelect :limit='1' :userName="searchForm.cwProjectRecordsDTO.realHeaderName" @update:modelValue='(value, label) => {searchForm.cwProjectRecordsDTO.realHeaderName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.cwProjectRecordsDTO.realHeaderName" @update:modelValue='(value, label) => {searchForm.cwProjectRecordsDTO.realHeaderName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="档案年度" prop="year">
         <el-date-picker
           v-model="searchForm.year"
           type="year"
-          value-format="yyyy"
+          value-format="YYYY"
           placeholder="选择档案年度"
           style="width:100%"
           placement="bottom-start"
@@ -48,7 +48,7 @@
 
       <el-form-item v-if="showHideItem" label="创建人" prop="createBy.name">
 <!--        <el-input  v-model="searchForm.createBy.name" placeholder="请输入创建人" clearable></el-input>-->
-        <UserSelect :limit='1' :userName="searchForm.createBy.name" @update:modelValue='(value, label) => {searchForm.createBy.name = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.createBy.name" @update:modelValue='(value, label) => {searchForm.createBy.name = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
         <el-date-picker
@@ -139,7 +139,7 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="60" ></vxe-column>
+<!--          <vxe-column type="checkbox" width="60" ></vxe-column>-->
           <vxe-column min-width="150" align="center" title="档案号" field="fileNumber">
             <template #default="scope">
               <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReportArchive:view')" @click="view(scope.row.id)">{{scope.row.fileNumber}}</el-link>

+ 29 - 19
src/views/cw/projectReportArchive/ProjectReportArchiveTaskForm.vue

@@ -116,6 +116,13 @@
                     </el-date-picker>
                   </el-form-item>
                 </el-col>
+				<el-col :span="12">
+					<el-form-item label="归档时间" prop="auditDate"
+								:rules="[
+					]">
+					  <el-input :disabled="true" v-model="inputForm.auditDate" placeholder="请填写归档时间" clearable></el-input>
+					</el-form-item>
+				</el-col>
                 <el-col v-if="status !== 'audit'" :span="12">
                   <el-form-item label="案卷号" prop="number"
                                 :rules="[
@@ -130,14 +137,14 @@
                     <el-input :disabled="true" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
                   </el-form-item>
                 </el-col>
-                <el-form v-if="status === 'audit'" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+                <el-form v-if="status === 'audit'" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
                          label-width="110px" @submit.native.prevent>
                 <el-col  :span="12">
                   <el-form-item label="案卷号" prop="number"
                                 :rules="[
                                 {required: true, message:'案卷号不能为空', trigger:'blur'}
                    ]">
-                    <el-input style="width: 480px" :disabled="false" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
+                    <el-input style="width: 100%" :disabled="false" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
                   </el-form-item>
                 </el-col>
                 <el-col  :span="12">
@@ -145,17 +152,11 @@
                                 :rules="[
                                 {required: true, message:'确认案卷号不能为空', trigger:'blur'}
                    ]">
-                    <el-input :disabled="false" style="width: 480px" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
+                    <el-input :disabled="false" style="width: 100%" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
                   </el-form-item>
                 </el-col>
                 </el-form>
-                <el-col :span="12">
-                  <el-form-item label="归档时间" prop="auditDate"
-                                :rules="[
-                   ]">
-                    <el-input :disabled="true" v-model="inputForm.auditDate" placeholder="请填写归档时间" clearable></el-input>
-                  </el-form-item>
-                </el-col>
+
                 <el-col :span="24">
                   <el-form-item label="备注" prop="remarks"
                                 :rules="[
@@ -218,17 +219,26 @@
                   <el-input :disabled="true" v-model="inputForm.reportCreateName" placeholder="请填写报告主办人" clearable></el-input>
                 </el-form-item>
               </el-col>
-              <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
-                       label-width="110px" @submit.native.prevent>
-              <el-col :span="24">
-                <el-form-item label="审计意见" prop="reportRemarks"
-                              :rules="[
+<!--              <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"-->
+<!--                       label-width="110px" @submit.native.prevent>-->
+<!--              <el-col :span="12">-->
+<!--                <el-form-item label="审计意见" prop="reportRemarks"-->
+<!--                              :rules="[-->
+<!--                   ]">-->
+<!--                  <el-input type="textarea"  style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>-->
+
+<!--                </el-form-item>-->
+<!--              </el-col>-->
+<!--              </el-form>-->
+				<el-col :span="12">
+					<el-form-item label="审计意见" prop="reportRemarks"
+								  :class="method==='view'?'readonly':''"
+								  :rules="[
                    ]">
-                  <el-input type="textarea"  style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>
+						<el-input type="textarea" :disabled="status !== 'audit'" style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>
 
-                </el-form-item>
-              </el-col>
-              </el-form>
+					</el-form-item>
+				</el-col>
             </el-row>
         </el-form>
         <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">

+ 10 - 4
src/views/cw/reimbursementApproval/info/InfoList.vue

@@ -20,10 +20,10 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="经办人" prop="handled">
-        <UserSelect :limit='1' :userName="searchForm.handled" @getValue='(value, label) => {searchForm.handled = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.handled" @update:modelValue='(value, label) => {searchForm.handled = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="报销人" prop="reimBy">
-        <UserSelect :limit='1' :userName="searchForm.reimBy" @getValue='(value, label) => {searchForm.reimBy = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.reimBy" @update:modelValue='(value, label) => {searchForm.reimBy = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="报销状态" prop="type">
         <el-select v-model="searchForm.type" placeholder="请选择" style="width:100%;">
@@ -76,7 +76,10 @@
           @getValue="(value, label) => {searchForm.remiType=label}"/>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="报销金额" prop="amounts">
-        <InputNumber :disabled="false" :precision="num" v-model="searchForm.amounts"></InputNumber>
+        <InputNumber :disabled="false" :precision="num" :value="searchForm.amounts"
+					 @changefrom="(val)=>{searchForm.amounts[0]=val}"
+					 @changeto="(val)=>{searchForm.amounts[1]=val}"
+		></InputNumber>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="报告号" prop="reportNumber">
         <el-input v-model="searchForm.reportNumber" placeholder="请输入报告号" clearable></el-input>
@@ -165,7 +168,7 @@
           <vxe-column width="100" title="报销金额(元)" field="number" fixed="right" align="center"></vxe-column>
           <vxe-column width="100" title="状态" fixed="right" align="center" field="type">
             <template #default="scope">
-              <el-button text @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
+              <el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
             </template>
           </vxe-column>
 
@@ -534,7 +537,9 @@
       },
       // 驳回后调整
       adjust (row) {
+      	console.log('row', row)
         this.reimbursementApprovalService.findById(row.id).then((data) => {
+			console.log('data', data)
           if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
             this.$message.error('数据已发生改变或不存在,请刷新数据')
             this.refreshList()
@@ -556,6 +561,7 @@
       },
       // 审核或重新调整跳转
       todo (row) {
+      	console.log('row.taskId', row.taskId)
         let cUser = false
         taskService.getTaskDefInfo({
           taskId: row.taskId

+ 7 - 6
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -127,7 +127,7 @@
 				  <vxe-table-column field="deptName" title="报销部门" ></vxe-table-column>
 				  <vxe-table-column field="typeName" title="报销类别" ></vxe-table-column>
 				  <vxe-table-column field="projectName" title="报销项目" >
-					  <template #default="scope">
+					  <template #edit="scope">
 						  <el-link  type="primary" :underline="false" v-if="commonJS.isNotEmpty(scope.row.projectId)" @click="viewProject(scope.row.projectId)">{{scope.row.projectName}}</el-link>
 						  <span v-else>{{scope.row.projectName}}</span>
 					  </template>
@@ -174,7 +174,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input v-model="scope.row.typeName" @focus="typePullForm(scope.$rowIndex, scope.row.deptId)"></el-input>
 					  </template>
 				  </vxe-table-column>
@@ -251,7 +251,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input v-model="scope.row.typeName" @focus="typePullForm2(scope.$rowIndex, scope.row.deptId)"></el-input>
 					  </template>
 				  </vxe-table-column>
@@ -328,7 +328,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input v-model="scope.row.typeName" @focus="typePullForm3(scope.$rowIndex, scope.row.deptId)"></el-input>
 					  </template>
 				  </vxe-table-column>
@@ -405,7 +405,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input v-model="scope.row.typeName" @focus="typePullForm4(scope.$rowIndex, scope.row.deptId)"></el-input>
 					  </template>
 				  </vxe-table-column>
@@ -482,7 +482,7 @@
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
-					  <template v-slot:edit="scope">
+					  <template #edit="scope">
 						  <el-input v-model="scope.row.typeName" @focus="typePullForm5(scope.$rowIndex, scope.row.deptId)"></el-input>
 					  </template>
 				  </vxe-table-column>
@@ -808,6 +808,7 @@
           this.loading = true
           this.$refs.inputForm.resetFields()
           this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
+			  this.$refs.uploadComponent.clearUpload()
             if (this.status === 'audit' || this.status === 'taskFormDetail') {
               method = 'view'
             }

+ 6 - 6
src/views/cw/reportCancellApply/ReportCancellApplyList.vue

@@ -9,10 +9,10 @@
         <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="projectMasterName">
-        <UserSelect :limit='1' :userName="searchForm.projectMasterName" @getValue='(value, label) => {searchForm.projectMasterName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.projectMasterName" @update:modelValue='(value, label) => {searchForm.projectMasterName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理2" prop="projectMaster2Name">
-        <UserSelect :limit='1' :userName="searchForm.projectMaster2Name" @getValue='(value, label) => {searchForm.projectMaster2Name = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.projectMaster2Name" @update:modelValue='(value, label) => {searchForm.projectMaster2Name = value}'></UserSelect>
       </el-form-item>
 <!--      <el-form-item label="创建人" prop="createBy">-->
 <!--        <el-input v-model="searchForm.createBy" placeholder="请输入创建人" clearable></el-input>-->
@@ -25,17 +25,18 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"
           :value="searchForm.createBy"
           :clearable="true"
           :accordion="true"
+		  size="default"
           @getValue="(value) => {searchForm.createBy=value}"/>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="创建时间" prop="contractDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.contractDates"
           type="datetimerange"
           range-separator="至"
@@ -103,7 +104,6 @@
           <vxe-column  min-width="150px" align="center" fixed="right" title="状态" field="status" >
             <template #default="scope">
               <el-button  @click="detail(scope.row)" effect="dark"
-						  text
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
                 {{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}}
               </el-button>

+ 3 - 3
src/views/cw/reportCancellApplyArchived/ReportCancellApplyArchivedForm.vue

@@ -52,7 +52,7 @@
                                 :rules="[
                    ]">
                     <!--                    <el-input v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>-->
-                    <UserSelect :disabled="true" :limit='1' :value="inputForm.cwProjectRecordsDTO.projectMasterId" @getValue='(value) => {inputForm.cwProjectRecordsDTO.projectMasterId = value}'></UserSelect>
+                    <UserSelect :disabled="true" :limit='1' :modelValue="inputForm.cwProjectRecordsDTO.projectMasterId" @update:modelValue='(value) => {inputForm.cwProjectRecordsDTO.projectMasterId = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
@@ -60,7 +60,7 @@
                                 :rules="[
                    ]">
                     <!--                    <el-input v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>-->
-                    <UserSelect :disabled="true" :limit='1' :value="inputForm.cwProjectRecordsDTO.realHeader" @getValue='(value) => {inputForm.cwProjectRecordsDTO.realHeader = value}'></UserSelect>
+                    <UserSelect :disabled="true" :limit='1' :modelValue="inputForm.cwProjectRecordsDTO.realHeader" @update:modelValue='(value) => {inputForm.cwProjectRecordsDTO.realHeader = value}'></UserSelect>
                   </el-form-item>
                 </el-col>
                 <!--            <el-col :span="12">-->
@@ -247,7 +247,7 @@
                   </el-form-item>
                 </el-col>
                 <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
-                         label-width="135px" @submit.native.prevent>
+						 style="width:100%" label-width="135px" @submit.native.prevent>
                   <el-col :span="24">
                     <el-form-item label="审计意见" prop="reportRemarks"
                                   :rules="[

+ 4 - 4
src/views/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList.vue

@@ -9,10 +9,10 @@
         <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="projectMasterName">
-        <UserSelect :limit='1' :userName="searchForm.projectMasterName" @getValue='(value, label) => {searchForm.projectMasterName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.projectMasterName" @update:modelValue='(value, label) => {searchForm.projectMasterName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理2" prop="projectMaster2Name">
-        <UserSelect :limit='1' :userName="searchForm.projectMaster2Name" @getValue='(value, label) => {searchForm.projectMaster2Name = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.projectMaster2Name" @update:modelValue='(value, label) => {searchForm.projectMaster2Name = value}'></UserSelect>
       </el-form-item>
 <!--      <el-form-item label="创建人" prop="createBy">-->
 <!--        <el-input v-model="searchForm.createBy" placeholder="请输入创建人" clearable></el-input>-->
@@ -44,7 +44,7 @@
         </el-date-picker>
       </el-form-item>
 
-      <el-form-item label="作废归档状态" prop="status">
+      <el-form-item label="作废归档状态" prop="applyFileType">
         <el-select v-model="searchForm.applyFileType" placeholder="请选择报告作废归档状态" style="width:100%;" clearable>
           <el-option
             v-for="item in $dictUtils.getDictList('filed_type')"
@@ -136,7 +136,6 @@
           <vxe-column  min-width="150px" align="center" fixed="right" title="作废归档状态" field="applyFileType" >
             <template #default="scope">
               <el-button  @click="detail(scope.row)" effect="dark"
-						  text
                           :type="$dictUtils.getDictLabel('filed_type_status', scope.row.applyFileType, '')">
                 {{$dictUtils.getDictLabel("filed_type", scope.row.applyFileType, '-')}}
               </el-button>
@@ -203,6 +202,7 @@
         showHideName: '展示',
         searchForm: {
           projectNumber: '',
+		  applyFileType: '',
           projectName: '',
           projectMasterId: '',
           projectMaster2Id: '',

+ 1 - 1
src/views/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue

@@ -236,7 +236,7 @@
                 <el-input :disabled="true" v-model="inputForm.reportCreateName" placeholder="请填写报告主办人" clearable></el-input>
               </el-form-item>
             </el-col>
-            <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
+            <el-form style="width:100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
                      label-width="135px" @submit.native.prevent>
               <el-col :span="24">
                 <el-form-item label="审计意见" prop="reportRemarks"

+ 8 - 6
src/views/cw/reportManagement/ReportManagementAddForm.vue

@@ -99,7 +99,7 @@
                             {required: true, message:'签字注师1不能为空', trigger:'change'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-              <UserSelect ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
+              <UserSelect style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
             </el-form-item>
           </el-col>
 
@@ -109,7 +109,7 @@
                             // {required: true, message:'签字注师2不能为空', trigger:'change'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-              <UserSelect ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
+              <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect2>
             </el-form-item>
           </el-col>
 
@@ -119,7 +119,7 @@
                               {required: true, message:'签字注师1不能为空', trigger:'blur'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-              <UserSelect ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
+              <UserSelect style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
             </el-form-item>
           </el-col>
 
@@ -129,7 +129,7 @@
                               // {required: true, message:'签字注师2不能为空', trigger:'blur'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-              <UserSelect ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
+              <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect2>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -494,7 +494,7 @@
             <el-form-item label="计算机文号" prop="computerNo"
                           :rules="[
                    ]">
-              <el-input v-model="inputForm.computerNo" placeholder="请输入校对人签名">
+              <el-input v-model="inputForm.computerNo" placeholder="请输入计算机文号">
               </el-input>
             </el-form-item>
           </el-col>
@@ -529,7 +529,8 @@
   // import UpLoadComponent from '@/views/common/UpLoadComponentV2.1'
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
-  import UserSelect from '../workClientInfo/clientUserSelect'
+  import UserSelect from '../workClientInfo/clientUserSelect/AccountantUserIndex'
+  import UserSelect2 from '../workClientInfo/clientUserSelect/AccountantUserIndex2'
   import UserSelectAll from '@/components/userSelect'
   import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
   import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
@@ -645,6 +646,7 @@
       UpLoadComponent,
       SelectTree,
       UserSelect,
+	  UserSelect2,
       ReportServiceUnitForm,
       ProjectRecoredChooseCom,
       UserSelectAll

+ 21 - 17
src/views/cw/reportManagement/ReportManagementForm.vue

@@ -78,6 +78,7 @@
 
                     :url="`/system-server/sys/office/treeData?type=2`"
                     :value="inputForm.officeId"
+					size="default"
                     :accordion="true"
                     @getValue="(value) => {inputForm.officeId=value}"/>
                   <!--                <el-input v-model="inputForm.officeId" placeholder="请填写报告所属部门" clearable></el-input>-->
@@ -103,7 +104,7 @@
                               :rules="[
                    ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-                  <UserSelect ref="userSelect1" :disabled="method === 'view'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
+                  <UserSelect style="width: 100%" ref="userSelect1" :disabled="method === 'view'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
                 </el-form-item>
               </el-col>
 
@@ -112,7 +113,7 @@
                               :rules="[
                    ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-                  <UserSelect ref="userSelect2" :disabled="method === 'view'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
+                  <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="method === 'view'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect2>
                 </el-form-item>
               </el-col>
 
@@ -122,7 +123,7 @@
                               {required: true, message:'签字注师1不能为空', trigger:'blur'}
                    ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-                  <UserSelect ref="userSelect1" :disabled="method === 'view'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
+                  <UserSelect style="width: 100%" ref="userSelect1" :disabled="method === 'view'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
                 </el-form-item>
               </el-col>
               <el-col v-if="inputForm.signatureType === '2' " :span="12">
@@ -131,7 +132,7 @@
                               {required: true, message:'签字注师2不能为空', trigger:'blur'}
                    ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-                  <UserSelect ref="userSelect2" :disabled="method === 'view'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
+                  <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="method === 'view'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect2>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
@@ -163,7 +164,7 @@
                               {required: true, message:'报告实际制作人不能为空', trigger:'blur'},
                           {required: true, message:'报告实际制作人不能为空', trigger:'change'}
                    ]">
-                  <UserSelectAll :readonly="true" :disabled="method === 'view'" :limit='1' :value="inputForm.realCreate" @getValue='(value) => {inputForm.realCreate = value}'></UserSelectAll>
+                  <UserSelectAll :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.realCreate" @update:modelValue='(value) => {inputForm.realCreate = value}'></UserSelectAll>
                 </el-form-item>
               </el-col>
 
@@ -358,7 +359,7 @@
                    ]">
                   <el-date-picker
                     placement="bottom-start"
-                    value-format="yyyy-MM-dd"
+                    value-format="YYYY-MM-DD"
                     v-model="inputForm.reportDate"
                     style="width: 100%"
                     placeholder="选择日期">
@@ -818,22 +819,22 @@
 						>
 							<vxe-table-column type="seq" align="center" width="80" title="序号"></vxe-table-column>
 							<vxe-table-column align="center" field="servedUnitName" title="被服务单位" :edit-render="{}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-input v-model="scope.row.servedUnitName" placeholder="被服务单位" clearable></el-input>
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" field="servedUnitName" title="被服务单位" :edit-render="{}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-input v-model="scope.row.servedUnitName" placeholder="被服务单位" clearable></el-input>
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" field="reportDate" title="报告日期" :edit-render="{}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-input v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" field="reportType" title="报告类型" :edit-render="{name: '$select', options: $dictUtils.getDictList('cw_report_type')}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-select v-model="scope.row.reportType" placeholder="请选择报告类型" clearable style="width: 100%;">
 										<el-option
 											v-for="item in $dictUtils.getDictList('cw_report_type')"
@@ -846,25 +847,25 @@
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" field="reportNo" title="报告文号" :edit-render="{}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-input v-model="scope.row.reportNo" placeholder="报告文号" clearable></el-input>
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" field="sealType" title="盖章状态" :edit-render="{}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-input v-model="scope.row.sealType" placeholder="盖章状态" clearable></el-input>
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" field="documentStatus" title="单据状态" :edit-render="{}">
-								<template #default="scope">
+								<template v-slot:edit="scope">
 									<el-input v-model="scope.row.documentStatus" placeholder="单据状态" clearable></el-input>
 								</template>
 							</vxe-table-column>
 							<vxe-table-column align="center" title="操作" width="300">
 								<template #default="scope">
-									<el-button :disabled="true" size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
-									<el-button :disabled="true" size="small" type="primary" @click="sss(scope.$rowIndex)">上传附件</el-button>
-									<el-button :disabled="false" size="small" type="primary" @click="seeFileInfoTwo(scope.$rowIndex)">查看文件详情</el-button>
+									<vxe-button :disabled="true" size="small" status="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</vxe-button>
+									<vxe-button :disabled="true" size="small" status="primary" @click="sss(scope.$rowIndex)">上传附件</vxe-button>
+									<vxe-button :disabled="false" size="small" status="primary" @click="seeFileInfoTwo(scope.$rowIndex)">查看文件详情</vxe-button>
 								</template>
 							</vxe-table-column>
 						</vxe-table>
@@ -896,7 +897,9 @@
   import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
   import UpLoadComponent from '@/views/common/UpLoadComponentV2.1'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
-  import UserSelect from '../workClientInfo/clientUserSelect'
+  // import UserSelect from '../workClientInfo/clientUserSelect'
+  import UserSelect from '../workClientInfo/clientUserSelect/AccountantUserIndex'
+  import UserSelect2 from '../workClientInfo/clientUserSelect/AccountantUserIndex2'
   import UserSelectAll from '@/components/userSelect'
   // import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   // import WorkContractChooseCom from '../projectRecords/WorkContractChooseCom'
@@ -1036,6 +1039,7 @@
       UpLoadComponent,
       SelectTree,
       UserSelect,
+	  UserSelect2,
       // WorkClientChooseForm,
       // WorkContractChooseCom,
       UpLoadComponentDialog,

+ 14 - 6
src/views/cw/reportManagement/ReportManagementList.vue

@@ -9,10 +9,10 @@
         <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="projectMasterName">
-        <UserSelect :limit='1' :userName="searchForm.projectMasterName" @getValue='(value, label) => {searchForm.projectMasterName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.projectMasterName" @update:modelValue='(value, label) => {searchForm.projectMasterName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理2" prop="realHeaderName">
-        <UserSelect :limit='1' :userName="searchForm.realHeaderName" @getValue='(value, label) => {searchForm.realHeaderName = label}'></UserSelect>
+        <UserSelect :limit='1' :modelValue="searchForm.realHeaderName" @update:modelValue='(value, label) => {searchForm.realHeaderName = value}'></UserSelect>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="创建人" prop="createBy">
         <SelectUserTree
@@ -33,7 +33,10 @@
         <el-input v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="审计收费(税前、元)" prop="contractAmounts">
-        <InputNumber :disabled="false" :precision="num" v-model="searchForm.contractAmounts"></InputNumber>
+        <InputNumber :disabled="false" :precision="num" :value="searchForm.contractAmounts"
+					 @changefrom="(val)=>{searchForm.contractAmounts[0]=val}"
+					 @changeto="(val)=>{searchForm.contractAmounts[1]=val}"
+		></InputNumber>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="报备类型" prop="filingType">
         <el-select v-model="searchForm.filingType" placeholder="请选择" style="width:100%;">
@@ -68,8 +71,8 @@
       <el-form-item v-if="showHideItem" label="创建时间" prop="contractDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.contractDates"
           type="datetimerange"
           range-separator="至"
@@ -557,7 +560,12 @@
       pushF (row) {
         // console.log('row', row)
         // 读取流程表单
-        let title = ' ' + row.documentNo + ' - ' + row.projectName
+		let title = ' '
+		if (!row.documentNo) {
+			title = ' ' + row.projectName
+		} else {
+			title = ' ' + row.documentNo + ' - ' + row.projectName
+		}
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[会计-报告复核]'
         let status = 'startAndClose'
         if (row.reviewStatus === '3') {

+ 6 - 4
src/views/cw/reportManagement/ReportManagementSignatureForm.vue

@@ -108,7 +108,7 @@
                           {required: true, message: '签字注师1不能为空', trigger: 'blur'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-              <UserSelect ref="userSelect1"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
+              <UserSelect style="width: 100%" ref="userSelect1"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
             </el-form-item>
           </el-col>
 
@@ -119,7 +119,7 @@
                           // {required: true, message: '签字注师2不能为空', trigger: 'blur'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-              <UserSelect ref="userSelect2"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
+              <UserSelect style="width: 100%" ref="userSelect2"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
             </el-form-item>
           </el-col>
 
@@ -130,7 +130,7 @@
                           {required: true, message: '签字注师1不能为空', trigger: 'blur'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-              <UserSelect  ref="userSelect1"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
+              <UserSelect style="width: 100%" ref="userSelect1"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
             </el-form-item>
           </el-col>
 
@@ -141,7 +141,7 @@
                           {required: true, message: '签字注师2不能为空', trigger: 'blur'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-              <UserSelect  ref="userSelect2"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
+              <UserSelect style="width: 100%" ref="userSelect2"  :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -1538,9 +1538,11 @@
           console.log('正在访问签章状态...')
           if (this.inputForm.signatureType === '1') {
             projectReportService.getAuditNodeByReportId(this.inputForm.sid1).then((data) => {
+            	console.log('进来了', data)
               if (data.success) {
                 projectReportService.getSignatureTypeById(this.inputForm.sid1, data.signatureType).then((sign) => {
                   if (sign.signatureType === '1') {
+                  	console.log('sign.signatureType', sign.signatureType)
                     console.log('签章已完成,展示‘同意’按钮')
                     this.$emit('callBackFunc', 'show')
                     this.$refs.archiveFile.hideSign() // 隐藏签章按钮

+ 14 - 14
src/views/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -89,7 +89,7 @@
                             :rules="[
                    ]">
                 <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-                <UserSelect ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
+                <UserSelect style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
               </el-form-item>
             </el-col>
 
@@ -98,7 +98,7 @@
                             :rules="[
                    ]">
                 <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-                <UserSelect ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
+                <UserSelect style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
               </el-form-item>
             </el-col>
 
@@ -107,7 +107,7 @@
                             :rules="[
                    ]">
                 <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-                <UserSelect  ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
+                <UserSelect style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
               </el-form-item>
             </el-col>
 
@@ -116,7 +116,7 @@
                             :rules="[
                    ]">
                 <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-                <UserSelect ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.signatureAnnotator2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
+                <UserSelect style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -147,7 +147,7 @@
               <el-form-item label="报告实际制作人" prop="realCreate"
                             :rules="[
                    ]">
-                <UserSelectAll :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :value="inputForm.realCreate" @getValue='(value) => {inputForm.realCreate = value}'></UserSelectAll>
+                <UserSelectAll :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.realCreate" @update:modelValue='(value) => {inputForm.realCreate = value}'></UserSelectAll>
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -472,18 +472,18 @@
               ref="details"
               class="vxe-table-element"
               :data="inputForm.detailFor1010"
-              style="margin-left: 5em"
+              style="margin-left: 5em;width: 100%"
 			  keep-source
               highlight-current-row
               :key="tableKeyClient"
               :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
             >
-              <vxe-table-column field="typeName" width="730px" title="复核的主要内容" :edit-render="{}">
+              <vxe-table-column field="typeName" title="复核的主要内容" :edit-render="{}">
                 <template v-slot:edit="scope">
                   <el-input :disabled="true"  v-model="scope.row.typeName" ></el-input>
                 </template>
               </vxe-table-column>
-              <vxe-table-column width="450px" field="reviewComments" title="复核结果(是/否/不适用)" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
+              <vxe-table-column width="30%" field="reviewComments" title="复核结果(是/否/不适用)" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
                 <template v-slot:edit="scope">
                   <vxe-select :disabled="inputForm.taskName === '二级复核' || inputForm.taskName === '三级复核'" v-model="scope.row.reviewComments" transfer>
                     <vxe-option
@@ -522,18 +522,18 @@
                 ref="details"
                 class="vxe-table-element"
                 :data="inputForm.detailFor1020"
-                style="margin-left: 5em"
+                style="margin-left: 5em;width: 100%"
 				keep-source
                 highlight-current-row
                 :key="tableKeyClient2"
                 :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
               >
-                <vxe-table-column field="typeName" width="730px" title="复核的主要内容" :edit-render="{}">
+                <vxe-table-column field="typeName" title="复核的主要内容" :edit-render="{}">
                   <template v-slot:edit="scope">
                     <el-input :disabled="true" v-model="scope.row.typeName" ></el-input>
                   </template>
                 </vxe-table-column>
-                <vxe-table-column width="450px" field="reviewComments" title="复核结果(是/否/不适用)" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
+                <vxe-table-column width="30%" field="reviewComments" title="复核结果(是/否/不适用)" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
                   <template v-slot:edit="scope">
                     <vxe-select :disabled="inputForm.reviewStatus === '4' || inputForm.taskName === '三级复核'" v-model="scope.row.reviewComments" transfer>
                       <vxe-option
@@ -572,18 +572,18 @@
                 ref="details"
                 class="vxe-table-element"
                 :data="inputForm.detailFor1030"
-                style="margin-left: 5em"
+                style="margin-left: 5em;width: 100%"
 				keep-source
                 highlight-current-row
                 :key="tableKeyClient3"
                 :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
               >
-                <vxe-table-column field="typeName" width="730px" title="复核的主要内容" :edit-render="{}">
+                <vxe-table-column field="typeName" title="复核的主要内容" :edit-render="{}">
                   <template v-slot:edit="scope">
                     <el-input :disabled="true" v-model="scope.row.typeName" ></el-input>
                   </template>
                 </vxe-table-column>
-                <vxe-table-column width="450px" field="reviewComments" title="复核结果(是/否/不适用)" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
+                <vxe-table-column width="30%" field="reviewComments" title="复核结果(是/否/不适用)" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
                   <template v-slot:edit="scope">
                     <vxe-select :disabled="inputForm.taskName === '一级复核' || inputForm.reviewStatus === '4'" v-model="scope.row.reviewComments" transfer>
                       <vxe-option

+ 15 - 9
src/views/cw/workClientInfo/WorkClientAddForm.vue

@@ -396,7 +396,7 @@
                         :disabled="disabled_up || status === 'audit' || status === 'taskFormDetail'"
                         v-model="inputForm.cwWorkClientTypeDTO.releaseDate"
                         type="date"
-                        value-format="yyyy-MM-dd"
+                        value-format="YYYY-MM-DD"
                         placeholder="选择发行日期"
                         style="width:100%"
                         placement="bottom-start"
@@ -412,7 +412,7 @@
                         :disabled="disabled_up || status === 'audit' || status === 'taskFormDetail'"
                         v-model="inputForm.cwWorkClientTypeDTO.listedDate"
                         type="date"
-                        value-format="yyyy-MM-dd"
+                        value-format="YYYY-MM-DD"
                         placeholder="选择上市日期"
                         style="width:100%"
                         placement="bottom-start"
@@ -445,14 +445,14 @@
                     <el-form-item label="首次发行签字注师1" prop="cwWorkClientTypeDTO.signatory1"
                                   :rules="[
                    ]">
-                      <UserSelect ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.cwWorkClientTypeDTO.signatory1" @getValue='(value) => {changeSignatory1(value)}'></UserSelect>
+                      <UserSelect ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.cwWorkClientTypeDTO.signatory1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
                     </el-form-item>
                   </el-col>
                   <el-col :span="12">
                     <el-form-item label="首次发行签字注师2" prop="cwWorkClientTypeDTO.signatory2"
                                   :rules="[
                    ]">
-                      <UserSelect ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.cwWorkClientTypeDTO.signatory2" @getValue='(value) => {changeSignatory2(value)}'></UserSelect>
+                      <UserSelect ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.cwWorkClientTypeDTO.signatory2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
                     </el-form-item>
                   </el-col>
                   <el-col :span="12">
@@ -462,7 +462,7 @@
                       <el-date-picker
                         v-model="inputForm.cwWorkClientTypeDTO.undertakeBusinessDate"
                         type="date"
-                        value-format="yyyy-MM-dd"
+                        value-format="YYYY-MM-DD"
                         placeholder="选择首次承接业务日期"
                         style="width:100%"
                         placement="bottom-start"
@@ -640,8 +640,8 @@
                       </template>
                     </vxe-table-column>
                     <vxe-table-column align="center" field="sex" title="性别" :edit-render="{name: '$select', options: $dictUtils.getDictList('sex')}">
-                      <template v-slot:edit="scope">
-                        <vxe-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
+                      <template #edit="scope">
+						  <vxe-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
                           <vxe-option
                             v-for="item in $dictUtils.getDictList('sex')"
                             :key="item.value"
@@ -717,7 +717,7 @@
 </template>
 
 <script>
-  import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import UserSelect from './clientUserSelect'
   import workClientService from '@/api/cw/workClientInfo/WorkClientService'
@@ -1257,7 +1257,7 @@
         let name = this.inputForm.name
         if (this.commonJS.isNotEmpty(name)) {
           await this.enterpriseSearchService.enterpriseSearchByName(name).then((data) => {
-            this.gridData = data.items
+            this.gridData = data.data.items
             this.updatePopover();
             this.tableKey = Math.random()
           })
@@ -1345,6 +1345,7 @@
         }
       },
       changeSignatory1 (value) {
+      	console.log('value', value)
         if (this.inputForm.cwWorkClientTypeDTO.signatory2 === value && this.commonJS.isNotEmpty(value)) {
           this.$message.warning('首次发行签字注师1和首次发行签字注师2不可以相同')
           this.$nextTick(() => {
@@ -1355,6 +1356,7 @@
           })
         } else {
           this.inputForm.cwWorkClientTypeDTO.signatory1 = value
+			console.log('signatory1', this.inputForm.cwWorkClientTypeDTO.signatory1)
         }
       },
       changeSignatory2 (value) {
@@ -1663,5 +1665,9 @@
     top: 100%;
     left: 0;
   }
+  .el-divider__text {
+	  font-size: 16px;
+	  font-weight: bold;
+  }
 </style>
 

+ 1 - 1
src/views/cw/workClientInfo/WorkClientBillingChooseRadio.vue

@@ -117,7 +117,7 @@
         this.dataList = []
         this.loading = true
         this.searchForm.clientId = this.clientId
-        workClientService.getBillingListByClientId(this.searchForm).then(({data}) => {
+        workClientService.getBillingListByClientId(this.searchForm).then((data) => {
           this.dataList = data
           this.loading = false
         })

+ 16 - 16
src/views/cw/workClientInfo/WorkClientForm.vue

@@ -284,10 +284,10 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <el-form-item label="创建时间" prop="createDate"
+                  <el-form-item label="创建时间" prop="createTime"
                                 :rules="[
                    ]">
-                    <el-input :disabled="true" v-model="inputForm.createDate" placeholder="请填写创建时间" clearable></el-input>
+                    <el-input :disabled="true" v-model="inputForm.createTime" placeholder="请填写创建时间" clearable></el-input>
                   </el-form-item>
                 </el-col>
               </el-row>
@@ -378,7 +378,7 @@
                       :disabled="disabled_up || method==='view'"
                       v-model="inputForm.cwWorkClientTypeDTO.releaseDate"
                       type="date"
-                      value-format="yyyy-MM-dd"
+                      value-format="YYYY-MM-DD"
                       placeholder="选择发行日期"
                       style="width:100%"
                       placement="bottom-start"
@@ -394,7 +394,7 @@
                       :disabled="disabled_up || method==='view'"
                       v-model="inputForm.cwWorkClientTypeDTO.listedDate"
                       type="date"
-                      value-format="yyyy-MM-dd"
+                      value-format="YYYY-MM-DD"
                       placeholder="选择上市日期"
                       style="width:100%"
                       placement="bottom-start"
@@ -438,13 +438,13 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <el-form-item label="首次承接业务日期" prop="cwWorkClientTypeDTO.undertakeBusinessDate"
+                  <el-form-item label="首次承接业务日期" prop="inputForm.cwWorkClientTypeDTO.undertakeBusinessDate"
                                 :rules="[
                    ]">
                     <el-date-picker
                       v-model="inputForm.cwWorkClientTypeDTO.undertakeBusinessDate"
-                      type="date"
-                      value-format="yyyy-MM-dd"
+                      value-format="YYYY-MM-DD"
+					  format="YYYY-MM-DD"
                       placeholder="选择首次承接业务日期"
                       style="width:100%"
                       placement="bottom-start"
@@ -718,7 +718,7 @@
               <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
               <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
               <vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
-              <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
+              <vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
             </vxe-table>
           </el-tab-pane>
           <el-tab-pane label="关联合同" name="contract">
@@ -763,7 +763,7 @@
               <vxe-column min-width="160" align="center" title="合同金额(元)" field="contractAmount"></vxe-column>
               <vxe-column min-width="160" align="center" title="所属部门" field="departmentName"></vxe-column>
               <vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
-              <vxe-column min-width="160" align="center" title="创建日期" field="createDate"></vxe-column>
+              <vxe-column min-width="160" align="center" title="创建日期" field="createTime"></vxe-column>
             </vxe-table>
           </el-tab-pane>
           <el-tab-pane label="关联报告" name="report">
@@ -814,7 +814,7 @@
               <vxe-column min-width="150" title="所属部门" align="center" field="officeName"></vxe-column>
               <vxe-column min-width="150" title="项目经理" align="center" field="projectMasterName"></vxe-column>
               <vxe-column min-width="120" title="报告创建人" align="center" field="createName"></vxe-column>
-              <vxe-column min-width="180" title="报告创建时间" align="center" field="createDate"></vxe-column>
+              <vxe-column min-width="180" title="报告创建时间" align="center" field="createTime"></vxe-column>
             </vxe-table>
           </el-tab-pane>
           <el-tab-pane label="关联发票" name="invoice">
@@ -925,7 +925,7 @@
         loading: false,
         inputForm: {
           id: '',
-          createDate: '',
+			createTime: '',
           createBy: {
             id: '',
             name: ''
@@ -1128,7 +1128,7 @@
         }
         this.inputForm = {
           id: '',
-          createDate: '',
+			createTime: '',
           createBy: {
             id: '',
             name: this.$store.state.user.name
@@ -1370,8 +1370,8 @@
             this.contactSubmit()
             this.baseSubmit()
             this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
-            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
-              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            if (this.commonJS.isEmpty(this.inputForm.createTime)) {
+              this.inputForm.createTime = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
             workClientService.saveForm(this.inputForm).then((data) => {
               callback(data.businessTable, data.businessId, this.inputForm)
@@ -1413,7 +1413,7 @@
         this.tableKeyContact = Math.random()
         this.inputForm = {
           id: '',
-          createDate: '',
+			createTime: '',
           createBy: {
             id: '',
             name: ''
@@ -1892,7 +1892,7 @@
   }
 </style>
 <style>
-  .vxe-table--tooltip-wrapper{
+  .vxe-select--panel{
     z-index: 3000 !important;
   }
 </style>

+ 4 - 4
src/views/cw/workClientInfo/WorkClientList.vue

@@ -44,8 +44,8 @@
       <el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
         <el-date-picker
           placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
           v-model="searchForm.createDates"
           type="datetimerange"
           range-separator="至"
@@ -179,8 +179,8 @@
           <vxe-column title="操作" width="140px" fixed="right" align="center">
             <template  #default="scope">
               <div v-if="isAdmin">
-                <el-button v-if="(scope.row.status==='0'||scope.row.status==='5')" type="primary"  size="small" @click="edit(scope.row.id)">修改</el-button>
-                <el-button v-if="(scope.row.status==='0'||scope.row.status==='5')" type="primary"   size="small" @click="del(scope.row.id)">删除</el-button>
+                <el-button v-if="(scope.row.status==='0'||scope.row.status==='5')" text type="primary"  size="small" @click="edit(scope.row.id)">修改</el-button>
+                <el-button v-if="(scope.row.status==='0'||scope.row.status==='5')" text type="primary"   size="small" @click="del(scope.row.id)">删除</el-button>
               </div>
               <div v-else>
                 <!--              拥有人修改-->

+ 14 - 14
src/views/cw/workClientInfo/WorkClientListForm.vue

@@ -11,17 +11,17 @@
       @keyup.enter.native="getWorkClient"
       v-model="visible">
       <div style="height: calc(100%);">
-        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
           <!-- 搜索框-->
           <el-form-item label="客户姓名" prop="name">
-            <el-input size="small" v-model="searchForm.name" placeholder="请输入客户姓名" clearable></el-input>
+            <el-input v-model="searchForm.name" placeholder="请输入客户姓名" clearable></el-input>
           </el-form-item>
           <el-form-item label="客户编号" prop="no">
-            <el-input size="small" v-model="searchForm.no" placeholder="请输入客户编号" clearable></el-input>
+            <el-input v-model="searchForm.no" placeholder="请输入客户编号" clearable></el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
-            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+            <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
           </el-form-item>
         </el-form>
 
@@ -31,7 +31,6 @@
           resizable
           height="400px"
           :loading="loading"
-          size="small"
           ref="clientTable"
           show-header-overflow
           show-overflow
@@ -43,16 +42,16 @@
           :row-config="{isCurrent: true}"
           :checkbox-config="{trigger: 'row'}">
           <vxe-column type="seq" width="40"></vxe-column>
-          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column type="checkbox" width="60px"></vxe-column>
           <vxe-column width="" title="客户名称" align="center" field="name"></vxe-column>
           <vxe-column width="" title="客户编号" align="center" field="no"></vxe-column>
           <vxe-column width="" title="客户类型" align="center" field="type">
-            <template slot-scope="scope">
+            <template #default="scope">
               {{$dictUtils.getDictLabel('cw_work_client_type', scope.row.type, '-')}}
             </template>
           </vxe-column>
           <vxe-column width="" title="所属行业" align="center" field="industry">
-            <template slot-scope="scope">
+            <template #default="scope">
               {{$dictUtils.getDictLabel('cw_work_client_industry', scope.row.industry, '-')}}
             </template>
           </vxe-column>
@@ -60,7 +59,6 @@
         </vxe-table>
         <vxe-pager
           background
-          size="small"
           :current-page="tablePage.currentPage"
           :page-size="tablePage.pageSize"
           :total="tablePage.total"
@@ -69,10 +67,12 @@
           @page-change="currentChangeHandle">
         </vxe-pager>
       </div>
-      <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
-    </span>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
     </el-dialog>
   </div>
 </template>

+ 123 - 0
src/views/cw/workClientInfo/clientUserSelect/AccountantUserIndex.vue

@@ -0,0 +1,123 @@
+<template>
+	<template v-if="printRead">
+		<label>{{ name }}</label>
+	</template>
+	<template v-else>
+		<el-input
+			placeholder="请选择"
+			readonly
+			:clearable="clearable"
+			:disabled="disabled"
+			style="line-hight: 40px"
+			v-model="name"
+		>
+			<template #append>
+				<el-button
+					:disabled="disabled"
+					:readonly="readonly"
+					@click="showUserSelect"
+					icon="search"
+				></el-button>
+			</template>
+		</el-input>
+		<user-select
+			ref="userSelect"
+			@doSubmit="selectUsersToInput"
+			:tenantId="tenantId"
+			:limit="limit"
+		></user-select>
+	</template>
+</template>
+<script>
+	import userSelect from "./AccountantUserSelectDialog";
+	import userService from "@/api/sys/userService";
+	export default {
+		data() {
+			return {
+				name: "",
+				selectData: [],
+			};
+		},
+		props: {
+			limit: Number,
+			modelValue: { type: String, default: "" },
+			tenantId: { type: String, default: null },
+			printRead: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			clearable: {
+				type: Boolean,
+				default: () => {
+					return true;
+				},
+			},
+			readonly: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			disabled: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+		},
+		components: {
+			userSelect,
+		},
+		watch: {
+			modelValue: {
+				handler(newVal) {
+					this.selectData = [];
+					if (newVal && newVal !== true) {
+						console.log('newVAal', newVal)
+						console.log('进来了')
+						newVal.split(",").forEach((id) => {
+							userService.queryById(id).then((data) => {
+								if (data && data.id !== "") {
+									this.selectData.push(data);
+									this.name = this.selectData
+										.map((user) => {
+											return user.name;
+										})
+										.join(",");
+								}
+							});
+						});
+					} else {
+						this.name = "";
+					}
+				},
+				immediate: true,
+				deep: false,
+			},
+		},
+		methods: {
+			selectUsersToInput(users) {
+				let selectIds = users
+					.map((user) => {
+						return user.id;
+					})
+					.join(",");
+				this.$emit("update:modelValue", selectIds);
+			},
+			showUserSelect() {
+				this.$refs.userSelect.init()
+			},
+		},
+	};
+</script>
+<style>
+	.el-form-item__content .el-input-group {
+		vertical-align: middle;
+	}
+	.el-tag + .el-tag {
+		margin-left: 5px;
+		margin-bottom: 5px;
+	}
+</style>

+ 123 - 0
src/views/cw/workClientInfo/clientUserSelect/AccountantUserIndex2.vue

@@ -0,0 +1,123 @@
+<template>
+	<template v-if="printRead">
+		<label>{{ name }}</label>
+	</template>
+	<template v-else>
+		<el-input
+			placeholder="请选择"
+			readonly
+			:clearable="clearable"
+			:disabled="disabled"
+			style="line-hight: 40px"
+			v-model="name"
+		>
+			<template #append>
+				<el-button
+					:disabled="disabled"
+					:readonly="readonly"
+					@click="showUserSelect"
+					icon="search"
+				></el-button>
+			</template>
+		</el-input>
+		<user-select
+			ref="userSelect"
+			@doSubmit="selectUsersToInput"
+			:tenantId="tenantId"
+			:limit="limit"
+		></user-select>
+	</template>
+</template>
+<script>
+	import userSelect from "./AccountantUserSelectDialog2";
+	import userService from "@/api/sys/userService";
+	export default {
+		data() {
+			return {
+				name: "",
+				selectData: [],
+			};
+		},
+		props: {
+			limit: Number,
+			modelValue: { type: String, default: "" },
+			tenantId: { type: String, default: null },
+			printRead: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			clearable: {
+				type: Boolean,
+				default: () => {
+					return true;
+				},
+			},
+			readonly: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			disabled: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+		},
+		components: {
+			userSelect,
+		},
+		watch: {
+			modelValue: {
+				handler(newVal) {
+					this.selectData = [];
+					if (newVal && newVal !== true) {
+						console.log('newVAal', newVal)
+						console.log('进来了')
+						newVal.split(",").forEach((id) => {
+							userService.queryById(id).then((data) => {
+								if (data && data.id !== "") {
+									this.selectData.push(data);
+									this.name = this.selectData
+										.map((user) => {
+											return user.name;
+										})
+										.join(",");
+								}
+							});
+						});
+					} else {
+						this.name = "";
+					}
+				},
+				immediate: true,
+				deep: false,
+			},
+		},
+		methods: {
+			selectUsersToInput(users) {
+				let selectIds = users
+					.map((user) => {
+						return user.id;
+					})
+					.join(",");
+				this.$emit("update:modelValue", selectIds);
+			},
+			showUserSelect() {
+				this.$refs.userSelect.init()
+			},
+		},
+	};
+</script>
+<style>
+	.el-form-item__content .el-input-group {
+		vertical-align: middle;
+	}
+	.el-tag + .el-tag {
+		margin-left: 5px;
+		margin-bottom: 5px;
+	}
+</style>

+ 488 - 0
src/views/cw/workClientInfo/clientUserSelect/AccountantUserSelectDialog.vue

@@ -0,0 +1,488 @@
+<template>
+  <div>
+    <el-dialog
+    title="用户选择"
+    width="1000px"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+	draggable
+     class="userDialog"
+    v-model="visible">
+    <el-container style="height: 500px">
+      <el-aside width="200px">
+
+        <el-card class="org">
+          <div slot="header" class="clearfix">
+            <el-input
+              placeholder="请输入组织机构过滤"
+              size="small"
+              v-model="filterText">
+            </el-input>
+          </div>
+           <el-tree
+            :data="officeTreeData"
+            :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+            default-expand-all
+            highlight-current
+            node-key="id"
+            :render-content="renderContent"
+            :filter-node-method="filterNode"
+            :expand-on-click-node="false"
+            @node-click="handleNodeClick"
+            ref="officeTree">
+          </el-tree>
+        </el-card>
+      </el-aside>
+
+    <el-container>
+      <el-header style="text-align: left; font-size: 12px;height:30px">
+        <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+            <el-form-item prop="loginName">
+              <el-input size="small" v-model="searchForm.loginName" placeholder="登录名" clearable></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+              <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+            </el-form-item>
+          </el-form>
+      </el-header>
+
+      <el-main>
+        <el-table
+          :data="dataList"
+          v-loading="loading"
+          size="small"
+          border
+          ref="userTable"
+          @selection-change="selectionChangeHandle"
+          @sort-change="sortChangeHandle"
+          height="calc(100% - 40px)"
+          style="width: 100%;">
+          <el-table-column
+            header-align="center"
+            align="center"
+            v-if="limit <= 1"
+            width="50">
+<!--              <template slot-scope="scope">-->
+<!--                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>-->
+<!--              </template>-->
+			  <template #default="scope">
+				  <el-radio-group v-model="dataListAllSelections[0]" @change.native="getTemplateRow(scope.$index, scope.row)">
+					  <el-radio :label="scope.row">
+						  <template #default="{ label }">
+							  <!-- 将label文本设置为空 -->
+							  <span></span>
+						  </template>
+					  </el-radio>
+				  </el-radio-group>
+			  </template>
+          </el-table-column>
+          <el-table-column
+            type="selection"
+            header-align="center"
+            v-if="limit > 1"
+            align="center"
+            width="50">
+          </el-table-column>
+          <el-table-column
+            prop="photo"
+            header-align="center"
+            align="center"
+            label="头像">
+            <template #default="scope">
+              <img :src="scope.row.photo === ''?'/static/img/avatar.png':scope.row.photo" style="height:35px"/>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="loginName"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="90"
+            label="登录名">
+          </el-table-column>
+          <el-table-column
+            prop="name"
+            header-align="center"
+            align="真实姓名"
+            sortable="custom"
+            min-width="90"
+            label="用户名">
+          </el-table-column>
+          <el-table-column
+            prop="accountantUserCount"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="110"
+            label="被选次数">
+
+            <!--用插槽的方法来改变颜色!-->
+            <template #default="scope">
+              <div v-if="scope.row.accountantUserFlag === 0">
+                {{ scope.row.accountantUserCount }}
+              </div>
+              <div v-else :style="{ color: scope.row.accountantUserCount>100 ? 'red' : 'black' }">
+                {{ scope.row.accountantUserCount }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="companyDTO.name"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="110"
+            label="所属机构">
+          </el-table-column>
+          <el-table-column
+            prop="officeDTO.name"
+            header-align="center"
+            align="center"
+            sortable="custom"
+            min-width="110"
+            label="所属部门">
+          </el-table-column>
+          <el-table-column
+            prop="loginFlag"
+            header-align="center"
+            align="center"
+            min-width="100"
+            label="状态">
+            <template #default="scope">
+              <el-tag v-if="scope.row.loginFlag === '1'" size="small" type="success">正常</el-tag>
+              <el-tag v-else-if="scope.row.loginFlag === '0'" size="small" type="danger">禁用</el-tag>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+          @size-change="sizeChangeHandle"
+          @current-change="currentChangeHandle"
+          :current-page="pageNo"
+          :page-sizes="[5, 10, 50, 100]"
+          :page-size="pageSize"
+          :total="total"
+          layout="total, sizes, prev, pager, next, jumper">
+        </el-pagination>
+      </el-main>
+    </el-container>
+
+    <el-aside width="200px">
+      <el-tag
+        :key="tag.id"
+        v-for="tag in dataListAllSelections"
+        closable
+        :disable-transitions="false"
+        @close="del(tag)">
+        {{tag.name}}
+      </el-tag>
+  </el-aside>
+</el-container>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        searchForm: {
+          loginName: '',
+          accountantUserCount: '',
+          accountantUserFlag: '',
+          companyDTO: {
+            id: ''
+          },
+          officeDTO: {
+            id: ''
+          },
+          name: ''
+        },
+        filterText: '',
+        dataListAllSelections: [],   // 所有选中的数据包含跨页数据
+        dataListSelections: [],
+        idKey: 'id', // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+        dataList: [],
+        dynamicTags: [],
+        officeTreeData: [],
+        pageNo: 1,
+        pageSize: 10,
+        total: 0,
+        orders: [],
+        loading: false,
+        visible: false
+      }
+    },
+    props: {
+      selectData: {
+        type: Array,
+        default: () => { return [] }
+      },
+      limit: {
+        type: Number,
+        default: 999999
+      }
+    },
+    watch: {
+      filterText (val) {
+        this.$refs.officeTree.filter(val)
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.$nextTick(() => {
+          this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData))
+          this.refreshTree()
+          this.resetSearch()
+        })
+      },
+      renderContent (h, { node, data, store }) {
+		  return h('span', { class: 'custom-tree-node' }, [
+			  data.type === '1' ? h('i', { class: 'fa fa-sitemap' }) : h('i', { class: 'fa fa-users' }),
+			  h('span', { class: 'text' }, node.label),
+		  ]);
+        // return (
+        //       <span class="custom-tree-node">
+        //         {
+        //           data.type === '1' ? <i class="fa fa-sitemap"></i> : <i class="fa fa-users"></i>
+        //         }
+        //         <span class="text">{node.label}</span>
+        //       </span>
+        // )
+      },
+      getTemplateRow (index, row) {                                 // 获取选中数据
+        this.dataListSelections = [row]
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+           // 设置选中的方法
+      setSelectRow () {
+        console.log('设置选中的方法')
+        if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+          this.$refs.userTable.clearSelection()
+          return
+        }
+                // 标识当前行的唯一键的名称
+        let idKey = this.idKey
+        let selectAllIds = []
+        this.dataListAllSelections.forEach(row => {
+          selectAllIds.push(row[idKey])
+        })
+        this.$refs.userTable.clearSelection()
+        for (var i = 0; i < this.dataList.length; i++) {
+          if (selectAllIds.indexOf(this.dataList[i][idKey]) >= 0) {
+                        // 设置选中,记住table组件需要使用ref="table"
+            this.$refs.userTable.toggleRowSelection(this.dataList[i], true)
+          }
+        }
+      },
+            // 记忆选择核心方法
+      changePageCoreRecordData () {
+                // 标识当前行的唯一键的名称
+        let idKey = this.idKey
+        let that = this
+              // 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
+        if (this.dataListAllSelections.length <= 0) {
+          this.dataListSelections.forEach(row => {
+            that.dataListAllSelections.push(row)
+          })
+          return
+        }
+                // 总选择里面的key集合
+        let selectAllIds = []
+        this.dataListAllSelections.forEach(row => {
+          selectAllIds.push(row[idKey])
+        })
+        let selectIds = []
+                // 获取当前页选中的id
+        this.dataListSelections.forEach(row => {
+          selectIds.push(row[idKey])
+                  // 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
+          if (selectAllIds.indexOf(row[idKey]) < 0) {
+            that.dataListAllSelections.push(row)
+          }
+        })
+        let noSelectIds = []
+              // 得到当前页没有选中的id
+        this.dataList.forEach(row => {
+          if (selectIds.indexOf(row[idKey]) < 0) {
+            noSelectIds.push(row[idKey])
+          }
+        })
+        noSelectIds.forEach(id => {
+          if (selectAllIds.indexOf(id) >= 0) {
+            for (let i = 0; i < that.dataListAllSelections.length; i++) {
+              if (that.dataListAllSelections[i][idKey] === id) {
+                                // 如果总选择中有未被选中的,那么就删除这条
+                that.dataListAllSelections.splice(i, 1)
+                break
+              }
+            }
+          }
+        })
+      },
+     // 得到选中的所有数据
+      getAllSelectionData () {
+         // 再执行一次记忆勾选数据匹配,目的是为了在当前页操作勾选后直接获取选中数据
+        this.changePageCoreRecordData()
+      },
+      filterNode (value, data) {
+        if (!value) return true
+        return data.name.indexOf(value) !== -1
+      },
+      del (tag) {
+        this.dataListAllSelections.splice(this.dataListAllSelections.indexOf(tag), 1)
+        this.$nextTick(() => {
+          this.setSelectRow()
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.searchForm.certType = '6'
+        if (this.commonJS.isEmpty(this.searchForm.officeDTO.id) && this.commonJS.isEmpty(this.searchForm.companyDTO.id)) {
+          this.searchForm.selectAll = 'true'
+        }
+        this.$http({
+          url: '/system-server/sys/user/list',
+          method: 'get',
+          params: {
+            'current': this.pageNo,
+            'size': this.pageSize,
+            'orders': this.orders,
+            ...this.searchForm
+          }
+        }).then((data) => {
+          this.dataList = data.records
+          this.total = data.total
+          this.pageNo = data.current
+          this.loading = false
+          this.$nextTick(() => {
+            this.setSelectRow()
+          })
+        })
+      },
+      refreshTree () {
+        this.$http({
+          url: `/system-server/sys/office/treeData`,
+          method: 'get'
+        }).then((data) => {
+          this.officeTreeData = data
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageNo = 1
+        this.refreshList()
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageNo = val
+        this.refreshList()
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+       // 排序
+      sortChangeHandle (column) {
+        if (column.prop === 'officeDTO.name') {
+          column.prop = 'o.name'
+        }
+        if (column.prop === 'companyDTO.name') {
+          column.prop = 'c.name'
+        }
+        this.orders = []
+        if (column.order != null) {
+          this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        }
+        this.refreshList()
+      },
+      handleNodeClick (data) {
+        if (data.type === '1') {
+          this.searchForm.companyDTO.id = data.id
+          this.searchForm.officeDTO.id = ''
+        } else {
+          this.searchForm.companyDTO.id = ''
+          this.searchForm.officeDTO.id = data.id
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.searchForm.companyDTO.id = ''
+        this.searchForm.officeDTO.id = ''
+        this.$refs.officeTree.setCurrentKey(null)
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      doSubmit () {
+        console.log('doSubmit')
+        if (this.dataListAllSelections.length === 0) {
+          this.$message.error(`请选择用户`)
+          return
+        }
+        if (this.limit < this.dataListAllSelections.length) {
+          this.$message.error(`你最多只能选择${this.limit}个用户`)
+          return
+        }
+        if (this.dataListAllSelections[0].accountantUserCount >= 100 && this.dataListAllSelections[0].accountantUserFlag === 1) {
+          this.$message.error(`请选择被选次数小于100次的签字注师人员`)
+          return
+        }
+        this.visible = false
+        this.$emit('doSubmit', this.dataListAllSelections)
+      }
+    }
+  }
+</script>
+<style lang="scss">
+.org {
+  height: 100%;
+  .el-card__header {
+    padding: 10px;
+  }
+  .el-card__body {
+    padding: 10px;
+    max-height: 520px;
+    overflow: auto;
+  }
+}
+.userDialog{
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+  .el-main {
+    padding: 20px 20px 5px 20px;
+    .el-pagination{
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 488 - 0
src/views/cw/workClientInfo/clientUserSelect/AccountantUserSelectDialog2.vue

@@ -0,0 +1,488 @@
+<template>
+  <div>
+    <el-dialog
+      title="用户选择"
+      width="1000px"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+	  draggable
+      class="userDialog"
+      v-model="visible">
+      <el-container style="height: 500px">
+        <el-aside width="200px">
+
+          <el-card class="org">
+            <div slot="header" class="clearfix">
+              <el-input
+                placeholder="请输入组织机构过滤"
+                size="small"
+                v-model="filterText">
+              </el-input>
+            </div>
+            <el-tree
+              :data="officeTreeData"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              default-expand-all
+              highlight-current
+              node-key="id"
+              :render-content="renderContent"
+              :filter-node-method="filterNode"
+              :expand-on-click-node="false"
+              @node-click="handleNodeClick"
+              ref="officeTree">
+            </el-tree>
+          </el-card>
+        </el-aside>
+
+        <el-container>
+          <el-header style="text-align: left; font-size: 12px;height:30px">
+            <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+              <el-form-item prop="loginName">
+                <el-input size="small" v-model="searchForm.loginName" placeholder="登录名" clearable></el-input>
+              </el-form-item>
+
+              <el-form-item>
+                <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+              </el-form-item>
+            </el-form>
+          </el-header>
+
+          <el-main>
+            <el-table
+              :data="dataList"
+              v-loading="loading"
+              size="small"
+              border
+              ref="userTable"
+              @selection-change="selectionChangeHandle"
+              @sort-change="sortChangeHandle"
+              height="calc(100% - 40px)"
+              style="width: 100%;">
+              <el-table-column
+                header-align="center"
+                align="center"
+                v-if="limit <= 1"
+                width="50">
+<!--                <template #default="scope">-->
+<!--                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>-->
+<!--                </template>-->
+				  <template #default="scope">
+					  <el-radio-group v-model="dataListAllSelections[0]" @change.native="getTemplateRow(scope.$index, scope.row)">
+						  <el-radio :label="scope.row">
+							  <template #default="{ label }">
+								  <!-- 将label文本设置为空 -->
+								  <span></span>
+							  </template>
+						  </el-radio>
+					  </el-radio-group>
+				  </template>
+              </el-table-column>
+              <el-table-column
+                type="selection"
+                header-align="center"
+                v-if="limit > 1"
+                align="center"
+                width="50">
+              </el-table-column>
+              <el-table-column
+                prop="photo"
+                header-align="center"
+                align="center"
+                label="头像">
+                <template #default="scope">
+                  <img :src="scope.row.photo === ''?'/static/img/avatar.png':scope.row.photo" style="height:35px"/>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="loginName"
+                header-align="center"
+                align="center"
+                sortable="custom"
+                min-width="90"
+                label="登录名">
+              </el-table-column>
+              <el-table-column
+                prop="name"
+                header-align="center"
+                align="真实姓名"
+                sortable="custom"
+                min-width="90"
+                label="用户名">
+              </el-table-column>
+              <el-table-column
+                prop="accountantUserCount"
+                header-align="center"
+                align="center"
+                sortable="custom"
+                min-width="110"
+                label="被选次数">
+
+                <!--用插槽的方法来改变颜色!-->
+                <template #default="scope">
+                  <div v-if="scope.row.accountantUserFlag === 0">
+                    {{ scope.row.accountantUserCount }}
+                  </div>
+                  <div v-else :style="{ color: scope.row.accountantUserCount>100 ? 'red' : 'black' }">
+                    {{ scope.row.accountantUserCount }}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="companyDTO.name"
+                header-align="center"
+                align="center"
+                sortable="custom"
+                min-width="110"
+                label="所属机构">
+              </el-table-column>
+              <el-table-column
+                prop="officeDTO.name"
+                header-align="center"
+                align="center"
+                sortable="custom"
+                min-width="110"
+                label="所属部门">
+              </el-table-column>
+              <el-table-column
+                prop="loginFlag"
+                header-align="center"
+                align="center"
+                min-width="100"
+                label="状态">
+                <template #default="scope">
+                  <el-tag v-if="scope.row.loginFlag === '1'" size="small" type="success">正常</el-tag>
+                  <el-tag v-else-if="scope.row.loginFlag === '0'" size="small" type="danger">禁用</el-tag>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination
+              @size-change="sizeChangeHandle"
+              @current-change="currentChangeHandle"
+              :current-page="pageNo"
+              :page-sizes="[5, 10, 50, 100]"
+              :page-size="pageSize"
+              :total="total"
+              layout="total, sizes, prev, pager, next, jumper">
+            </el-pagination>
+          </el-main>
+        </el-container>
+
+        <el-aside width="200px">
+          <el-tag
+            :key="tag.id"
+            v-for="tag in dataListAllSelections"
+            closable
+            :disable-transitions="false"
+            @close="del(tag)">
+            {{tag.name}}
+          </el-tag>
+        </el-aside>
+      </el-container>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      searchForm: {
+        loginName: '',
+        accountantUserCount: '',
+        accountantUserFlag: '',
+        companyDTO: {
+          id: ''
+        },
+        officeDTO: {
+          id: ''
+        },
+        name: ''
+      },
+      filterText: '',
+      dataListAllSelections: [],   // 所有选中的数据包含跨页数据
+      dataListSelections: [],
+      idKey: 'id', // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+      dataList: [],
+      dynamicTags: [],
+      officeTreeData: [],
+      pageNo: 1,
+      pageSize: 10,
+      total: 0,
+      orders: [],
+      loading: false,
+      visible: false
+    }
+  },
+  props: {
+    selectData: {
+      type: Array,
+      default: () => { return [] }
+    },
+    limit: {
+      type: Number,
+      default: 999999
+    }
+  },
+  watch: {
+    filterText (val) {
+      this.$refs.officeTree.filter(val)
+    }
+  },
+  methods: {
+    init () {
+      this.visible = true
+      this.$nextTick(() => {
+        this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData))
+        this.refreshTree()
+        this.resetSearch()
+      })
+    },
+    renderContent (h, { node, data, store }) {
+		return h('span', { class: 'custom-tree-node' }, [
+			data.type === '1' ? h('i', { class: 'fa fa-sitemap' }) : h('i', { class: 'fa fa-users' }),
+			h('span', { class: 'text' }, node.label),
+		]);
+      // return (
+      //   <span class="custom-tree-node">
+      //           {
+      //             data.type === '1' ? <i class="fa fa-sitemap"></i> : <i class="fa fa-users"></i>
+      //           }
+      //     <span class="text">{node.label}</span>
+      //         </span>
+      // )
+    },
+    getTemplateRow (index, row) {                                 // 获取选中数据
+      this.dataListSelections = [row]
+      this.$nextTick(() => {
+        this.changePageCoreRecordData()
+      })
+    },
+    // 设置选中的方法
+    setSelectRow () {
+      console.log('设置选中的方法')
+      if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+        this.$refs.userTable.clearSelection()
+        return
+      }
+      // 标识当前行的唯一键的名称
+      let idKey = this.idKey
+      let selectAllIds = []
+      this.dataListAllSelections.forEach(row => {
+        selectAllIds.push(row[idKey])
+      })
+      this.$refs.userTable.clearSelection()
+      for (var i = 0; i < this.dataList.length; i++) {
+        if (selectAllIds.indexOf(this.dataList[i][idKey]) >= 0) {
+          // 设置选中,记住table组件需要使用ref="table"
+          this.$refs.userTable.toggleRowSelection(this.dataList[i], true)
+        }
+      }
+    },
+    // 记忆选择核心方法
+    changePageCoreRecordData () {
+      // 标识当前行的唯一键的名称
+      let idKey = this.idKey
+      let that = this
+      // 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
+      if (this.dataListAllSelections.length <= 0) {
+        this.dataListSelections.forEach(row => {
+          that.dataListAllSelections.push(row)
+        })
+        return
+      }
+      // 总选择里面的key集合
+      let selectAllIds = []
+      this.dataListAllSelections.forEach(row => {
+        selectAllIds.push(row[idKey])
+      })
+      let selectIds = []
+      // 获取当前页选中的id
+      this.dataListSelections.forEach(row => {
+        selectIds.push(row[idKey])
+        // 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
+        if (selectAllIds.indexOf(row[idKey]) < 0) {
+          that.dataListAllSelections.push(row)
+        }
+      })
+      let noSelectIds = []
+      // 得到当前页没有选中的id
+      this.dataList.forEach(row => {
+        if (selectIds.indexOf(row[idKey]) < 0) {
+          noSelectIds.push(row[idKey])
+        }
+      })
+      noSelectIds.forEach(id => {
+        if (selectAllIds.indexOf(id) >= 0) {
+          for (let i = 0; i < that.dataListAllSelections.length; i++) {
+            if (that.dataListAllSelections[i][idKey] === id) {
+              // 如果总选择中有未被选中的,那么就删除这条
+              that.dataListAllSelections.splice(i, 1)
+              break
+            }
+          }
+        }
+      })
+    },
+    // 得到选中的所有数据
+    getAllSelectionData () {
+      // 再执行一次记忆勾选数据匹配,目的是为了在当前页操作勾选后直接获取选中数据
+      this.changePageCoreRecordData()
+    },
+    filterNode (value, data) {
+      if (!value) return true
+      return data.name.indexOf(value) !== -1
+    },
+    del (tag) {
+      this.dataListAllSelections.splice(this.dataListAllSelections.indexOf(tag), 1)
+      this.$nextTick(() => {
+        this.setSelectRow()
+      })
+    },
+    // 获取数据列表
+    refreshList () {
+      this.loading = true
+      this.searchForm.certType = '6'
+      if (this.commonJS.isEmpty(this.searchForm.officeDTO.id) && this.commonJS.isEmpty(this.searchForm.companyDTO.id)) {
+        this.searchForm.selectAll = 'true'
+      }
+      this.$http({
+        url: '/system-server/sys/user/list2',
+        method: 'get',
+        params: {
+          'current': this.pageNo,
+          'size': this.pageSize,
+          'orders': this.orders,
+          ...this.searchForm
+        }
+      }).then((data) => {
+        this.dataList = data.records
+        this.total = data.total
+        this.pageNo = data.current
+        this.loading = false
+        this.$nextTick(() => {
+          this.setSelectRow()
+        })
+      })
+    },
+    refreshTree () {
+      this.$http({
+        url: `/system-server/sys/office/treeData`,
+        method: 'get'
+      }).then((data) => {
+        this.officeTreeData = data
+      })
+    },
+    // 每页数
+    sizeChangeHandle (val) {
+      this.pageSize = val
+      this.pageNo = 1
+      this.refreshList()
+      this.$nextTick(() => {
+        this.changePageCoreRecordData()
+      })
+    },
+    // 当前页
+    currentChangeHandle (val) {
+      this.pageNo = val
+      this.refreshList()
+      this.$nextTick(() => {
+        this.changePageCoreRecordData()
+      })
+    },
+    // 多选
+    selectionChangeHandle (val) {
+      this.dataListSelections = val
+      this.$nextTick(() => {
+        this.changePageCoreRecordData()
+      })
+    },
+    // 排序
+    sortChangeHandle (column) {
+      if (column.prop === 'officeDTO.name') {
+        column.prop = 'o.name'
+      }
+      if (column.prop === 'companyDTO.name') {
+        column.prop = 'c.name'
+      }
+      this.orders = []
+      if (column.order != null) {
+        this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+      }
+      this.refreshList()
+    },
+    handleNodeClick (data) {
+      if (data.type === '1') {
+        this.searchForm.companyDTO.id = data.id
+        this.searchForm.officeDTO.id = ''
+      } else {
+        this.searchForm.companyDTO.id = ''
+        this.searchForm.officeDTO.id = data.id
+      }
+      this.refreshList()
+    },
+    resetSearch () {
+      this.searchForm.companyDTO.id = ''
+      this.searchForm.officeDTO.id = ''
+      this.$refs.officeTree.setCurrentKey(null)
+      this.$refs.searchForm.resetFields()
+      this.refreshList()
+    },
+    doSubmit () {
+      console.log('doSubmit')
+      if (this.dataListAllSelections.length === 0) {
+        this.$message.error(`请选择用户`)
+        return
+      }
+      if (this.limit < this.dataListAllSelections.length) {
+        this.$message.error(`你最多只能选择${this.limit}个用户`)
+        return
+      }
+      if (this.dataListAllSelections[0].accountantUserCount >= 100 && this.dataListAllSelections[0].accountantUserFlag === 1) {
+        this.$message.error(`请选择被选次数小于100次的签字注师人员`)
+        return
+      }
+      this.visible = false
+      this.$emit('doSubmit', this.dataListAllSelections)
+    }
+  }
+}
+</script>
+<style lang="scss">
+.org {
+  height: 100%;
+  .el-card__header {
+    padding: 10px;
+  }
+  .el-card__body {
+    padding: 10px;
+    max-height: 520px;
+    overflow: auto;
+  }
+}
+.userDialog{
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+  .el-main {
+    padding: 20px 20px 5px 20px;
+    .el-pagination{
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 165 - 153
src/views/cw/workClientInfo/clientUserSelect/UserSelectDialog.vue

@@ -1,169 +1,181 @@
 <template>
-  <div>
-    <el-dialog
-    title="用户选择"
-    width="1000px"
-    :close-on-click-modal="false"
-    :append-to-body="true"
-	draggable
-	class="userDialog"
-	v-model="visible">
-    <el-container style="height: 500px">
-      <el-aside width="200px">
+	<el-dialog
+		title="用户选择"
+		width="1000px"
+		:close-on-click-modal="false"
+		:append-to-body="true"
+		draggable
+		class="userDialog"
+		v-model="visible">
+		<el-container style="height: 500px">
+			<el-aside width="200px">
 
-        <el-card class="org">
-          <div slot="header" class="clearfix">
-            <el-input
-              placeholder="请输入组织机构过滤"
-              size="small"
-              v-model="filterText">
-            </el-input>
-          </div>
-           <el-tree
-            :data="officeTreeData"
-            :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
+				<el-card class="org">
+					<div slot="header" class="clearfix">
+						<el-input
+							placeholder="请输入组织机构过滤"
+							size="small"
+							v-model="filterText">
+						</el-input>
+					</div>
+					<el-tree
+						:data="officeTreeData"
+						:props="{
+						  value: 'id',             // ID字段名
+						  label: 'name',         // 显示名称
+						  children: 'children'    // 子级字段名
                 }"
-            default-expand-all
-            highlight-current
-            node-key="id"
-            :render-content="renderContent"
-            :filter-node-method="filterNode"
-            :expand-on-click-node="false"
-            @node-click="handleNodeClick"
-            ref="officeTree">
-          </el-tree>
-        </el-card>
-      </el-aside>
+						default-expand-all
+						highlight-current
+						node-key="id"
+						:render-content="renderContent"
+						:filter-node-method="filterNode"
+						:expand-on-click-node="false"
+						@node-click="handleNodeClick"
+						ref="officeTree">
+					</el-tree>
+				</el-card>
+			</el-aside>
 
-    <el-container>
-      <el-header style="text-align: left; font-size: 12px;height:30px">
-        <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-            <el-form-item prop="loginName">
-              <el-input size="small" v-model="searchForm.loginName" placeholder="登录名" clearable></el-input>
-            </el-form-item>
+			<el-container>
+				<el-header style="text-align: left; font-size: 12px;height:30px">
+					<el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+						<el-form-item prop="loginName">
+							<el-input size="small" v-model="searchForm.loginName" placeholder="登录名" clearable></el-input>
+						</el-form-item>
 
-            <el-form-item>
-              <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
-              <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
-            </el-form-item>
-          </el-form>
-      </el-header>
+						<el-form-item>
+							<el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+							<el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+						</el-form-item>
+					</el-form>
+				</el-header>
 
-      <el-main>
-        <el-table
-          :data="dataList"
-          v-loading="loading"
-          size="small"
-          border
-          ref="userTable"
-          @selection-change="selectionChangeHandle"
-          @sort-change="sortChangeHandle"
-          height="calc(100% - 40px)"
-          style="width: 100%;">
-          <el-table-column
-            header-align="center"
-            align="center"
-            v-if="limit <= 1"
-            width="50">
-              <template #default="scope">
-                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>
-              </template>
-          </el-table-column>
-          <el-table-column
-            type="selection"
-            header-align="center"
-            v-if="limit > 1"
-            align="center"
-            width="50">
-          </el-table-column>
-          <el-table-column
-            prop="photo"
-            header-align="center"
-            align="center"
-            label="头像">
-            <template #default="scope">
-              <img :src="scope.row.photo === ''?'/static/img/avatar.png':scope.row.photo" style="height:35px"/>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="loginName"
-            header-align="center"
-            align="center"
-            sortable="custom"
-            min-width="90"
-            label="登录名">
-          </el-table-column>
-          <el-table-column
-            prop="name"
-            header-align="center"
-            align="真实姓名"
-            sortable="custom"
-            min-width="90"
-            label="用户名">
-          </el-table-column>
-          <el-table-column
-            prop="companyDTO.name"
-            header-align="center"
-            align="center"
-            sortable="custom"
-            min-width="110"
-            label="所属机构">
-          </el-table-column>
-          <el-table-column
-            prop="officeDTO.name"
-            header-align="center"
-            align="center"
-            sortable="custom"
-            min-width="110"
-            label="所属部门">
-          </el-table-column>
-          <el-table-column
-            prop="loginFlag"
-            header-align="center"
-            align="center"
-            min-width="100"
-            label="状态">
-            <template #default="scope">
-              <el-tag v-if="scope.row.loginFlag === '1'" size="small" type="success">正常</el-tag>
-              <el-tag v-else-if="scope.row.loginFlag === '0'" size="small" type="danger">禁用</el-tag>
-            </template>
-          </el-table-column>
-        </el-table>
-        <el-pagination
-          @size-change="sizeChangeHandle"
-          @current-change="currentChangeHandle"
-          :current-page="pageNo"
-          :page-sizes="[5, 10, 50, 100]"
-          :page-size="pageSize"
-          :total="total"
-          layout="total, sizes, prev, pager, next, jumper">
-        </el-pagination>
-      </el-main>
-    </el-container>
+				<el-main>
+					<el-table
+						:data="dataList"
+						v-loading="loading"
+						size="small"
+						border
+						ref="userTable"
+						@selection-change="selectionChangeHandle"
+						@sort-change="sortChangeHandle"
+						height="calc(100% - 40px)"
+						style="width: 100%;">
+						<el-table-column
+							header-align="center"
+							align="center"
+							v-if="limit <= 1"
+							width="50">
+							<template #default="scope">
+								<el-radio-group v-model="dataListAllSelections[0]" @change.native="getTemplateRow(scope.$index, scope.row)">
+									<el-radio :label="scope.row">
+										<template #default="{ label }">
+											<!-- 将label文本设置为空 -->
+											<span></span>
+										</template>
+									</el-radio>
+								</el-radio-group>
+<!--								<el-radio-group :value="dataListAllSelections[0]&&dataListAllSelections[0].id"  @change.native="getTemplateRow(scope.$index, scope.row)">-->
+<!--									<el-radio-->
+<!--										:label="scope.row.id"-->
+<!--										:value="dataListAllSelections[0]&&dataListAllSelections[0].id"-->
+<!--										@change.native="getTemplateRow(scope.$index,scope.row)">-->
+<!--										<span></span>-->
+<!--									</el-radio>-->
+<!--								</el-radio-group>-->
+							</template>
+						</el-table-column>
+						<el-table-column
+							type="selection"
+							header-align="center"
+							v-if="limit > 1"
+							align="center"
+							width="50">
+						</el-table-column>
+						<el-table-column
+							prop="photo"
+							header-align="center"
+							align="center"
+							label="头像">
+							<template #default="scope">
+								<img :src="scope.row.photo === ''?'/static/img/avatar.png':scope.row.photo" style="height:35px"/>
+							</template>
+						</el-table-column>
+						<el-table-column
+							prop="loginName"
+							header-align="center"
+							align="center"
+							sortable="custom"
+							min-width="90"
+							label="登录名">
+						</el-table-column>
+						<el-table-column
+							prop="name"
+							header-align="center"
+							align="真实姓名"
+							sortable="custom"
+							min-width="90"
+							label="用户名">
+						</el-table-column>
+						<el-table-column
+							prop="companyDTO.name"
+							header-align="center"
+							align="center"
+							sortable="custom"
+							min-width="110"
+							label="所属机构">
+						</el-table-column>
+						<el-table-column
+							prop="officeDTO.name"
+							header-align="center"
+							align="center"
+							sortable="custom"
+							min-width="110"
+							label="所属部门">
+						</el-table-column>
+						<el-table-column
+							prop="loginFlag"
+							header-align="center"
+							align="center"
+							min-width="100"
+							label="状态">
+							<template #default="scope">
+								<el-tag v-if="scope.row.loginFlag === '1'" size="small" type="success">正常</el-tag>
+								<el-tag v-else-if="scope.row.loginFlag === '0'" size="small" type="danger">禁用</el-tag>
+							</template>
+						</el-table-column>
+					</el-table>
+					<el-pagination
+						@size-change="sizeChangeHandle"
+						@current-change="currentChangeHandle"
+						:current-page="pageNo"
+						:page-sizes="[5, 10, 50, 100]"
+						:page-size="pageSize"
+						:total="total"
+						layout="total, sizes, prev, pager, next, jumper">
+					</el-pagination>
+				</el-main>
+			</el-container>
 
-    <el-aside width="200px">
-      <el-tag
-        :key="tag.id"
-        v-for="tag in dataListAllSelections"
-        closable
-        :disable-transitions="false"
-        @close="del(tag)">
-        {{tag.name}}
-      </el-tag>
-  </el-aside>
-</el-container>
+			<el-aside width="200px">
+				<el-tag
+					:key="tag.id"
+					v-for="tag in dataListAllSelections"
+					closable
+					:disable-transitions="false"
+					@close="del(tag)">
+					{{tag.name}}
+				</el-tag>
+			</el-aside>
+		</el-container>
 		<template #footer>
 			<span class="dialog-footer">
 			  <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
 			  <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
 			</span>
 		</template>
-    </el-dialog>
-
-  </div>
+	</el-dialog>
 </template>
 
 <script>

+ 117 - 102
src/views/cw/workClientInfo/clientUserSelect/index.vue

@@ -1,108 +1,123 @@
 <template>
-<div>
-    <el-input placeholder="请选择" :size="size" :disabled="disabled" :readonly="readonly" style="line-hight:40px" @change="changeName" v-model="name" class="input-with-select">
-		<template #append>
-			<el-button :disabled="disabled"  :readonly="readonly" @click="showUserSelect" icon="el-icon-search"></el-button>
-		</template>
-    </el-input>
-    <user-select ref="userSelect" @doSubmit="selectUsersToInput" :limit="limit" :selectData="selectData"></user-select>
-</div>
+	<template v-if="printRead">
+		<label>{{ name }}</label>
+	</template>
+	<template v-else>
+		<el-input
+			placeholder="请选择"
+			readonly
+			:clearable="clearable"
+			:disabled="disabled"
+			style="line-hight: 40px"
+			v-model="name"
+		>
+			<template #append>
+				<el-button
+					:disabled="disabled"
+					:readonly="readonly"
+					@click="showUserSelect"
+					icon="search"
+				></el-button>
+			</template>
+		</el-input>
+		<user-select
+			ref="userSelect"
+			@doSubmit="selectUsersToInput"
+			:tenantId="tenantId"
+			:limit="limit"
+		></user-select>
+	</template>
 </template>
 <script>
-import userSelect from './UserSelectDialog'
-import userService from '@/api/sys/UserService'
-export default {
-  data () {
-    return {
-      name: '',
-      labelValue: this.value,
-      selectData: []
-    }
-  },
-  props: {
-    limit: Number,
-    value: String,
-    userName: String,
-    size: {
-      type: String,
-      default: () => { return 'small' }
-    },
-    readonly: {
-      type: Boolean,
-      default: () => { return false }
-    },
-    disabled: {
-      type: Boolean,
-      default: () => { return false }
-    }
-  },
-  components: {
-    userSelect
-  },
-  beforeCreate () {
-  },
-  watch: {
-    value: {
-      handler (newVal) {
-        this.selectData = []
-        if (newVal) {
-          newVal.split(',').forEach((id) => {
-            userService.queryById(id).then((data) => {
-              if (data && data.id !== '') {
-                this.selectData.push(data)
-              }
-            })
-          })
-        }
-      },
-      immediate: true,
-      deep: false
-    },
-    selectData: {
-      handler (newVal) {
-        this.name = newVal.map(user => { return user.name }).join(',')
-      },
-      immediate: false,
-      deep: false
-    },
-    userName: {
-      handler (newVal) {
-        this.name = newVal
-      },
-      immediate: false,
-      deep: false
-    }
-  },
-  methods: {
-    selectUsersToInput (users) {
-      this.selectData = users
-      this.labelValue = users.map(user => { return user.id }).join(',')
-      this.name = users.map(user => { return user.name }).join(',')
-      this.$emit('getValue', this.labelValue, this.name)
-    },
-    changeName () {
-      this.$emit('getValue', null, this.name)
-    },
-    showUserSelect () {
-      this.$refs.userSelect.init()
-    },
-    changeNameValue (name) {
-      this.name = name
-    },
-    clearSelectData () {
-      this.selectData = []
-    }
-  }
-}
+	import userSelect from "./UserSelectDialog";
+	import userService from "@/api/sys/userService";
+	export default {
+		data() {
+			return {
+				name: "",
+				selectData: [],
+			};
+		},
+		props: {
+			limit: Number,
+			modelValue: { type: String, default: "" },
+			tenantId: { type: String, default: null },
+			printRead: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			clearable: {
+				type: Boolean,
+				default: () => {
+					return true;
+				},
+			},
+			readonly: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			disabled: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+		},
+		components: {
+			userSelect,
+		},
+		watch: {
+			modelValue: {
+				handler(newVal) {
+					this.selectData = [];
+					if (newVal && newVal !== true) {
+						console.log('newVAal', newVal)
+						console.log('进来了')
+						newVal.split(",").forEach((id) => {
+							userService.queryById(id).then((data) => {
+								if (data && data.id !== "") {
+									this.selectData.push(data);
+									this.name = this.selectData
+										.map((user) => {
+											return user.name;
+										})
+										.join(",");
+								}
+							});
+						});
+					} else {
+						this.name = "";
+					}
+				},
+				immediate: true,
+				deep: false,
+			},
+		},
+		methods: {
+			selectUsersToInput(users) {
+				let selectIds = users
+					.map((user) => {
+						return user.id;
+					})
+					.join(",");
+				this.$emit("update:modelValue", selectIds);
+			},
+			showUserSelect() {
+				this.$refs.userSelect.init()
+			},
+		},
+	};
 </script>
 <style>
-  .el-form-item__content .el-input-group {
-      vertical-align: middle;
-  }
- .el-tag + .el-tag {
-    margin-left: 5px;
-    margin-bottom: 5px;
-  }
+	.el-form-item__content .el-input-group {
+		vertical-align: middle;
+	}
+	.el-tag + .el-tag {
+		margin-left: 5px;
+		margin-bottom: 5px;
+	}
 </style>
-
-

+ 6 - 4
src/views/cw/workClientInfo/manageLevelType/ManageLevelTypeListForm.vue

@@ -58,10 +58,12 @@
 <!--          @page-change="currentChangeHandle">-->
 <!--        </vxe-pager>-->
       </div>
-      <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" type="primary" v-if="method != 'view'" @click="getManageLevelType()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
-    </span>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getManageLevelType()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
     </el-dialog>
   </div>
 </template>

+ 6 - 4
src/views/cw/workClientInfo/organizationType/OrganizationTypeListForm.vue

@@ -58,10 +58,12 @@
 <!--          @page-change="currentChangeHandle">-->
 <!--        </vxe-pager>-->
       </div>
-      <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" type="primary" v-if="method != 'view'" @click="getOrganizationType()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
-    </span>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getOrganizationType()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
     </el-dialog>
   </div>
 </template>

+ 1 - 0
src/views/cw/workContract/ContractFilePaperForm.vue

@@ -550,6 +550,7 @@
         this.showViewer = false
       },
       init (method, id) {
+      	console.log('this.businessId', this.businessId)
       	console.log('this.$store.state.user.office.name', this.$store.state.user.office.name)
         // console.log(method)
         // console.log('id', id)

+ 5 - 2
src/views/cw/workContract/ContractNameForm.vue

@@ -641,10 +641,13 @@
 		WorkClientChooseForm,
 		SelectTree,
 		WorkClientChooseRadio,
-		WorkClientForm,
+		// WorkClientForm,
+		// WorkClientForm: () => import('../workClientInfo/WorkClientForm'),
 		ProjectRecordsForm: () => import('../projectRecords/ProjectRecordsForm'),
 		InvoiceForm,
 		ReportManagementForm
+		// InvoiceForm: () => import('../invoice/InvoiceForm'),
+		// ReportManagementForm: () => import('../reportManagement/ReportManagementForm')
     },
     ossService: null,
     // workContractService: null,
@@ -801,7 +804,7 @@
           })
           // 获取关联项目信息
           projectRecordsService.getByContractId(this.inputForm.id).then((project) => {
-            this.projectList = project.data
+            this.projectList = project
           })
           // 获取关联报告信息
           projectReportService.getIdByContractId(this.inputForm.id, this.reportForm).then((data) => {

+ 19 - 16
src/views/cw/workContract/ContractRegistration.vue

@@ -32,11 +32,10 @@
 			  ></el-input>
 		  </el-form-item>
 		  <el-form-item  v-if="showHideItem" prop="contractAmounts" label="合同金额:">
-			  <el-input
-				  v-model="searchForm.contractAmounts"
-				  placeholder="请输入合同金额"
-				  clearable
-			  ></el-input>
+			  <InputNumber :disabled="false" :precision="num" :value="searchForm.contractAmounts"
+						   @changefrom="(val)=>{searchForm.contractAmounts[0]=val}"
+						   @changeto="(val)=>{searchForm.contractAmounts[1]=val}"
+			  ></InputNumber>
 		  </el-form-item>
 		  <el-form-item  v-if="showHideItem" prop="contractDates" label="签约时间:">
 			  <el-date-picker
@@ -48,7 +47,7 @@
 				  end-placeholder="结束日期">
 			  </el-date-picker>
 		  </el-form-item>
-		  <el-form-item v-if="showHideItem" prop="createBy" label="创建人:">
+		  <el-form-item v-if="showHideItem" prop="createById" label="创建人:">
 			  <SelectUserTree
 				  ref="companyTree"
 				  :props="{
@@ -57,11 +56,11 @@
                   children: 'children'    // 子级字段名
                 }"
 				  :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"
-				  :value="searchForm.createBy"
+				  :value="searchForm.createById"
 				  :clearable="true"
 				  :accordion="true"
 				  size="default"
-				  @getValue="(value) => {searchForm.createBy=value}"/>
+				  @getValue="(value) => {searchForm.createById=value}"/>
 		  </el-form-item>
 		  <el-form-item  v-if="showHideItem" prop="department" label="所属部门:">
 			  <SelectTree
@@ -166,7 +165,7 @@
           <vxe-column min-width="150" align="center" title="创建日期" field="createTime"></vxe-column>
           <vxe-column min-width="100px" title="状态" field="status" fixed="right" align="center" >
             <template #default="scope">
-              <el-button @click="detail(scope.row)" text type="primary" :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}} </el-button>
+              <el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}} </el-button>
             </template>
           </vxe-column>
 <!--          <vxe-column width="200px" title="电子归档" field="filedType">-->
@@ -176,12 +175,12 @@
 <!--          </vxe-column>-->
           <vxe-column min-width="100px" title="纸质归档" fixed="right" align="center" field="filedPaperType">
             <template #default="scope">
-              <el-button  @click="detailPaperFiled(scope.row)" text type="primary" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedPaperType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("filed_type", scope.row.filedPaperType, '未归档')}} </el-button>
+              <el-button  @click="detailPaperFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedPaperType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("filed_type", scope.row.filedPaperType, '未归档')}} </el-button>
             </template>
           </vxe-column>
           <vxe-column min-width="100px"  title="借用状态" fixed="right" align="center" field="borrowType" >
             <template #default="scope">
-              <el-button  @click="detailBorrow(scope.row)" text type="primary" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>
+              <el-button  @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>
             </template>
           </vxe-column>
 
@@ -190,7 +189,7 @@
             <template  #default="scope">
               <div v-if="isAdmin">
                 <el-button v-if="scope.row.filedPaperType === '5'" text type="primary" size="small" @click="edit(scope.row)">修改</el-button>
-                <el-button v-if="scope.row.filedPaperType === '5'" type="danger" size="small" @click="del(scope.row.id)">删除</el-button>
+                <el-button v-if="scope.row.filedPaperType === '5'" text type="primary" size="small" @click="del(scope.row.id)">删除</el-button>
               </div>
               <div v-else>
 <!--              <el-button v-if="hasPermission('cw:workContract:view')" text type="primary" size="small" @click="view(scope.row.id)">查看</el-button>-->
@@ -203,7 +202,7 @@
               <!--              被驳回后当前申请人重新调整-->
 <!--              <el-button v-if="hasPermission('cw:workContract:edit')&&scope.row.createId === $store.state.user.id&&scope.row.status === '4'" text type="primary"  size="small" @click="adjust(scope.row)">驳回调整</el-button>-->
               <!--              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.filedPaperType === '5' && isAdmin" text type="primary" size="small" @click="editForm(scope.row.id)">修改</el-button>-->
-              <el-button v-if="hasPermission('cw:workContract:del') && (scope.row.filedPaperType === '1' || scope.row.filedPaperType === '3' || scope.row.filedPaperType === '0')  && scope.row.createId === $store.state.user.id" type="danger" size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('cw:workContract:del') && (scope.row.filedPaperType === '1' || scope.row.filedPaperType === '3' || scope.row.filedPaperType === '0')  && scope.row.createId === $store.state.user.id" text type="primary" size="small" @click="del(scope.row.id)">删除</el-button>
               <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '2' && scope.row.createId === $store.state.user.id" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
 <!--              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" text type="primary" size="small" @click="filed(scope.row.id)">归档</el-button>-->
               <!--归档暂存修改-->
@@ -215,7 +214,7 @@
               <!--合同借用-->
               <el-button v-if="hasPermission('cw:workContract:borrow') && scope.row.status === '5' && scope.row.filedPaperType === '5' && (scope.row.borrowType === undefined || scope.row.borrowType === '0' || scope.row.borrowType === '1')" text type="primary" size="small" @click="borrow(scope.row)">借用</el-button>
               <!--借用撤回-->
-              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedPaperType === '5' && scope.row.borrowType === '2'" text type="primary" size="small" @click="rebackBorrow(scope.row)">撤回借用申请</el-button>
+              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedPaperType === '5' && scope.row.borrowType === '2' && (scope.row.borrowUserId === $store.state.user.id)" text type="primary" size="small" @click="rebackBorrow(scope.row)">撤回借用申请</el-button>
               <!--借用归还-->
               <el-button v-if="hasPermission('cw:workContract:reture') && scope.row.status === '5' && scope.row.filedPaperType === '5'  && scope.row.borrowType === '5'" text type="primary" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>
 
@@ -255,6 +254,7 @@
 </template>
 
 <script>
+	import InputNumber from '@/views/workContract/InputNumber.vue'
   import ContractNameForm from "./ContractNameForm";
   import ContractAddForm from './contractRegisitionAddForm/ContractAddForm'
   import WorkClientForm from '../../workClient/WorkClientForm'
@@ -288,7 +288,7 @@
           type: '',
           filedType: '',
           contractAmounts: [],
-		  createBy: '',
+			createById: '',
           createId: '',
           department: '',
           status: '',
@@ -318,6 +318,7 @@
       this.cwWorkContractBorrowService = new CwWorkContractBorrowService()
     },
     components: {
+		InputNumber,
       ContractNameForm,
       ContractAddForm,
       WorkClientForm,
@@ -361,7 +362,7 @@
       },
       // 获取数据列表
       refreshList () {
-        // console.log('user', this.user)
+        console.log('user', this.$store.state.user.id)
         this.loading = true
 			contractInfoService
 				.list({
@@ -607,6 +608,7 @@
         }
         if (type === 'rebackBorrow') {
           row.borrowType = '0'
+			row.createTime = '';
           this.cwWorkContractBorrowService.updateStatusByContractInfoId(row).then(() => {
             this.cwWorkContractBorrowService.deleteById(row.id)
           })
@@ -872,6 +874,7 @@
             this.refreshList()
           })
         })
+		  this.refreshList()
       },
       // 纸质归档详情
       detailPaperFiled (row) {

+ 4 - 4
src/views/cw/workContract/ContractRegistrationForm.vue

@@ -205,8 +205,8 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="合同金额(元)" prop="contractAmount" v-if="inputForm.contractAmountType === '1'"
+        <el-col :span="12" v-if="inputForm.contractAmountType === '1'">
+          <el-form-item label="合同金额(元)" prop="contractAmount"
                         :rules="[
                   {required: true, message:'请输入合同金额(元)', trigger:'blur'}
                ]">
@@ -216,8 +216,8 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="预计金额(元)" prop="predictAmount" v-if="inputForm.contractAmountType === '2'"
+        <el-col :span="12" v-if="inputForm.contractAmountType === '2'">
+          <el-form-item label="预计金额(元)" prop="predictAmount"
                         :rules="[
                   /*{required: true, message:'请输入预计金额(元)', trigger:'blur'}*/
                ]">

+ 10 - 5
src/views/cw/workContract/CwWorkContractBorrowForm.vue

@@ -200,7 +200,6 @@
     methods: {
       init (id) {
         if (id) {
-          console.log('进来了')
           this.loading = true
           this.inputForm.id = id
           this.$nextTick(() => {
@@ -208,12 +207,14 @@
             this.cwWorkContractBorrowService.findById(this.inputForm.id).then((data) => {
               this.$refs.archiveFile.clearUpload()
               this.$refs.uploadFile.clearUpload()
-              console.log('data1', data)
               if (this.commonJS.isEmpty(data.id)) {
                 contractInfoService.findById(this.inputForm.id).then((data) => {
                   this.inputForm = this.recover(this.inputForm, data)
-                  this.inputForm.borrowName = this.userName
-                  // this.inputForm.borrowData = new Date()
+                  // this.inputForm.borrowName = this.userName
+					if (this.commonJS.isEmpty(this.inputForm.borrowName)){
+						this.inputForm.borrowName = this.userName
+					}
+                  this.inputForm.borrowData = this.moment(new Date()).format('YYYY-MM-DD')
                   this.$refs.uploadFile.newUpload('view', data.contractProperList, 'cwWorkContract', null, null, null, null, false)
                   this.$refs.archiveFile.newUpload('view', data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
                   // console.log('data', data)
@@ -227,8 +228,12 @@
                   this.$refs.archiveFile.newUpload('view', data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
                 })
                 this.inputForm = this.recover(this.inputForm, data)
-                this.inputForm.borrowName = this.userName
+                // this.inputForm.borrowName = this.userName
+				  if (this.commonJS.isEmpty(this.inputForm.borrowName)){
+					  this.inputForm.borrowName = this.userName
+				  }
                 // this.inputForm.borrowData = new Date()
+				  this.inputForm.borrowData = this.moment(new Date()).format('YYYY-MM-DD')
                 this.loading = false
               }
             })

+ 8 - 8
src/views/cw/workContract/contractRegisitionAddForm/ContractAddForm.vue

@@ -135,7 +135,7 @@
                ]">
             <el-date-picker
               placement="bottom-start"
-              value-format="YYYY-MM-DD h:m:s"
+              value-format="YYYY-MM-DD"
               v-model="inputForm.signingDate"
               style="width: 100%"
               placeholder="选择日期">
@@ -175,7 +175,7 @@
                   children: 'children'    // 子级字段名
                 }"
 
-              :url="`/system-server/sys/office/treeData?type=1`"
+              :url="`/system-server/sys/office/treeData?type=2`"
               :value="inputForm.department"
               :accordion="true"
 			  size="default"
@@ -215,8 +215,8 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="合同金额(元)" prop="contractAmount" v-if="inputForm.contractAmountType === '1'"
+        <el-col :span="12" v-if="inputForm.contractAmountType === '1'">
+          <el-form-item label="合同金额(元)" prop="contractAmount"
                         :rules="[
                   {required: true, message:'请输入合同金额(元)', trigger:'blur'}
                ]">
@@ -226,8 +226,8 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="预计金额(元)" prop="predictAmount" v-if="inputForm.contractAmountType === '2'"
+        <el-col :span="12" v-if="inputForm.contractAmountType === '2'">
+          <el-form-item label="预计金额(元)" prop="predictAmount"
                         :rules="[
                   /*{required: true, message:'请输入预计金额(元)', trigger:'blur'}*/
                ]">
@@ -615,7 +615,7 @@
               this.inputForm.createId = this.$store.state.user.id
             }
             if (this.commonJS.isEmpty(this.inputForm.createTime)) {
-              this.inputForm.createTime = this.moment(new Date()).format('YYYY-MM-DD h:m:s')
+              this.inputForm.createTime = this.moment(new Date()).format('YYYY-MM-DD')
             }
             const f = []
             if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
@@ -921,7 +921,7 @@
           this.dataListNew.push(item)
         })
         fileList.forEach((item) => {
-          item.createTime = moment(new Date()).format('YYYY-MM-DD h:m:s')
+          item.createTime = moment(new Date()).format('YYYY-MM-DD')
           item.createBy = this.$store.state.user.name
           this.dataListNew.push(item)
         })

+ 192 - 0
src/views/dashboard/widgets/components/MyNoticePageList.vue

@@ -0,0 +1,192 @@
+<template>
+	<el-card class="box-card">
+		<template #header>
+			<div class="card-header">
+				<span>我的通知</span>
+				<div style="float:right;">
+					<el-button type="text" @click="refreshList()">刷新</el-button>
+					<el-button type="text" @click="toPendingList()">更多>></el-button>
+				</div>
+			</div>
+		</template>
+		<el-table :data="dataList" style="width: 100%" height="480">
+			<el-table-column label="实例标题" prop="title">
+				<template #default="scope">
+					<el-link  type="primary" :underline="false" @click="todo(scope.row)">{{scope.row.title}}</el-link>
+				</template>
+			</el-table-column>
+			<el-table-column
+				show-overflow-tooltip
+				label="流程名称"
+				prop="taskName"
+			></el-table-column>
+			<el-table-column
+				show-overflow-tooltip
+				label="流程发起人"
+				prop="createUser"
+			></el-table-column>
+			<el-table-column
+				show-overflow-tooltip
+				label="创建时间"
+				prop="createTime"
+			></el-table-column>
+		</el-table>
+		<vxe-pager
+			background
+			size="small"
+			:current-page="tablePage.currentPage"
+			:page-size="tablePage.pageSize"
+			:total="tablePage.total"
+			:page-sizes="[
+				10,
+				20,
+				100,
+				1000,
+				{ label: '全量数据', value: 1000000 },
+			]"
+			:layouts="[
+				'PrevPage',
+				'JumpNumber',
+				'NextPage',
+				'FullJump',
+				'Sizes',
+				'Total',
+			]"
+			@page-change="currentChangeHandle"
+		>
+		</vxe-pager>
+	</el-card>
+	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+</template>
+
+<script>
+	import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+// import notifyService from "@/api/notify/notifyService";
+import noticeService from '@/api/flowable/NoticeService'
+import taskService from "@/api/flowable/taskService";
+	import pick from "lodash.pick";
+export default {
+	title: "我的通知",
+	icon: "tongzhi",
+	description: "我的通知",
+	layout: {
+		w: 6,
+		h: 15,
+	},
+	components: {
+		WareHouseHistoryPopup,
+	},
+	data() {
+		return {
+			dataList: [],
+			typeList: [],
+			searchForm: {
+				title: '',
+				taskName: ''
+			},
+			tablePage: {
+				total: 0,
+				currentPage: 1,
+				pageSize: 10,
+				orders: []
+			},
+			loading: false,
+			visible: false,
+			currentTask: null,
+			processInstanceId: ''
+		};
+	},
+	mounted() {
+		this.refreshList();
+	},
+
+	activated() {
+		this.refreshList();
+	},
+	methods: {
+		todo (row) {
+			// console.log('row', row)
+			if (row.taskName === '库存提醒') {
+				// console.log('测试进来了')
+				this.$refs.wareHouseHistoryPopup.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else {
+				this.inputForm = {
+					taskId: '',
+					noticeId: ''
+				}
+				console.log('进来了+++', row.taskId)
+				taskService.getTaskDef({
+					procInsId: row.taskId,
+					procDefId: row.defId
+				}).then((data) => {
+					this.inputForm.taskId = row.taskId
+					this.inputForm.noticeId = row.noticeName
+					noticeService.update(this.inputForm)
+					// this.$router.push({
+					// 	path: '/flowable/task/TaskForm',
+					// 	query: {
+					// 		isShow: false,
+					// 		formReadOnly: true,
+					// 		formTitle: `${row.title}`,
+					// 		num: 2,
+					// 		title: `审批【${row.taskName || ''}】`,
+					// 		...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')
+					// 	}
+					// })
+					this.$router.push({
+					  path: '/flowable/task/TaskFormDetail',
+					  query: {
+						  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						  isShow: 'false',
+						  readOnly: true,
+						title: `审批【${row.taskName || ''}】`,
+						formTitle: `${row.title}`,
+						businessId: data.businessId,
+						  status: 'reback'
+					  }
+					})
+				})
+			}
+		},
+		// 获取数据列表
+		refreshList() {
+			this.loading = true
+			noticeService.list({
+				current: this.tablePage.currentPage,
+				size: this.tablePage.pageSize,
+				orders: this.tablePage.orders,
+				isSelf: true,
+				...this.searchForm
+			}).then((data) => {
+				this.dataList = data.records
+				this.tablePage.total = data.total
+				this.loading = false
+			})
+		},
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage;
+			this.tablePage.pageSize = pageSize;
+			this.refreshList();
+		},
+		resetSearch() {
+			this.$refs.searchForm.resetFields();
+			this.refreshList();
+		},
+		toPendingList () {
+			// this.$router.push('./PendingList')
+			this.$router.push('/flowable/task/NoticePageList')
+		},
+	},
+};
+</script>
+<style scoped>
+	.box-card {
+		height: 100%;
+	}
+</style>

+ 3 - 3
src/views/dashboard/widgets/components/MyNotifyList.vue

@@ -2,7 +2,7 @@
 	<el-card class="box-card">
 		<template #header>
 			<div class="card-header">
-				<span>我的通知</span>
+				<span>公告</span>
 			</div>
 		</template>
 		<el-table :data="dataList" style="width: 100%" height="480">
@@ -131,9 +131,9 @@
 import NotifyForm from "@/views/notify/NotifyForm.vue";
 import notifyService from "@/api/notify/notifyService";
 export default {
-	title: "我的通知",
+	title: "我的公告",
 	icon: "tonggao5",
-	description: "我的通知",
+	description: "我的公告",
 	layout: {
 		w: 6,
 		h: 15,

+ 78 - 2
src/views/dashboard/widgets/components/TodoList.vue

@@ -3,9 +3,13 @@
 		<template #header>
 			<div class="card-header">
 				<span>我的待办</span>
+				<div style="float:right;">
+					<el-button type="text" @click="refreshList()">刷新</el-button>
+					<el-button type="text" @click="toPendingList()">更多>></el-button>
+				</div>
 			</div>
 		</template>
-		<el-table :data="dataList" style="width: 100%" height="480">
+		<!--<el-table :data="dataList" style="width: 100%" height="480">
 			<el-table-column
 				label="实例标题"
 				prop="vars.title"
@@ -79,7 +83,60 @@
 			]"
 			@page-change="currentChangeHandle"
 		>
-		</vxe-pager>
+		</vxe-pager>-->
+		<div style="height: calc(100% - 55px);margin-top: 5px">
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="auto"
+				:loading="loading"
+				size="small"
+				ref="todoTable"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				:import-config="{}"
+				:export-config="{}"
+				:data="dataList"
+				header-align="center"
+				:checkbox-config="{}">
+				<vxe-column title="实例标题" field="vars.title">
+				</vxe-column>
+				<vxe-column title="流程名称" field="processDefinitionName"></vxe-column>
+				<vxe-column title="当前环节" field="task.name">
+					<template #default="scope">
+						<el-tag>{{scope.row.task.name}}</el-tag>
+					</template>
+				</vxe-column>
+				<vxe-column title="流程发起人" field="vars.userName"></vxe-column>
+				<vxe-column
+					field="task.createTime"
+					title="发起时间">
+				</vxe-column>
+				<vxe-column title="操作" width="100px" fixed="right" align="center">
+					<template #default="scope">
+						<div>
+							<el-button text type="primary" @click="todo(scope.row)">办理</el-button>
+							<el-button  text type="primary" @click="trace(scope.row)">进度</el-button>
+						</div>
+					</template>
+				</vxe-column>
+			</vxe-table>
+			<vxe-pager
+				background
+				style="margin-top: 5px"
+				size="small"
+				:current-page="tablePage.currentPage"
+				:page-size="tablePage.pageSize"
+				:total="tablePage.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle">
+			</vxe-pager>
+		</div>
 	</el-card>
 	<v-dialog
 		title="查看进度"
@@ -122,10 +179,21 @@ export default {
 			visible: false,
 			currentTask: null,
 			processInstanceId: "",
+			timer: null
 		};
 	},
 	mounted() {
+		// 页面加载后
+		// 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
+		// 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
 		this.refreshList();
+		this.timer = setInterval(() => {
+			setTimeout(this.refreshList, 0)
+		}, 60000)
+	},
+	beforeDestroy () {
+		clearInterval(this.timer)
+		this.timer = null
 	},
 	activated() {
 		this.refreshList();
@@ -169,11 +237,13 @@ export default {
 					status: row.status,
 				})
 				.then((data) => {
+					var cs = "cs"
 					this.$router.push({
 						path: "/flowable/task/TaskForm",
 						query: {
 							formTitle: `${row.vars.title}`,
 							title: `审批【${row.task.name || ""}】`,
+							cs: cs,
 							...pick(
 								data,
 								"formType",
@@ -192,6 +262,12 @@ export default {
 					});
 				});
 		},
+		toPendingList () {
+			// this.$router.push('./PendingList')
+			this.$router.push({
+				path: '/flowable/task/TodoList',
+			})
+		},
 		trace(row) {
 			this.processInstanceId = row.task.processInstanceId;
 			this.visible = true;

+ 237 - 0
src/views/flowable/task/NoticePageList.vue

@@ -0,0 +1,237 @@
+<template>
+  <div class="page">
+
+    <el-form :inline="true"  class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <el-form-item label="标题" prop="title">
+        <el-input v-model="searchForm.title"></el-input>
+      </el-form-item>
+      <el-form-item label="流程名称" prop="taskName">
+        <el-input v-model="searchForm.taskName"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button  type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+      <div class="jp-table">
+        <vxe-toolbar :refresh="{query: refreshList}" custom>
+          <template #buttons>
+            <el-button type="primary" @click="readAll()">全部标记已读</el-button>
+            <el-button :disabled="$refs.todoTable && $refs.todoTable.getCheckboxRecords().length === 0" type="warning" @click="portionRead()">标记为已读</el-button>
+          </template>
+        </vxe-toolbar>
+
+		  <el-tabs v-model="type" type="card" @tab-click="handleClick">
+			  <el-tab-pane :key="index" v-for="(item,index) in typeList" :label="item.value" :name="item.value" :value="item.id"></el-tab-pane>
+		  </el-tabs>
+
+        <div style="height: calc(100% - 80px);">
+            <vxe-table
+              border="inner"
+              auto-resize
+              resizable
+              height="auto"
+              :loading="loading"
+              ref="todoTable"
+              show-header-overflow
+              show-overflow
+              highlight-hover-row
+              :menu-config="{}"
+              :print-config="{}"
+              :import-config="{}"
+              :export-config="{}"
+              :data="dataList"
+              :checkbox-config="{}">
+              <vxe-column type="seq" width="60" title="序号"></vxe-column>
+              <vxe-column type="checkbox"  width="60px"></vxe-column>
+              <vxe-column  title="实例标题" field="title" >
+                <template #default="scope">
+                  <el-link  type="primary" :underline="false" @click="todo(scope.row)">{{scope.row.title}}</el-link>
+                </template>
+              </vxe-column>
+              <vxe-column  title="流程名称" field="taskName" > </vxe-column>
+              <vxe-column  title="流程发起人" field="createUser" ></vxe-column>
+              <vxe-column
+                field="createTime"
+                title="创建时间">
+              </vxe-column>
+              <vxe-column  title="读取状态" field="type" ></vxe-column>
+            </vxe-table>
+            <vxe-pager
+              background
+              :current-page="tablePage.currentPage"
+              :page-size="tablePage.pageSize"
+              :total="tablePage.total"
+              :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+              :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+              @page-change="currentChangeHandle">
+            </vxe-pager>
+        </div>
+      </div>
+       <el-dialog
+        title="查看进度"
+        :close-on-click-modal="true"
+        :visible.sync="visible"
+		draggable
+        width="70%"
+        height="600px">
+          <flow-chart ref="preview" :processInstanceId="processInstanceId"></flow-chart>
+        </el-dialog>
+    <WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+  </div>
+</template>
+
+<script>
+  import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+  import taskService from '@/api/flowable/taskService'
+  import noticeService from '@/api/flowable/noticeService'
+  import pick from 'lodash.pick'
+  export default {
+    data () {
+      return {
+        dataList: [],
+        typeList: [],
+        searchForm: {
+          title: '',
+          taskName: ''
+        },
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false,
+        visible: false,
+        currentTask: null,
+        processInstanceId: ''
+      }
+    },
+    created () {
+      this.typeList = [
+        {id: '0', value: '未读'},
+        {id: '1', value: '已读'}
+      ]
+    },
+    activated () {
+      this.refreshList()
+    },
+    components: {
+      WareHouseHistoryPopup
+    },
+    methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        if (this.commonJS.isEmpty(this.searchForm.type)) {
+          this.searchForm.type = '0'
+        }
+        noticeService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      todo (row) {
+        // console.log('row', row)
+        if (row.taskName === '库存提醒') {
+          // console.log('测试进来了')
+          this.$refs.wareHouseHistoryPopup.init(row.defId)
+          this.inputForm = {
+            id: row.id
+          }
+          noticeService.stockUpdate(this.inputForm)
+          this.resetSearch()
+        } else {
+          this.inputForm = {
+            taskId: '',
+            noticeId: ''
+          }
+          taskService.getTaskDef({
+            procInsId: row.taskId,
+            procDefId: row.defId
+          }).then((data) => {
+            this.inputForm.taskId = row.taskId
+            this.inputForm.noticeId = row.noticeName
+            noticeService.update(this.inputForm)
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                isShow: false,
+                formReadOnly: true,
+                formTitle: `${row.title}`,
+                num: 2,
+                title: `审批【${row.taskName || ''}】`,
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      handleClick (tab) {
+        const val = tab.index
+        this.searchForm.type = val
+        this.refreshList()
+      },
+
+      // 全部已读
+      readAll () {
+        this.$confirm(`确定将全部信息标记为已读吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          noticeService.readAll().then((data) => {
+            this.loading = false
+            this.$message({
+              message: data,
+              type: 'success',
+              duration: 1500
+            })
+            this.refreshList()
+          })
+        })
+      },
+
+      // 部分已读
+      portionRead (id) {
+        let ids = id || this.$refs.todoTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定将选定信息标记为已读吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          noticeService.portionRead(ids).then((data) => {
+            this.loading = false
+            this.$message({
+              message: data,
+              type: 'success',
+              duration: 1500
+            })
+            this.refreshList()
+          })
+        })
+      }
+    }
+  }
+</script>

+ 8 - 2
src/views/flowable/task/TaskForm.vue

@@ -167,13 +167,13 @@
 							></user-select>
 						</el-form-item>
 					</el-col>
-					<el-col :span="16">
+					<!--<el-col :span="16">
 						<el-form-item>
 							<el-checkbox v-model="isAssign"
 								>指定下一步处理者(不设置就使用默认处理人)</el-checkbox
 							>
 						</el-form-item>
-					</el-col>
+					</el-col>-->
 					<el-col :span="16">
 						<el-form-item
 							v-if="isAssign"
@@ -248,6 +248,7 @@
 
 <script>
 // import FlowChart from '../modeler/FlowChart'
+import noticeService from '@/api/flowable/noticeService'
 import useTabs from "@/utils/useTabs";
 import UserSelect from "@/components/userSelect/index.vue";
 import PreviewForm from "@/views/flowable/form/GenerateFlowableForm.vue";
@@ -379,6 +380,7 @@ export default {
 			this.businessId = 'false'
 		},
 		init() {
+			this.cs = this.$route.query.cs;
 			this.taskSelectedTab = "form-first";
 			this.procDefId = this.$route.query.procDefId;
 			this.procDefKey = this.$route.query.procDefKey;
@@ -999,6 +1001,9 @@ export default {
 									} else if (num === '3') {
 										this.$router.push({path: '/sys/dashboard/workBench/PendingList'})
 										this.cc(data)
+									}else if (this.cs === 'cs') {
+										this.$router.push({path: '/dashboard/index'})
+										this.cc(data)
 									} else {
 										this.$router.push({path: '/flowable/task/TodoList'})
 										this.cc(data)
@@ -1212,6 +1217,7 @@ export default {
 	},
 	data() {
 		return {
+			cs: "",
 			form: null,
 			formType: "",
 			formUrl: "",

+ 2 - 2
src/views/flowable/task/TaskFormEdit.vue

@@ -99,13 +99,13 @@
 							></user-select>
 						</el-form-item>
 					</el-col>
-					<el-col :span="16">
+					<!--<el-col :span="16">
 						<el-form-item>
 							<el-checkbox v-model="isAssign"
 								>指定下一步处理者(不设置就使用默认处理人)</el-checkbox
 							>
 						</el-form-item>
-					</el-col>
+					</el-col>-->
 					<el-col :span="16">
 						<el-form-item
 							v-if="isAssign"

+ 14 - 14
src/views/home/index.vue

@@ -6,14 +6,14 @@
 				<!-- <DataPanel /> -->
 				<ContentChart />
 			</div>
-			<el-row :gutter="16" style="margin-top: 16px">
-				<el-col :span="12">
-					<CateforiesPercent />
-				</el-col>
-				<el-col :span="12">
-					<Carousel />
-				</el-col>
-			</el-row>
+<!--			<el-row :gutter="16" style="margin-top: 16px">-->
+<!--				<el-col :span="12">-->
+<!--					<CateforiesPercent />-->
+<!--				</el-col>-->
+<!--				<el-col :span="12">-->
+<!--					<Carousel />-->
+<!--				</el-col>-->
+<!--			</el-row>-->
 		</div>
 		<div class="right-side">
 			<el-row :gutter="16">
@@ -30,12 +30,12 @@
 				<el-col class="panel" :span="24">
 					<Announcement />
 				</el-col>
-				<el-col class="panel" :span="12">
-					<Docs />
-				</el-col>
-				<el-col class="panel" :span="12">
-					<Wx />
-				</el-col>
+<!--				<el-col class="panel" :span="12">-->
+<!--					<Docs />-->
+<!--				</el-col>-->
+<!--				<el-col class="panel" :span="12">-->
+<!--					<Wx />-->
+<!--				</el-col>-->
 			</el-row>
 		</div>
 	</div>

+ 800 - 0
src/views/materialManagement/collect/CollectForm.vue

@@ -0,0 +1,800 @@
+<template>
+  <div>
+    <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="100px" @submit.native.prevent>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+      <el-row :gutter="26">
+        <el-col :span="12">
+          <el-form-item label="领用编号" prop="collectNo">
+            <el-input placeholder="自动生成" v-model="inputForm.collectNo" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="经办人" prop="handledBy">
+            <el-input v-model="inputForm.handledBy" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="经办人部门" prop="handledByOffice">
+            <SelectTree
+              :disabled="true"
+              ref="officeTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+              :url="`/system-server/sys/office/treeData?type=2`"
+              :value="inputForm.handledByOffice"
+              :accordion="true"
+              size="default"
+              @getValue="(value) => {inputForm.handledByOffice=value}"/>
+<!--            <el-input v-model="inputForm.handledByOffice" :disabled="true"></el-input>-->
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="领用时间" prop="collectDate" :rules="[{required: true, message:'请选择领用时间', trigger:'blur'}]">
+            <el-date-picker
+              v-model="inputForm.collectDate"
+              type="date"
+              value-format="YYYY-MM-DD"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks">
+            <el-input v-model="inputForm.remarks"
+                      type="textarea"
+                      :rows="5"
+                      maxlength="500"
+                      placeholder="请填写备注信息"
+                      show-word-limit>
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i>
+        领用详情
+        <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly" @click="insertEvent('detail')" plain>
+          新增
+        </el-button>
+      </el-divider>
+      <el-row  :gutter="15" >
+        <el-col :span="24">
+			<vxe-table
+				border
+				show-footer
+				show-overflow
+				ref="detailTable"
+				class="vxe-table-element"
+				:data="inputForm.detailInfos"
+				style="margin-left: 5em"
+				:key="clientTableKey"
+				highlight-current-row
+				:edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
+				:edit-rules="validRules"
+			>
+				<vxe-table-column field="recipientAgent" title="领用人" :edit-render="{}" :rules="[{required: true, message:'请选择领用人', trigger:'blur'}]">
+					<template v-slot:edit="scope">
+						<el-input v-model="scope.row.recipientAgent" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="recipientOffice" title="领用人部门" :edit-render="{}">
+					<template v-slot:edit="scope">
+						<el-input :disabled='true' v-model="scope.row.recipientOffice" ></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="collectType" title="领用类型" :edit-render="{}" :rules="[{required: true, message:'请选择领用类型', trigger:'blur'}]">
+					<template v-slot:edit="scope">
+						<el-input v-model="scope.row.collectType" @focus="typePullForm(scope.$rowIndex)"></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="goodsName" title="物品名称" :edit-render="{}" :rules="[{required: true, message:'请填写物品名称', trigger:'blur'}]">
+					<template v-slot:edit="scope">
+						<el-input v-model="scope.row.goodsName" @focus="openPurchasePageForm(scope.$rowIndex, scope.row)"></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="collectNumber" title="领用数量" :edit-render="{}">
+					<template v-slot:edit="scope">
+						<!--              <el-input @change="changeValue" v-model="scope.row.tradeNumber" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>-->
+						<!--              <el-input @change="changeValue" v-model="scope.row.tradeNumber" @blur="scope.row.tradeNumber = twoDecimalPlaces2(scope.row.tradeNumber)" maxlength="10"></el-input>-->
+						<el-input v-model="scope.row.collectNumber" @blur="scope.row.collectNumber = twoDecimalPlaces2(scope.row.collectNumber)" maxlength="10"></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column v-if="this.status === 'audit'" field="surplusNumber" title="库存数量" :edit-render="{}">
+					<template v-slot:edit="scope">
+						<el-input :disabled="true" v-model="scope.row.surplusNumber" maxlength="10"></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
+					<template v-slot:edit="scope">
+						<el-input v-model="scope.row.company"></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="remarks" title="备注" :edit-render="{}">
+					<template v-slot:edit="scope">
+						<el-input v-model="scope.row.remarks" ></el-input>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column title="操作" width="300">
+					<template v-slot="scope">
+						<vxe-button size="small" status="danger" :disabled="formReadOnly" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</vxe-button>
+						<vxe-button size="small" status="primary" :disabled="formReadOnly" @click="sss(scope.$rowIndex)">上传附件</vxe-button>
+						<vxe-button size="small" status="primary" v-if="formReadOnly" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
+					</template>
+				</vxe-table-column>
+			</vxe-table>
+		</el-col>
+      </el-row>
+
+    </el-form>
+    <PurchasePageForm  ref="purchasePageForm" @getProject="getContract"></PurchasePageForm>
+    <!-- 附件 -->
+    <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
+    <MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
+    <UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
+  </div>
+</template>
+
+<script>
+  import MaterialManagementDialog from '../file/MaterialManagementDialog'
+  import CollectService from '@/api/materialManagement/CollectService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
+  import MaterialTypePullForm from '../info/MaterialTypePullForm'
+  import UserPullForm from '@/views/finance/invoice/UserPullForm'
+  import PurchasePageForm from './PurchasePageForm'
+  import CommonApi from '@/api/cw/common/CommonApi'
+  export default {
+    data () {
+      return {
+        validRules: {
+          recipientAgent: [
+            {required: true, message: '领用人不能为空'}
+          ],
+          recipientOffice: [
+            {required: true, message: '领用人部门不能为空'}
+          ],
+          collectType: [
+            {required: true, message: '领用类型不能为空'}
+          ],
+          goodsName: [
+            {required: true, message: '物品名称不能为空'}
+          ],
+          collectNumber: [
+            {required: true, message: '领用数量不能为空'}
+          ]
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        indexRow: '',
+        inputForm: {
+          fileInfoLost: [],
+          handledByOffice: '',
+          handledBy: '',
+          handledById: '',
+          collectNo: '', // 领用编号
+          userId: '',
+          collectDate: '',
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [], // 附件信息
+          procInsId: ''
+        },
+		  clientTableKey: '',
+        keyWatch: ''
+      }
+    },
+    CollectService: null,
+    commonApi: null,
+    created () {
+      this.collectService = new CollectService()
+      this.commonApi = new CommonApi()
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      MaterialManagementDialog,
+      UpLoadComponent,
+      SelectTree,
+      CwProgramPageForm,
+      MaterialTypePullForm,
+      UserPullForm,
+      PurchasePageForm
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      },
+      name () {
+        return this.$store.state.user.name
+      },
+      officeName () {
+        return this.$store.state.user.office.name
+      },
+      userId () {
+        return this.$store.state.user.id
+      },
+      recipientAgentId () {
+        return this.$store.state.user.id
+      },
+      collectTypeId () {
+        return ''
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      },
+      'loading': {
+        handler (newVal) {
+          this.$emit('changeLoading', newVal)
+          this.$refs.uploadComponent.changeLoading(newVal)
+        }
+      }
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          fileInfoLost: [],
+          handledByOffice: '',
+          handledBy: this.$store.state.user.name,
+          handledById: this.$store.state.user.id,
+          collectNo: '', // 领用编号
+          userId: this.$store.state.user.id,
+          collectDate: new Date(),
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [], // 附件信息
+          procInsId: ''
+        }
+        if (method === 'add') {
+          this.title = `新建领用类型`
+        } else if (method === 'edit') {
+          this.title = '修改领用类型'
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+            this.inputForm.handledByOffice = this.$store.state.user.office.id
+          }
+          if (this.status === 'audit' || this.status === 'taskFormDetail') {
+            method = 'view'
+          }
+          this.loading = true
+          this.$refs.inputForm.resetFields()
+          this.collectService.findById(this.inputForm.id).then((data) => {
+            if (this.inputForm.id !== 'false') {
+              this.inputForm = this.recover(this.inputForm, data)
+              if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+                this.inputForm.handledByOffice = this.$store.state.user.office.id
+              }
+              if (this.commonJS.isNotEmpty(data.recipientAgentId)) {
+                this.recipientAgentId = data.recipientAgentId
+              }
+              if (this.commonJS.isNotEmpty(data.collectTypeId)) {
+                this.collectTypeId = data.collectTypeId
+              }
+              if (this.commonJS.isNotEmpty(this.inputForm.detailInfos)) {
+                let i = this.inputForm.detailInfos.length
+                for (let j = 0; j < i; j++) {
+                  if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+                    if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+                      this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
+                    }
+                  }
+                }
+              }
+              this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            } else {
+              if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+                this.inputForm.handledByOffice = this.$store.state.user.office.id
+              }
+              if (this.commonJS.isEmpty(this.inputForm.handledBy)) {
+                this.inputForm.handledBy = this.$store.state.user.name
+              }
+              if (this.commonJS.isEmpty(this.inputForm.handledById)) {
+                this.inputForm.handledById = this.$store.state.user.id
+              }
+              if (this.commonJS.isEmpty(this.inputForm.collectDate)) {
+                this.inputForm.collectDate = new Date()
+              }
+              this.inputForm.detailInfos = []
+              this.loading = false
+            }
+          })
+          if (method !== 'edit' && method !== 'view') {
+            this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
+          }
+        })
+      },
+      getUpload (p, index) {
+        p.then((list) => {
+          // list为返回数据
+          this.inputForm.detailInfos[index].fileInfoLost = list
+          this.inputForm.detailInfos[index].fileNumber = list.length
+          this.tableKeyClient = Math.random()
+        })
+      },
+      seeFileInfo (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload('view', this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      sss (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload(null, this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            this.inputForm.id = this.businessId
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.collectService.save(this.inputForm).then((data) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.inputForm.detailInfos = []
+        // this.inputForm.amountInfos = []
+        this.$refs.uploadComponent.clearUpload()
+
+        this.visible = false
+        this.$refs.inputForm.resetFields()
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'detail') {
+          this.$refs.detailTable.remove(row)
+          this.inputForm.detailInfos.splice(rowIndex, 1)
+        }
+        if (type === 'amount') {
+          this.$refs.amountTable.remove(row)
+          // this.inputForm.amountInfos.splice(rowIndex, 1)
+        }
+      },
+      // 新增
+      async insertEvent (type) {
+        if (type === 'detail') {
+          await this.$refs.detailTable.insert().then((data) => {
+            data.recipientAgent = this.$store.state.user.name
+            data.recipientAgentId = this.recipientAgentId
+            data.recipientOffice = this.officeName
+            this.inputForm.detailInfos.push(data)
+			  this.clientTableKey = Math.random()
+          })
+        }
+        if (type === 'amount') {
+          await this.$refs.amountTable.insert().then((data) => {
+            // this.inputForm.amountInfos.push(data)
+          })
+        }
+      },
+      reapplyForm (callback) {
+        this.loading = true
+        this.collectService.findById(this.inputForm.id).then((data) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startFormTrue(callback)
+          }
+        })
+      },
+      startForm (callback) {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+          this.collectService.findById(this.inputForm.id).then((data) => {
+            // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+            if (this.commonJS.isNotEmpty(data.status) && data.status !== '0' && data.status !== '1' && data.status !== '3') {
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.startFormTrue(callback)
+            }
+          })
+        } else {
+          this.startFormTrue(callback)
+        }
+      },
+      // 暂存
+      async saveForm (callback) {
+        this.loading = true
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          return
+        }
+        if (this.commonJS.isEmpty(this.inputForm.files)) {
+          this.inputForm.files = []
+        }
+        this.inputForm.files = this.$refs.uploadComponent.getDataList()
+        this.inputForm.status = '1'
+        this.collectService.save(this.inputForm).then((data) => {
+          callback()
+          this.$refs.inputForm.resetFields()
+          this.loading = false
+        }).catch(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = false
+        })
+      },
+      // 送审
+      async startFormTrue (callback) {
+        this.loading = true
+        this.$refs['inputForm'].validate(async (valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+              this.$message.error('至少填写一条领用详情信息')
+              this.loading = false
+              return
+            } else {
+              let i = this.inputForm.detailInfos.length
+              for (let j = 0; j < i; j++) {
+                let k = j + 1
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].recipientAgent)) {
+                  this.$message.error('领用详情第' + k + '行请选择领用人')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].collectType)) {
+                  this.$message.error('领用详情第' + k + '行请选择领用类型')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].goodsName)) {
+                  this.$message.error('领用详情第' + k + '行请选择物品名称')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+                  this.$message.error('领用详情第' + k + '行请输入领用数量')
+                  this.loading = false
+                  return
+                }
+              }
+            }
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.inputForm.status = '2'
+            this.collectService.save(this.inputForm).then((data) => {
+              this.inputForm.id = data.businessId
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            }).catch(() => {
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            })
+          } else {
+            this.loading = false
+          }
+        })
+      },
+      // 通过
+      async agreeForm (callback) {
+        this.loading = true
+        this.$refs['inputForm'].validate(async (valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+              if (this.commonJS.isNotEmpty(data)) {
+                if (data === '仓库管理员审核') {
+                  this.inputForm.status = '5'
+                }
+              }
+              this.collectService.save(this.inputForm).then((data) => {
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
+              })
+            })
+          } else {
+            this.loading = false
+          }
+        })
+      },
+      // 修改状态
+      async updateStatusById (type, callback) {
+        this.loading = true
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.collectService.findById(this.inputForm.id).then((data) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.collectService.updateStatusById(param).then(() => {
+                    this.loading = false
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.collectService.findById(this.inputForm.id).then((data) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.collectService.updateStatusById(param).then(() => {
+                  this.loading = false
+                  callback()
+                })
+              }
+            })
+          }
+        }
+      },
+      // updateStatusById (type) {
+      //   if (type === 'reject') {
+      //     this.inputForm.status = '4'
+      //     this.collectService.updateStatusById(this.inputForm)
+      //   }
+      // },
+      // footerMethod ({ columns, data }) {
+      //   const footerData = [
+      //     columns.map((column, columnIndex) => {
+      //       if (columnIndex === 0) {
+      //         return '商品总价'
+      //       }
+      //       if (['priceSum'].includes(column.property)) {
+      //         // eslint-disable-next-line no-undef
+      //         this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+      //         return XEUtils.sum(data, column.property)
+      //       }
+      //       return null
+      //     })
+      //   ]
+      //   return footerData
+      // },
+      // twoDecimalPlaces (num, index) {
+      //   let str = num.toString()
+      //   var len1 = str.substr(0, 1)
+      //   var len2 = str.substr(1, 1)
+      //   // eslint-disable-next-line eqeqeq
+      //   if (str.length > 1 && len1 == 0 && len2 != '.') {
+      //     str = str.substr(1, 1)
+      //   }
+      //   // eslint-disable-next-line eqeqeq
+      //   if (len1 == '.') {
+      //     str = ''
+      //   }
+      //   // eslint-disable-next-line eqeqeq
+      //   if (str.indexOf('.') != -1) {
+      //     var str_ = str.substr(str.indexOf('.') + 1)
+      //     // eslint-disable-next-line eqeqeq
+      //     if (str_.indexOf('.') != -1) {
+      //       str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+      //     }
+      //     if (str_.length > 2) {
+      //       this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+      //       return (str = '')
+      //     }
+      //   }
+      //   // eslint-disable-next-line no-useless-escape
+      //   this.inputForm.detailInfos[index].priceSum = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+      // },
+      twoDecimalPlaces2 (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`领用数量小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      countAmount (row) {
+        let amount
+        let taxAmount
+        let count = 0
+        if (!this.commonJS.isEmpty(row.amount)) {
+          amount = parseFloat(row.amount)
+          count = count + amount
+        }
+        if (!this.commonJS.isEmpty(row.taxAmount)) {
+          taxAmount = parseFloat(row.taxAmount)
+          count = count + taxAmount
+        }
+        row.count = parseFloat(count).toFixed(2)
+      },
+      getProgram (rows) {
+        this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].projectName = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].reportNumber = rows[0].reportNo
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      // 领用类型下拉弹窗
+      typePullForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.materialTypePullForm.init()
+      },
+      getProgramForType (rows) {
+        this.inputForm.detailInfos[this.indexRow].collectTypeId = rows.id
+        this.inputForm.detailInfos[this.indexRow].collectType = rows.name
+        this.inputForm.detailInfos[this.indexRow].goodsName = ''
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      // 领用人下拉弹窗
+      userPullListForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.userPullForm.init()
+      },
+      getProgramForUser (rows) {
+        this.inputForm.detailInfos[this.indexRow].recipientAgentId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].recipientAgent = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].deptId = rows[0].parentId
+        this.inputForm.detailInfos[this.indexRow].recipientOffice = rows[0].officeName
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getUserInfo (rows) {
+      },
+      openPurchasePageForm (rowIndex, row) {
+        if (this.commonJS.isEmpty(row.collectType)) {
+          this.$message.error('请选择领用类型')
+          return
+        }
+        this.indexRow = rowIndex
+        this.$refs.purchasePageForm.init(row.collectTypeId)
+      },
+      getContract (row) {
+        this.inputForm.detailInfos[this.indexRow].surplusNumber = row.tradeNumber
+        this.inputForm.detailInfos[this.indexRow].goodsName = row.tradeName
+        // 去除重复的领用详情
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          console.log('进来了')
+          for (let k = j + 1; k < i; k++) {
+            if (this.inputForm.detailInfos[j].collectTypeId === this.inputForm.detailInfos[k].collectTypeId) {
+              if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].goodsName) &&
+                this.commonJS.isNotEmpty(this.inputForm.detailInfos[k].goodsName) && this.inputForm.detailInfos[j].goodsName === this.inputForm.detailInfos[k].goodsName) {
+                // parseFloat(item.account).toFixed(2)
+                this.inputForm.detailInfos.splice(k, 1)
+                this.$message.warning(`同种领用类型的商品名称只能输入一条信息!`)
+              }
+            }
+          }
+        }
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      // 值改变事件
+      changeValue () {
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].surplusNumber)) {
+            this.$message.error('请选择领用物品名称')
+            return
+          }
+          if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+            if (parseFloat(this.inputForm.detailInfos[j].surplusNumber) < parseFloat(this.inputForm.detailInfos[j].collectNumber)) {
+              this.$message.error('领用数量不能大于剩余数量')
+              this.inputForm.detailInfos[j].collectNumber = ''
+              return
+            }
+          }
+        }
+      }
+    }
+  }
+</script>

+ 666 - 0
src/views/materialManagement/collect/CollectList.vue

@@ -0,0 +1,666 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" v-if="searchVisible" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="领用编号" prop="collectNo">
+        <el-input v-model="searchForm.collectNo" placeholder="请输入领用编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="领用物品名称" prop="goodsName">
+        <el-input v-model="searchForm.goodsName" placeholder="请输入领用物品名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="经办人" prop="handledBy">
+        <UserSelect :limit='1' :modelValue="searchForm.handledBy" @update:modelValue='(value, label) => {searchForm.handledBy = value}'></UserSelect>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" prop="handledByOffice" label="经办人部门">
+        <SelectTree
+          ref="officeTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+          :url="`/system-server/sys/office/treeData?type=2`"
+          :value="searchForm.handledByOffice"
+		  size="default"
+          :accordion="true"
+          @getValue="(value) => {searchForm.handledByOffice=value}"/>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="领用时间" prop="collectDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
+          v-model="searchForm.collectDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="退回状态" prop="statusReturn">
+        <el-select v-model="searchForm.statusReturn" placeholder="请选择" style="width:100%;" clearable>
+          <el-option
+            v-for="item in $dictUtils.getDictList('cw_status')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('material:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+		  <template #tools>
+			  <vxe-button
+				  text
+				  type="primary"
+				  :title="searchVisible ? '收起检索' : '展开检索'"
+				  icon="vxe-icon-search"
+				  class="tool-btn"
+				  @click="searchVisible = !searchVisible"
+			  ></vxe-button>
+		  </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="领用编号" field="collectNo">
+            <template #default="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('material:list')" @click="view(scope.row.id)">{{scope.row.collectNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('material:list')"  @click="view(scope.row.id,)">{{scope.row.collectNo}}</el-link>
+              <span v-else>{{scope.row.collectNo}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160" align="center" title="领用物品名称" field="goodsName">
+            <template #default="scope">
+              <span v-if="commonJS.isEmpty(scope.row.detailId)" style="color: #F56C6C">领用物品已全部退回</span>
+              <span v-else>{{scope.row.goodsName}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160" align="center" title="经办人" field="handledByName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="经办人部门" field="handledByOfficeName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="领用时间" field="collectDate"></vxe-column>
+          <vxe-column  min-width="100px" align="center" fixed="right" title="状态" field="status" >
+            <template #default="scope">
+              <el-button  @click="detail(scope.row)" effect="dark"
+                          :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '')">
+                {{$dictUtils.getDictLabel("cw_status", scope.row.status, '')}}
+              </el-button>
+            </template>
+          </vxe-column>
+          <vxe-column  min-width="100px" align="center" fixed="right" title="退回状态" field="statusReturn" >
+            <template #default="scope">
+              <el-button  @click="detailReturn(scope.row)" effect="dark"
+                          :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.statusReturn, '')">
+                {{$dictUtils.getDictLabel("cw_status", scope.row.statusReturn, '未发起')}}
+              </el-button>
+            </template>
+          </vxe-column>
+
+          <vxe-column title="操作" width="220px" fixed="right" align="center">
+            <template  #default="scope">
+              <el-button v-if="hasPermission('material:edit')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" text type="primary"  size="small" @click="push(scope.row)">修改</el-button>
+              <el-button v-else-if="hasPermission('material:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" text type="primary"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('material:edit')&&scope.row.createBy === $store.state.user.id&&scope.row.status==='2'" text type="primary"  size="small" @click="reback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('material:del')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" text type="primary"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-else-if="hasPermission('material:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" text type="primary"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary"  size="small" @click="examine(scope.row)">审核</el-button>
+              <el-button v-if="hasPermission('material:edit')&&scope.row.status === '4'&&scope.row.createBy === $store.state.user.id" text type="primary"  size="small" @click="adjust(scope.row)">驳回调整</el-button>
+
+              <el-button v-if="hasPermission('material:edit')&&scope.row.status === '5'&&scope.row.createBy === $store.state.user.id && commonJS.isNotEmpty(scope.row.detailId) &&
+              (commonJS.isEmpty(scope.row.statusReturn) || scope.row.statusReturn === '0' || scope.row.statusReturn === '1' || scope.row.statusReturn === '3' || scope.row.statusReturn === '5')"
+						 text type="primary"  size="small" @click="returnPush(scope.row)">退回</el-button>
+              <el-button v-if="hasPermission('material:edit')&&scope.row.statusReturn === '2'&&scope.row.createBy === $store.state.user.id"
+						 text type="primary"  size="small" @click="rebackReturn(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('material:edit')&&scope.row.statusReturn === '3'&&scope.row.createBy === $store.state.user.id"
+						 text type="primary"  size="small" @click="returnRequest(scope.row)">取消申请</el-button>
+              <el-button v-if="scope.row.statusReturn==='2' && checkIsAuditReturn(scope.row)"
+						 text type="primary"  size="small" @click="examineReturn(scope.row)">退回审核</el-button>
+              <el-button v-if="hasPermission('material:edit')&&scope.row.statusReturn === '4'&&scope.row.createBy === $store.state.user.id"
+						 text type="primary"  size="small" @click="adjustReturn(scope.row)">驳回调整</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+        <UpdateCollectInfoForm ref="updateCollectInfoForm" @refreshList="refreshList"></UpdateCollectInfoForm>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import UserSelect from '@/components/userSelect'
+  import CollectService from '@/api/materialManagement/CollectService'
+  import UpdateCollectInfoForm from './UpdateCollectInfoForm'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import taskService from '@/api/flowable/taskService'
+  import processService from '@/api/flowable/processService'
+  import pick from 'lodash.pick'
+  import userService from '@/api/sys/userService'
+  export default {
+    data () {
+      return {
+		  searchVisible: true,
+        showHideItem: false,
+        showHideIcon: 'el-icon-arrow-down',
+        showHideName: '展示',
+        num: 0,
+        searchForm: {
+          handledBy: '',
+          handledByOffice: '',
+          collectNo: '',
+          goodsName: '',
+          collectDates: [],
+          statusReturn: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: '',
+        processDefinitionAuditIdReturn: '',
+        procDefAuditKeyReturn: ''
+      }
+    },
+    collectService: null,
+    created () {
+      this.collectService = new CollectService()
+    },
+    components: {
+      UserSelect,
+      SelectTree,
+      UpdateCollectInfoForm
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      showHide () {
+        if (this.showHideItem === false) {
+          this.showHideItem = true
+          this.showHideIcon = 'el-icon-arrow-up'
+          this.showHideName = '隐藏'
+        } else {
+          this.showHideItem = false
+          this.showHideIcon = 'el-icon-arrow-down'
+          this.showHideName = '展示'
+        }
+      },
+      // 新增
+      add () {
+        // this.$refs.reportManagementForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.updateCollectInfoForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.updateCollectInfoForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.collectService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('物资管理-领用申请').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+        processService.getByName('物资管理-领用退回申请').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditIdReturn = data.id
+            this.procDefAuditKeyReturn = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.collectService.remove(ids).then((data) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【领用申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [领用申请]`
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/materialManagement/collect/CollectList'
+              }
+            })
+          })
+      },
+      // 发起领用申请
+      push (row) {
+        // 读取流程表单
+        let title = `发起流程【领用申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[领用申请]`
+        let status = 'startAndHold'
+        if (row.status === '3') {
+          status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
+        }
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          businessId: row.id,
+          businessTable: 'material_management_collect_basics'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'material_management_collect_basics',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/materialManagement/collect/CollectList'
+              }
+            })
+          })
+      },
+      // 查看客户登记流程结果
+      detail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                isShow: 'false',
+                readOnly: true,
+                title: '领用申请' + '流程详情',
+                formTitle: '领用申请' + '流程详情',
+                businessId: row.id,
+                status: 'reback'
+              }
+            })
+          })
+        }
+      },
+      // 撤回报告流程
+      reback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.collectService.findById(row.id).then((data) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              processService.revokeProcIns(row.procInsId).then((data) => {
+                let form = {status: '3', id: row.id}
+                this.collectService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+          // await this.reportCancellApplyService.queryById(row.id).then((data) => {
+          //   if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+          //     this.$message.error('数据已发生改变或不存在,请刷新数据')
+          //     this.refreshList()
+          //   } else {
+          //     processService.revokeProcIns(row.procInsId).then((data) => {
+          //       let form = {status: '3', id: row.id}
+          //       this.reportCancellApplyService.updateStatusById(form)
+          //       this.$message.success(data)
+          //       this.refreshList()
+          //     })
+          //   }
+          // })
+        })
+      },
+      // 驳回后调整
+      adjust (row) {
+        this.collectService.findById(row.id).then((data) => {
+          if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todo(row)
+          }
+        })
+      },
+      // 审核
+      examine (row) {
+        this.collectService.findById(row.id).then((data) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todo(row)
+          }
+        })
+      },
+      // 审核或重新调整跳转
+      todo (row) {
+        let cUser = false
+        taskService.getTaskDefInfo({
+          taskId: row.taskId
+        }).then((data) => {
+          this.$router.push({
+            path: '/flowable/task/TaskForm',
+            query: {
+              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+              isShow: false,
+              formReadOnly: true,
+              formTitle: `${data.taskName}`,
+              cUser: cUser,
+              title: `审批【${data.taskName || ''}】`,
+              routePath: '/materialManagement/collect/CollectList'   // 数据处理后需要跳转的页面路径
+            }
+          })
+        })
+      },
+      // 查询当前登录人是否是数据的审核人
+      checkIsAudit (row) {
+        let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+        if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+          for (const userId of row.auditUserIds) {
+            if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+              return true
+            }
+          }
+        }
+        return false
+      },
+      // 发起领用-退回申请
+      async returnPush (row) {
+        if (this.commonJS.isEmpty(row.returnId)) {
+          this.loading = true
+          // 由于退回数据表中没有数据,需要生成一条默认数据
+          let resp = await this.collectService.createReturnData({id: row.id})
+          if (resp) {
+            this.loading = false
+            row.returnId = resp.returnId
+            this.returnPushTrue(row)
+          } else {
+            this.loading = false
+            this.$message.error('无法退回数据,联系管理员解决')
+          }
+        } else {
+          this.returnPushTrue(row)
+        }
+      },
+      returnPushTrue (row) {
+        // 读取流程表单
+        let title = `发起流程【领用-退回申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[领用-退回申请]`
+        let status = 'startAndHold'
+        if (row.statusReturn === '3') {
+          status = 'startAndClose'
+        } else if (row.statusReturn === '4') {
+          status = 'reapplyFlag'
+        }
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditIdReturn,
+          businessId: row.returnId,
+          businessTable: 'material_management_collect_basics_return'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditIdReturn,
+                procDefKey: this.procDefAuditKeyReturn,
+                title: title,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'material_management_collect_basics_return',
+                businessId: row.returnId,
+                isShow: 'false',
+                status: status,
+                routePath: '/materialManagement/collect/CollectList',
+                returnId: row.returnId
+              }
+            })
+          })
+      },
+      detailReturn (row) {
+        if (this.commonJS.isNotEmpty(row.statusReturn) && row.statusReturn !== '0' && row.statusReturn !== '1') {
+          // eslint-disable-next-line eqeqeq
+          taskService.getTaskDef({
+            procInsId: row.procInsIdReturn,
+            procDefId: this.processDefinitionAuditIdReturn
+          }).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                isShow: 'false',
+                readOnly: true,
+                title: '领用-退回申请' + '流程详情',
+                formTitle: '领用-退回申请' + '流程详情',
+                businessId: row.returnId,
+                status: 'reback',
+                returnId: row.returnId
+              }
+            })
+          })
+        }
+      },
+      // 撤回退回流程
+      rebackReturn (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.collectService.findById(row.id).then((data) => {
+            if (data.statusReturn !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              processService.revokeProcIns(row.procInsIdReturn).then((data) => {
+                let form = {status: '3', id: row.id}
+                this.collectService.updateStatusByIdReturn(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
+      },
+      returnRequest (row) {
+        this.$confirm(`确定要取消该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.collectService.findById(row.id).then((data) => {
+            if (data.statusReturn !== '3') { // status的值不等于“已撤回”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              this.collectService.returnRequest({id: row.id}).then((data) => {
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
+      },
+      // 驳回后调整
+      adjustReturn (row) {
+        this.collectService.findById(row.id).then((data) => {
+          if (data.statusReturn !== '4') { // status的值不等于“驳回”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todoReturn(row)
+          }
+        })
+      },
+      // 审核
+      examineReturn (row) {
+        this.collectService.findById(row.id).then((data) => {
+          if (data.statusReturn !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todoReturn(row)
+          }
+        })
+      },
+      // 审核或重新调整跳转
+      todoReturn (row) {
+        let cUser = false
+        taskService.getTaskDefInfo({
+          taskId: row.taskIdReturn
+        }).then((data) => {
+          this.$router.push({
+            path: '/flowable/task/TaskForm',
+            query: {
+              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+              isShow: false,
+              formReadOnly: true,
+              formTitle: `${data.taskName}`,
+              cUser: cUser,
+              title: `审批【${data.taskName || ''}】`,
+              routePath: '/materialManagement/collect/CollectList'   // 数据处理后需要跳转的页面路径
+            }
+          })
+        })
+      },
+      // 查询当前登录人是否是数据的审核人
+      checkIsAuditReturn (row) {
+        let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+        if (this.commonJS.isNotEmpty(row.auditUserIdsReturn)) {
+          for (const userId of row.auditUserIdsReturn) {
+            if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+              return true
+            }
+          }
+        }
+        return false
+      }
+    }
+  }
+</script>

+ 842 - 0
src/views/materialManagement/collect/CollectReturnForm.vue

@@ -0,0 +1,842 @@
+<template>
+  <div>
+    <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+             label-width="100px" @submit.native.prevent>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+      <el-row :gutter="26">
+        <el-col :span="12">
+          <el-form-item label="领用编号" prop="collectNo">
+            <el-input placeholder="自动生成" v-model="inputForm.collectNo" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="经办人" prop="handledBy">
+            <el-input v-model="inputForm.handledBy" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="经办人部门" prop="handledByOffice">
+            <SelectTree
+              :disabled="true"
+              ref="officeTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+              :url="`/system-server/sys/office/treeData?type=2`"
+              :value="inputForm.handledByOffice"
+              :accordion="true"
+              size="default"
+              @getValue="(value) => {inputForm.handledByOffice=value}"/>
+<!--            <el-input v-model="inputForm.handledByOffice" :disabled="true"></el-input>-->
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="领用时间" prop="collectDate" :rules="[{required: true, message:'请选择领用时间', trigger:'blur'}]">
+            <el-date-picker
+              :disabled="true"
+              v-model="inputForm.collectDate"
+              type="date"
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks">
+            <el-input v-model="inputForm.remarks"
+                      type="textarea"
+                      :rows="5"
+                      maxlength="500"
+                      placeholder="请填写备注信息"
+                      :disabled="true"
+                      show-word-limit>
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i>
+        领用详情
+      </el-divider>
+      <el-row  :gutter="15" >
+        <el-col :span="24">
+			<vxe-table
+				border
+				show-footer
+				show-overflow
+				ref="detailTable"
+				class="vxe-table-element"
+				:data="inputForm.detailInfos"
+				style="margin-left: 5em"
+				:row-class-name="rowClassName"
+			>
+				<vxe-table-column field="recipientAgent" title="领用人" align="center">
+					<template #default="scope">
+						<span>{{scope.row.recipientAgent}}</span><span v-if="scope.row.isReturn === '1'">(已退回)</span>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="recipientOffice" title="领用人部门" align="center"></vxe-table-column>
+				<vxe-table-column field="collectType" title="领用类型" align="center"></vxe-table-column>
+				<vxe-table-column field="goodsName" title="物品名称" align="center"></vxe-table-column>
+				<vxe-table-column field="collectNumber" title="领用数量" align="center"></vxe-table-column>
+				<vxe-table-column v-if="status === 'audit'" field="surplusNumber" title="库存数量" align="center"></vxe-table-column>
+				<vxe-table-column field="company" title="单位" align="center"></vxe-table-column>
+				<vxe-table-column field="remarks" title="备注" align="center"></vxe-table-column>
+				<vxe-table-column title="操作" width="170" align="center">
+					<template v-slot="scope">
+						<el-button size="small" type="primary" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">附件</el-button>
+						<el-button size="small" type="primary" v-if="scope.row.isReturn === '0' && status !== 'audit' && status !== 'taskFormDetail'" @click="returnCollect(scope.$rowIndex)">退回</el-button>
+						<el-button size="small" type="primary" v-if="scope.row.isReturn === '1' && status !== 'audit' && status !== 'taskFormDetail'" @click="cancelReturn(scope.$rowIndex)">取消退回</el-button>
+					</template>
+				</vxe-table-column>
+			</vxe-table>
+		</el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="24" style="margin-top: 20px">
+          <el-form-item label="退回原因" prop="returnCause" :rules="[{required: true, message: '退回原因不能为空', trigger: 'blur'}]">
+            <el-input v-model="inputForm.returnCause"
+                      type="textarea"
+                      :rows="5"
+                      maxlength="500"
+                      placeholder="请填写退回原因"
+                      show-word-limit>
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+    <PurchasePageForm  ref="purchasePageForm" @getProject="getContract"></PurchasePageForm>
+    <!-- 附件 -->
+    <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
+    <MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
+    <UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
+  </div>
+</template>
+
+<script>
+  import MaterialManagementDialog from '../file/MaterialManagementDialog'
+  import CollectService from '@/api/materialManagement/CollectService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
+  import MaterialTypePullForm from '../info/MaterialTypePullForm'
+  import UserPullForm from '@/views/finance/invoice/UserPullForm'
+  import PurchasePageForm from './PurchasePageForm'
+  import CommonApi from '@/api/cw/common/CommonApi'
+  export default {
+    data () {
+      return {
+        validRules: {
+          recipientAgent: [
+            {required: true, message: '领用人不能为空'}
+          ],
+          recipientOffice: [
+            {required: true, message: '领用人部门不能为空'}
+          ],
+          collectType: [
+            {required: true, message: '领用类型不能为空'}
+          ],
+          goodsName: [
+            {required: true, message: '物品名称不能为空'}
+          ],
+          collectNumber: [
+            {required: true, message: '领用数量不能为空'}
+          ]
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        indexRow: '',
+        inputForm: {
+          fileInfoLost: [],
+          handledByOffice: '',
+          handledBy: '',
+          handledById: '',
+          collectNo: '', // 领用编号
+          userId: '',
+          collectDate: '',
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [], // 附件信息
+          procInsId: '',
+          statusReturn: '',
+          procInsIdReturn: '',
+          processDefinitionIdReturn: '',
+          returnId: '',
+          returnCause: '',
+          returnFiles: []
+        },
+        keyWatch: ''
+      }
+    },
+    collectService: null,
+    commonApi: null,
+    created () {
+      this.collectService = new CollectService()
+      this.commonApi = new CommonApi()
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      MaterialManagementDialog,
+      UpLoadComponent,
+      SelectTree,
+      CwProgramPageForm,
+      MaterialTypePullForm,
+      UserPullForm,
+      PurchasePageForm
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      },
+      name () {
+        return this.$store.state.user.name
+      },
+      officeName () {
+        return this.$store.state.user.office.name
+      },
+      userId () {
+        return this.$store.state.user.id
+      },
+      recipientAgentId () {
+        return this.$store.state.user.id
+      },
+      collectTypeId () {
+        return ''
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      },
+      'loading': {
+        handler (newVal) {
+          this.$emit('changeLoading', newVal)
+          this.$refs.uploadComponent.changeLoading(newVal)
+        }
+      }
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          fileInfoLost: [],
+          handledByOffice: '',
+          handledBy: this.$store.state.user.name,
+          handledById: this.$store.state.user.id,
+          collectNo: '', // 领用编号
+          userId: this.$store.state.user.id,
+          collectDate: new Date(),
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [], // 附件信息
+          procInsId: '',
+          statusReturn: '',
+          procInsIdReturn: '',
+          processDefinitionIdReturn: '',
+          returnId: '',
+          returnCause: '',
+          returnFiles: []
+        }
+        if (method === 'add') {
+          this.title = `新建领用类型`
+        } else if (method === 'edit') {
+          this.title = '修改领用类型'
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+            this.inputForm.handledByOffice = this.$store.state.user.office.id
+          }
+          if (this.status === 'audit' || this.status === 'taskFormDetail') {
+            method = 'view'
+          } else {
+            method = 'edit'
+          }
+          this.loading = true
+          this.$refs.inputForm.resetFields()
+          this.collectService.findByReturnId(this.inputForm.id).then((data) => {
+            this.$refs.uploadComponent.clearUpload()
+            if (this.inputForm.id !== 'false') {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+                this.inputForm.handledByOffice = this.$store.state.user.office.id
+              }
+              if (this.commonJS.isNotEmpty(data.recipientAgentId)) {
+                this.recipientAgentId = data.recipientAgentId
+              }
+              if (this.commonJS.isNotEmpty(data.collectTypeId)) {
+                this.collectTypeId = data.collectTypeId
+              }
+              if (this.commonJS.isNotEmpty(this.inputForm.detailInfos)) {
+                let i = this.inputForm.detailInfos.length
+                for (let j = 0; j < i; j++) {
+                  if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+                    if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+                      this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
+                    }
+                  }
+                }
+              }
+              console.log(this.inputForm, data)
+              if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
+                this.inputForm.returnFiles = []
+              }
+              this.$refs.uploadComponent.newUpload(method, this.inputForm.returnFiles, 'collect_return')
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            } else {
+              if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+                this.inputForm.handledByOffice = this.$store.state.user.office.id
+              }
+              if (this.commonJS.isEmpty(this.inputForm.handledBy)) {
+                this.inputForm.handledBy = this.$store.state.user.name
+              }
+              if (this.commonJS.isEmpty(this.inputForm.handledById)) {
+                this.inputForm.handledById = this.$store.state.user.id
+              }
+              if (this.commonJS.isEmpty(this.inputForm.collectDate)) {
+                this.inputForm.collectDate = new Date()
+              }
+              this.inputForm.detailInfos = []
+              this.loading = false
+            }
+          })
+        })
+      },
+      getUpload (p, index) {
+        p.then((list) => {
+          // list为返回数据
+          this.inputForm.detailInfos[index].fileInfoLost = list
+          this.inputForm.detailInfos[index].fileNumber = list.length
+          this.tableKeyClient = Math.random()
+        })
+      },
+      seeFileInfo (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload('view', this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      sss (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload(null, this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            this.inputForm.id = this.businessId
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.collectService.save(this.inputForm).then((data) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.inputForm.detailInfos = []
+        // this.inputForm.amountInfos = []
+        this.$refs.uploadComponent.clearUpload()
+
+        this.visible = false
+        this.$refs.inputForm.resetFields()
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'detail') {
+          this.$refs.detailTable.remove(row)
+          this.inputForm.detailInfos.splice(rowIndex, 1)
+        }
+        if (type === 'amount') {
+          this.$refs.amountTable.remove(row)
+          // this.inputForm.amountInfos.splice(rowIndex, 1)
+        }
+      },
+      // 新增
+      async insertEvent (type) {
+        if (type === 'detail') {
+          await this.$refs.detailTable.insert().then((data) => {
+            data.recipientAgent = this.$store.state.user.name
+            data.recipientAgentId = this.recipientAgentId
+            data.recipientOffice = this.officeName
+            this.inputForm.detailInfos.push(data)
+          })
+        }
+        if (type === 'amount') {
+          await this.$refs.amountTable.insert().then((data) => {
+            // this.inputForm.amountInfos.push(data)
+          })
+        }
+      },
+      reapplyForm (callback) {
+        this.loading = true
+        this.collectService.findById(this.inputForm.id).then((data) => {
+          if (data.statusReturn !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startFormTrue(callback)
+          }
+        })
+      },
+      startForm (callback) {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+          this.collectService.findById(this.inputForm.id).then((data) => {
+            // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+            if (this.commonJS.isNotEmpty(data.statusReturn) && data.statusReturn !== '0' && data.statusReturn !== '1' && data.statusReturn !== '3' && data.statusReturn !== '5') {
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.startFormTrue(callback)
+            }
+          })
+        } else {
+          this.startFormTrue(callback)
+        }
+      },
+      // 暂存
+      async saveForm (callback) {
+        this.loading = true
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          return
+        }
+        if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
+          this.inputForm.returnFiles = []
+        }
+        this.inputForm.returnFiles = this.$refs.uploadComponent.getDataList()
+        this.inputForm.statusReturn = '1'
+        this.collectService.saveReturn(this.inputForm).then((data) => {
+          callback()
+          this.$refs.inputForm.resetFields()
+          this.loading = false
+        }).catch(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = false
+        })
+      },
+      // 送审
+      async startFormTrue (callback) {
+        this.loading = true
+        this.$refs['inputForm'].validate(async (valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
+              this.inputForm.returnFiles = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+              this.$message.error('至少填写一条领用详情信息')
+              this.loading = false
+              return
+            } else {
+              let i = this.inputForm.detailInfos.length
+              for (let j = 0; j < i; j++) {
+                let k = j + 1
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].recipientAgent)) {
+                  this.$message.error('领用详情第' + k + '行请选择领用人')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].collectType)) {
+                  this.$message.error('领用详情第' + k + '行请选择领用类型')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].goodsName)) {
+                  this.$message.error('领用详情第' + k + '行请选择物品名称')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+                  this.$message.error('领用详情第' + k + '行请输入领用数量')
+                  this.loading = false
+                  return
+                }
+              }
+            }
+            this.inputForm.returnFiles = this.$refs.uploadComponent.getDataList()
+            this.inputForm.statusReturn = '2'
+            this.collectService.saveReturn(this.inputForm).then((data) => {
+              this.inputForm.id = data.businessId
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            }).catch(() => {
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            })
+          } else {
+            this.loading = false
+          }
+        })
+      },
+      // 通过
+      async agreeForm (callback) {
+        this.loading = true
+        this.$refs['inputForm'].validate(async (valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
+              this.inputForm.returnFiles = []
+            }
+            this.inputForm.returnFiles = this.$refs.uploadComponent.getDataList()
+            // this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+            //   if (this.commonJS.isNotEmpty(data)) {
+            //     if (data === '仓库管理员审核') {
+            //       this.inputForm.status = '5'
+            //     }
+            //   }
+            //   this.collectService.save(this.inputForm).then((data) => {
+            //     callback(data.businessTable, data.businessId, this.inputForm)
+            //     this.loading = false
+            //   }).catch(() => {
+            //     this.loading = false
+            //   })
+            // })
+            this.inputForm.statusReturn = '5'
+            this.collectService.saveReturnAgree(this.inputForm).then((data) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          } else {
+            this.loading = false
+          }
+        })
+      },
+      // 修改状态
+      async updateStatusById (type, callback) {
+        this.loading = true
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.collectService.findById(this.inputForm.id).then((data) => {
+              if (data.statusReturn !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.statusReturn = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.statusReturn = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.statusReturn, id: this.inputForm.id}
+                  this.collectService.updateStatusByIdReturn(param).then(() => {
+                    this.loading = false
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.collectService.findById(this.inputForm.id).then((data) => {
+              if (data.statusReturn !== '4') { // status的值不等于“驳回”就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                this.collectService.returnRequest({id: this.inputForm.id}).then((data) => {
+                  this.loading = false
+                  callback()
+                })
+                // 终止
+                // let param = {status: '0', id: this.inputForm.id}
+                // this.collectService.updateStatusByIdReturn(param).then(() => {
+                //   this.loading = false
+                //   callback()
+                // })
+              }
+            })
+          }
+        }
+      },
+      // updateStatusById (type) {
+      //   if (type === 'reject') {
+      //     this.inputForm.status = '4'
+      //     this.collectService.updateStatusById(this.inputForm)
+      //   }
+      // },
+      // footerMethod ({ columns, data }) {
+      //   const footerData = [
+      //     columns.map((column, columnIndex) => {
+      //       if (columnIndex === 0) {
+      //         return '商品总价'
+      //       }
+      //       if (['priceSum'].includes(column.property)) {
+      //         // eslint-disable-next-line no-undef
+      //         this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+      //         return XEUtils.sum(data, column.property)
+      //       }
+      //       return null
+      //     })
+      //   ]
+      //   return footerData
+      // },
+      // twoDecimalPlaces (num, index) {
+      //   let str = num.toString()
+      //   var len1 = str.substr(0, 1)
+      //   var len2 = str.substr(1, 1)
+      //   // eslint-disable-next-line eqeqeq
+      //   if (str.length > 1 && len1 == 0 && len2 != '.') {
+      //     str = str.substr(1, 1)
+      //   }
+      //   // eslint-disable-next-line eqeqeq
+      //   if (len1 == '.') {
+      //     str = ''
+      //   }
+      //   // eslint-disable-next-line eqeqeq
+      //   if (str.indexOf('.') != -1) {
+      //     var str_ = str.substr(str.indexOf('.') + 1)
+      //     // eslint-disable-next-line eqeqeq
+      //     if (str_.indexOf('.') != -1) {
+      //       str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+      //     }
+      //     if (str_.length > 2) {
+      //       this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+      //       return (str = '')
+      //     }
+      //   }
+      //   // eslint-disable-next-line no-useless-escape
+      //   this.inputForm.detailInfos[index].priceSum = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+      // },
+      twoDecimalPlaces2 (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`领用数量小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      countAmount (row) {
+        let amount
+        let taxAmount
+        let count = 0
+        if (!this.commonJS.isEmpty(row.amount)) {
+          amount = parseFloat(row.amount)
+          count = count + amount
+        }
+        if (!this.commonJS.isEmpty(row.taxAmount)) {
+          taxAmount = parseFloat(row.taxAmount)
+          count = count + taxAmount
+        }
+        row.count = parseFloat(count).toFixed(2)
+      },
+      getProgram (rows) {
+        this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].projectName = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].reportNumber = rows[0].reportNo
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      // 领用类型下拉弹窗
+      typePullForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.materialTypePullForm.init()
+      },
+      getProgramForType (rows) {
+        this.inputForm.detailInfos[this.indexRow].collectTypeId = rows.id
+        this.inputForm.detailInfos[this.indexRow].collectType = rows.name
+        this.inputForm.detailInfos[this.indexRow].goodsName = ''
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      // 领用人下拉弹窗
+      userPullListForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.userPullForm.init()
+      },
+      getProgramForUser (rows) {
+        this.inputForm.detailInfos[this.indexRow].recipientAgentId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].recipientAgent = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].deptId = rows[0].parentId
+        this.inputForm.detailInfos[this.indexRow].recipientOffice = rows[0].officeName
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getUserInfo (rows) {
+      },
+      openPurchasePageForm (rowIndex, row) {
+        if (this.commonJS.isEmpty(row.collectType)) {
+          this.$message.error('请选择领用类型')
+          return
+        }
+        this.indexRow = rowIndex
+        this.$refs.purchasePageForm.init(row.collectTypeId)
+      },
+      getContract (row) {
+        this.inputForm.detailInfos[this.indexRow].surplusNumber = row.tradeNumber
+        this.inputForm.detailInfos[this.indexRow].goodsName = row.tradeName
+        // 去除重复的领用详情
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          for (let k = j + 1; k < i; k++) {
+            if (this.inputForm.detailInfos[j].collectTypeId === this.inputForm.detailInfos[k].collectTypeId) {
+              if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].goodsName) &&
+                this.commonJS.isNotEmpty(this.inputForm.detailInfos[k].goodsName) && this.inputForm.detailInfos[j].goodsName === this.inputForm.detailInfos[k].goodsName) {
+                // parseFloat(item.account).toFixed(2)
+                this.inputForm.detailInfos.splice(k, 1)
+                this.$message.warning(`同种领用类型的商品名称只能输入一条信息!`)
+              }
+            }
+          }
+        }
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      // 值改变事件
+      changeValue () {
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].surplusNumber)) {
+            this.$message.error('请选择领用物品名称')
+            return
+          }
+          if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+            if (parseFloat(this.inputForm.detailInfos[j].surplusNumber) < parseFloat(this.inputForm.detailInfos[j].collectNumber)) {
+              this.$message.error('领用数量不能大于剩余数量')
+              this.inputForm.detailInfos[j].collectNumber = ''
+              return
+            }
+          }
+        }
+      },
+      // 退回
+      returnCollect (index) {
+        this.inputForm.detailInfos[index].isReturn = '1'
+      },
+      // 取消退回
+      cancelReturn (index) {
+        this.inputForm.detailInfos[index].isReturn = '0'
+      },
+      // 列表行颜色
+      rowClassName ({ row, rowIndex }) {
+        if (row.isReturn === '1') { // 退回
+          return 'row-grey'
+        } else {
+          return ''
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+  /deep/  .row-green {
+    /*background-color: #67c23ad1;*/
+    /*color: #fff;*/
+    font-weight: bold;
+  }
+  /deep/  .row-grey {
+    background-color: #b8b7b7;
+    color: #fff;
+  }
+  /deep/  .row-red {
+    background-color: #f56c6c66;
+    /*color: #fff;*/
+    font-weight: bold;
+  }
+</style>

+ 166 - 0
src/views/materialManagement/collect/PurchasePageForm.vue

@@ -0,0 +1,166 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择商品"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="商品名称" prop="tradeName">
+            <el-input v-model="searchForm.tradeName" placeholder="请输入商品名称" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="radio" width="60px"></vxe-column>
+          <vxe-column min-width="230" align="center" title="商品名称" field="tradeName"></vxe-column>
+<!--          <vxe-column min-width="230" align="center" title="商品数量" field="tradeNumber"></vxe-column>-->
+
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProject()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  // import CollectService from '@/api/materialManagement/CollectService'
+  import WareHouseService from '@/api/materialManagement/WareHouseService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          wareHouseType: '',
+          tradeName: ''
+        },
+        typeTest: ''
+      }
+    },
+    // collectService: null,
+    wareHouseService: null,
+    created () {
+      // this.collectService = new CollectService()
+      this.wareHouseService = new WareHouseService()
+    },
+    components: {
+    },
+    methods: {
+      init (collectType) {
+        this.visible = true
+        this.typeTest = collectType
+        this.list()
+      },
+      // 表单提交
+      getProject () {
+        let row = this.$refs.projectTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getProject', row)
+      },
+      list () {
+        this.loading = true
+        // this.searchForm.createId = this.$store.state.user.id
+        // this.searchForm.status = '5'
+        this.searchForm.wareHouseType = this.typeTest
+        // this.collectService.wareHouseList({
+        //   'current': this.tablePage.currentPage,
+        //   'size': this.tablePage.pageSize,
+        //   'orders': this.tablePage.orders,
+        //   ...this.searchForm
+        // }).then((data) => {
+        //   this.dataList = data.records
+        //   this.tablePage.total = data.total
+        //   this.loading = false
+        // })
+        this.wareHouseService.wareHouseSummaryList({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
+        this.typeTest = ''
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 558 - 0
src/views/materialManagement/collect/UpdateCollectInfoForm.vue

@@ -0,0 +1,558 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      v-model="visible">
+      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="100px" @submit.native.prevent>
+
+        <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+        <el-row :gutter="26">
+          <el-col :span="12">
+            <el-form-item label="领用编号" prop="collectNo">
+              <el-input placeholder="自动生成" v-model="inputForm.collectNo" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="经办人" prop="handledBy">
+              <el-input v-model="inputForm.handledBy" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="经办人部门" prop="handledByOffice">
+              <SelectTree
+                :disabled="true"
+                ref="officeTree"
+                :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+                :url="`/system-server/sys/office/treeData?type=2`"
+                :value="inputForm.handledByOffice"
+                :accordion="true"
+                size="default"
+                @getValue="(value) => {inputForm.handledByOffice=value}"/>
+              <!--            <el-input v-model="inputForm.handledByOffice" :disabled="true"></el-input>-->
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="领用时间" prop="collectDate" :rules="[{required: true, message:'请选择领用时间', trigger:'blur'}]">
+              <el-date-picker
+                v-model="inputForm.collectDate"
+                type="date"
+                value-format="YYYY-MM-DD"
+                style="width: 100%"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="inputForm.remarks"
+                        type="textarea"
+                        :rows="5"
+                        maxlength="500"
+                        placeholder="请填写备注信息"
+                        show-word-limit>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+<!--method==='view' || this.formReadOnly-->
+        <el-divider content-position="left"><i class="el-icon-document"></i>
+          领用详情
+          <el-button style="margin-left: 20px" type="primary" :disabled="true" @click="insertEvent('detail')" plain>
+            新增
+          </el-button>
+        </el-divider>
+        <el-row  :gutter="15" >
+          <el-col :span="24">
+			  <vxe-table
+				  border
+				  show-footer
+				  show-overflow
+				  ref="detailTable"
+				  class="vxe-table-element"
+				  :data="inputForm.detailInfos"
+				  style="margin-left: 5em"
+				  highlight-current-row
+				  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
+				  :edit-rules="validRules"
+			  >
+				  <vxe-table-column field="recipientAgent" title="领用人" :edit-render="{}" :rules="[{required: true, message:'请选择领用人', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.recipientAgent" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column field="recipientOffice" title="领用人部门" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.recipientOffice" ></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column field="collectType" title="领用类型" :edit-render="{}" :rules="[{required: true, message:'请选择领用类型', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.collectType" @focus="typePullForm(scope.$rowIndex)"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column field="goodsName" title="物品名称" :edit-render="{}" :rules="[{required: true, message:'请填写物品名称', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.goodsName" @focus="openPurchasePageForm(scope.$rowIndex, scope.row)"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <!--            <vxe-table-column field="surplusNumber" title="剩余数量" :edit-render="{}">-->
+				  <!--              <template v-slot:edit="scope">-->
+				  <!--                <el-input :disabled="true" v-model="scope.row.surplusNumber" maxlength="10"></el-input>-->
+				  <!--              </template>-->
+				  <!--            </vxe-table-column>-->
+				  <vxe-table-column field="collectNumber" title="领用数量" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.collectNumber" @blur="scope.row.collectNumber = twoDecimalPlaces2(scope.row.collectNumber)" maxlength="10"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.company"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column field="remarks" title="备注" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.remarks" ></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column title="操作" width="180">
+					  <template v-slot="scope">
+						  <!--                <el-button :disabled='true' type="danger" v-if="method!=='view'" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>-->
+						  <!--                <el-button :disabled='true' type="primary" v-if="method!=='view'" @click="sss(scope.$rowIndex)">上传附件</el-button>-->
+						  <vxe-button status="primary" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
+					  </template>
+				  </vxe-table-column>
+			  </vxe-table>
+		  </el-col>
+        </el-row>
+
+      </el-form>
+      <PurchasePageForm  ref="purchasePageForm" @getProject="getContract"></PurchasePageForm>
+      <!-- 附件 -->
+      <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
+      <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+      <CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
+      <MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
+      <UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import PurchasePageForm from './PurchasePageForm'
+  import CollectService from '@/api/materialManagement/CollectService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import MaterialManagementDialog from '../file/MaterialManagementDialog'
+  import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
+  import MaterialTypePullForm from '../info/MaterialTypePullForm'
+  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import UserPullForm from '@/views/finance/invoice/UserPullForm'
+  export default {
+    data () {
+      return {
+        validRules: {
+          recipientAgent: [
+            {required: true, message: '领用人不能为空'}
+          ],
+          recipientOffice: [
+            {required: true, message: '领用人部门不能为空'}
+          ],
+          collectType: [
+            {required: true, message: '领用类型不能为空'}
+          ],
+          goodsName: [
+            {required: true, message: '物品名称不能为空'}
+          ],
+          collectNumber: [
+            {required: true, message: '领用数量不能为空'}
+          ]
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          sign: '', // 管理员修改标记
+          fileInfoLost: [],
+          handledByOffice: '',
+          handledBy: '',
+          handledById: '',
+          collectNo: '', // 领用编号
+          userId: '',
+          collectDate: '',
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [] // 附件信息
+        }
+      }
+    },
+    CollectService: null,
+    MaterialManagementService: null,
+    created () {
+      this.collectService = new CollectService()
+      this.materialManagementService = new MaterialManagementService()
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      SelectTree,
+      MaterialTypePullForm,
+      CwProgramPageForm,
+      MaterialManagementDialog,
+      UpLoadComponent,
+      UserPullForm,
+      PurchasePageForm
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      },
+      name () {
+        return this.$store.state.user.name
+      },
+      officeName () {
+        return this.$store.state.user.office.name
+      },
+      userId () {
+        return this.$store.state.user.id
+      },
+      recipientAgentId () {
+        return this.$store.state.user.id
+      },
+      collectTypeId () {
+        return ''
+      }
+    },
+    methods: {
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          sign: '', // 管理员修改标记
+          fileInfoLost: [],
+          handledByOffice: '',
+          handledBy: this.$store.state.user.name,
+          handledById: this.$store.state.user.id,
+          collectNo: '', // 领用编号
+          userId: this.$store.state.user.id,
+          collectDate: new Date(),
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [] // 附件信息
+        }
+        if (method === 'add') {
+          this.title = `新建领用类型`
+        } else if (method === 'edit') {
+          this.inputForm.id = id
+          this.title = '修改领用类型'
+        } else if (method === 'view') {
+          this.inputForm.id = id
+          this.title = '查看领用类型'
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.$refs.inputForm.resetFields()
+            this.collectService.findById(this.inputForm.id).then((data) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+                this.inputForm.handledByOffice = this.$store.state.user.office.id
+              }
+              if (this.commonJS.isNotEmpty(data.collectDate)) {
+                this.inputForm.collectDate = data.collectDate
+              }
+              if (this.commonJS.isNotEmpty(data.recipientAgentId)) {
+                this.recipientAgentId = data.recipientAgentId
+              }
+              if (this.commonJS.isNotEmpty(data.collectTypeId)) {
+                this.collectTypeId = data.collectTypeId
+              }
+              let i = this.inputForm.detailInfos.length
+              for (let j = 0; j < i; j++) {
+                if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+                  if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+                    this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
+                  }
+                }
+              }
+              this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 值改变事件
+      changeValue () {
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].surplusNumber)) {
+            this.$message.error('请选择领用物品名称')
+            return
+          }
+          if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+            if (this.inputForm.detailInfos[j].surplusNumber < this.inputForm.detailInfos[j].collectNumber) {
+              this.$message.error('领用数量不能大于剩余数量')
+              return
+            }
+          }
+        }
+      },
+      getProgramForUser (rows) {
+        this.inputForm.detailInfos[this.indexRow].recipientAgentId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].recipientAgent = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].deptId = rows[0].parentId
+        this.inputForm.detailInfos[this.indexRow].recipientOffice = rows[0].officeName
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getProgramForType (rows) {
+        this.inputForm.detailInfos[this.indexRow].collectTypeId = rows.id
+        this.inputForm.detailInfos[this.indexRow].collectType = rows.name
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getProgram (rows) {
+        this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].projectName = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].reportNumber = rows[0].reportNo
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getUpload (p, index) {
+        p.then((list) => {
+          // list为返回数据
+          this.inputForm.detailInfos[index].fileInfoLost = list
+          this.inputForm.detailInfos[index].fileNumber = list.length
+          this.tableKeyClient = Math.random()
+        })
+      },
+      twoDecimalPlaces2 (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`领用数量小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      // 采购人下拉弹窗
+      userPullListForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.userPullForm.init()
+      },
+      // footerMethod ({ columns, data }) {
+      //   const footerData = [
+      //     columns.map((column, columnIndex) => {
+      //       if (columnIndex === 0) {
+      //         return '商品总价'
+      //       }
+      //       if (['priceSum'].includes(column.property)) {
+      //         // eslint-disable-next-line no-undef
+      //         this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+      //         return XEUtils.sum(data, column.property)
+      //       }
+      //       return null
+      //     })
+      //   ]
+      //   return footerData
+      // },
+      seeFileInfo (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload('view', this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      sss (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload(null, this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      // 采购类型下拉弹窗
+      typePullForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.materialTypePullForm.init()
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.loading = false
+              this.inputForm.files = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+              this.$message.error('至少填写一条领用详情信息')
+              this.loading = false
+              return
+            } else {
+              let i = this.inputForm.detailInfos.length
+              for (let j = 0; j < i; j++) {
+                let k = j + 1
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].recipientAgent)) {
+                  this.$message.error('领用详情第' + k + '行请选择领用人')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].collectType)) {
+                  this.$message.error('领用详情第' + k + '行请选择领用类型')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].goodsName)) {
+                  this.$message.error('领用详情第' + k + '行请选择物品名称')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+                  this.$message.error('领用详情第' + k + '行请输入领用数量')
+                  this.loading = false
+                  return
+                }
+              }
+            }
+            this.inputForm.sign = '测试'
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.collectService.save(this.inputForm).then((data) => {
+              // eslint-disable-next-line no-undef
+              // callback(data.businessTable, data.businessId, this.inputForm)
+              // this.$refs.inputForm.resetFields()
+              this.$emit('refreshList')
+              this.loading = false
+              this.close()
+            }).catch(() => {
+              // this.$refs.inputForm.resetFields()
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.inputForm.detailInfos = []
+        this.inputForm.amountInfos = []
+        this.$refs.uploadComponent.clearUpload()
+        this.visible = false
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'detail') {
+          this.$refs.detailTable.remove(row)
+          this.inputForm.detailInfos.splice(rowIndex, 1)
+        }
+        if (type === 'amount') {
+          this.$refs.amountTable.remove(row)
+          // this.inputForm.amountInfos.splice(rowIndex, 1)
+        }
+      },
+      // 新增
+      async insertEvent (type) {
+        if (type === 'detail') {
+          await this.$refs.detailTable.insert().then((data) => {
+            data.recipientAgent = this.$store.state.user.name
+            data.recipientAgentId = this.recipientAgentId
+            data.recipientOffice = this.officeName
+            this.inputForm.detailInfos.push(data)
+          })
+        }
+        if (type === 'amount') {
+          await this.$refs.amountTable.insert().then((data) => {
+            this.inputForm.amountInfos.push(data)
+          })
+        }
+      },
+      getContract (row) {
+        this.inputForm.detailInfos[this.indexRow].surplusNumber = row.tradeNumber
+        this.inputForm.detailInfos[this.indexRow].goodsName = row.tradeName
+        // 去除重复的领用详情
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          console.log('进来了')
+          for (let k = j + 1; k < i; k++) {
+            if (this.inputForm.detailInfos[j].collectTypeId === this.inputForm.detailInfos[k].collectTypeId) {
+              if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].goodsName) &&
+                this.commonJS.isNotEmpty(this.inputForm.detailInfos[k].goodsName) && this.inputForm.detailInfos[j].goodsName === this.inputForm.detailInfos[k].goodsName) {
+                // parseFloat(item.account).toFixed(2)
+                this.inputForm.detailInfos.splice(k, 1)
+                this.$message.warning(`同种领用类型的商品名称只能输入一条信息!`)
+              }
+            }
+          }
+        }
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      openPurchasePageForm (rowIndex, row) {
+        if (this.commonJS.isEmpty(row.collectType)) {
+          this.$message.error('请选择领用类型')
+          return
+        }
+        this.indexRow = rowIndex
+        this.$refs.purchasePageForm.init(row.collectTypeId)
+      }
+    }
+  }
+</script>

+ 167 - 0
src/views/materialManagement/contract/ContractChooseForm.vue

@@ -0,0 +1,167 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择合同信息"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="合同名称" prop="contractName">
+            <el-input v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="合同生效日期" prop="effectiveDates">
+            <el-date-picker
+              placement="bottom-start"
+              format="YYYY-MM-DD HH:mm:ss"
+              value-format="YYYY-MM-DD HH:mm:ss"
+              v-model="searchForm.effectiveDates"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="radio" width="40px"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同编号" field="contractNo"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="客户名称" field="name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="统一社会信用代码" field="uscCode"></vxe-column>
+          <vxe-column min-width="160" align="center" title="详细地址" field="address"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同生效日期" field="effectiveDate"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同终止日期" field="endTime"></vxe-column>
+
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProject()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ContractService from '@/api/materialManagement/ContractService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          contractName: '',
+          status: '',
+          effectiveDates: []
+        }
+      }
+    },
+    contractService: null,
+    created () {
+      this.contractService = new ContractService()
+    },
+    components: {
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProject () {
+        let row = this.$refs.projectTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getProject', row)
+      },
+      list () {
+        this.loading = true
+        // this.searchForm.createId = this.$store.state.user.id
+        this.searchForm.status = '5'
+        this.contractService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 668 - 0
src/views/materialManagement/contract/ContractForm.vue

@@ -0,0 +1,668 @@
+<template>
+  <div>
+    <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="200px" @submit.native.prevent>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
+      <el-row :gutter="0">
+        <el-col :span="10">
+          <el-form-item label="客户名称" prop="name" :rules="[
+                   ]">
+            <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户名称</span>
+            <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入客户名称" clearable></el-input>
+            <div class="usc_code_append_message">{{nameMessage}}</div>
+          </el-form-item>
+        </el-col>
+        <el-col :span="2">
+          <el-popover
+            v-model="visiblePop"
+            placement="left"
+            width="400"
+            height="800"
+            trigger="click"
+            :popper-options="{ boundariesElement: 'viewport', removeOnDestroy: true }"
+            ref="pops">
+            <vxe-table
+              border="inner"
+              auto-resize
+              resizable
+              :row-config="{isHover: true}"
+              :data="gridData"
+              :checkbox-config="{}"
+              :row-style="rowStyle"
+              :key="tableKey"
+              @cell-click="rowClick"
+              :show-header="false"
+            >
+              <vxe-column title="" field="entname" ></vxe-column>
+            </vxe-table>
+            <el-button type="info" slot="reference" @click="getPopTable" style="width: 100%" plain>查询</el-button>
+          </el-popover>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="是否有统一社会信用代码" prop="isUscCode"
+                        :rules="[
+                          {required: true, message:'请选择是否有统一社会信用代码', trigger:'blur'}
+                   ]">
+            <el-radio-group v-model="inputForm.isUscCode">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" >{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        </el-row>
+        <el-row :gutter="15">
+          <el-col v-if="inputForm.isUscCode === '1'" :span="12">
+            <el-form-item label="统一社会信用代码" prop="uscCode"
+                          :rules="[
+                                    {required: true, message:'统一社会信用代码不能为空', trigger:'blur'}
+                     ]">
+              <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+              <div class="usc_code_append_message">{{uscCodeMessage}}</div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="注册地址" prop="companyAddress"
+                          :rules="[
+                     ]">
+              <el-input v-model="inputForm.companyAddress" placeholder="注册地址" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="详细地址" prop="address"
+                          :rules="[
+                                  {required: true, message:'详细地址不能为空', trigger:'blur'}
+                     ]">
+              <el-input v-model="inputForm.address" placeholder="详细地址" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="公司电话" prop="mobile"
+                          :rules="[
+                     ]">
+              <el-input v-model="inputForm.mobile" placeholder="公司电话" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remarks1"
+                          :rules="[
+                   ]">
+              <el-input type="textarea" maxlength="500" v-model="inputForm.remarks1" placeholder="请填写备注" show-word-limit></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      <el-divider content-position="left"><i class="el-icon-document"></i> 合同信息</el-divider>
+      <el-row  :gutter="0">
+        <el-col :span="12">
+          <el-form-item label="合同名称" prop="contractName"
+                        :rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
+                 ]">
+            <el-input v-model="inputForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同编号" prop="contractNo"
+                        :rules="[
+                 ]">
+            <el-input :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="签订日期" prop="signingDate"
+                        :rules="[
+                {required: true, message:'请输入签订日期', trigger:'blur'}
+               ]">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.signingDate"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同生效日期" prop="effectiveDate"
+                        :rules="[
+               ]">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.effectiveDate"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同终止日期" prop="endTime"
+                        :rules="[
+               ]">
+            <el-date-picker
+              @change="checkFiledNo"
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.endTime"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks2"
+                        :rules="[
+                   ]">
+            <el-input type="textarea" maxlength="500" v-model="inputForm.remarks2" placeholder="请填写备注" show-word-limit></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+        <el-tab-pane label="客户联系人" name="contact">
+          <span slot="label">客户联系人</span>
+          <el-row :gutter="15">
+            <el-button type="primary" style="margin-bottom: 15px" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('contact')">
+              新增客户联系人
+            </el-button>
+          </el-row>
+          <el-row  :gutter="15">
+            <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
+              <vxe-table
+                border
+                show-overflow
+                show-footer
+                :column-config="{resizable: true}"
+                ref="contactTable"
+                :key="tableKeyContact"
+                class="vxe-table-element"
+                :data="inputForm.cwProjectClientContactDTOList"
+                style=""
+                highlight-current-row
+                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
+              >
+                <vxe-table-column align="center" field="name" title="姓名" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.name" placeholder="姓名" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="position" title="职务" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.position" placeholder="职务" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="contactFirst" title="联系方式1" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.contactFirst" oninput="value=value.replace(/[^\d]/g,'')" placeholder="联系方式1" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="contactSecond" title="联系方式2" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.contactSecond" oninput="value=value.replace(/[^\d]/g,'')" placeholder="联系方式2" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="remarks" title="备注" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input maxlength="500" v-model="scope.row.remarks" placeholder="备注" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" title="操作" width="100">
+                  <template v-slot="scope">
+                    <el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'contact')">删除</el-button>
+                  </template>
+                </vxe-table-column>
+              </vxe-table>
+            </el-form>
+          </el-row>
+        </el-tab-pane>
+        <el-tab-pane label="附件" name="files">
+          <!--        附件-->
+          <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+        </el-tab-pane>
+
+
+      </el-tabs>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
+  import CommonApi from '@/api/cw/common/CommonApi'
+  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import ContractService from '@/api/materialManagement/ContractService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  export default {
+    data () {
+      return {
+        validRules: {
+          purchaserAgent: [
+            {required: true, message: '采购人不能为空'}
+          ],
+          procurementOffice: [
+            {required: true, message: '采购部门不能为空'}
+          ],
+          procurementType: [
+            {required: true, message: '采购类型不能为空'}
+          ]
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        indexRow: '',
+        inputForm: {
+          id: '',
+          createDate: '',
+          name: '',
+          uscCode: '',
+          isUscCode: '',
+          address: '',
+          companyAddress: '',
+          mobile: '',
+          remarks1: '',
+          remarks2: '',
+          contractName: '',
+          signingDate: '',
+          effectiveDate: '',
+          endTime: '',
+          cwProjectClientContactDTOList: [],
+          files: [] // 附件信息
+        },
+        activeName: 'contact',
+        uscCodeMessage: '',
+        nameMessage: '',
+        tableKey: '',
+        tableKeyContact: '2',
+        keyWatch: '',
+        visiblePop: false,
+        gridData: []
+      }
+    },
+    enterpriseSearchService: null,
+    materialManagementService: null,
+    contractService: null,
+    commonApi: null,
+    created () {
+      this.enterpriseSearchService = new EnterpriseSearchService()
+      this.materialManagementService = new MaterialManagementService()
+      this.contractService = new ContractService()
+      this.commonApi = new CommonApi()
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      UpLoadComponent,
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      },
+      name () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
+      officeName () {
+        return JSON.parse(localStorage.getItem('user')).officeDTO.name
+      },
+      purchaserAgentId () {
+        return JSON.parse(localStorage.getItem('user')).id
+      },
+      procurementTypeId () {
+        return ''
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+              if (this.commonJS.isEmpty(this.inputForm.isUscCode)) {
+                this.inputForm.isUscCode = '1'
+              }
+            })
+          }
+        }
+      }
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          name: '',
+          isUscCode: '',
+          mobile: '',
+          uscCode: '',
+          address: '',
+          companyAddress: '',
+          remarks1: '',
+          remarks2: '',
+          contractName: '',
+          contractNo: '',
+          signingDate: '',
+          effectiveDate: '',
+          endTime: '',
+          cwProjectClientContactDTOList: [],
+          files: [] // 附件信息
+        }
+        this.activeName = 'contact'
+        this.uscCodeMessage = ''
+        this.nameMessage = ''
+        if (method === 'add') {
+          this.title = `新建采购类型`
+        } else if (method === 'edit') {
+          this.title = '修改采购类型'
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (this.formReadOnly === true && this.businessId !== 'false') {
+            method = 'view'
+          }
+          if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+            this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
+          }
+          if (this.status === 'audit' || this.status === 'taskFormDetail') {
+            method = 'view'
+          }
+          this.loading = true
+          this.$refs.inputForm.resetFields()
+          this.contractService.findById(this.inputForm.id).then((data) => {
+            if (this.inputForm.id !== 'false') {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            } else {
+              this.inputForm.cwProjectClientContactDTOList = []
+              this.loading = false
+            }
+          })
+          if (method !== 'edit' && method !== 'view') {
+            this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            this.inputForm.id = this.businessId
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.contractService.save(this.inputForm).then((data) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.inputForm.detailInfos = []
+        this.$refs.uploadComponent.clearUpload()
+        this.visible = false
+        this.nameMessage = ''
+        this.uscCodeMessage = ''
+      },
+      reapplyForm (callback) {
+        this.contractService.findById(this.inputForm.id).then((data) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
+      // 暂存
+      async saveForm (callback) {
+        this.loading = true
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          return
+        }
+        if (this.commonJS.isEmpty(this.inputForm.files)) {
+          this.inputForm.files = []
+        }
+        this.inputForm.files = this.$refs.uploadComponent.getDataList()
+        this.inputForm.status = '1'
+        this.contractService.save(this.inputForm).then((data) => {
+          callback()
+          this.$refs.inputForm.resetFields()
+          this.loading = false
+        }).catch(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = false
+        })
+      },
+      // 送审
+      async startForm (callback) {
+        this.$refs['inputForm'].validate(async (valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
+              this.$message.error('最少添加一个联系人')
+              this.loading = false
+              throw new Error()
+            }
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.inputForm.status = '2'
+            this.contractService.save(this.inputForm).then((data) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            }).catch(() => {
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 通过
+      async agreeForm (callback) {
+        this.$refs['inputForm'].validate(async (valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.inputForm.status = '5'
+            this.contractService.save(this.inputForm).then((data) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+            // this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+            //   if (this.commonJS.isNotEmpty(data)) {
+            //     console.log('进来了', data)
+            //     if (data === '公司领导审批') {
+            //       this.inputForm.status = '5'
+            //     }
+            //   }
+            //   this.contractService.save(this.inputForm).then((data) => {
+            //     callback(data.businessTable, data.businessId, this.inputForm)
+            //     this.loading = false
+            //   }).catch(() => {
+            //     this.loading = false
+            //   })
+            // })
+          }
+        })
+      },
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.contractService.findById(this.inputForm.id).then((data) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.contractService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.contractService.findById(this.inputForm.id).then((data) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.contractService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
+        }
+      },
+      async getPopTable () {
+        let name = this.inputForm.name
+        if (this.commonJS.isNotEmpty(name)) {
+          await this.enterpriseSearchService.enterpriseSearchByName(name).then((data) => {
+            this.gridData = data.items
+            this.$refs.pops.updatePopper()
+            this.tableKey = Math.random()
+          })
+        }
+        this.$refs.pops.updatePopper()
+      },
+      closePop () {
+        this.visiblePop = false
+      },
+      rowStyle (event) {
+        return 'cursor:pointer;'
+      },
+      async rowClick (event) {
+        let id = this.gridData[event.rowIndex].companyid
+        await this.enterpriseSearchService.enterpriseTicketInfo(id).then((data) => {
+          this.inputForm.name = data.ENTNAME
+          this.inputForm.uscCode = data.UNCID
+          this.inputForm.address = data.OPLOC
+        })
+        this.visiblePop = false
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      insertEvent (type) {
+        if (type === 'contact') {
+          let d = {
+            contactFirst: '',
+            contactSecond: '',
+            email: '',
+            fax: '',
+            name: '',
+            officeId: '',
+            position: '',
+            remarks: '',
+            sex: ''
+          }
+          if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
+            this.inputForm.cwProjectClientContactDTOList = []
+          }
+          this.$refs.contactTable.insertAt(d)
+          this.inputForm.cwProjectClientContactDTOList.push(d)
+          this.tableKeyContact = Math.random()
+        }
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'contact') {
+          this.$refs.contactTable.remove(row)
+          this.inputForm.cwProjectClientContactDTOList.splice(rowIndex, 1)
+        }
+      },
+      checkFiledNo () {
+        console.log('进来了时间比较')
+        // eslint-disable-next-line no-unused-vars
+        let date1 = this.inputForm.effectiveDate
+        // eslint-disable-next-line no-unused-vars
+        let date2 = this.inputForm.endTime
+        if (Date.parse(this.inputForm.endTime) < Date.parse(this.inputForm.effectiveDate)) {
+          this.$message.warning(`合同终止日期要大于合同生效日期`)
+          this.inputForm.endTime = ''
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>
+<style>
+  .usc_code_append_message {
+    color: #F56C6C;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+    position: absolute;
+    top: 100%;
+    left: 0;
+  }
+</style>

+ 381 - 0
src/views/materialManagement/contract/ContractList.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" class="query-form m-b-10" v-if="searchVisible" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="客户名称" prop="name">
+        <el-input v-model="searchForm.name" placeholder="请输入客户名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="合同名称" prop="contractName">
+        <el-input v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="状态" prop="status">
+        <el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;">
+          <el-option
+            v-for="item in $dictUtils.getDictList('cw_status')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="合同生效日期" prop="effectiveDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          v-model="searchForm.effectiveDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('contract:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+		  <template #tools>
+			  <vxe-button
+				  text
+				  type="primary"
+				  :title="searchVisible ? '收起检索' : '展开检索'"
+				  icon="vxe-icon-search"
+				  class="tool-btn"
+				  @click="searchVisible = !searchVisible"
+			  ></vxe-button>
+		  </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同编号" field="contractNo"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同名称" field="contractName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('material:list')" @click="view(scope.row.id)">{{scope.row.contractName}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('material:list')"  @click="view(scope.row.id,)">{{scope.row.contractName}}</el-link>
+              <span v-else>{{scope.row.contractName}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160" align="center" title="客户名称" field="name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="统一社会信用代码" field="uscCode"></vxe-column>
+          <vxe-column min-width="160" align="center" title="详细地址" field="address"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同生效日期" field="effectiveDate"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同终止日期" field="endTime"></vxe-column>
+          <vxe-column  min-width="150px" align="center" fixed="right" title="状态" field="status" >
+            <template #default="scope">
+              <el-button  @click="detail(scope.row)" effect="dark"
+                          :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
+                {{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}}
+              </el-button>
+            </template>
+          </vxe-column>
+
+          <vxe-column title="操作" width="150px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('contract:edit')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"  size="small" @click="push(scope.row)">修改</el-button>
+              <el-button v-else-if="hasPermission('contract:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('contract:edit')&&scope.row.createBy === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('contract:del')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-else-if="hasPermission('contract:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+        <UpdateContractInfoForm ref="updateContractInfoForm" @refreshDataList="refreshList"></UpdateContractInfoForm>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import UpdateContractInfoForm from './UpdateContractInfoForm'
+  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import ContractService from '@/api/materialManagement/ContractService'
+  import taskService from '@/api/flowable/taskService'
+  import processService from '@/api/flowable/processService'
+  import pick from 'lodash.pick'
+  import userService from '@/api/sys/userService'
+  export default {
+    data () {
+      return {
+		  searchVisible: true,
+        showHideItem: false,
+        showHideIcon: 'el-icon-arrow-down',
+        showHideName: '展示',
+        num: 0,
+        searchForm: {
+          contractName: '',
+          name: '',
+          handledBy: '',
+          handledByOffice: '',
+          status: '',
+          effectiveDates: [],
+          procurementType: '',
+          createBy: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: ''
+      }
+    },
+    materialManagementService: null,
+    contractService: null,
+    created () {
+      this.materialManagementService = new MaterialManagementService()
+      this.contractService = new ContractService()
+    },
+    components: {
+      UpdateContractInfoForm,
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      showHide () {
+        if (this.showHideItem === false) {
+          this.showHideItem = true
+          this.showHideIcon = 'el-icon-arrow-up'
+          this.showHideName = '隐藏'
+        } else {
+          this.showHideItem = false
+          this.showHideIcon = 'el-icon-arrow-down'
+          this.showHideName = '展示'
+        }
+      },
+      // 新增
+      add () {
+        // this.$refs.reportManagementForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.updateContractInfoForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.updateContractInfoForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.contractService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('物资管理-合同').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.contractService.remove(ids).then((data) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【物资管理-合同申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [物资管理-合同申请]`
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/materialManagement/contract/ContractList'
+              }
+            })
+          })
+      },
+      // 发起物资管理-合同申请
+      push (row) {
+        // 读取流程表单
+        let title = `发起流程【物资管理-合同申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[物资管理-合同申请]`
+        let status = 'startAndHold'
+        if (row.status === '3') {
+          status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
+        }
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          businessId: row.id,
+          businessTable: 'material_management_pruchase_request_basics'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'material_management_pruchase_request_basics',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/materialManagement/contract/ContractList'
+              }
+            })
+          })
+      },
+      // 查看客户登记流程结果
+      detail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                isShow: 'false',
+                readOnly: true,
+                title: '质控管理' + '流程详情',
+                formTitle: '质控管理' + '流程详情',
+                businessId: row.id,
+                status: 'reback'
+              }
+            })
+          })
+        }
+      },
+      // 撤回报告流程
+      reback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.contractService.findById(row.id).then((data) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              processService.revokeProcIns(row.procInsId).then((data) => {
+                let form = {status: '3', id: row.id}
+                this.contractService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
+      }
+    }
+  }
+</script>

+ 554 - 0
src/views/materialManagement/contract/UpdateContractInfoForm.vue

@@ -0,0 +1,554 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      v-model="visible"
+      append-to-body
+    >
+    <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+             label-width="200px" @submit.native.prevent>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
+      <el-row :gutter="0">
+        <el-col :span="10">
+          <el-form-item label="客户名称" prop="name" :rules="[
+                   ]">
+            <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户名称</span>
+            <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入客户名称" clearable></el-input>
+            <div class="usc_code_append_message">{{nameMessage}}</div>
+          </el-form-item>
+        </el-col>
+        <el-col :span="2">
+          <el-popover
+            v-model="visiblePop"
+            placement="left"
+            width="400"
+            height="800"
+            trigger="click"
+            :popper-options="{ boundariesElement: 'viewport', removeOnDestroy: true }"
+            ref="pops">
+            <vxe-table
+              border="inner"
+              auto-resize
+              resizable
+              :row-config="{isHover: true}"
+              :data="gridData"
+              :checkbox-config="{}"
+              :row-style="rowStyle"
+              :key="tableKey"
+              @cell-click="rowClick"
+              :show-header="false"
+            >
+              <vxe-column title="" field="entname" ></vxe-column>
+            </vxe-table>
+            <el-button type="info" slot="reference" @click="getPopTable" style="width: 100%" plain>查询</el-button>
+          </el-popover>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="是否有统一社会信用代码" prop="isUscCode"
+                        :rules="[
+                          {required: true, message:'请选择是否有统一社会信用代码', trigger:'blur'}
+                   ]">
+            <el-radio-group v-model="inputForm.isUscCode">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" >{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="15">
+        <el-col v-if="inputForm.isUscCode === '1'" :span="12">
+          <el-form-item label="统一社会信用代码" prop="uscCode"
+                        :rules="[
+                                    {required: true, message:'统一社会信用代码不能为空', trigger:'blur'}
+                     ]">
+            <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+            <div class="usc_code_append_message">{{uscCodeMessage}}</div>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="注册地址" prop="companyAddress"
+                        :rules="[
+                     ]">
+            <el-input v-model="inputForm.companyAddress" placeholder="注册地址" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="详细地址" prop="address"
+                        :rules="[
+                                  {required: true, message:'详细地址不能为空', trigger:'blur'}
+                     ]">
+            <el-input v-model="inputForm.address" placeholder="详细地址" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="公司电话" prop="mobile"
+                        :rules="[
+                     ]">
+            <el-input v-model="inputForm.mobile" placeholder="公司电话" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks1"
+                        :rules="[
+                   ]">
+            <el-input type="textarea" maxlength="500" v-model="inputForm.remarks1" placeholder="请填写备注" show-word-limit></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-divider content-position="left"><i class="el-icon-document"></i> 合同信息</el-divider>
+      <el-row  :gutter="0">
+        <el-col :span="12">
+          <el-form-item label="合同名称" prop="contractName"
+                        :rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
+                 ]">
+            <el-input v-model="inputForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同编号" prop="contractNo"
+                        :rules="[
+                 ]">
+            <el-input :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="签订日期" prop="signingDate"
+                        :rules="[
+                {required: true, message:'请输入签订日期', trigger:'blur'}
+               ]">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.signingDate"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同生效日期" prop="effectiveDate"
+                        :rules="[
+                {required: true, message:'请输入合同生效日期', trigger:'blur'}
+               ]">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.effectiveDate"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同终止日期" prop="endTime"
+                        :rules="[
+                {required: true, message:'请输入合同终止日期', trigger:'blur'}
+               ]">
+            <el-date-picker
+              @change="checkFiledNo"
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.endTime"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks2"
+                        :rules="[
+                   ]">
+            <el-input type="textarea" maxlength="500" v-model="inputForm.remarks2" placeholder="请填写备注" show-word-limit></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+        <el-tab-pane label="客户联系人" name="contact">
+          <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户联系人</span>
+          <el-row :gutter="15">
+            <el-button type="primary" style="margin-bottom: 15px" :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'" @click="insertEvent('contact')">
+              新增客户联系人
+            </el-button>
+          </el-row>
+          <el-row  :gutter="15">
+            <el-form :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'">
+              <vxe-table
+                border
+                show-overflow
+                show-footer
+                :column-config="{resizable: true}"
+                ref="contactTable"
+                :key="tableKeyContact"
+                class="vxe-table-element"
+                :data="inputForm.cwProjectClientContactDTOList"
+                style=""
+                highlight-current-row
+                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
+              >
+                <vxe-table-column align="center" field="name" title="姓名" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.name" placeholder="姓名" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="position" title="职务" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.position" placeholder="职务" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="contactFirst" title="联系方式1" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.contactFirst" oninput="value=value.replace(/[^\d]/g,'')" placeholder="联系方式1" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="contactSecond" title="联系方式2" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input v-model="scope.row.contactSecond" oninput="value=value.replace(/[^\d]/g,'')" placeholder="联系方式2" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="remarks" title="备注" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input maxlength="500" v-model="scope.row.remarks" placeholder="备注" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" title="操作" width="100">
+                  <template v-slot="scope">
+                    <el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'contact')">删除</el-button>
+                  </template>
+                </vxe-table-column>
+              </vxe-table>
+            </el-form>
+          </el-row>
+        </el-tab-pane>
+        <el-tab-pane label="附件" name="files">
+          <!--        附件-->
+          <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+        </el-tab-pane>
+
+
+      </el-tabs>
+    </el-form>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
+  import CommonApi from '@/api/cw/common/CommonApi'
+  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import ContractService from '@/api/materialManagement/ContractService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  export default {
+    data () {
+      return {
+        validRules: {
+          purchaserAgent: [
+            {required: true, message: '采购人不能为空'}
+          ],
+          procurementOffice: [
+            {required: true, message: '采购部门不能为空'}
+          ],
+          procurementType: [
+            {required: true, message: '采购类型不能为空'}
+          ]
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        indexRow: '',
+        inputForm: {
+          id: '',
+          createDate: '',
+          name: '',
+          uscCode: '',
+          isUscCode: '',
+          address: '',
+          companyAddress: '',
+          mobile: '',
+          remarks1: '',
+          remarks2: '',
+          contractName: '',
+          contractNo: '',
+          signingDate: '',
+          effectiveDate: '',
+          endTime: '',
+          cwProjectClientContactDTOList: [],
+          files: [] // 附件信息
+        },
+        activeName: 'contact',
+        uscCodeMessage: '',
+        nameMessage: '',
+        tableKey: '',
+        tableKeyContact: '2',
+        keyWatch: '',
+        visiblePop: false,
+        gridData: []
+      }
+    },
+    enterpriseSearchService: null,
+    materialManagementService: null,
+    contractService: null,
+    commonApi: null,
+    created () {
+      this.enterpriseSearchService = new EnterpriseSearchService()
+      this.materialManagementService = new MaterialManagementService()
+      this.contractService = new ContractService()
+      this.commonApi = new CommonApi()
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      UpLoadComponent,
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      },
+      name () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
+      officeName () {
+        return JSON.parse(localStorage.getItem('user')).officeDTO.name
+      },
+      purchaserAgentId () {
+        return JSON.parse(localStorage.getItem('user')).id
+      },
+      procurementTypeId () {
+        return ''
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          name: '',
+          isUscCode: '',
+          mobile: '',
+          uscCode: '',
+          address: '',
+          companyAddress: '',
+          remarks1: '',
+          remarks2: '',
+          contractName: '',
+          signingDate: '',
+          effectiveDate: '',
+          endTime: '',
+          cwProjectClientContactDTOList: [],
+          files: [] // 附件信息
+        }
+        this.activeName = 'contact'
+        this.uscCodeMessage = ''
+        this.nameMessage = ''
+        if (method === 'add') {
+          this.title = `新建采购类型`
+        } else if (method === 'edit') {
+          this.title = '修改合同信息'
+        } else if (method === 'view') {
+          this.title = '查看合同信息'
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (this.formReadOnly === true && this.businessId !== 'false') {
+            method = 'view'
+          }
+          if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+            this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
+          }
+          if (this.status === 'audit' || this.status === 'taskFormDetail') {
+            method = 'view'
+          }
+          this.loading = true
+          this.$refs.inputForm.resetFields()
+          this.contractService.findById(this.inputForm.id).then((data) => {
+            if (this.inputForm.id !== 'false') {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            } else {
+              this.inputForm.cwProjectClientContactDTOList = []
+              this.loading = false
+            }
+          })
+          if (method !== 'edit' && method !== 'view') {
+            this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.contractService.save(this.inputForm).then((data) => {
+              this.$emit('refreshDataList')
+              this.loading = false
+              this.close()
+              // this.$message.success(data)
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.inputForm.detailInfos = []
+        this.$refs.uploadComponent.clearUpload()
+        this.visible = false
+        this.nameMessage = ''
+        this.uscCodeMessage = ''
+      },
+      reapplyForm (callback) {
+        this.contractService.findById(this.inputForm.id).then((data) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
+      async getPopTable () {
+        let name = this.inputForm.name
+        if (this.commonJS.isNotEmpty(name)) {
+          await this.enterpriseSearchService.enterpriseSearchByName(name).then((data) => {
+            this.gridData = data.items
+            this.$refs.pops.updatePopper()
+            this.tableKey = Math.random()
+          })
+        }
+        this.$refs.pops.updatePopper()
+      },
+      closePop () {
+        this.visiblePop = false
+      },
+      rowStyle (event) {
+        return 'cursor:pointer;'
+      },
+      async rowClick (event) {
+        let id = this.gridData[event.rowIndex].companyid
+        await this.enterpriseSearchService.enterpriseTicketInfo(id).then((data) => {
+          this.inputForm.name = data.ENTNAME
+          this.inputForm.uscCode = data.UNCID
+          this.inputForm.address = data.OPLOC
+        })
+        this.visiblePop = false
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      insertEvent (type) {
+        if (type === 'contact') {
+          let d = {
+            contactFirst: '',
+            contactSecond: '',
+            email: '',
+            fax: '',
+            name: '',
+            officeId: '',
+            position: '',
+            remarks: '',
+            sex: ''
+          }
+          if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
+            this.inputForm.cwProjectClientContactDTOList = []
+          }
+          this.$refs.contactTable.insertAt(d)
+          this.inputForm.cwProjectClientContactDTOList.push(d)
+          this.tableKeyContact = Math.random()
+        }
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'contact') {
+          this.$refs.contactTable.remove(row)
+          this.inputForm.cwProjectClientContactDTOList.splice(rowIndex, 1)
+        }
+      },
+      checkFiledNo () {
+        console.log('进来了时间比较')
+        // eslint-disable-next-line no-unused-vars
+        let date1 = this.inputForm.effectiveDate
+        // eslint-disable-next-line no-unused-vars
+        let date2 = this.inputForm.endTime
+        if (Date.parse(this.inputForm.endTime) < Date.parse(this.inputForm.effectiveDate)) {
+          this.$message.warning(`合同终止日期要大于合同生效日期`)
+          this.inputForm.endTime = ''
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>
+<style>
+  .usc_code_append_message {
+    color: #F56C6C;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+    position: absolute;
+    top: 100%;
+    left: 0;
+  }
+</style>

+ 91 - 0
src/views/materialManagement/file/MaterialManagementDialog.vue

@@ -0,0 +1,91 @@
+<!--文件上传组件-->
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="800px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <UpLoadComponentV2 ref="upLoadComponentV2"></UpLoadComponentV2>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import UpLoadComponentV2 from './MaterialManagementV2'
+  export default {
+    data () {
+      return {
+        visible: false,
+        title: '',
+        index: ''
+      }
+    },
+    computed: {
+    },
+    watch: {
+    },
+    created () {
+    },
+    components: {
+      UpLoadComponentV2
+    },
+    mounted () {
+    },
+    methods: {
+      /**
+       * 文件上传组件初始化
+       * @param auth
+       *    auth的值为"view"时,不可上传/编辑文件
+       *    auth为其他值时,可上传/编辑文件
+       * @param fileList  要显示到文件上传列表中的文件。
+       *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+       *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+       * @param directory  要存放到oss的哪个文件夹下。
+       *    注:值为空时,默认存放到"public"文件夹
+       * @param maxValue  上传文件允许的最大值,单位:MB
+       *    注:值为空时,默认值为300MB
+       * @param dividerName  组件中divider的名称
+       *    注:值为空时,默认值为‘附件’
+       * @param uploadFlag  ‘上传文件’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+       * @param delFlag  ‘删除’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+       * @param showDivider  ‘附件‘Divider是否展示
+       *    注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       */
+      newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider, index) {
+        this.index = index
+        this.title = '附件'
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs.upLoadComponentV2.newUpload(auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider)
+        })
+      },
+      doSubmit () {
+        if (!this.$refs.upLoadComponentV2.checkProgress()) {
+          this.$emit('getUpload', this.$refs.upLoadComponentV2.getDataList(), this.index)
+          this.close()
+        }
+      },
+      close () {
+        this.$refs.upLoadComponentV2.clearUpload()
+        this.visible = false
+      }
+    }
+  }
+</script>

+ 674 - 0
src/views/materialManagement/file/MaterialManagementV2.vue

@@ -0,0 +1,674 @@
+<!--文件上传组件-->
+<template>
+  <div>
+    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
+    <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
+               :limit="999" :http-request="httpRequest"
+               multiple
+               :on-exceed="(files, fileList) =>{
+                      $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+                     }"
+               :show-file-list="false"
+               :on-change="changes"
+               :on-progress="uploadVideoProcess"
+               :file-list="fileList">
+      <el-button type="primary" :slot="auth==='view'&&uploadFlag===false?'tip':'trigger'" @click="clickHandel" :disabled="auth==='view'&&uploadFlag===false">点击上传</el-button>
+    </el-upload>
+    <div style="height: calc(100% - 80px);margin-top: 10px">
+      <!-- 进度条 -->
+      <el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
+      <el-table
+        ref="uploadTable"
+        :key="tableKey"
+        @row-click="tableRowClick"
+        :row-class-name="tableRowClassName"
+        :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="name" align="center">
+          <template #default="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image
+                style="width: 30px; height: 30px;padding-top: 4px"
+                :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]"
+              ></el-image>
+            </div>
+            <div v-else>
+              <el-link  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.name}}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column v-if="auth !== 'view'" label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column v-if="auth !== 'view'" label="创建时间" prop="createTime" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template #default="scope">
+            {{getSize(scope.row.size)}}
+          </template>
+        </el-table-column>
+<!--        <el-table-column label="文件类型" prop="fileType" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <component-->
+<!--              :is="scope.row.fileTypeComponent || 'fileTypeComponentA'"-->
+<!--              :options="$dictUtils.getDictList('cw_project_report_file_type')"-->
+<!--              :value="scope.row.fileType"-->
+<!--              @updateFileType="updateFileType"-->
+<!--            ></component>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="盖章类型" prop="sealType" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <component-->
+<!--              :is="scope.row.sealTypeComponent || 'sealTypeComponentA'"-->
+<!--              :options="$dictUtils.getDictList('cw_seal_type')"-->
+<!--              :value="scope.row.sealType"-->
+<!--              :scope="scope"-->
+<!--              @updateSealType="updateSealType"-->
+<!--            ></component>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="备注" prop="remarks" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <component-->
+<!--              :is="scope.row.remarksComponent || 'remarksComponentA'"-->
+<!--              :value="scope.row.remarks"-->
+<!--              @updateRemarks="updateRemarks"-->
+<!--            ></component>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template  #default="scope">
+            <el-button text type="primary"  icon="el-icon-edit" size="small" @click="toHref(scope.row)" :disabled="false">下载</el-button>
+            <el-button text type="primary"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
+            <!--<el-button size="small" type="text" icon="el-icon-edit"
+                     @click="handleUpdate(scope.row, scope.$index)"
+            >{{ scope.row.btn || "修改" }}</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>
+
+  </div>
+</template>
+
+<script>
+  // eslint-disable-next-line no-unused-vars
+  import OSSSerivce, {
+    httpRequest,
+    // eslint-disable-next-line no-unused-vars
+    handleRemove,
+    fileName,
+    // eslint-disable-next-line no-unused-vars
+    beforeAvatarUpload,
+    // eslint-disable-next-line no-unused-vars
+    openWindowOnUrl,
+    // eslint-disable-next-line no-unused-vars
+    toHref
+  } from '@/api/sys/OSSService'
+  // import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  import moment from 'moment'
+  export default {
+    data () {
+      return {
+        progressFlag: false,
+        loadProgress: 0,
+        fileList: [],
+        dataList: [],
+        dataListNew: [],
+        url: '',
+        showViewer: false,
+        ossService: null,
+        auth: '',
+        directory: 'public',
+        maxValue: 300,
+        tableKey: '',
+        fileLoading: true,
+        dividerName: '',
+        uploadFlag: false,
+        delFlag: false,
+        createBy: '',
+        showDivider: true,
+        fileType: '',
+        sealType: '',
+        remarks: ''
+      }
+    },
+    watch: {
+    },
+    created () {
+      this.ossService = new OSSSerivce()
+    },
+    components: {
+      // ElImageViewer,
+      fileTypeComponentA: {
+        render: function (h) {
+          return h('span', {
+            domProps: {
+              innerText: this.$dictUtils.getDictLabel('cw_project_report_file_type', this.value, '')
+            }
+          })
+        },
+        props: ['options', 'value']
+      },
+      fileTypeComponentB: {
+        data () {
+          return { fileType: '' }
+        },
+        props: ['options', 'value'],
+        mounted () {
+          this.fileType = this.value
+        },
+        render: function (h) {
+          return h(
+            'el-select',
+            {
+              attrs: {
+                placeholder: '请选择',
+                value: this.$dictUtils.getDictLabel('cw_project_report_file_type', this.fileType, ''),
+                size: 'small',
+                clearable: true
+              },
+              props: ['value'],
+              on: {
+                change: (value) => {
+                  this.fileType = value
+                  this.$emit('updateFileType', value)
+                }
+              }
+            },
+            [
+              this.options.map((item) => {
+                let { label, value } = item
+                return h('el-option', {
+                  props: {
+                    label,
+                    value: parseInt(value),
+                    key: value
+                  }
+                })
+              })
+            ]
+          )
+        }
+      },
+      sealTypeComponentA: {
+        render: function (h) {
+          return h('span', {
+            domProps: {
+              innerText: this.$dictUtils.getDictLabel('cw_seal_type', this.value, '')
+            }
+          })
+        },
+        props: ['options', 'value']
+      },
+      sealTypeComponentB: {
+        data () {
+          return { sealType: '' }
+        },
+        props: ['options', 'value', 'scope'],
+        mounted () {
+          this.sealType = this.value
+        },
+        render: function (h) {
+          return h(
+            'el-select',
+            {
+              attrs: {
+                placeholder: '请选择',
+                value: this.$dictUtils.getDictLabel('cw_seal_type', this.sealType, ''),
+                size: 'small',
+                clearable: true
+              },
+              props: ['value'],
+              on: {
+                change: (value) => {
+                  let suffix = this.scope.row.name.substring(this.scope.row.name.lastIndexOf('.') + 1)
+                  if (parseInt(value) === 1) {
+                    if (suffix === 'pdf' || suffix === 'doc' || suffix === 'docx') {
+                      this.sealType = value
+                      this.$emit('updateSealType', value)
+                    } else {
+                      this.$message.error('只有“pdf、doc、docx”格式文件的盖章类型可以是“电子章”')
+                      this.sealType = ''
+                      this.$emit('updateSealType', '')
+                    }
+                  } else {
+                    this.sealType = value
+                    this.$emit('updateSealType', value)
+                  }
+                }
+              }
+            },
+            [
+              this.options.map((item) => {
+                let { label, value } = item
+                return h('el-option', {
+                  props: {
+                    label,
+                    value: parseInt(value),
+                    key: value
+                  }
+                })
+              })
+            ]
+          )
+        }
+      },
+      remarksComponentA: {
+        render: function (h) {
+          return h('span', {
+            domProps: {
+              innerText: this.value
+            }
+          })
+        },
+        props: ['value']
+      },
+      remarksComponentB: {
+        data () {
+          return { remarks: '' }
+        },
+        props: ['value'],
+        mounted () {
+          this.remarks = this.value
+        },
+        render: function (h) {
+          return h(
+            'el-input',
+            {
+              attrs: {
+                placeholder: '请输入',
+                value: this.remarks,
+                size: 'small',
+                clearable: true
+              },
+              props: ['value'],
+              on: {
+                input: (value) => {
+                  this.remarks = value
+                  this.$emit('updateRemarks', value)
+                }
+              }
+            }
+          )
+        }
+      }
+    },
+    mounted () {
+      window.onPreview = this.onPreview
+    },
+    methods: {
+      /**
+       * dividerName: 组件中divider的名称赋值
+       * showDivider: ‘附件‘Divider是否展示
+       *     注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       **/
+      setDividerName (dividerName, showDivider) {
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+        if (this.commonJS.isNotEmpty(showDivider)) {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        } else {
+          this.showDivider = true
+        }
+      },
+      /**
+       * 文件上传组件初始化
+       * @param auth
+       *    auth的值为"view"时,不可上传/编辑文件
+       *    auth为其他值时,可上传/编辑文件
+       * @param fileList  要显示到文件上传列表中的文件。
+       *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+       *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+       * @param directory  要存放到oss的哪个文件夹下。
+       *    注:值为空时,默认存放到"public"文件夹
+       * @param maxValue  上传文件允许的最大值,单位:MB
+       *    注:值为空时,默认值为300MB
+       * @param dividerName  组件中divider的名称
+       *    注:值为空时,默认值为‘附件’
+       * @param uploadFlag  ‘上传文件’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+       * @param delFlag  ‘删除’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+       * @param showDivider  ‘附件‘Divider是否展示
+       *    注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       */
+      async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+        await this.fileLoadingFalse()
+        if (this.commonJS.isEmpty(dividerName)) {
+          this.dividerName = '附件'
+        } else {
+          this.dividerName = dividerName
+        }
+        if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+          this.directory = directory
+        } else {
+          this.directory = 'public'
+        }
+        if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+          this.maxValue = maxValue
+        } else {
+          this.maxValue = 300
+        }
+        this.auth = auth
+        if (this.commonJS.isEmpty(uploadFlag)) {
+          this.uploadFlag = false
+        } else {
+          if (uploadFlag !== true && uploadFlag !== false) {
+            this.uploadFlag = false
+          } else {
+            this.uploadFlag = uploadFlag
+          }
+        }
+        if (this.commonJS.isEmpty(delFlag)) {
+          this.delFlag = false
+        } else {
+          if (delFlag !== true && delFlag !== false) {
+            this.delFlag = false
+            this.createBy = delFlag
+          } else {
+            this.delFlag = delFlag
+          }
+        }
+        if (this.commonJS.isEmpty(fileList)) {
+          this.fileLoading = true
+        }
+        for await (let item of fileList) {
+          await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+            item.lsUrl = data.url
+            item.size = data.size
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            if (this.dataList.length === fileList.length) {
+              this.fileLoading = true
+            }
+          })
+        }
+        // this.dataList = JSON.parse(JSON.stringify(fileList))
+        // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+        if (this.commonJS.isEmpty(showDivider)) {
+          this.showDivider = true
+        } else {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        }
+      },
+      async httpRequest (file) {
+        await httpRequest(file, fileName(file), this.directory, this.maxValue)
+      },
+      uploadVideoProcess (event, file, fileList) {
+        this.progressFlag = true // 显示进度条
+        this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+        if (this.loadProgress >= 100) {
+          this.loadProgress = 100
+          setTimeout(() => {
+            this.progressFlag = false
+          }, 1000) // 一秒后关闭进度条
+        }
+      },
+      getSize (value) {
+        if (this.commonJS.isEmpty(value)) {
+          return '0 B'
+        } else {
+          let val = parseInt(value)
+          if (this.commonJS.isEmpty(val)) {
+            return '0 B'
+          }
+          if (isNaN(val)) {
+            return '0 B'
+          }
+          if (val === 0) {
+            return '0 B'
+          }
+          let k = 1024
+          let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+          let i = Math.floor(Math.log(val) / Math.log(k))
+          return (val / Math.pow(k, i)).toPrecision(3) + '' + sizes[i]
+        }
+      },
+      async changes (file, fileList) {
+        // if (file.status !== 'ready') {
+        //   return
+        // }
+        if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+          this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+          return
+        }
+        this.dataListNew = []
+        this.dataList.forEach((item) => {
+          this.dataListNew.push(item)
+        })
+        for (let item of fileList) {
+          item.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item.createBy = {
+            id: '',
+            name: ''
+          }
+          item.createBy.id = this.$store.state.user.id
+          item.createBy.name = this.$store.state.user.name
+          this.dataListNew.push(item)
+        }
+        for await (let item of this.dataListNew) {
+          if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+            item.url = item.raw.url
+            if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+              await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+                item.lsUrl = data
+              })
+            }
+          }
+        }
+        this.tableKey = Math.random()
+      },
+      showFile (row) {
+        openWindowOnUrl(row)
+      },
+      onPreview (url) {
+        this.url = url
+        this.showViewer = true
+      },
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      toHref (row) {
+        toHref(row)
+      },
+      deleteById (row, index) {
+        this.dataListNew.splice(index, 1)
+        if (row.id !== null && row.id !== '' && row.id !== undefined) {
+          this.dataList.splice(index, 1)
+          // this.ossService.deleteMsgById(row.id)
+        } else {
+          let num
+          if (this.dataList.length > 0) {
+            num = this.dataList.length - 1
+          } else {
+            num = 0
+          }
+          this.$refs.upload.uploadFiles.splice(index - num, 1)
+        }
+      },
+      /**
+       * 关闭dialog时使用  清除el-upload中上传的文件
+       */
+      clearUpload () {
+        this.$refs.upload.uploadFiles = []
+        this.dataList = []
+        this.dataListNew = []
+        this.createBy = ''
+      },
+      /**
+       * 获取当前文件列表中的文件数据
+       */
+      getDataList () {
+        let _this = this
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _this.dataListNew.forEach((item, index) => {
+              if (item.btnType === 'save') {
+                _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+                _this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+                _this.dataListNew[index].remarksComponent = 'remarksComponentA'
+                _this.dataListNew[index].btn = '修改'
+                _this.dataListNew[index].btnType = 'edit'
+                _this.dataListNew[index].fileType = _this.fileType
+                _this.dataListNew[index].sealType = _this.sealType
+                _this.dataListNew[index].remarks = _this.remarks
+              }
+            })
+            _this.tableKey = Math.random()
+            resolve(_this.dataListNew)
+          })
+        }
+        return waitForEach()
+      },
+      /**
+       * 判断进度条是否结束,附件是否加载完成
+       * @returns {boolean}
+       */
+      checkProgress () {
+        if (this.progressFlag === true) {
+          this.$message.warning('请等待附件上传完成再进行操作')
+          return true
+        }
+        if (this.fileLoading === false) {
+          this.$message.warning('请等待附件加载完成再进行操作')
+          return true
+        }
+        return false
+      },
+      ifName (row) {
+        if (this.commonJS.isEmpty(row.name)) {
+          row.name = '---'
+          return false
+        }
+        let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+        if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+          return true
+        } else {
+          return false
+        }
+      },
+      fileLoadingFalse () {
+        this.fileLoading = false
+      },
+      /** 修改||保存按钮操作 */
+      handleUpdate: async function (row, rowIndex) {
+        if (row.btnType === 'edit' || this.commonJS.isEmpty(row.btnType)) {
+          let _this = this
+          const waitForEach = function () {
+            return new Promise(function (resolve, reject) {
+              _this.dataListNew.forEach((item, index) => {
+                if (item.btnType === 'save') {
+                  _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+                  _this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+                  _this.dataListNew[index].remarksComponent = 'remarksComponentA'
+                  _this.dataListNew[index].btn = '修改'
+                  _this.dataListNew[index].btnType = 'edit'
+                  _this.dataListNew[index].fileType = _this.fileType
+                  _this.dataListNew[index].sealType = _this.sealType
+                  _this.dataListNew[index].remarks = _this.remarks
+                }
+              })
+              resolve()
+            })
+          }
+          waitForEach().then(() => {
+            this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentB'
+            this.dataListNew[rowIndex].sealTypeComponent = 'sealTypeComponentB'
+            this.dataListNew[rowIndex].remarksComponent = 'remarksComponentB'
+            this.dataListNew[rowIndex].btn = '保存'
+            this.dataListNew[rowIndex].btnType = 'save'
+          })
+        } else {
+          this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentA'
+          this.dataListNew[rowIndex].sealTypeComponent = 'sealTypeComponentA'
+          this.dataListNew[rowIndex].remarksComponent = 'remarksComponentA'
+          this.dataListNew[rowIndex].btn = '修改'
+          this.dataListNew[rowIndex].btnType = 'edit'
+          this.dataListNew[rowIndex].fileType = this.fileType
+          this.dataListNew[rowIndex].sealType = this.sealType
+          this.dataListNew[rowIndex].remarks = this.remarks
+        }
+        this.tableKey = Math.random()
+      },
+      updateFileType (fileType) {
+        this.fileType = fileType
+      },
+      updateSealType (sealType) {
+        this.sealType = sealType
+      },
+      updateRemarks (remarks) {
+        this.remarks = remarks
+      },
+      tableRowClassName ({ row, rowIndex }) {
+        row.index = rowIndex
+      },
+      // 行点击事件
+      tableRowClick (row, column) {
+        if (this.auth !== 'view') {
+          if (column.label !== '备注' && column.label !== '文件名称' && column.label !== '操作') {
+            let _this = this
+            const waitForEach = function () {
+              return new Promise(function (resolve, reject) {
+                _this.dataListNew.forEach((item, index) => {
+                  if (item.btnType === 'save') {
+                    _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+                    _this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+                    _this.dataListNew[index].remarksComponent = 'remarksComponentA'
+                    _this.dataListNew[index].btn = '修改'
+                    _this.dataListNew[index].btnType = 'edit'
+                    _this.dataListNew[index].fileType = _this.fileType
+                    _this.dataListNew[index].sealType = _this.sealType
+                    _this.dataListNew[index].remarks = _this.remarks
+                  }
+                })
+                resolve()
+              })
+            }
+            waitForEach().then(() => {
+              this.fileType = this.dataListNew[row.index].fileType
+              this.sealType = this.dataListNew[row.index].sealType
+              this.remarks = this.dataListNew[row.index].remarks
+              this.dataListNew[row.index].fileTypeComponent = 'fileTypeComponentB'
+              this.dataListNew[row.index].sealTypeComponent = 'sealTypeComponentB'
+              this.dataListNew[row.index].remarksComponent = 'remarksComponentB'
+              this.dataListNew[row.index].btn = '保存'
+              this.dataListNew[row.index].btnType = 'save'
+            })
+            this.tableKey = Math.random()
+          }
+        }
+      },
+      // 点击上传文件按钮的时候,把未保存的文件保存一下
+      clickHandel () {
+        this.dataListNew.forEach((item, index) => {
+          if (item.btnType === 'save') {
+            this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+            this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+            this.dataListNew[index].remarksComponent = 'remarksComponentA'
+            this.dataListNew[index].btn = '修改'
+            this.dataListNew[index].btnType = 'edit'
+            this.dataListNew[index].fileType = this.fileType
+            this.dataListNew[index].sealType = this.sealType
+            this.dataListNew[index].remarks = this.remarks
+          }
+        })
+      }
+    }
+  }
+</script>

+ 134 - 0
src/views/materialManagement/info/MaterialTypePullForm.vue

@@ -0,0 +1,134 @@
+<template>
+  <div>
+    <el-dialog
+      title="类型选择"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="类型名称" prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="请输入类型名称" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="500px"
+          :loading="loading"
+          ref="typeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--          <vxe-column type="checkbox" width="40" ></vxe-column>-->
+          <vxe-column type="radio" width="60" ></vxe-column>
+          <vxe-column title="内容名称" field="name" align="left" tree-node></vxe-column>
+          <vxe-column width="100" title="序号" field="sort"></vxe-column>
+        </vxe-table>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProgramForType" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import MaterialTypeService from '@/api/materialManagement/MaterialTypeService'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false
+      }
+    },
+    materialTypeService: null,
+    created () {
+      this.materialTypeService = new MaterialTypeService()
+    },
+    components: {
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgramForType () {
+        let rows
+        if (this.commonJS.isEmpty(this.$refs.typeTable.getRadioRecord())) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        rows = this.$refs.typeTable.getRadioRecord()
+        if (rows.children.length > 0) {
+          this.$message.error('请选择子集数据')
+          return
+        }
+        this.$emit('getProgramForType', rows)
+        this.close()
+      },
+      list () {
+        this.loading = true
+        this.materialTypeService.cgList({...this.searchForm}).then((data) => {
+          this.dataList = data
+          this.loading = false
+          this.$nextTick(() => {
+            this.$refs.typeTable.setAllTreeExpand(true)
+          })
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 744 - 0
src/views/materialManagement/info/UpdateInfoForm.vue

@@ -0,0 +1,744 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      v-model="visible"
+      append-to-body
+    >
+      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="110px" @submit.native.prevent>
+
+        <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="采购编号" prop="purchaseNo">
+              <el-input placeholder="自动生成" v-model="inputForm.purchaseNo" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="采购名称" prop="purchaseSketch"
+                          :rules="[{required: true, message: '采购名称不能为空', trigger: 'blur'}
+                 ]">
+              <el-input v-model="inputForm.purchaseSketch" placeholder="请填写采购名称"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="经办人" prop="handledBy">
+              <el-input v-model="inputForm.handledBy" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="经办人部门" prop="handledByOffice">
+              <SelectTree
+                :disabled="true"
+                ref="officeTree"
+                :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+                :url="`/system-server/sys/office/treeData?type=2`"
+                :value="inputForm.handledByOffice"
+                :accordion="true"
+                size="default"
+                @getValue="(value) => {inputForm.handledByOffice=value}"/>
+              <!--            <el-input v-model="inputForm.handledByOffice" :disabled="true"></el-input>-->
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="采购时间" prop="purchaseDate" :rules="[{required: true, message:'请选择采购时间', trigger:'blur'}]">
+              <el-date-picker
+                v-model="inputForm.purchaseDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placement="bottom-start"
+                style="width: 100%"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="采购方式" prop="purchaseMode"
+                          :rules="[]">
+              <el-select v-model="inputForm.purchaseMode" placeholder="请选择采购方式" style="width:100%;">
+                <el-option
+                  v-for="item in $dictUtils.getDictList('material_purchase_mode')"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="inputForm.remarks"
+                        type="textarea"
+                        :rows="5"
+                        maxlength="500"
+                        placeholder="请输入简介"
+                        show-word-limit>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-divider content-position="left"><i class="el-icon-document"></i>
+          采购详情
+          <el-button style="margin-left: 20px" type="primary" @click="insertEvent('detail')" plain>
+            新增
+          </el-button>
+        </el-divider>
+        <el-row  :gutter="15" >
+          <el-col :span="24">
+			  <vxe-table
+				  border
+				  show-footer
+				  show-overflow
+				  :footer-method="footerMethod"
+				  ref="detailTable"
+				  class="vxe-table-element"
+				  :data="inputForm.detailInfos"
+				  style="margin-left: 5em"
+				  :key="clientTableKey"
+				  highlight-current-row
+				  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
+				  :edit-rules="validRules"
+			  >
+				  <vxe-table-column align="center" field="purchaserAgent" title="采购人" :edit-render="{}" :rules="[{required: true, message:'请选择采购人', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input v-model="scope.row.purchaserAgent" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="procurementOffice" title="采购部门" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <el-input :disabled='true' v-model="scope.row.procurementOffice" ></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="procurementType" title="采购类型" :edit-render="{}" :rules="[{required: true, message:'请选择采购类型', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input v-model="scope.row.procurementType" @focus="typePullForm(scope.$rowIndex)"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="supplierName" title="供应商" :edit-render="{}" :rules="[{required: true, message:'请选择供应商', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <vxe-pulldown ref="xDown4" transfer>
+							  <template #default>
+								  <vxe-input v-model="scope.row.supplierName" :readonly="commonJS.isNotEmpty(scope.row.isSupplier) && scope.row.isSupplier === '2'"
+											 :disabled="method === 'view'" placeholder="请填写供应商" @focus="focusEvent4(scope.$rowIndex)" ></vxe-input>
+							  </template>
+							  <template #dropdown>
+								  <div style="width: 600px;
+                              height: 300px;
+                              background-color: #fff;
+                              box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);">
+									  <vxe-input v-model="suppName" type="search" @search-click="searchClick"  placeholder="请输入供应商名称搜索" style="width: 100%" clearable></vxe-input>
+									  <vxe-grid
+										  border
+										  show-overflow
+										  auto-resize
+										  height="auto"
+										  :row-config="{isHover: true}"
+										  :loading="loading4"
+										  :pager-config="tablePage4"
+										  :data="tableData4"
+										  :columns="tableColumn4"
+										  @cell-click="cellClickEvent4"
+										  @page-change="pageChangeEvent4">
+									  </vxe-grid>
+								  </div>
+							  </template>
+						  </vxe-pulldown>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="tradeName" title="商品名称" :edit-render="{}" :rules="[{required: true, message:'请填写商品名称', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input @change="ifSameValue" v-model="scope.row.tradeName"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="tradePrice" title="商品单价(元)" :edit-render="{}" :rules="[{required: true, message:'请输入商品单价', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <!--              <el-input @change="changeValue" maxlength="15" v-model="scope.row.tradePrice" @keyup.native="scope.row.tradePrice = twoDecimalPlaces(scope.row.tradePrice)"></el-input>-->
+						  <el-input @change="changeValue" maxlength="15" v-model="scope.row.tradePrice" @blur="scope.row.tradePrice = twoDecimalPlaces(scope.row.tradePrice)"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="tradeNumber" title="商品数量" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <!--              <el-input @change="changeValue" v-model="scope.row.tradeNumber" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>-->
+						  <el-input @change="changeValue" v-model="scope.row.tradeNumber" @blur="scope.row.tradeNumber = twoDecimalPlaces2(scope.row.tradeNumber)" maxlength="10"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="priceSum" title="商品总价" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <el-input v-model="scope.row.priceSum" @blur="scope.row.priceSum = twoDecimalPlaces(scope.row.priceSum)" maxlength="15"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
+					  <template v-slot:edit="scope">
+						  <el-input v-model="scope.row.company"></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column align="center" field="remarks" title="备注" :edit-render="{}">
+					  <template v-slot:edit="scope">
+						  <el-input v-model="scope.row.remarks" ></el-input>
+					  </template>
+				  </vxe-table-column>
+				  <vxe-table-column title="操作" width="180">
+					  <template #default="scope">
+						  <vxe-button status="danger" size="small" v-if="method!=='view'" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</vxe-button>
+						  <vxe-button status="primary" size="small" v-if="method!=='view'" @click="sss(scope.$rowIndex)">上传附件</vxe-button>
+						  <vxe-button status="primary" size="small" v-if="method==='view'" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
+						  <!--              <el-button  v-if="formReadOnly" :disabled="false" type="primary" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>-->
+					  </template>
+				  </vxe-table-column>
+			  </vxe-table>
+		  </el-col>
+        </el-row>
+
+        <!--<el-divider content-position="left"><i class="el-icon-document"></i>
+          专用发票信息
+          <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" @click="insertEvent('amount')" plain>
+            新增
+          </el-button>
+        </el-divider>
+        <el-row  :gutter="15" >
+          <vxe-table
+            border
+            show-overflow
+            ref="amountTable"
+            class="vxe-table-element"
+            :data="inputForm.amountInfos"
+            style="margin-left: 5em"
+            @cell-click=""
+            @edit-closed=""
+            highlight-current-row
+            :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
+          >
+            <vxe-table-column field="code" title="发票代码" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input v-model="scope.row.code" ></el-input>
+              </template>
+            </vxe-table-column>
+            <vxe-table-column field="number" title="发票号" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input v-model="scope.row.number" ></el-input>
+              </template>
+            </vxe-table-column>
+            <vxe-table-column field="amount" title="金额" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input v-model="scope.row.amount" ></el-input>
+              </template>
+            </vxe-table-column>
+            <vxe-table-column field="taxAmount" title="税额" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input v-model="scope.row.taxAmount" ></el-input>
+              </template>
+            </vxe-table-column>
+            <vxe-table-column field="count" title="价税合计" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input v-model="scope.row.count" ></el-input>
+              </template>
+            </vxe-table-column>
+            <vxe-table-column title="操作" width="100">
+              <template v-slot="scope">
+                <el-button  type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'amount')">删除</el-button>
+              </template>
+            </vxe-table-column>
+          </vxe-table>
+        </el-row>-->
+
+      </el-form>
+      <!-- 附件 -->
+      <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+      <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
+      <CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
+      <MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
+      <UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
+      <template #footer>
+		  <span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+	  </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import MaterialManagementDialog from '../file/MaterialManagementDialog'
+  import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
+  import MaterialTypePullForm from './MaterialTypePullForm'
+  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import UserPullForm from '@/views/finance/invoice/UserPullForm'
+  import XEUtils from 'xe-utils'
+  import SupplierService from '@/api/materialManagement/SupplierService'
+  export default {
+    data () {
+      return {
+        validRules: {
+          purchaserAgent: [
+            {required: true, message: '采购人不能为空'}
+          ],
+          procurementOffice: [
+            {required: true, message: '采购部门不能为空'}
+          ],
+          procurementType: [
+            {required: true, message: '采购类型不能为空'}
+          ],
+          tradeName: [
+            {required: true, message: '商品名称不能为空'}
+          ],
+          tradePrice: [
+            {required: true, message: '商品单价不能为空'}
+          ],
+          tradeNumber: [
+            {required: true, message: '商品数量不能为空'}
+          ],
+          priceSum: [
+            {required: true, message: '商品总价不能为空'}
+          ]
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          tradeTotalPrice: '',  // 商品总价
+          fileInfoLost: [],
+          purchaseMode: '',
+          handledByOffice: '',
+          handledBy: '',
+          purchaseSketch: '',
+          purchaseNo: '', // 采购编号
+          userId: '',
+          purchaseDate: '',
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [] // 附件信息
+        },
+        loading4: false,
+        tablePage4: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10
+        },
+        tableColumn4: [
+          { field: 'name', title: '名称', align: 'center' },
+          { field: 'address', title: '地址', align: 'center' },
+          { field: 'telPhone', title: '联系电话', align: 'center' }
+        ],
+		  clientTableKey: '',
+        tableData4: [],
+        suppName: '',
+        suppIndex: ''
+      }
+    },
+    MaterialManagementService: null,
+    supplierService: null,
+    created () {
+      this.materialManagementService = new MaterialManagementService()
+      this.supplierService = new SupplierService()
+    },
+    components: {
+      SelectTree,
+      MaterialTypePullForm,
+      CwProgramPageForm,
+      MaterialManagementDialog,
+      UpLoadComponent,
+      UserPullForm
+    },
+    computed: {
+      name () {
+        return this.$store.state.user.name
+      },
+      officeName () {
+        return this.$store.state.user.office.name
+      },
+      purchaserAgentId () {
+        return this.$store.state.user.id
+      },
+      procurementTypeId () {
+        return ''
+      }
+    },
+    methods: {
+      init (method, id) {
+      	console.log('method', method)
+        this.method = method
+		  console.log('this.method', this.method)
+        this.inputForm = {
+          tradeTotalPrice: '',  // 商品总价
+          fileInfoLost: [],
+          purchaseMode: '',
+          handledByOffice: '',
+          handledBy: this.$store.state.user.name,
+          purchaseSketch: '',
+          purchaseNo: '', // 采购编号
+          userId: this.$store.state.user.id,
+          purchaseDate: new Date(),
+          remarks: '',
+          detailInfos: [],
+          // amountInfos: [],
+          files: [] // 附件信息
+        }
+        if (method === 'add') {
+          this.title = `新建采购类型`
+        } else if (method === 'edit') {
+          this.inputForm.id = id
+          this.title = '修改采购类型'
+        } else if (method === 'view') {
+          this.inputForm.id = id
+          this.title = '查看采购类型'
+        } else if (method === 'addChild') {
+          this.title = '添加下级结构'
+          this.inputForm.parentId = id
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.$refs.inputForm.resetFields()
+            this.materialManagementService.findById(this.inputForm.id).then((data) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
+                this.inputForm.handledByOffice = this.$store.state.user.office.id
+              }
+              if (this.commonJS.isNotEmpty(data.purchaserAgentId)) {
+                this.purchaserAgentId = data.purchaserAgentId
+              }
+              if (this.commonJS.isNotEmpty(data.procurementTypeId)) {
+                this.procurementTypeId = data.procurementTypeId
+              }
+              let i = this.inputForm.detailInfos.length
+              for (let j = 0; j < i; j++) {
+                if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+                  if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+                    this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
+                  }
+                }
+              }
+              this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 值改变事件
+      changeValue () {
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+            if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+              // parseFloat(item.account).toFixed(2)
+              this.inputForm.detailInfos[j].priceSum = parseFloat(parseFloat(this.inputForm.detailInfos[j].tradePrice) * parseFloat(this.inputForm.detailInfos[j].tradeNumber)).toFixed(2)
+            }
+          }
+        }
+      },
+      getProgramForUser (rows) {
+        this.inputForm.detailInfos[this.indexRow].purchaserAgentId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].purchaserAgent = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].deptId = rows[0].parentId
+        this.inputForm.detailInfos[this.indexRow].procurementOffice = rows[0].officeName
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getProgramForType (rows) {
+        this.inputForm.detailInfos[this.indexRow].procurementTypeId = rows.id
+        this.inputForm.detailInfos[this.indexRow].procurementType = rows.name
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getProgram (rows) {
+        this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
+        this.inputForm.detailInfos[this.indexRow].projectName = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].reportNumber = rows[0].reportNo
+        this.indexRow = ''
+        this.$forceUpdate()
+      },
+      getUpload (p, index) {
+        p.then((list) => {
+          // list为返回数据
+          this.inputForm.detailInfos[index].fileInfoLost = list
+          this.inputForm.detailInfos[index].fileNumber = list.length
+          this.tableKeyClient = Math.random()
+        })
+      },
+      twoDecimalPlaces (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      twoDecimalPlaces2 (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`商品数量小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      // 采购人下拉弹窗
+      userPullListForm (rowIndex) {
+        this.indexRow = rowIndex
+        this.$refs.userPullForm.init()
+      },
+      footerMethod ({ columns, data }) {
+        const footerData = [
+          columns.map((column, columnIndex) => {
+            if (columnIndex === 0) {
+              return '商品总价'
+            }
+            if (['priceSum'].includes(column.property)) {
+              // eslint-disable-next-line no-undef
+              this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+              return XEUtils.sum(data, column.property)
+            }
+            return null
+          })
+        ]
+        return footerData
+      },
+      seeFileInfo (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload('view', this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      sss (index) {
+        if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
+          this.inputForm.detailInfos[index].fileInfoLost = []
+        }
+        this.$refs.materialManagementDialog.newUpload(null, this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
+      },
+      // 采购类型下拉弹窗
+      typePullForm (rowIndex) {
+        this.indexRow = rowIndex
+        // this.$refs.reimbursementTypePullForm.init()
+        // this.$refs.cwReimbursementTypePullForm.init()
+        this.$refs.materialTypePullForm.init()
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.loading = false
+              this.inputForm.files = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+              this.$message.error('至少填写一条采购详情信息')
+              this.loading = false
+              return
+            } else {
+              let i = this.inputForm.detailInfos.length
+              for (let j = 0; j < i; j++) {
+                let k = j + 1
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].purchaserAgent)) {
+                  this.$message.error('采购详情第' + k + '行请选择采购人')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].procurementType)) {
+                  this.$message.error('采购详情第' + k + '行请选择采购类型')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].tradeName)) {
+                  this.$message.error('采购详情第' + k + '行请输入商品名称')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+                  this.$message.error('采购详情第' + k + '行请输入商品单价')
+                  this.loading = false
+                  return
+                }
+                if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+                  this.$message.error('采购详情第' + k + '行请输入商品数量')
+                  this.loading = false
+                  return
+                }
+              }
+            }
+            this.inputForm.files = this.$refs.uploadComponent.getDataList()
+            this.materialManagementService.save(this.inputForm).then((data) => {
+              // eslint-disable-next-line no-undef
+              // callback(data.businessTable, data.businessId, this.inputForm)
+              // this.$refs.inputForm.resetFields()
+              this.$emit('refreshList')
+              this.loading = false
+              this.close()
+            }).catch(() => {
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.inputForm.detailInfos = []
+        this.inputForm.amountInfos = []
+        this.$refs.uploadComponent.clearUpload()
+        this.visible = false
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'detail') {
+          this.$refs.detailTable.remove(row)
+          this.inputForm.detailInfos.splice(rowIndex, 1)
+        }
+        if (type === 'amount') {
+          this.$refs.amountTable.remove(row)
+          this.inputForm.amountInfos.splice(rowIndex, 1)
+        }
+      },
+      // 新增
+      async insertEvent (type) {
+        if (type === 'detail') {
+          await this.$refs.detailTable.insert().then((data) => {
+            data.purchaserAgentId = this.purchaserAgentId
+            data.purchaserAgent = this.name
+            data.procurementOffice = this.officeName
+            this.inputForm.detailInfos.push(data)
+			  this.clientTableKey = Math.random()
+          })
+        }
+        if (type === 'amount') {
+          await this.$refs.amountTable.insert().then((data) => {
+            this.inputForm.amountInfos.push(data)
+          })
+        }
+      },
+      ifSameValue () {
+        let i = this.inputForm.detailInfos.length
+        for (let j = 0; j < i; j++) {
+          if (j + 1 < i) {
+            if (this.inputForm.detailInfos[j].procurementTypeId === this.inputForm.detailInfos[j + 1].procurementTypeId) {
+              if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeName) &&
+                this.commonJS.isNotEmpty(this.inputForm.detailInfos[j + 1].tradeName) && this.inputForm.detailInfos[j].tradeName === this.inputForm.detailInfos[j + 1].tradeName) {
+                // parseFloat(item.account).toFixed(2)
+                this.inputForm.detailInfos.splice(j + 1, 1)
+                this.$message.warning(`同采购类型的商品名称只能输入一条信息!`)
+              }
+            }
+          }
+        }
+      },
+      focusEvent4 (rowIndex) {
+        this.$refs.xDown4.showPanel()
+        this.loading4 = true
+        this.suppName = '' // 搜索框的值 清空
+        this.suppIndex = rowIndex // 获取当前行下标
+        this.tablePage4.currentPage = 1
+        this.tablePage4.pageSize = 10
+        this.refreshSupplierList()
+      },
+      suffixClick4 () {
+        this.$refs.xDown4.togglePanel()
+      },
+      searchClick () {
+        this.refreshSupplierList()
+      },
+      cellClickEvent4 ({ row }) {
+        this.inputForm.detailInfos[this.suppIndex].supplierName = row.name
+        this.inputForm.detailInfos[this.suppIndex].supplierId = row.id
+        this.inputForm.detailInfos[this.suppIndex].isSupplier = '2' // isSupplier:手动填写 ‘1’ 选择填写 ‘2’
+        this.suppIndex = ''
+        this.$refs.xDown4.hidePanel()
+      },
+      pageChangeEvent4 ({ currentPage, pageSize }) {
+        this.tablePage4.currentPage = currentPage
+        this.tablePage4.pageSize = pageSize
+        this.refreshSupplierList()
+      },
+      // 刷新供应商
+      refreshSupplierList () {
+        this.supplierService.list({
+          'current': this.tablePage4.currentPage,
+          'size': this.tablePage4.pageSize,
+          'name': this.suppName
+        }).then((data) => {
+          this.tableData4 = data.records
+          this.tablePage4.total = data.total
+          this.loading4 = false
+        })
+      }
+    }
+  }
+</script>
+
+<style>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+  .vxe-pulldown--panel {
+    z-index: 9997 !important
+  }
+</style>

+ 169 - 0
src/views/materialManagement/materialType/TypeForm.vue

@@ -0,0 +1,169 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      v-model="visible">
+      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="100px" @submit.native.prevent>
+        <el-row  :gutter="15">
+          <el-col :span="21">
+            <el-form-item label="上级节点" prop="parentId">
+              <SelectTree
+                ref="areaTree"
+                :props="{
+                      value: 'id',             // ID字段名
+                      label: 'name',         // 显示名称
+                      children: 'children'    // 子级字段名
+                    }"
+                url="/public-modules-server/material/materialType/treeData?type=5"
+                :value="inputForm.parentId"
+                :clearable="true"
+                :accordion="true"
+				size="default"
+                @getValue="(value) => {inputForm.parentId=value}"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="物资名称" prop="name"
+                          :rules="[
+                          {required: true, message:'物资名称不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.name" placeholder="请填写物资名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="序号" prop="sort">
+              <el-input v-model="inputForm.sort" :disabled="true" show-word-limit></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  // import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
+  import ReimbursementApprovalTypeService from '@/api/cw/reimbursementApproval/ReimbursementApprovalTypeService'
+  import MaterialTypeService from '@/api/materialManagement/MaterialTypeService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  // import OfficeService from '@/api/sys/OfficeService'
+  export default {
+    data () {
+      return {
+        disabled: false,
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          businessType: '',
+          name: '',
+          sort: '',
+          parentId: ''
+        }
+      }
+    },
+    // reimbursementTypeService: null,
+    reimbursementApprovalTypeService: null,
+    materialTypeService: null,
+    // OfficeService: null,
+    created () {
+      // this.reimbursementTypeService = new ReimbursementTypeService()
+      this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
+      this.materialTypeService = new MaterialTypeService()
+      // this.officeService = new OfficeService()
+    },
+    components: {
+      SelectTree
+    },
+    methods: {
+      init (method, id, businessType) {
+        this.method = method
+        this.inputForm = {
+          businessType: '',
+          name: '',
+          sort: '',
+          parentId: ''
+        }
+        if (method === 'add') {
+          this.title = `新建报销类型`
+        } else if (method === 'edit') {
+          this.inputForm.id = id
+          this.title = '修改报销类型'
+        } else if (method === 'view') {
+          this.inputForm.id = id
+          this.title = '查看报销类型'
+        } else if (method === 'addChild') {
+          this.title = '添加下级结构'
+          this.inputForm.parentId = id
+          this.inputForm.businessType = businessType
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.$refs.inputForm.resetFields()
+            this.materialTypeService.findById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            })
+            // this.reimbursementTypeService.findById(this.inputForm.id).then(({data}) => {
+            //   this.inputForm = this.recover(this.inputForm, data)
+            //   this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            //   this.loading = false
+            // })
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.materialTypeService.save(this.inputForm).then(({data}) => {
+              if (data === false) {
+                this.close()
+                this.$message.error('物资名称重复,请重新填写')
+                this.$emit('refreshDataList')
+                this.loading = false
+              } else {
+                this.close()
+                this.$message.success(data)
+                this.$emit('refreshDataList')
+                this.loading = false
+              }
+            }).catch(() => {
+              this.loading = false
+            })
+            // this.reimbursementTypeService.save(this.inputForm).then(({data}) => {
+            //   this.close()
+            //   this.$message.success(data)
+            //   this.$emit('refreshDataList')
+            //   this.loading = false
+            // }).catch(() => {
+            //   this.loading = false
+            // })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>

+ 148 - 0
src/views/materialManagement/materialType/TypeList.vue

@@ -0,0 +1,148 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="物资名称" prop="name">
+        <el-input v-model="searchForm.name" placeholder="请输入物资名称" clearable></el-input>
+      </el-form-item>
+<!--      <el-form-item label="序号" prop="sort">-->
+<!--        <el-input v-model="searchForm.sort" placeholder="请输入序号" clearable></el-input>-->
+<!--      </el-form-item>-->
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('material:type:add')" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+<!--          <el-button v-if="hasPermission('program:configuration:type:del')" type="danger"  icon="el-icon-delete" @click="del()" :disabled="$refs.typeTable && $refs.typeTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 50px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="typeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="60" ></vxe-column>
+          <vxe-column title="物资名称" field="name" align="left" tree-node></vxe-column>
+          <vxe-column width="100" title="序号" field="sort"></vxe-column>
+
+          <vxe-column title="操作" width="230px" fixed="right" align="center">
+            <template  #default="scope">
+              <el-button v-if="hasPermission('material:type:edit')&&(scope.row.level === '1' || scope.row.level === '2' || scope.row.level === '3' || scope.row.level === '4')" text type="primary" @click="addChild(scope.row.id,scope.row.businessType)">添加下级结构</el-button>
+              <el-button v-if="hasPermission('material:type:edit')" text type="primary" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('material:type:remove')" text type="primary" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+
+      </div>
+    </div>
+    <TypeForm  ref="typeForm" @refreshDataList="refreshList"></TypeForm>
+  </div>
+</template>
+
+<script>
+  import MaterialTypeService from '@/api/materialManagement/MaterialTypeService'
+  import TypeForm from './TypeForm'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: '',
+          no: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    materialTypeService: null,
+    created () {
+      this.materialTypeService = new MaterialTypeService()
+    },
+    components: {
+      TypeForm
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.typeForm.init('add', '')
+      },
+      addChild (id, businessType) {
+        this.$refs.typeForm.init('addChild', id, businessType)
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.typeTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.typeForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.typeForm.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.materialTypeService.list({...this.searchForm}).then((data) => {
+          this.dataList = data
+          this.loading = false
+          this.$nextTick(() => {
+            this.$refs.typeTable.setAllTreeExpand(true)
+          })
+        })
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.typeTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.materialTypeService.remove(ids).then((data) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>

+ 0 - 0
src/views/materialManagement/purchase/PurchaseForm.vue


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio