Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui
commit
52bcf07e25
|
@ -1,10 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||||
<FormItem label="积分比率" prop="money">
|
<FormItem label="消费1元赠送积分" prop="money">
|
||||||
<Input type="number" v-model="formValidate.money">
|
<Input type="number" v-model="formValidate.money">
|
||||||
<span slot="prepend">1积分=</span>
|
<span slot="append">积分</span>
|
||||||
<span slot="append">人民币</span>
|
<!-- <span slot="append">人民币</span>-->
|
||||||
|
</Input>
|
||||||
|
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="积分抵扣付款" prop="money">
|
||||||
|
<Input type="number" v-model="formValidate.money">
|
||||||
|
<span slot="prepend">积分</span>
|
||||||
|
<span slot="append"> = 1 人民币</span>
|
||||||
</Input>
|
</Input>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -35,7 +42,8 @@
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem class="label-item" v-for="(point,index) in formValidate.pointSettingItems" :key="index" :label="'签到设置'+(index+1)">
|
<FormItem class="label-item" v-for="(point,index) in formValidate.pointSettingItems" :key="index"
|
||||||
|
:label="'签到设置'+(index+1)">
|
||||||
<div class="label-item">
|
<div class="label-item">
|
||||||
|
|
||||||
<InputNumber :min="1" v-model="point.day"></InputNumber>
|
<InputNumber :min="1" v-model="point.day"></InputNumber>
|
||||||
|
@ -43,7 +51,8 @@
|
||||||
<InputNumber :min="0" v-model="point.point"></InputNumber>
|
<InputNumber :min="0" v-model="point.point"></InputNumber>
|
||||||
|
|
||||||
<Button ghost type="error" @click="delSign(point,index)">删除</Button>
|
<Button ghost type="error" @click="delSign(point,index)">删除</Button>
|
||||||
<span class="ml_10">签到<span class="theme_color">{{point.day}}</span>天,赠送<span class="theme_color">{{point.point}}</span>积分</span>
|
<span class="ml_10">签到<span class="theme_color">{{ point.day }}</span>天,赠送<span
|
||||||
|
class="theme_color">{{ point.point }}</span>积分</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -58,8 +67,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { setSetting } from "@/api/index";
|
import {setSetting} from "@/api/index";
|
||||||
import { handleSubmit } from "./validate";
|
import {handleSubmit} from "./validate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -101,7 +111,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.formValidate.pointSettingItems.push({
|
this.formValidate.pointSettingItems.push({
|
||||||
point: "0",
|
point: "0",
|
||||||
day: this.formValidate.pointSettingItems.length ,
|
day: this.formValidate.pointSettingItems.length,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 实例化数据
|
// 实例化数据
|
||||||
|
@ -114,7 +124,7 @@ export default {
|
||||||
this.res[item] += "";
|
this.res[item] += "";
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$set(this, "formValidate", { ...this.res });
|
this.$set(this, "formValidate", {...this.res});
|
||||||
|
|
||||||
Object.keys(this.formValidate).forEach((item) => {
|
Object.keys(this.formValidate).forEach((item) => {
|
||||||
this.ruleValidate[item] = [
|
this.ruleValidate[item] = [
|
||||||
|
@ -150,22 +160,27 @@ export default {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .ivu-input-number:nth-last-of-type(1) {
|
> .ivu-input-number:nth-last-of-type(1) {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .ivu-input {
|
> .ivu-input {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .ivu-input {
|
/deep/ .ivu-input {
|
||||||
width: 70px !important;
|
width: 70px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ivu-input-wrapper {
|
.ivu-input-wrapper {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-btns {
|
.label-btns {
|
||||||
/deep/ .ivu-btn {
|
/deep/ .ivu-btn {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
Loading…
Reference in New Issue