Quellcode durchsuchen

手工费批量结算

pengyh vor 1 Jahr
Ursprung
Commit
afce8c38e4

+ 3 - 3
package-lock.json

@@ -4716,9 +4716,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.13.18",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.18.tgz",
-      "integrity": "sha512-P9gMVRm/wlzlR+uAJvARH8jkf7wOCk9XWx6NcN5mZqM04li079GNpaHp9Qb0s9f9j0G4fMCBVuZGtm2BBpEo3A==",
+      "version": "2.13.20",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.20.tgz",
+      "integrity": "sha512-qHa59hdy7sIvmv3oMl7J0tzQPOR6B3e1HNZWHdo2alcyVqwnoT9xawYqabNhQJwH+Hfy22slJmjM00hlqIMQtw==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "@turf/turf": "^6.5.0",
     "@vue-office/excel": "^1.3.0",
     "@vue/composition-api": "^1.7.1",
-    "@zjlib/element-plugins": "^2.13.18",
+    "@zjlib/element-plugins": "^2.13.20",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 27 - 3
src/views/auxiliaryFittings/settleAccountManagement/auxiliaryHandworkFee/index.vue

@@ -159,7 +159,8 @@ export default {
 			// 表格属性
 			tableAttributes: {
 				// 启用勾选列
-				selectColumn: true
+				selectColumn: true,
+				selectable: this.selectable
 			},
 			// 表格事件
 			tableEvents: {
@@ -200,7 +201,18 @@ export default {
 	computed: {
 		// 事件组合
 		optionsEvensGroup() {
-			return []
+			return [
+				[
+					[
+						this.optionsEvensAuth("bulkSettlement", {
+							isRole: this.tabIndex == 2,
+							click: () => {
+								this.batchSettleAccounts()
+							}
+						})
+					],
+				]
+			]
 		},
 		// 更多参数
 		moreParameters() {
@@ -236,6 +248,12 @@ export default {
 		columnParsing(item, defaultData) {
 			return defaultData
 		},
+		selectable(row, index) {
+			if(this.tabIndex==2){
+				console.log(row,row.selectMapData)
+				return ["WAIT"].includes(Object.entries(row.selectMapData.status).find(([key, val]) => val == row.status)?.[0])
+			}
+		},
 		// 监听勾选变化
 		selectionChange(data) {
 			this.recordSelected = data
@@ -302,7 +320,7 @@ export default {
 					btnType: 'text',
 					conditions: ({ row, index, column }) => {
 						if(this.tabIndex == 1){
-							return row.status == 'WAIT' && row.workerAmount != row.okAmount
+							return row.workerAmount != row.okAmount
 						}else{
 							return row.status == 'WAIT'
 						}
@@ -321,6 +339,12 @@ export default {
 				},
 			})
 		},
+		batchSettleAccounts() {
+			if (this.recordSelected.length == 0) {
+				return this.$message.warning('请至少勾选一条数据!');
+			}
+			this.settleAccounts(this.recordSelected.map(item => { return item.settlementOrderId }).join(','))
+		},
 		settleAccounts(id,cancel,type) {
 			this.$confirm(`请确认是否提交结算, 是否继续?`, '提示', {
 				confirmButtonText: '确定',