level.blade.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. @extends('layouts.base')
  2. @section('title', '会员等级设置')
  3. @section('content')
  4. <link href="{{static_url('yunshop/css/total.css')}}" media="all" rel="stylesheet" type="text/css" />
  5. <link rel="stylesheet" href="{{static_url('css/public-number.css')}}">
  6. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  7. <style scoped>
  8. .main-panel{
  9. margin-top:50px;
  10. }
  11. .main-panel #re_content {
  12. padding: 10px;
  13. }
  14. .panel{
  15. margin-bottom:10px!important;
  16. border-radius: 10px;
  17. padding-left: 20px;
  18. }
  19. .panel .active a {
  20. background-color: #29ba9c!important;
  21. border-radius: 18px!important;
  22. color:#fff;
  23. }
  24. .panel a{
  25. border:none!important;
  26. background-color:#fff!important;
  27. }
  28. .content{
  29. background: #eff3f6;
  30. padding:10px!important;
  31. }
  32. .con{
  33. padding-bottom:40px;
  34. position:relative;
  35. border-radius: 8px;
  36. }
  37. .con .setting .block{
  38. padding:10px;
  39. background-color:#fff;
  40. border-radius: 8px;
  41. }
  42. .block{
  43. padding:10px;
  44. background-color:#fff;
  45. border-radius: 8px;
  46. }
  47. .con .setting .block .title{
  48. font-size:18px;
  49. margin-bottom:15px;
  50. display:flex;
  51. align-items:center;
  52. }
  53. .confirm-btn{
  54. width: calc(100% - 266px);
  55. position:fixed;
  56. bottom:0;
  57. right:0;
  58. margin-right:10px;
  59. line-height:63px;
  60. background-color: #ffffff;
  61. box-shadow: 0px 8px 23px 1px
  62. rgba(51, 51, 51, 0.3);
  63. background-color:#fff;
  64. text-align:center;
  65. }
  66. b{
  67. font-size:14px;
  68. }
  69. .el-checkbox__inner{
  70. border:solid 1px #56be69!important;
  71. }
  72. .upload-boxed .el-icon-close {
  73. position: absolute;
  74. top: -5px;
  75. right: -5px;
  76. color: #fff;
  77. background: #333;
  78. border-radius: 50%;
  79. cursor: pointer;
  80. }
  81. </style>
  82. <div style="padding: 10px">
  83. @include('layouts.newTabs')
  84. <div>
  85. <div id="app" v-cloak>
  86. <div class="total-head block" style="margin: 0 0 20px 0;padding: 0">
  87. <!-- 会员等级设置 -->
  88. <div class="block">
  89. <div class="vue-title">
  90. <div class="vue-title-left"></div>
  91. <div class="vue-title-content">会员等级设置</div>
  92. </div>
  93. <el-form ref="form" :model="form" label-width="15%">
  94. <el-form-item label="默认会员级别名称" >
  95. <el-input v-model="form.level_name" placeholder="请输入会员级别名称" style="width:70%;"></el-input>
  96. <div style="font-size:12px;">会员默认等级名称,不填写默认“普通会员”</div>
  97. </el-form-item>
  98. <el-form-item label="会员等级权益页面是否显示" >
  99. <template>
  100. <el-switch
  101. v-model="form.display_page"
  102. active-value="1"
  103. inactive-value="0"
  104. >
  105. </el-switch>
  106. </template>
  107. <div style="font-size:12px;">提示: 开启,用户在商品详情页和会员中心点击会员等级都可以进入等级权益页面</div>
  108. </el-form-item>
  109. <el-form-item label="会员等级升级依据">
  110. <template>
  111. <el-radio-group v-model="form.level_type">
  112. <el-radio label="0">订单金额</el-radio>
  113. <el-radio label="1">订单数量</el-radio>
  114. <el-radio label="2">指定购买商品</el-radio>
  115. <el-radio label="3">团队业绩(自购+一级+二级)</el-radio>
  116. <el-radio label="4">一次性充值余额</el-radio>
  117. </el-radio-group>
  118. </template>
  119. </el-form-item>
  120. <el-form-item label=" ">
  121. <template>
  122. <el-radio-group v-model="form.level_after">
  123. <el-radio label="1">付款后</el-radio>
  124. <el-radio label="0">完成后</el-radio>
  125. </el-radio-group>
  126. </template>
  127. <div style="font-size:12px;">如果选择付款后,只要用户下单付款满足升级依据,即可升级;如果选择完成后,则表示需要订单完成状态才能升级</div>
  128. </el-form-item>
  129. <el-form-item label="会员等级时间限制" >
  130. <template>
  131. <el-switch
  132. v-model="form.term"
  133. active-value="1"
  134. inactive-value="0"
  135. >
  136. </el-switch>
  137. </template>
  138. <div style="font-size:12px;">只对指定购买商品升级依据生效,设置其它条件时会员等级不会受到该选项影响</div>
  139. </el-form-item>
  140. <el-form-item label="会员等级优惠计算方式 ">
  141. <template>
  142. <el-radio-group v-model="form.level_discount_calculation">
  143. <el-radio label="0">折扣方式</el-radio>
  144. <el-radio label="1">成本比例方式</el-radio>
  145. </el-radio-group>
  146. </template>
  147. <div style="font-size:12px;"> 折扣方式:按打折计算最高10折,折扣价格= 商品现价 * (1 - 折扣率/10 ) <br/>
  148. 成本比例方式:按百分比计算最高999%, 折扣价格 = 商品成本价 * (比例/100) <br/></div>
  149. </el-form-item>
  150. <el-form-item label="商品详情会员折扣" >
  151. <template>
  152. <el-switch
  153. v-model="form.discount"
  154. active-value="1"
  155. inactive-value="2"
  156. >
  157. </el-switch>
  158. </template>
  159. </el-form-item>
  160. <el-form-item label="会员价" >
  161. <template>
  162. <el-switch
  163. v-model="form.vip_price"
  164. active-value="1"
  165. inactive-value="2"
  166. >
  167. </el-switch>
  168. </template>
  169. <div style="font-size:12px;">开启后,在前端商品选择规格页面,购物车页面,填写订单页面,我的订单页面,订单详情页面,存货订单页面(存货订单插件)显示会员价 <br/></div>
  170. </el-form-item>
  171. </el-form>
  172. </div>
  173. </div>
  174. <div class="confirm-btn">
  175. <el-button type="primary" @click="submit">提交</el-button>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. <script>
  181. var vm = new Vue({
  182. el: '#app',
  183. delimiters: ['[[', ']]'],
  184. data() {
  185. let set = {!! json_encode(($set?:[])) !!};
  186. return {
  187. uploadShow:false,
  188. chooseImgName:'',
  189. uploadListShow:false,
  190. chooseImgListName:'',
  191. type:'',
  192. selNum:'',
  193. form:{
  194. ...set
  195. },
  196. }
  197. },
  198. created() {
  199. },
  200. mounted () {
  201. console.log(this.form,111);
  202. },
  203. methods: {
  204. submit() {
  205. let that = this;
  206. let url = '{!! yzWebFullUrl('member.member-set.level-store') !!}';
  207. let json = {
  208. set : this.form
  209. };
  210. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  211. this.$http.post(url,json).then(response => {
  212. if (response.data.result) {
  213. this.$message({type: 'success',message: response.data.msg});
  214. } else {
  215. this.$message({message: response.data.msg,type: 'error'});
  216. }
  217. loading.close();
  218. // location.reload();
  219. },response => {
  220. loading.close();
  221. });
  222. },
  223. }
  224. })
  225. </script>
  226. @endsection