com-setting.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template id="com-setting">
  2. <div class="com-setting">
  3. <el-form size="mini" :data="form" label-width="180px">
  4. <el-form-item label="是否开启分销" prop="is_distribution" v-if="is_distribution">
  5. <el-switch
  6. v-model="form.is_distribution"
  7. :active-value="1"
  8. :inactive-value="0">
  9. </el-switch>
  10. <div class="red">注:必须在“
  11. <el-button type="text" @click="$navigate({r:'mall/distribution/basic'}, true)">分销中心=>基础设置</el-button>
  12. ”中开启,才能使用
  13. </div>
  14. </el-form-item>
  15. <el-form-item label="是否开启短信提醒" prop="is_sms" v-if="is_sms">
  16. <el-switch
  17. v-model="form.is_sms"
  18. :active-value="1"
  19. :inactive-value="0">
  20. </el-switch>
  21. <div class="ml-24 red">注:必须在“
  22. <el-button type="text" @click="$navigate({r:'mall/setting/sms'}, true)">系统管理=>短信通知</el-button>
  23. ”中开启,才能使用
  24. </div>
  25. </el-form-item>
  26. <el-form-item class="switch" label="是否开启区域允许购买" prop="is_territorial_limitation" v-if="is_territorial_limitation">
  27. <el-switch v-model="form.is_territorial_limitation" :active-value="1"
  28. :inactive-value="0"></el-switch>
  29. <span class="ml-24 red">注:必须在“
  30. <el-button type="text" @click="$navigate({r:'mall/area-limit/index'}, true)">
  31. 系统管理=>区域允许购买
  32. </el-button>
  33. ”中开启,才能使用
  34. </span>
  35. </el-form-item>
  36. <el-form-item label="支付方式" prop="payment_type" v-if="is_payment">
  37. <label slot="label">支付方式
  38. <el-tooltip class="item" effect="dark"
  39. content="默认支持线上支付;若三个都不勾选,则视为勾选线上支付"
  40. placement="top">
  41. <i class="el-icon-info"></i>
  42. </el-tooltip>
  43. </label>
  44. <el-checkbox-group v-model="form.payment_type" size="mini">
  45. <el-checkbox label="online_pay" size="mini">线上支付</el-checkbox>
  46. <el-checkbox label="huodao" size="mini" v-if="is_surpport_huodao">货到付款</el-checkbox>
  47. <el-checkbox label="balance" size="mini">余额支付</el-checkbox>
  48. </el-checkbox-group>
  49. </el-form-item>
  50. <el-form-item label="发货方式" prop="send_type" v-if="is_send_type">
  51. <label slot="label">发货方式
  52. <el-tooltip class="item" effect="dark"
  53. content="自提需要设置门店,如果您还未设置门店请保存本页后设置门店"
  54. placement="top">
  55. <i class="el-icon-info"></i>
  56. </el-tooltip>
  57. </label>
  58. <div>
  59. <el-checkbox-group v-model="form.send_type">
  60. <el-checkbox label="express">快递配送</el-checkbox>
  61. <el-checkbox label="offline">到店自提</el-checkbox>
  62. <el-checkbox label="city" v-if="is_surpport_city">同城配送</el-checkbox>
  63. </el-checkbox-group>
  64. </div>
  65. </el-form-item>
  66. </el-form>
  67. </div>
  68. </template>
  69. <script>
  70. Vue.component('com-setting', {
  71. template: '#com-setting',
  72. props: {
  73. value: Object,
  74. is_distribution: {
  75. type: Boolean,
  76. default() {
  77. return true;
  78. }
  79. },
  80. is_sms: {
  81. type: Boolean,
  82. default() {
  83. return true;
  84. }
  85. },
  86. is_mail: {
  87. type: Boolean,
  88. default() {
  89. return true;
  90. }
  91. },
  92. is_print: {
  93. type: Boolean,
  94. default() {
  95. return true;
  96. }
  97. },
  98. is_territorial_limitation: {
  99. type: Boolean,
  100. default() {
  101. return true;
  102. }
  103. },
  104. is_payment: {
  105. type: Boolean,
  106. default() {
  107. return true;
  108. }
  109. },
  110. is_send_type: {
  111. type: Boolean,
  112. default() {
  113. return true;
  114. }
  115. },
  116. is_surpport_huodao: {
  117. type: Boolean,
  118. default() {
  119. return true;
  120. }
  121. },
  122. is_surpport_city: {
  123. type: Boolean,
  124. default() {
  125. return true;
  126. }
  127. },
  128. },
  129. data() {
  130. return {
  131. setting: {
  132. is_distribution: 0,
  133. is_sms: 0,
  134. is_mail: 0,
  135. is_print: 0,
  136. is_territorial_limitation: 0,
  137. send_type: ['express', 'offline'],
  138. payment_type: ['online_pay'],
  139. }
  140. };
  141. },
  142. computed: {
  143. form() {
  144. for (let key in this.setting) {
  145. if (typeof this.value[key] === 'undefined') {
  146. this.value[key] = this.setting[key];
  147. }
  148. }
  149. return this.value;
  150. }
  151. },
  152. });
  153. </script>