com-setting.php 7.2 KB

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