| 
					
				 | 
			
			
				@@ -85,25 +85,31 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 保存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleSave() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.loading = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const saveData = this.tableData.map(item => ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        periodId: item.periodId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        redPacketMoney: item.amount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$confirm(`是否确定?确定后营期下的所有公司红包金额都将设置成对应值`, '提示', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        confirmButtonText: '确定', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        cancelButtonText: '取消', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: 'warning' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.loading = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const saveData = this.tableData.map(item => ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          periodId: item.periodId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          redPacketMoney: item.amount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      batchSaveRedPacketByPeriod(saveData).then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (response.code === 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$message.success('设置成功'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$emit('success'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.handleClose(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$message.error(response.msg || '批量设置失败'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }).catch(error => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$message.error('批量设置失败:' + error.message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }).finally(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.loading = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        batchSaveRedPacketByPeriod(saveData).then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (response.code === 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$message.success('设置成功'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$emit('success'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.handleClose(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$message.error(response.msg || '批量设置失败'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }).catch(error => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$message.error('批量设置失败:' + error.message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }).finally(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.loading = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 关闭 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleClose() { 
			 |