From 15e19113558e46aaf8f7263a66730fc01aadf603 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 12 Jan 2021 10:25:20 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java          |   18 ++++++++++++++++++
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html |   14 +++++++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
index 2d8435e..ca6c675 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -15,6 +15,7 @@
 import com.matrix.system.hive.service.AchieveNewService;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 
@@ -126,6 +127,23 @@
         com.matrix.core.tools.excl.ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true);
     }
 
+    @RequestMapping(value = "/del")
+    @ResponseBody
+    public AjaxResult del(Long id) {
+        int i = achieveNewService.removeById(id);
+        if (i > 0) {
+            return AjaxResult.buildSuccessInstance("删除失败");
+        }
+        return AjaxResult.buildFailInstance("删除失败");
+    }
+
+    @RequestMapping(value = "/add")
+    @ResponseBody
+    public AjaxResult add(@RequestBody List<AchieveNew> list) {
+
+        
+        return AjaxResult.buildSuccessInstance("添加成功");
+    }
 
 }
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
index df3b253..663b815 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
@@ -139,7 +139,7 @@
                 </el-tab-pane>
                 <el-tab-pane label="业绩设置" name="second">
                     <el-row>
-                        <el-button size="mini" type="primary">保存</el-button>
+                        <el-button size="mini" type="primary" @click="saveAchieve">保存</el-button>
                     </el-row>
                     <el-table
                             :data="achieveItems"
@@ -336,6 +336,18 @@
             calOrderTotalFormatter(row, column) {
                 return row.count * row.price;
             },
+            saveAchieve() {
+                let _this = this;
+                AjaxProxy.requst({
+                    app: _this,
+                    data: _this.achieveItems,
+                    contentType: 'application/json',
+                    url: basePath + '/admin/achieve/add',
+                    callback: function (data) {
+                        _this.$message.success(data.info);
+                    }
+                });
+            },
             shareAchieve(index, row) {
                 var row2 = JSON.parse(JSON.stringify(row));
                 this.achieveItems.push(row2);

--
Gitblit v1.9.1