bztang-admin/plugins/cultural-space/views/widget/marketing/cultural_space.js

77 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

define({
name:"cultural_space",
template:`
<div class="cultural_space">
<el-form>
<div style="margin:0 auto;width:80%;">
<el-form-item label="是否开启" label-width="155px">
<el-radio v-model="json.is_open" :label="0">关闭</el-radio>
<el-radio v-model="json.is_open" :label="1">开启</el-radio>
</el-form-item>
</div>
<template v-if="json.is_open == 1">
<div style="margin:0 auto;width:80%;">
<el-form-item label="是否赠送贡献值" label-width="155px">
<el-radio v-model="json.is_give_contribution" :label="0">不开启</el-radio>
<el-radio v-model="json.is_give_contribution" :label="1">开启</el-radio>
<div class="form-item_tips">赠送贡献值比例在文创空间基本设置中同意设置</div>
</el-form-item>
</div>
</template>
<template >
<div style="margin:0 auto;width:80%;">
<el-form-item label="是否开启基金增值" label-width="155px">
<el-radio v-model="json.is_fund_open" :label="0">不开启</el-radio>
<el-radio v-model="json.is_fund_open" :label="1">开启</el-radio>
<div class="form-item_tips">是否开启基金消费双向增值</div>
</el-form-item>
</div>
</template>
</el-form>
</div>
`,
style:`
.ladder-content{
min-width: 550px!important;
}
.ladder-content .ladder-row{
margin-bottom: 5px!important;
}
.ladder-content .ladder-row .ladder-input{
width: 230px!important;
}
`,
props: {
form: {
default() {
return {}
}
}
},
data() {
return {
json: {
is_open: 0,// 当前商品是否参与文创空间0=未开启1=开启
is_give_contribution: 0,// 是否赠送贡献值0=不赠送1=赠送
is_fund_open: 0,// 是否赠送贡献值0=不赠送1=赠送
}
}
},
watch: { },
mounted() {
if (this.form) {
let cultural_space = this.form || {};
console.log('商品权重值设置信息');
console.log(cultural_space);
this.json.is_open = cultural_space.is_open ? cultural_space.is_open : 0;
this.json.is_give_contribution = cultural_space.is_give_contribution ? cultural_space.is_give_contribution : 0;
this.json.is_fund_open = cultural_space.is_fund_open ? cultural_space.is_fund_open : 0;
}
},
methods:{
validate(){
return this.json;
}
}
})