From 639eb18312a62ac2a76e2b59e16bcc1ff8d70d03 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 14 一月 2026 18:00:59 +0800
Subject: [PATCH] 经销商管理

---
 admin/src/views/business/integralRuleSet.vue |  221 +++++++++++++------------------------------------------
 1 files changed, 53 insertions(+), 168 deletions(-)

diff --git a/admin/src/views/business/integralRuleSet.vue b/admin/src/views/business/integralRuleSet.vue
index b5b537b..4b02938 100644
--- a/admin/src/views/business/integralRuleSet.vue
+++ b/admin/src/views/business/integralRuleSet.vue
@@ -2,127 +2,46 @@
   <div class="box" style="max-height:calc(100% - 60px);margin-bottom:50px;overflow-y: auto" >
     <el-form :model="form" ref="form">
       <div class="header">
-        <span style="font-size: 15px; font-weight: bold">銆�1銆戞敞鍐屽鍔�</span>
+        <span style="font-size: 15px; font-weight: bold">銆�1銆戠Н鍒嗘姷鎵g幇閲戣鍒�</span>
       </div>
       <div class="item-content">
-        <el-form-item label="绉垎濂栧姳" label-width="150px"  prop="regIntegralRewardStatus">
-          <el-switch  v-model="form.regIntegralRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
-        </el-form-item>
-        <el-form-item label="鏂颁汉娉ㄥ唽閫�" label-width="250px" prop="regIntegralReward">
-          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.regIntegralReward"   placeholder="璇疯緭鍏�"   v-trim>
-            <template slot="append">绉垎</template>
-          </el-input>
-        </el-form-item>
-      </div>
-      <div class="item-content">
-        <el-form-item label="浼樻儬鍒稿鍔�" label-width="150px"  prop="regCouponRewardStatus">
-          <el-switch  v-model="form.regCouponRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
-        </el-form-item>
-        <div  >
-          <el-form-item label="鏂颁汉娉ㄥ唽閫佷紭鎯犲埜" label-width="250px" prop="regCouponRewardList">
-          </el-form-item>
-          <div  style="margin-left: 150px;border: 1px solid #f2f2f2">
-            <el-table style="width: 600px;"  :data="form.regCouponRewardList">
-              <el-table-column prop="shopPrice" label="浼樻儬鍒�" min-width="300px" align="center">
-                <template slot-scope="{row}" >
-                  <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px" clearable filterable   placeholder="璇烽�夋嫨浼樻儬鍒�"  >
-                    <el-option v-for="item in couponList"   :label="item.name"  :value="item.id">  </el-option>
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column prop="num" label="鏁伴噺" min-width="200px" align="center">
-                <template slot-scope="{row}" >
-                  <el-input  style="width: 100px;margin: 0px 20px" type="number"   v-model="row.num"   placeholder="璇疯緭鍏ユ暟閲�"   v-trim/>
-                </template>
-              </el-table-column>
-              <el-table-column  label="鎿嶄綔" min-width="100px" align="center">
-                <template slot-scope="scope" >
-                  <el-button style="color: red;border: none;" @click="delCoupon(0,scope.$index)">鍒犻櫎</el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-            <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(0)" style="height: 30px;margin: 10px;">娣诲姞</el-button>
-          </div>
-        </div>
-      </div>
-      <div class="header">
-        <span style="font-size: 15px; font-weight: bold">銆�2銆戦個璇峰ソ鍙嬪鍔�</span>
-      </div>
-      <div class="item-content">
-        <el-form-item label="绉垎濂栧姳" label-width="150px"  prop="shareIntegralRewardStatus">
-          <el-switch  v-model="form.shareIntegralRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
-        </el-form-item>
-        <el-form-item label="濂藉弸鎴愬姛娉ㄥ唽閫侀個璇蜂汉" label-width="250px" prop="shareIntegralReward">
-          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.shareIntegralReward"   placeholder="璇疯緭鍏�"   v-trim>
-            <template slot="append">绉垎</template>
-          </el-input>
-        </el-form-item>
-      </div>
-      <div class="item-content">
-        <el-form-item label="浼樻儬鍒稿鍔�" label-width="150px"  prop="shareCouponRewardStatus">
-          <el-switch  v-model="form.shareCouponRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
-        </el-form-item>
-        <div  >
-          <el-form-item label="濂藉弸瀹屾垚棣栧崟閫侀個璇蜂汉浼樻儬鍒�" label-width="250px" prop="shareCouponRewardList">
-          </el-form-item>
-          <div  style="margin-left: 150px;border: 1px solid #f2f2f2">
-            <el-table style="width: 600px;"  :data="form.shareCouponRewardList">
-              <el-table-column prop="couponId" label="浼樻儬鍒�" min-width="300px" align="center">
-                <template slot-scope="{row}" >
-                  <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px"  clearable filterable   placeholder="璇烽�夋嫨浼樻儬鍒�"  >
-                    <el-option v-for="item in couponList"   :label="item.name"  :value="item.id">  </el-option>
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column prop="num" label="鏁伴噺" min-width="200px" align="center">
-                <template slot-scope="{row}" >
-                  <el-input  style="width: 100px;margin: 0px 20px" type="number"   v-model="row.num"   placeholder="璇疯緭鍏ユ暟閲�"   v-trim/>
-                </template>
-              </el-table-column>
-              <el-table-column  label="鎿嶄綔" min-width="100px" align="center">
-                <template slot-scope="scope" >
-                  <el-button style="color: red;border: none;" @click="delCoupon(1,scope.$index)">鍒犻櫎</el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-            <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(1)" style="height: 30px;margin: 10px;">娣诲姞</el-button>
-          </div>
-        </div>
-      </div>
-      <div class="header">
-        <span style="font-size: 15px; font-weight: bold">銆�3銆戞秷璐硅繑绉垎</span>
-      </div>
-      <div class="item-content">
-        <el-form-item label="杩旂敤鎴风Н鍒�" label-width="150px"  prop="returnMemberIntegralStatus">
-          <el-switch  v-model="form.returnMemberIntegralStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
-        </el-form-item>
-        <el-form-item label="璁㈠崟瀹炰粯閲戦姣忔弧" label-width="250px" prop="returnMemberIntegral">
-          <el-input  style="width: 250px;margin: 0px 20px" type="number"   v-model="form.returnMemberIntegral"   placeholder="璇疯緭鍏�"   v-trim>
-            <template slot="append">鍏冭繑鐢ㄦ埛1绉垎</template>
-          </el-input>
-          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>鎻愰啋锛氬疄浠橀噾棰濆幓闄よ繍璐�</p>
-        </el-form-item>
-      </div>
-      <div class="item-content">
-        <el-form-item label="杩旂粡閿�鍟嗙Н鍒�" label-width="150px"  prop="returnShopIntegralStatus">
-          <el-switch  v-model="form.returnShopIntegralStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
-        </el-form-item>
-        <el-form-item label="璁㈠崟瀹炰粯閲戦姣忔弧" label-width="250px" prop="returnShopIntegral">
-          <el-input  style="width: 250px;margin: 0px 20px" type="number"   v-model="form.returnShopIntegral"   placeholder="璇疯緭鍏�"   v-trim>
-            <template slot="append">鍏冭繑缁忛攢鍟�1绉垎</template>
-          </el-input>
-          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>鎻愰啋锛氬疄浠橀噾棰濆幓闄よ繍璐�</p>
+        <el-form-item label="" label-width="1px" prop="deductIntegralLimit">
+          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.deductIntegralLimit"   placeholder="璇疯緭鍏�"  v-trim>
+          </el-input>绉垎鎶垫墸1鍏�
         </el-form-item>
       </div>
       <div class="header">
