From 4eac422e52a4d28fb651b75d0f054697c7a2c0fa Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 09 二月 2026 15:14:13 +0800
Subject: [PATCH] 优化
---
admin/src/views/business/integralRuleSet.vue | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 150 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/business/integralRuleSet.vue b/admin/src/views/business/integralRuleSet.vue
new file mode 100644
index 0000000..4b02938
--- /dev/null
+++ b/admin/src/views/business/integralRuleSet.vue
@@ -0,0 +1,150 @@
+<template>
+ <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銆戠Н鍒嗘姷鎵g幇閲戣鍒�</span>
+ </div>
+ <div class="item-content">
+ <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">銆�2銆戠Н鍒嗕娇鐢ㄩ棬妲�</span>
+ </div>
+ <div class="item-content">
+ <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">
+ <el-button type="primary" style="width: 300px" :loading="working" @click="submit">淇濆瓨閰嶇疆椤�</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+</template>
+
+<script>
+import { getPlatformConfig, updPlatformConfig } from '@/api/system/dictData'
+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: {
+ dictCode:'INTEGRAL_SET',
+ integralRuleInfo: null,
+ integralInvalidCircle: 0,
+ integralInvalidType: 0,
+ minIntegralPriceLimit: 0,
+ deductIntegralLimit: 0
+ }
+ }
+ },
+ created () {
+ this.getData()
+ },
+
+ methods: {
+ getData () {
+ getPlatformConfig({})
+ .then(res => {
+ if (res) {
+ this.form = {
+ 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)
+ this.$refs.form.validate((valid) => {
+ if (!valid) {
+ return
+ }
+ // 璋冪敤鏂板缓鎺ュ彛
+ this.isWorking = true
+ updPlatformConfig(this.form).then(res => {
+ this.$message.success('淇濆瓨鎴愬姛')
+ this.getData()
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ })
+ }
+ }
+}
+</script>
+<style lang="scss" scoped>
+.el-container /deep/ .el-main{
+ width: 100%;
+ overflow-y: auto !important ;
+ height: calc(100% - 94px);
+}
+.item-content{
+ display: flex;
+ width: 100%;
+}
+.header{
+ margin: 20px 0 20px 0;padding:10px;background-color: #E0DEDE;
+}
+/deep/ .el-main{
+ width: 100%;
+ //height: 100%;
+ overflow-y: auto !important ;
+ height: calc(100% - 94px);
+}
+.box {
+ width: 100%;
+ padding: 0 30px;
+ box-sizing: border-box;
+ background: #ffffff;
+}
+</style>
--
Gitblit v1.9.3