Helius
2021-01-12 15e19113558e46aaf8f7263a66730fc01aadf603
modify
2 files modified
32 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java 18 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html 14 ●●●●● patch | view | raw | blame | history
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("添加成功");
    }
}
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);