-        <span style="font-size: 15px; font-weight: bold">銆�4銆戝悎璁′紭鎯犳壙鎷呮瘮渚�</span>
+        <span style="font-size: 15px; font-weight: bold">銆�2銆戠Н鍒嗕娇鐢ㄩ棬妲�</span>
       </div>
       <div class="item-content">
-        <el-form-item label="鎬婚儴鎵挎媴" label-width="150px" prop="totalRate">
-          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.totalRate"   placeholder="璇疯緭鍏�"   v-trim>
-            <template slot="append">%</template>
-          </el-input>
-          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>鎻愰啋锛氳缃�婚儴鍜岀粡閿�鍟嗗湪璁㈠崟鍚堣浼樻儬閲戦涓紙浼樻儬鍒�+绉垎鎶垫墸锛夊悇鑷壙鎷呯殑姣斾緥</p>
+        <el-form-item label="绉垎婊�" label-width="150px" prop="minIntegralPriceLimit">
+          <el-input  style="width: 150px;margin: 0px 20px" type="number"   v-model="form.minIntegralPriceLimit"   placeholder="璇疯緭鍏�"   v-trim>
+            <template slot="append">鍏�</template>
+          </el-input>鍙敤
+        </el-form-item>
+      </div>
+      <div class="item-content">
+        <el-form-item label="绉垎澶辨晥瑙勫垯" label-width="150px"  prop="integralInvalidType">
+          <el-radio-group v-model="form.integralInvalidType">
+            <el-radio :label="0">闀挎湡鏈夋晥</el-radio>
+            <el-radio :label="1">鎸夌Н鍒嗕骇鐢熸椂闂村け鏁�</el-radio>
+          </el-radio-group>
+          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>璇存槑锛氱Н鍒嗘寜鏈堥攢姣侊紝鏍规嵁绉垎鐢熸垚鏃堕棿锛岃缃攢姣佸懆鏈�(鍗曚綅锛氬勾)锛屽閿�姣佸懆鏈熻缃�1骞达紝鍘诲勾9鏈堜唤浜х敓鐨勭Н鍒嗭紝鍒颁粖骞�10鏈�1鍙�00:00鏃跺叏閮ㄧ粺涓�閿�姣侊紱</p>
+        </el-form-item>
+      </div>
+      <div class="item-content">
+        <el-form-item label="绉垎澶辨晥瑙勫垯" label-width="150px"  prop="integralInvalidCircle">
+          <el-input  style="width: 200px;margin: 0px 20px" type="number"  v-model="form.integralInvalidCircle"   placeholder="璇疯緭鍏�"   v-trim>
+            <template slot="append">骞�</template> </el-input>
+          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>璇存槑锛氶厤缃悗鏍规嵁浼氬憳绉垎鐢熸垚鏃堕棿鐨勫懆鏈熸竻绌猴紝鍗曚綅锛氬勾</p>
+        </el-form-item>
+      </div>
+      <div class="header">
+        <span style="font-size: 15px; font-weight: bold">銆�3銆戠Н鍒嗚鍒欒鏄�</span>
+      </div>
+      <div class="item-content">
+        <el-form-item label="" label-width="1px"  prop="integralRuleInfo">
+          <RichEditor  :richData="form.integralRuleInfo" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/>
         </el-form-item>
       </div>
       <el-form-item style="margin-top: 100px;width: 100%;text-align: center">
