| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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ãç§¯åæµæ£ç°éè§å</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> |