From 4351e71d782741143a98f86f6648acd16689165f Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 27 May 2022 19:48:02 +0800
Subject: [PATCH] Merge branch 'developer' into hive2.0
---
zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html | 339 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 339 insertions(+), 0 deletions(-)
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html
new file mode 100644
index 0000000..da44764
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html
@@ -0,0 +1,339 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+ <meta charset="utf-8">
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+ <meta http-equiv="Cache-Control" content="no-siteapp"/>
+ <!-- 本框架基本脚本和样式 -->
+ <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+ <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+ <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+ <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+
+<body>
+<div class="ibox-content" id="app" v-cloak>
+ <el-form label-width="120px" >
+ <el-row>
+ <p class="el-big-title">积分统计</p>
+ </el-row>
+ <el-row>
+ <el-row>
+ <el-col :span="18">
+ <el-form-item>
+ <el-col class="line" :span="6" style="text-align: center">积分总额</el-col>
+ <el-col class="line" :span="6" style="text-align: center">可使用积分</el-col>
+ <el-col class="line" :span="6" style="text-align: center">已消耗积分</el-col>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="18">
+ <el-form-item>
+ <el-col class="line" :span="6" style="text-align: center">0</el-col>
+ <el-col class="line" :span="6" style="text-align: center">0</el-col>
+ <el-col class="line" :span="6" style="text-align: center">0</el-col>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-row>
+ <el-row>
+ <p class="el-big-title">积分规则</p>
+ </el-row>
+ <el-row>
+ <el-col :span="10">
+ <template v-for="paramSettingOnes in jfyxq">
+ <el-form-item label-width="200px;">
+ <span slot="label">{{paramSettingOnes.paramName}}</span>
+ <el-col :span="8">
+ <el-select v-model="paramSettingOnes.paramValue" placeholder="请选择">
+ <el-option label="本年后" value="1"></el-option>
+ <el-option label="1年后" value="2"></el-option>
+ <el-option label="2年后" value="3"></el-option>
+ <el-option label="3年后" value="4"></el-option>
+ <el-option label="4年后" value="5"></el-option>
+ <el-option label="5年后" value="6"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="2" style="margin-left: 10px;display: flex;align-items: center;height: 40px">
+ <el-tooltip class="item" effect="dark" content="设置为“1年后”,表示在今年获得的用户积分将在明年的12月31号23:59:59失效,以此类推" placement="top">
+ <i class="el-icon-question" style="font-size: 18px;color:#999999" ></i>
+ </el-tooltip>
+ </el-col>
+ </el-form-item >
+ </template>
+ </el-col>
+ <el-col :span="14">
+ <template v-for="paramSettingTwos in jfdxj">
+ <el-form-item>
+ <span slot="label">{{paramSettingTwos.paramName}}</span>
+ <el-col :span="1">
+ <el-switch v-model="paramSettingTwos.paramSwitch" active-color="#13ce66" inactive-color="#ccc" @change="change">
+ </el-switch>
+ </el-col>
+ <el-col :span="2" style="margin-left: 10px;display: flex;align-items: center;height: 40px">
+ <el-tooltip class="item" effect="dark" content="客户付款时,可以选择积分抵现付款" placement="top">
+ <i class="el-icon-question" style="font-size: 18px;color:#999999" ></i>
+ </el-tooltip>
+ </el-col>
+ <el-col :span="11">
+ <transition>
+ <div v-show="paramSettingTwos.paramSwitch">
+ <el-col :span="6">
+ <el-input v-model="paramSettingTwos.paramValue" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <el-col class="line" :span="5" style="margin-left: 10px">积分=1元</el-col>
+ </div>
+ </transition>
+ </el-col>
+ </el-form-item>
+ </template>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-tabs v-model="activeName" >
+ <el-tab-pane label="门店积分规则" name="first">
+ <el-row>
+ <el-col :span="21">
+ <el-form-item>
+ <el-col class="line" :span="7" style="margin-left: 10px">本人积分</el-col>
+ <el-col class="line" :span="7" style="margin-left: 10px">老带新积分</el-col>
+ <el-col class="line" :span="7" style="margin-left: 10px">二级老带新积分</el-col>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="21">
+ <template v-for="paramSetting in mdjf">
+ <el-form-item>
+ <span slot="label">{{paramSetting.paramName}}</span>
+ <el-col :span="3">
+ <el-input v-model="paramSetting.paramValue" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <div v-show="paramSetting.paramName === '转介客户'">
+ <el-col class="line" :span="4" style="margin-left: 10px">积分/位</el-col>
+ </div>
+ <div v-show="paramSetting.paramName !== '转介客户'">
+ <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+ </div>
+ <el-col :span="3">
+ <el-input v-model="paramSetting.paramValue1" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <div v-show="paramSetting.paramName === '转介客户'">
+ <el-col class="line" :span="4" style="margin-left: 10px">积分/位</el-col>
+ </div>
+ <div v-show="paramSetting.paramName !== '转介客户'">
+ <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+ </div>
+ <div v-show="paramSetting.paramName !== '转介客户'">
+ <el-col :span="3">
+ <el-input v-model="paramSetting.paramValue2" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+ </div>
+ </el-form-item>
+ </template>
+ </el-col>
+ </el-row>
+ </el-tab-pane>
+ <el-tab-pane label="商城积分规则" name="second">
+ <el-row>
+ <el-col :span="21">
+ <el-form-item>
+ <el-col class="line" :span="7" style="margin-left: 10px">本人积分</el-col>
+ <el-col class="line" :span="7" style="margin-left: 10px">老带新积分</el-col>
+ <el-col class="line" :span="7" style="margin-left: 10px">二级老带新积分</el-col>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="21">
+ <template v-for="paramSettingShop in scjf">
+ <el-form-item>
+ <span slot="label">{{paramSettingShop.paramName}}</span>
+ <el-col :span="3">
+ <el-input v-model="paramSettingShop.paramValue" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <div v-show="paramSettingShop.paramName !== '现金消费'">
+ <el-col class="line" :span="4" style="margin-left: 10px">积分/次</el-col>
+ </div>
+ <div v-show="paramSettingShop.paramName === '现金消费'">
+ <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+ </div>
+ <el-col :span="3">
+ <el-input v-model="paramSettingShop.paramValue1" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <div v-show="paramSettingShop.paramName !== '现金消费'">
+ <el-col class="line" :span="4" style="margin-left: 10px">积分/次</el-col>
+ </div>
+ <div v-show="paramSettingShop.paramName === '现金消费'">
+ <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+ </div>
+ <el-col :span="3">
+ <el-input v-model="paramSettingShop.paramValue2" oninput ="value=value.replace(/[^0-9.]/g,'')"></el-input>
+ </el-col>
+ <div v-show="paramSettingShop.paramName !== '现金消费'">
+ <el-col class="line" :span="4" style="margin-left: 10px">积分/次</el-col>
+ </div>
+ <div v-show="paramSettingShop.paramName === '现金消费'">
+ <el-col class="line" :span="4" style="margin-left: 10px">元/积分</el-col>
+ </div>
+ </el-form-item>
+ </template>
+ </el-col>
+ </el-row>
+ </el-tab-pane>
+ </el-tabs>
+ </el-row>
+ <el-row justify="center" type="flex">
+ <el-button matrix:btn="scoreSetting-save" type="primary" @click="submit()">保存</el-button>
+ </el-row>
+ </el-form>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+
+<script>
+ var app = new Vue({
+ el: '#app',
+ data: {
+ activeName: 'first',
+ jfyxq:[],
+ jfdxj:[],
+ mdjf:[],
+ scjf:[],
+ },
+ created: function () {
+ this.loadInfo();
+ },
+ mounted: function () {
+ },
+ methods: {
+ //加载分类
+ loadInfo() {
+ let _this = this;
+ _this.loadParamSetting();
+ },
+ loadParamSetting() {
+ let _this = this;
+ //加载配置
+ AjaxProxy.requst({
+ app: _this,
+ data: {},
+ url: basePath + '/score/ruleSetting/selectScoreRule',
+ callback: function (data) {
+ _this.jfyxq = data.mapInfo.jfyxq;
+ _this.jfdxj = data.mapInfo.jfdxj;
+ _this.mdjf = data.mapInfo.mdjf;
+ _this.scjf = data.mapInfo.scjf;
+ console.log("over");
+ }
+ });
+ },
+ change(data){
+ if(data){
+ this.paramSwitch = true;
+ }else{
+ this.paramSwitch = false;
+ }
+ },
+
+ submit() {
+ console.log("提交");
+ let _this = this;
+ let submitDate = [];
+ for (let i = 0; i < _this.jfyxq.length; i++) {
+ let paramSetting = _this.jfyxq[i];
+ let paramCode = paramSetting.paramCode;
+ let paramValue = paramSetting.paramValue;
+ let paramValue1 = paramSetting.paramValue1;
+ let paramValue2 = paramSetting.paramValue2;
+
+ let obj = {
+ paramCode: paramCode,
+ paramValue: paramValue,
+ paramValue1: paramValue1,
+ paramValue2: paramValue2,
+ }
+ submitDate.push(obj);
+ }
+ for (let i = 0; i < _this.scjf.length; i++) {
+ let paramSetting = _this.scjf[i];
+ let paramCode = paramSetting.paramCode;
+ let paramValue = paramSetting.paramValue;
+ let paramValue1 = paramSetting.paramValue1;
+ let paramValue2 = paramSetting.paramValue2;
+
+ let obj = {
+ paramCode: paramCode,
+ paramValue: paramValue,
+ paramValue1: paramValue1,
+ paramValue2: paramValue2,
+ }
+ submitDate.push(obj);
+ }
+ for (let i = 0; i < _this.mdjf.length; i++) {
+ let paramSetting = _this.mdjf[i];
+ let paramCode = paramSetting.paramCode;
+ let paramValue = paramSetting.paramValue;
+ let paramValue1 = paramSetting.paramValue1;
+ let paramValue2 = paramSetting.paramValue2;
+
+ let obj = {
+ paramCode: paramCode,
+ paramValue: paramValue,
+ paramValue1: paramValue1,
+ paramValue2: paramValue2,
+ }
+ submitDate.push(obj);
+ }
+ for (let i = 0; i < _this.jfdxj.length; i++) {
+ let paramSetting = _this.jfdxj[i];
+ let paramCode = paramSetting.paramCode;
+ let paramSwitch = paramSetting.paramSwitch;
+ let paramValue;
+ if(paramSwitch){
+ paramValue = paramSetting.paramValue;
+ }
+ let paramValue1 = paramSetting.paramValue1;
+ let paramValue2 = paramSetting.paramValue2;
+
+ let obj = {
+ paramCode: paramCode,
+ paramValue: paramValue,
+ paramValue1: paramValue1,
+ paramValue2: paramValue2,
+ }
+ submitDate.push(obj);
+ }
+
+ AjaxProxy.requst({
+ app: _this,
+ data: submitDate,
+ url: basePath + '/score/ruleSetting/updateScoreRule',
+ callback: function (data) {
+ _this.$message({
+ message: data.info,
+ type: 'success',
+ onClose: function () {
+ _this.loadParamSetting();
+ }
+ });
+ }
+ });
+ }
+ }
+ })
+</script>
+
+</body>
+</html>
\ No newline at end of file
--
Gitblit v1.9.1