@@ -134,85 +53,51 @@
 
 <script>
 import { getPlatformConfig, updPlatformConfig } from '@/api/system/dictData'
-import {allList} from '@/api/business/coupon'
+import RichEditor from '@/components/common/RichEditor'
 export default {
   name: '',
+  components: { RichEditor },
   data () {
     return {
       uploadData: {
         folder: ''
       },
+      styleEditor: 'border: 1px solid #ccc;display: inline-block;height:400px;',
       isUploading: false,
       working: false,
       couponList: [],
       form: {
-        regIntegralRewardStatus: 0,
-        shareIntegralRewardStatus: 0,
-        regCouponRewardStatus: 0,
-        shareCouponRewardStatus: 0,
-        regIntegralReward: 0,
-        shareIntegralReward: 0,
-        regCouponRewardList: [],
-        shareCouponRewardList: [],
-        returnMemberIntegralStatus: 0,
-        returnShopIntegralStatus: 0,
-        returnMemberIntegral: 0,
-        returnShopIntegral: 0,
-        totalRate: 0
+        dictCode:'INTEGRAL_SET',
+        integralRuleInfo: null,
+        integralInvalidCircle: 0,
+        integralInvalidType: 0,
+        minIntegralPriceLimit: 0,
+        deductIntegralLimit: 0
       }
     }
   },
-
   created () {
-    this.getCouponList()
     this.getData()
   },
 
   methods: {
-    getCouponList () {
-      allList({})
-        .then(res => {
-          if (res) {
-            this.couponList = res || []
-          }
-        })
-    },
-    delCoupon(type,index){
-      if(type ===0){
-        this.form.regCouponRewardList.splice(index,1)
-      }else if(type ===1){
-        this.form.shareCouponRewardList.splice(index,1)
-      }
-    },
-    addCoupon(type){
-      if(type ===0){
-        this.form.regCouponRewardList.push({couponId:null,num:null})
-      }else if(type ===1){
-        this.form.shareCouponRewardList.push({couponId:null,num:null})
-      }
-
-    },
     getData () {
       getPlatformConfig({})
         .then(res => {
           if (res) {
             this.form = {
-              regIntegralRewardStatus: res.regIntegralRewardStatus || 0,
-              shareIntegralRewardStatus: res.shareIntegralRewardStatus || 0,
-              regCouponRewardStatus: res.regCouponRewardStatus || 0,
-              shareCouponRewardStatus: res.shareCouponRewardStatus || 0,
-              regIntegralReward: res.regIntegralReward || 0,
-              shareIntegralReward: res.shareIntegralReward || 0,
-              regCouponRewardList: res.regCouponRewardList || [],
-              shareCouponRewardList: res.shareCouponRewardList || [],
-              returnMemberIntegralStatus: res.returnMemberIntegralStatus || 0,
-              returnShopIntegralStatus: res.returnShopIntegralStatus || 0,
-              returnMemberIntegral: res.returnMemberIntegral || 0,
-              returnShopIntegral: res.returnShopIntegral || 0,
-              totalRate: res.totalRate || 0
+              dictCode: 'INTEGRAL_SET',
+              integralRuleInfo: res.integralRuleInfo || null,
+              integralInvalidCircle: res.integralInvalidCircle || 0,
+              integralInvalidType: res.integralInvalidType || 0,
+              minIntegralPriceLimit: res.minIntegralPriceLimit || 0,
+              deductIntegralLimit: res.deductIntegralLimit || 0
             }
           }
         })
+    },
+    getWangedditor (val) {
+      this.form.integralRuleInfo = val
     },
     submit () {
       console.log(this.form)
@@ -248,7 +133,7 @@
   width: 100%;
 }
 .header{
-  margin: 20px 0 20px 0;padding:10px;background-color: rgba(140,147,157,0.61);
+  margin: 20px 0 20px 0;padding:10px;background-color: #E0DEDE;
 }
 /deep/ .el-main{
   width: 100%;
@@ -258,7 +143,7 @@
 }
 .box {
   width: 100%;
-  padding: 30px;
+  padding: 0 30px;
   box-sizing: border-box;
   background: #ffffff;
 }

--
Gitblit v1.9.3