edit.php 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. $diyPath = dirname(__DIR__) . '/components';
  4. ComponentHelper::loadComponentView('com-dialog-select');
  5. ComponentHelper::loadComponentView('com-select-cat');
  6. ComponentHelper::loadComponentView('agent-setting-add', $diyPath);
  7. ?>
  8. <div id="app" v-cloak>
  9. <el-card class="box-card" v-loading="cardLoading" shadow="never" style="border:0;min-width: 1500px;"
  10. body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  11. <div slot="header">
  12. <el-breadcrumb separator="/">
  13. <el-breadcrumb-item>
  14. <span style="color: #409EFF;cursor: pointer"
  15. @click="$navigate({r:'cloud-stock-two/level/index'})">
  16. 代理商等级
  17. </span>
  18. </el-breadcrumb-item>
  19. <el-breadcrumb-item>{{titleName}}</el-breadcrumb-item>
  20. </el-breadcrumb>
  21. </div>
  22. <div class="form-body">
  23. <el-form :model="ruleForm" :rules="rules" size="small" ref="ruleForm" label-width="180px" v-loading="btnLoading">
  24. <el-row>
  25. <el-col :span="40">
  26. <el-form-item label="代理商等级权重" prop="level">
  27. <el-select style="width: 100%" v-model="ruleForm.level" @change="levelChangeFun" placeholder="请选择">
  28. <el-option
  29. v-for="item in weights"
  30. :key="item.level"
  31. :label="item.name"
  32. :value="item.level"
  33. :disabled="item.is_can_choose == 0?true:false">
  34. </el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="代理商等级名称" prop="name">
  38. <el-input v-model="ruleForm.name" placeholder="请输入代理商等级名称" maxlength="10"></el-input>
  39. </el-form-item>
  40. <el-form-item label="代理进货数量限制" prop="name">
  41. <el-switch
  42. v-model="ruleForm.is_open_fill_min"
  43. :active-value="1"
  44. :inactive-value="0">
  45. </el-switch>
  46. <el-input v-model="ruleForm.fill_min" placeholder="请输入限制数量" maxlength="10"></el-input>
  47. </el-form-item>
  48. <!-- <el-form-item label="是否开启越级奖" prop="is_over" required>
  49. <el-switch
  50. v-model="ruleForm.is_over"
  51. :active-value="1"
  52. :inactive-value="0">
  53. </el-switch>
  54. </el-form-item>
  55. <el-form-item label="是否开启平级奖" prop="is_equal" required>
  56. <el-switch
  57. v-model="ruleForm.is_equal"
  58. :active-value="1"
  59. :inactive-value="0">
  60. </el-switch>
  61. </el-form-item>
  62. <el-form-item label="补货奖" prop="is_fill" required>
  63. <el-switch
  64. v-model="ruleForm.is_fill"
  65. :active-value="1"
  66. :inactive-value="0">
  67. </el-switch>
  68. </el-form-item> -->
  69. <!-- <el-form-item label="团队奖佣金类型" prop="is_percent_team">
  70. <el-radio-group v-model="ruleForm.commission.is_percent_team">
  71. <el-radio :label="0">百分比</el-radio>
  72. <el-radio :label="1">固定金额</el-radio>
  73. </el-radio-group>
  74. </el-form-item>
  75. <el-form-item label="团队奖励">
  76. <el-input v-model.number="ruleForm.commission.agent_team_prize" type="number" onInput="value=toNumber(value,2)">
  77. <template slot="append" v-if="ruleForm.commission.is_percent_team == 0">%</template>
  78. <template slot="append" v-if="ruleForm.commission.is_percent_team == 1">元</template>
  79. </el-input>
  80. </el-form-item> -->
  81. <el-form-item label="被越级的奖励">
  82. <el-input v-model.number="ruleForm.commission.agent_over_prize" type="number">
  83. <template slot="append">%</template>
  84. </el-input>
  85. </el-form-item>
  86. <!-- <el-form-item label="团队奖积分类型" prop="is_percent_team" >
  87. <el-radio-group v-model="ruleForm.score.is_percent_team">
  88. <el-radio :label="0">百分比</el-radio>
  89. <el-radio :label="1">固定积分</el-radio>
  90. </el-radio-group>
  91. </el-form-item>
  92. <el-form-item label="团队积分奖励">
  93. <el-input v-model.number="ruleForm.score.agent_team_prize" type="number" onInput="value=toNumber(value,2)">
  94. <template slot="append" v-if="ruleForm.score.is_percent_team == 0">%</template>
  95. <template slot="append" v-if="ruleForm.score.is_percent_team == 1">积分</template>
  96. </el-input>
  97. </el-form-item>
  98. <el-form-item label="被越级的积分奖励">
  99. <el-input v-model.number="ruleForm.score.agent_over_prize" type="number" onInput="value=toNumber(value,2)">
  100. <template slot="append">%</template>
  101. </el-input>
  102. </el-form-item> -->
  103. <el-form-item label="平级奖佣金类型" prop="is_percent_equal">
  104. <el-radio-group v-model="ruleForm.commission.is_percent_equal">
  105. <el-radio :label="0">百分比</el-radio>
  106. <el-radio :label="1">固定金额</el-radio>
  107. </el-radio-group>
  108. </el-form-item>
  109. <el-form-item label="平级奖励">
  110. <el-input v-model.number="ruleForm.commission.agent_equal_prize" type="number" onInput="value=toNumber(value,2)">
  111. <template slot="append" v-if="ruleForm.commission.is_percent_equal == 0">%</template>
  112. <template slot="append" v-if="ruleForm.commission.is_percent_equal == 1">元</template>
  113. </el-input>
  114. </el-form-item>
  115. <!-- <el-form-item label="平级奖积分类型" prop="is_percent_equal">
  116. <el-radio-group v-model="ruleForm.score.is_percent_equal">
  117. <el-radio :label="0">百分比</el-radio>
  118. <el-radio :label="1">固定积分</el-radio>
  119. </el-radio-group>
  120. </el-form-item>
  121. <el-form-item label="平级积分奖励">
  122. <el-input v-model.number="ruleForm.score.agent_equal_prize" type="number" onInput="value=toNumber(value,2)">
  123. <template slot="append" v-if="ruleForm.score.is_percent_equal == 0">%</template>
  124. <template slot="append" v-if="ruleForm.score.is_percent_equal == 1">积分</template>
  125. </el-input>
  126. </el-form-item> -->
  127. <!-- <el-form-item label="开启独立平级奖结算" prop="is_open_equal_settle_type">
  128. <el-switch v-model="ruleForm.is_open_equal_settle_type" :active-value="1" :inactive-value="0">
  129. </el-switch>
  130. </el-form-item>
  131. <el-form-item v-if="ruleForm.is_open_equal_settle_type==1" prop="equal_settle_type" label="平级奖结算方式">
  132. <label slot="label">平级奖结算方式
  133. <el-tooltip class="item" effect="dark" content="奖励是由谁来结算平级奖" placement="top">
  134. <i class="el-icon-info"></i>
  135. </el-tooltip>
  136. </label>
  137. <el-col :span="30">
  138. <el-radio-group v-model="ruleForm.equal_settle_type" size="small">
  139. <el-radio :label="0" border>平台结算</el-radio>
  140. <el-radio :label="1" border>上级拿级差或团队奖者支付</el-radio>
  141. <el-radio :label="2" border>下级拿级差或团队奖者支付</el-radio>
  142. </el-radio-group>
  143. </el-col>
  144. </el-form-item> -->
  145. <el-form-item label="直推下级代理奖励设置" prop="is_recommender_reward">
  146. <el-switch v-model="ruleForm.is_recommender_reward" :active-value="1" :inactive-value="0">
  147. </el-switch>
  148. <div style="width:800px;" v-if="ruleForm.is_recommender_reward">
  149. <agent-setting-add v-model="ruleForm.agent_setting_info"
  150. text1="直推下级成为" text2=",奖励" append2="元" :type="2" :level_list="edit.list"></agent-setting-add>
  151. </div>
  152. </el-form-item>
  153. <el-form-item label="直推下级代理奖条件" prop="is_recommender_condition">
  154. <el-switch v-model="ruleForm.is_recommender_condition" :active-value="1" :inactive-value="0">
  155. </el-switch>
  156. </el-form-item>
  157. <el-form-item label="直推下级代理奖条件前需自身进货价的" v-if="ruleForm.is_recommender_condition">
  158. <el-input v-model.number="ruleForm.recommender_condition_prize" type="number">
  159. <template slot="append">%</template>
  160. </el-input>
  161. </el-form-item>
  162. <el-form-item label="结算比例" prop="recommender_settle_prize">
  163. <el-radio-group v-model="ruleForm.recommender_settle_prize">
  164. <el-radio :label="0">百分比</el-radio>
  165. <el-radio :label="1">固定金额</el-radio>
  166. </el-radio-group>
  167. <el-input v-model.number="ruleForm.recommender_settle_rate" type="number" onInput="value=toNumber(value,2)">
  168. <template slot="append" v-if="ruleForm.recommender_settle_prize == 0">%</template>
  169. <template slot="append" v-if="ruleForm.recommender_settle_prize== 1">元</template>
  170. </el-input>
  171. </el-form-item>
  172. <!-- <el-form-item label="直推下级代理奖条件" prop="is_recommender_diff">
  173. <el-switch v-model="ruleForm.is_recommender_diff" :active-value="1" :inactive-value="0">
  174. </el-switch>
  175. </el-form-item> -->
  176. <el-form-item label="条件升级">
  177. <el-form-item>
  178. <el-switch
  179. v-model="ruleForm.upgrade_type_condition"
  180. @change="upgradeTypeSwitch"
  181. :active-value="1"
  182. :inactive-value="0"
  183. active-text="开启"
  184. inactive-text="关闭"
  185. >
  186. </el-switch>
  187. </el-form-item>
  188. <el-form-item v-if="ruleForm.upgrade_type_condition==1">
  189. <el-radio-group v-model="ruleForm.condition_type">
  190. <el-radio :label="1">满足其一条件可升级</el-radio>
  191. <el-radio :label="2">满足所有条件可升级</el-radio>
  192. </el-radio-group>
  193. </el-form-item>
  194. <div v-if="ruleForm.upgrade_type_condition==1">
  195. <div style="margin-bottom: 20px;display: flex;">
  196. <el-checkbox v-model="checkbox1isCheck" label="条件1:购买指定商品"></el-checkbox>
  197. <com-dialog-select :multiple="true" @selected="goodsSelect"
  198. title="商品选择">
  199. <el-button v-if="checkbox1isCheck" type="primary" style="margin-left: 20px;">选择商品</el-button>
  200. </com-dialog-select>
  201. </div>
  202. <el-form-item v-if="checkbox1isCheck">
  203. <template>
  204. <div style="color: #ff4544;">最多可添加10个商品 &nbsp;&nbsp; 当前已经选择 <span style="font-size: 18px;">{{ruleForm.goods_list.length}}</span> 个商品</div>
  205. <div style="max-height: 300px;overflow-y: auto" >
  206. <el-table :data="ruleForm.goods_list" :show-header="false" border>
  207. <el-table-column label="">
  208. <template slot-scope="scope">
  209. <div flex>
  210. <div style="padding-right: 10px;flex-grow: 0">
  211. <com-image mode="aspectFill"
  212. :src="scope.row.cover_pic"></com-image>
  213. </div>
  214. <div style="display:flex;flex-direction:column;align-items:flex-start;">
  215. <div>{{scope.row.goods_name}}</div>
  216. <div>
  217. <span style="color: #ff4544;" v-if="scope.row.price">¥{{ scope.row.price }}</span>
  218. <span style="margin-left: 20px;" v-if="scope.row.stock">库存:{{ scope.row.stock }}</span>
  219. </div>
  220. </div>
  221. <div style="flex-grow: 0;">
  222. <el-button @click="deleteGoods(scope.$index)"
  223. type="text" circle size="mini">
  224. <el-tooltip class="item" effect="dark"
  225. content="删除" placement="top">
  226. <img src="resources/img/mall/del.png" alt="">
  227. </el-tooltip>
  228. </el-button>
  229. </div>
  230. </div>
  231. </template>
  232. </el-table-column>
  233. </el-table>
  234. </div>
  235. </template>
  236. </el-form-item>
  237. <el-col>
  238. <el-checkbox v-model="checkbox4isCheck" label="条件2:一次性补货商品金额达到N元">
  239. </el-checkbox>
  240. <div v-if="checkbox4isCheck" style="margin-left: 23px;" style="background-color: red;">
  241. <el-input v-model="ruleForm.checked_condition_values[3].nums" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请填入金额"><!-- conditionNum -->
  242. <template slot="append">元</template>
  243. </el-input>
  244. </div>
  245. </el-col>
  246. <el-col>
  247. <el-checkbox v-model="checkbox2isCheck" label="条件3:直推代理商满足指定人数"></el-checkbox>
  248. <div v-if="checkbox2isCheck" style="margin-left: 23px;" style="background-color: red;">
  249. <div v-for="(item,index) in ruleForm.checked_condition_values[1].value" :key="index" style="margin-bottom: 10px;width: 400px" v-if="item.is_use == 1">
  250. <el-input v-model="item.num" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请填入数量"><!-- conditionNum -->
  251. <div slot="prepend"><span style="color:#03C5FF">{{item.name}}</span> 的人数满</div>
  252. <template slot="append">个</template>
  253. </el-input>
  254. </div>
  255. </div>
  256. </el-col>
  257. <el-col>
  258. <el-checkbox v-model="checkbox3isCheck" label="条件4:直推代理商累计业绩达"></el-checkbox>
  259. <div v-if="checkbox3isCheck" style="margin-left: 23px;" style="background-color: red;">
  260. <div v-for="(item,index) in ruleForm.checked_condition_values[2].value" :key="index" style="margin-bottom: 10px;width: 400px" v-if="item.is_use == 1">
  261. <el-input v-model="item.num" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请填入金额"><!-- conditionNum -->
  262. <div slot="prepend"><span style="color:#03C5FF">{{item.name}}</span> 的累计业绩达</div>
  263. <template slot="append">元</template>
  264. </el-input>
  265. </div>
  266. </div>
  267. </el-col>
  268. <el-col>
  269. <el-checkbox v-model="checkbox5isCheck" label="条件5:下级代理商满足指定人数"></el-checkbox>
  270. <div v-if="checkbox5isCheck" style="margin-left: 23px;" style="background-color: red;">
  271. <div v-for="(item,index) in ruleForm.checked_condition_values[4].value" :key="index" style="margin-bottom: 10px;width: 800px" v-if="item.is_use == 1">
  272. <div style="display:flex;">
  273. <el-input v-model="item.num" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请填入数量" style="margin-right: 10px;"><!-- conditionNum -->
  274. <div slot="prepend"><span style="color:#03C5FF">{{item.name}}</span> 的人数满</div>
  275. <template slot="append">个</template>
  276. </el-input>
  277. <el-input v-model="item.direct_num" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请填入数量"><!-- conditionNum -->
  278. <div slot="prepend">其中直推<span style="color:#03C5FF">{{item.name}}</span> 的人数满</div>
  279. <template slot="append">个</template>
  280. </el-input>
  281. </div>
  282. </div>
  283. </div>
  284. </el-col>
  285. <!-- <div style="display: inline-block;">
  286. <div style="display: flex;">
  287. <el-checkbox v-model="checkbox3isCheck" label="条件3:商品补货升级" @change="editCheckbox3isCheck"></el-checkbox>
  288. <com-dialog-select :multiple="true" @selected="addGoodsTree"
  289. title="商品选择">
  290. <el-button v-if="checkbox3isCheck" style="background: none;border: 0;color: #0373ff;" type="primary" style="margin-left: 20px;">选择商品</el-button>
  291. </com-dialog-select>
  292. </div>
  293. <div style="margin-left: 10px;font-size: 12px;color: #666;margin-left: 20px;">商品补货升级包含云库存代理商在商城购买的商品和云库存补货的商品</div>
  294. </div> -->
  295. <!-- <div v-if="checkbox3isCheck">
  296. <el-radio-group v-if="ruleForm.checked_condition_values[2]" v-model="ruleForm.checked_condition_values[2].radio_type">
  297. <el-radio :label="1">或</el-radio>
  298. <el-radio :label="2">与</el-radio>
  299. </el-radio-group>
  300. <template>
  301. <div style="max-height: 300px;overflow-y: auto;max-width: 514px;" v-if="ruleForm.checked_condition_values[2]">
  302. <el-table ref="goodsInfos" :data="ruleForm.checked_condition_values[2].value" style="width: 100%" @selection-change="selectionGoods">
  303. <el-table-column
  304. type="selection"
  305. width="55"
  306. >
  307. </el-table-column>
  308. <el-table-column
  309. label="商品"
  310. width="200">
  311. <template slot-scope="scope">
  312. <div style="display: flex;align-items: center;">
  313. <el-image style="height:40px;width:40px;min-height:40px;min-width:40px;margin-right:10px;" :src="scope.row.cover_pic"></el-image>
  314. <div>
  315. <div style="color: #000;">{{scope.row.name}}</div>
  316. <div style="font-size: 12px;">
  317. <label>{{scope.row.cost_price}}</label>
  318. -
  319. <label>{{scope.row.original_price}}</label>
  320. </div>
  321. </div>
  322. </div>
  323. </template>
  324. </el-table-column>
  325. <el-table-column
  326. label="数量"
  327. width="120">
  328. <template slot-scope="scope">
  329. <el-input v-model.number="scope.row.num" onkeyup="value=value.replace(/[^\d]/g,'')" style="width: 110px;">
  330. <template slot="append">件</template>
  331. </el-input>
  332. </template>
  333. </el-table-column>
  334. <el-table-column
  335. fixed="right"
  336. label="操作"
  337. width="120">
  338. <template slot-scope="scope">
  339. <el-button
  340. @click.native.prevent="deleteGoodsThree(scope.$index)"
  341. type="text"
  342. size="small">
  343. 删除
  344. </el-button>
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. </div>
  349. </template>
  350. </div> -->
  351. </div>
  352. </el-form-item>
  353. <el-form-item label="赠送等级" v-if="ruleForm.give_quota.length && is_show_give">
  354. <div style="display: flex;flex-wrap: wrap;width: 400px;justify-content: space-between;">
  355. <el-input v-for="(item,index) in ruleForm.give_quota" v-if="item.is_use == 1" :key="index" v-model="item.num" style="margin-top: 10px;" placeholder="请填入数量" onkeyup="value=value.replace(/[^\d]/g,'')">
  356. <div slot="prepend"><span style="color:#03C5FF">{{item.name}}</span> 赠送</div><!-- 因为这里的等级名称长度不确定 不能固定input的长度 prepend文字不会换行 所以input竖着排列 -->
  357. <template slot="append">个</template>
  358. </el-input>
  359. </div>
  360. </el-form-item>
  361. <el-form-item label="是否启用" prop="status">
  362. <el-switch
  363. v-model="ruleForm.status"
  364. :active-value="1"
  365. :inactive-value="0">
  366. </el-switch>
  367. </el-form-item>
  368. <el-form-item label="等级说明" >
  369. <el-input
  370. type="textarea"
  371. :autosize="{ minRows: 4, maxRows: 4}"
  372. placeholder="请输入等级说明"
  373. v-model="ruleForm.detail">
  374. </el-input>
  375. </el-form-item>
  376. </el-col>
  377. </el-row>
  378. </el-form>
  379. </div>
  380. <el-button class="button-item" :loading="btnLoading" type="primary" @click="saveFun"
  381. size="small">保存
  382. </el-button>
  383. </el-card>
  384. </div>
  385. <script>
  386. const app = new Vue({
  387. el: '#app',
  388. data() {
  389. return {
  390. titleName:'添加代理商等级',
  391. msg: 1,
  392. options: [],//会员等级列表
  393. enable_level_list:[], //可用等级列表
  394. level: 0,
  395. form: {
  396. type: [],
  397. },
  398. checked_condition_keys: [],
  399. showConditionMsg: false,
  400. conditionMsg: '',
  401. weights: [],//等级权重列表
  402. ruleForm: {
  403. id:'',
  404. level: '',//权重 1 2 3等
  405. name: '',
  406. is_open_fill_min: 0,
  407. fill_min: 0,
  408. status: 1,
  409. is_equal: 1,
  410. is_over: 1,
  411. is_fill: 1,
  412. condition_type: 1,//1=满足其一可升级 2=满足所有条件可升级
  413. service_price: 0,
  414. is_auto_upgrade: 1,
  415. service_price_type: 0,
  416. upgrade_type_condition: 0,//条件升级
  417. sub_stock_rate: 100,
  418. rule: '',
  419. checked_condition_keys: [],//升级条件选中的key集合 ["0","1"]
  420. goodsNum:1,//指定购买商品的数量
  421. detail:'',//等级说明
  422. checked_condition_values:[//条件升级的数据upgradeData
  423. {"key":"0","value":[]},//{"goods_id":1},{"goods_id":2}条件1的数据 商品的数据id列表
  424. {"key":"1","value":[]},//{"level":1,"num":2},{"level":2,"num":3}条件2的数据 等级id和人数
  425. {"key":"2","value":[]},
  426. {"key":"3","value":[]},
  427. {"key":"4","value":[]},
  428. ],
  429. goods_list:[],
  430. give_quota:[],
  431. commission:{
  432. is_percent_team:0,
  433. is_percent_equal:0,
  434. is_percent_over:0,
  435. agent_team_prize:0,
  436. agent_equal_prize:0,
  437. agent_over_prize:0,
  438. },
  439. score:{
  440. is_percent_team:0,
  441. is_percent_equal:0,
  442. is_percent_over:0,
  443. agent_team_prize:0,
  444. agent_equal_prize:0,
  445. agent_over_prize:0,
  446. },
  447. is_open_equal_settle_type:0,
  448. equal_settle_type:0,
  449. is_recommender_reward:0,
  450. agent_setting_info:[],
  451. is_recommender_condition:0,
  452. recommender_condition_prize:0,
  453. is_recommender_diff:0,
  454. recommender_settle_prize:0,
  455. recommender_settle_rate:0,
  456. },
  457. rules: {
  458. level: [
  459. {required: true, message: '请选择代理商等级', trigger: 'change'},
  460. ],
  461. name: [
  462. {required: true, message: '请输入代理商等级名称', trigger: 'change'},
  463. ],
  464. is_use: [
  465. {required: true, message: '请选择代理商等级状态', trigger: 'change'},
  466. ],
  467. detail: [
  468. {required: true, message: '等级说明不能为空', trigger: 'change'},
  469. ],
  470. },
  471. btnLoading: false,
  472. cardLoading: false,
  473. checkList:[],
  474. checkbox1isCheck:false,//条件1 购买指定商品 是否勾选
  475. checkbox2isCheck:false,//条件2 代理商团队满足指定的人数 是否勾选
  476. checkbox3isCheck: false, //条件3 商品补货升级
  477. checkbox4isCheck: false, //条件3 商品补货升级
  478. checkbox5isCheck: false,
  479. goods:null,
  480. conditionNum:'',//条件2 代理商权重指定满足的人数
  481. //lowerLevel:[],//比当前选中的等级低的等级列表
  482. is_show_give:true,
  483. getWeightsLevel:'', //编辑的时候传进来的level
  484. radio_type: 1,
  485. goodsInfos: [],//商品假数据
  486. edit:{
  487. list:null,
  488. },
  489. };
  490. },
  491. mounted() {
  492. this.getLevel();
  493. if (getQuery('id')) {
  494. this.titleName="编辑代理商等级";
  495. this.getWeightsLevel = getQuery('level');
  496. this.loadData();//请求详情的数据
  497. }
  498. this.getWeights();//获取权重列表
  499. },
  500. methods: {
  501. getWeights(){
  502. let that = this;
  503. request({
  504. params: {
  505. r: 'cloud-stock-two/level/get-can-choose-level-list',
  506. level:this.getWeightsLevel
  507. },
  508. method: 'get',
  509. }).then(e => {
  510. if(e.data.code == 0){
  511. that.weights = e.data.data;
  512. }else{
  513. that.$message.error(e.data.msg);
  514. }
  515. }).catch(e => {
  516. console.log(e);
  517. });
  518. },
  519. close(e) {
  520. this.visible = false;
  521. },
  522. levelChangeFun(e){
  523. this.getLowerLevel();//获取代理商等级下级等级列表
  524. },
  525. getLowerLevel(){//获取代理商等级下级等级列表
  526. request({
  527. params: {
  528. r: 'cloud-stock-two/level/get-less-level-list',
  529. level:this.ruleForm.level
  530. },
  531. method: 'get',
  532. }).then(e => {
  533. if(e.data.code == 0){
  534. let arr = e.data.data;
  535. arr.forEach((item,index)=>{
  536. item.num = '';
  537. })
  538. this.ruleForm.give_quota = arr;
  539. /* 判断是否显示 等级赠送 start */
  540. let arr2 = [];
  541. arr2 = this.ruleForm.give_quota.filter((item)=>{
  542. return item.is_use == 1;
  543. })
  544. if(arr2.length){
  545. this.is_show_give=true;
  546. }else{
  547. this.is_show_give=false;
  548. }
  549. console.log(arr2.length)
  550. console.log(this.is_show_give)
  551. /* 判断是否显示 等级赠送 end */
  552. this.ruleForm.checked_condition_values[1].value = JSON.parse(JSON.stringify(arr))
  553. this.ruleForm.checked_condition_values[2].value = JSON.parse(JSON.stringify(arr))
  554. arr.forEach((item,index)=>{
  555. item.direct_num = '';
  556. })
  557. this.ruleForm.checked_condition_values[4].value = JSON.parse(JSON.stringify(arr))
  558. }else{
  559. this.$message.error(e.data.msg);
  560. }
  561. }).catch(e => {
  562. console.log(e);
  563. });
  564. },
  565. saveFun(){
  566. //console.log('请求了保存的函数')
  567. this.ruleForm.checked_condition_keys = [];
  568. if(this.checkbox1isCheck){//条件1 购买指定商品 是否勾选
  569. this.ruleForm.checked_condition_keys.push("0");
  570. }
  571. if(this.checkbox2isCheck){//条件2 代理商团队满足指定的人数 是否勾选
  572. this.ruleForm.checked_condition_keys.push("1");
  573. }
  574. if(this.checkbox3isCheck){
  575. this.ruleForm.checked_condition_keys.push("2");
  576. }
  577. if(this.checkbox4isCheck){
  578. this.ruleForm.checked_condition_keys.push("3");
  579. }
  580. if(this.checkbox5isCheck){
  581. this.ruleForm.checked_condition_keys.push("4");
  582. }
  583. if(this.ruleForm.level == ''){
  584. return this.$message.error('请选择代理商等级权重');
  585. }
  586. if(this.ruleForm.name == ''){
  587. return this.$message.error('请输入代理商等级名称');
  588. }
  589. if(this.ruleForm.upgrade_type_condition == 1){//勾选了条件升级
  590. if(!this.ruleForm.checked_condition_keys.length){//为空数组 没有勾选任何一个条件
  591. return this.$message.error('请勾选升级条件');
  592. }
  593. if(this.ruleForm.condition_type == 1 && this.ruleForm.checked_condition_keys.length == 0){//选择了满足其一条件
  594. return this.$message.error('请填写其中一个升级条件');
  595. }
  596. /* if(this.ruleForm.condition_type == 2 && this.ruleForm.checked_condition_keys.length == 1){//选择了满足所有条件
  597. return this.$message.error('请勾选升级条件1和条件2');
  598. } */
  599. if(this.checkbox1isCheck && !this.ruleForm.goods_list.length){//勾选条件1 没有选择商品
  600. return this.$message.error('请选择商品');
  601. }
  602. /* if(this.checkbox1isCheck && this.ruleForm.upgradeData[0].value.val1 <= 0){//勾选条件1 商品数量不对
  603. return this.$message.error('请填写正确的商品数量');
  604. } */
  605. if(this.checkbox2isCheck){//勾选条件2 但是没有可用下级代理商列表
  606. let is_use_arr = [];
  607. let judge_arr = [];
  608. is_use_arr = this.ruleForm.checked_condition_values[1].value.filter((item)=>{
  609. return item.is_use == 1
  610. })
  611. judge_arr = this.ruleForm.checked_condition_values[1].value.filter((item)=>{
  612. return item.num == '' || item.num == 0
  613. })
  614. //console.log('judge_arr='+JSON.stringify(judge_arr))
  615. if(is_use_arr.length == 0){
  616. return this.$message.error('升级条件3暂不可选');
  617. }
  618. if(judge_arr.length == this.ruleForm.checked_condition_values[1].value.length){
  619. return this.$message.error('升级条件3:代理商团队指定满足的人数,至少填一个大于0的数字');
  620. }
  621. }
  622. if(this.checkbox3isCheck){//勾选条件3 但是没有可用下级代理商列表
  623. let is_use_arr_checkbox3isCheck = [];
  624. let judge_arr_checkbox3isCheck = [];
  625. is_use_arr_checkbox3isCheck = this.ruleForm.checked_condition_values[2].value.filter((item)=>{
  626. return item.is_use == 1
  627. })
  628. judge_arr_checkbox3isCheck = this.ruleForm.checked_condition_values[2].value.filter((item)=>{
  629. return item.num == '' || item.num == 0
  630. })
  631. //console.log('judge_arr='+JSON.stringify(judge_arr))
  632. if(is_use_arr_checkbox3isCheck.length == 0){
  633. return this.$message.error('升级条件4暂不可选');
  634. }
  635. if(judge_arr_checkbox3isCheck.length == this.ruleForm.checked_condition_values[2].value.length){
  636. return this.$message.error('升级条件4:代理商团队指定满足的人数,至少填一个大于0的数字');
  637. }
  638. }
  639. if(this.checkbox5isCheck){//勾选条件5 但是没有可用下级代理商列表
  640. let is_use_arr_checkbox5isCheck = [];
  641. let judge_arr_checkbox5isCheck = [];
  642. is_use_arr_checkbox5isCheck = this.ruleForm.checked_condition_values[4].value.filter((item)=>{
  643. return item.is_use == 1
  644. })
  645. judge_arr_checkbox5isCheck = this.ruleForm.checked_condition_values[4].value.filter((item)=>{
  646. return item.num == '' || item.num == 0
  647. })
  648. //console.log('judge_arr='+JSON.stringify(judge_arr))
  649. if(is_use_arr_checkbox5isCheck.length == 0){
  650. return this.$message.error('升级条件5暂不可选');
  651. }
  652. if(judge_arr_checkbox5isCheck.length == this.ruleForm.checked_condition_values[4].value.length){
  653. return this.$message.error('升级条件5:代理商团队指定满足的人数,至少填一个大于0的数字');
  654. }
  655. }
  656. }
  657. for(var i=0;i<this.ruleForm.checked_condition_values[1].value.length;i++){
  658. if(this.ruleForm.checked_condition_values[1].value[i].num < 0){
  659. return this.$message.error('请正确填写升级条件3的数据');
  660. break;
  661. }
  662. }
  663. for(var i=0;i<this.ruleForm.checked_condition_values[2].value.length;i++){
  664. if(this.ruleForm.checked_condition_values[2].value[i].num < 0){
  665. return this.$message.error('请正确填写升级条件4的数据');
  666. break;
  667. }
  668. }
  669. for(var i=0;i<this.ruleForm.checked_condition_values[4].value.length;i++){
  670. if(this.ruleForm.checked_condition_values[4].value[i].num < 0){
  671. return this.$message.error('请正确填写升级条件5的数据');
  672. break;
  673. }
  674. }
  675. for(var i=0;i<this.ruleForm.give_quota.length;i++){
  676. if(this.ruleForm.give_quota[i].num < 0){
  677. return this.$message.error('赠送等级:请填写正确的赠送数量');
  678. break;
  679. }
  680. }
  681. //let give_quota_arr=[];
  682. this.ruleForm.give_quota.forEach((item,index)=>{
  683. if(item.num == ''){
  684. item.num = 0
  685. }
  686. /* let obj ={
  687. level:item.level,
  688. num:item.num
  689. }
  690. give_quota_arr.push(obj) */
  691. })
  692. //console.log('赠送名额='+JSON.stringify(give_quota_arr))
  693. this.ruleForm.checked_condition_values[1].value.forEach((item,index)=>{
  694. if(item.num == ''){
  695. item.num = 0
  696. }
  697. })
  698. this.ruleForm.checked_condition_values[2].value.forEach((item,index)=>{
  699. if(item.num == ''){
  700. item.num = 0
  701. }
  702. })
  703. let submitObj={};//提交给后台的对象
  704. submitObj.level = this.ruleForm.level;
  705. submitObj.name = this.ruleForm.name;
  706. submitObj.fill_min = this.ruleForm.fill_min;
  707. submitObj.is_open_fill_min = this.ruleForm.is_open_fill_min;
  708. submitObj.is_use = this.ruleForm.is_use;
  709. submitObj.checked_condition_keys = JSON.stringify(this.ruleForm.checked_condition_keys);
  710. submitObj.condition_type = this.ruleForm.condition_type;
  711. submitObj.checked_condition_values =JSON.stringify(this.ruleForm.checked_condition_values);
  712. submitObj.give_quota =JSON.stringify(this.ruleForm.give_quota);
  713. submitObj.is_over = this.ruleForm.is_over;
  714. submitObj.is_equal = this.ruleForm.is_equal;
  715. submitObj.is_fill = this.ruleForm.is_fill;
  716. submitObj.upgrade_type_condition = this.ruleForm.upgrade_type_condition;
  717. submitObj.detail = this.ruleForm.detail;
  718. submitObj.status = this.ruleForm.status;
  719. submitObj.commission = JSON.stringify(this.ruleForm.commission);
  720. submitObj.agent_setting_info = JSON.stringify(this.ruleForm.agent_setting_info);
  721. submitObj.score = JSON.stringify(this.ruleForm.score);
  722. submitObj.is_open_equal_settle_type = this.ruleForm.is_open_equal_settle_type;
  723. submitObj.equal_settle_type = this.ruleForm.equal_settle_type;
  724. submitObj.is_recommender_reward = this.ruleForm.is_recommender_reward;
  725. submitObj.is_recommender_condition = this.ruleForm.is_recommender_condition;
  726. submitObj.recommender_condition_prize = this.ruleForm.recommender_condition_prize;
  727. submitObj.recommender_settle_prize = this.ruleForm.recommender_settle_prize;
  728. submitObj.recommender_settle_rate = this.ruleForm.recommender_settle_rate;
  729. if(getQuery('id')){
  730. submitObj.id = this.ruleForm.id
  731. }
  732. this.btnLoading = true;
  733. request({
  734. params: {
  735. r: 'cloud-stock-two/level/edit'
  736. },
  737. method: 'post',
  738. data:submitObj
  739. }).then(e => {
  740. this.btnLoading = false;
  741. if (e.data.code == 0) {
  742. this.$message.success('保存成功');
  743. navigateTo({
  744. r: 'cloud-stock-two/level/index'
  745. })
  746. } else {
  747. this.$message.error(e.data.msg);
  748. }
  749. }).catch(e => {
  750. this.$message.error(e.data.msg);
  751. this.btnLoading = false;
  752. });
  753. },
  754. submitForm(formName) {
  755. let self = this;
  756. self.showConditionMsg = false;
  757. if (this.ruleForm.upgrade_type_condition == 1) {
  758. if (this.ruleForm.checked_condition_keys.length == 0) {
  759. this.$message.error('请完善升级条件');
  760. return;
  761. }
  762. let checked_condition_values = this.ruleForm.checked_condition_values;
  763. this.ruleForm.checked_condition_keys.forEach(v => {
  764. self.conditionMsg = '请完善条件:' + (parseInt(v) + 1);
  765. if (v == 0) {
  766. if (!checked_condition_values[v].value.val || !checked_condition_values[v].value.val1) {
  767. self.showConditionMsg = true;
  768. return;
  769. }
  770. }
  771. if (v > 0) {
  772. if (!checked_condition_values[v].value.val) {
  773. self.showConditionMsg = true;
  774. return;
  775. }
  776. }
  777. })
  778. if (self.showConditionMsg) {
  779. return
  780. }
  781. if (this.ruleForm.checked_condition_keys.length > 0) {
  782. if (this.ruleForm.condition_type == 0) {
  783. this.$message.error('请选择条件升级的方式升级类型');
  784. return;
  785. }
  786. }
  787. }
  788. this.$refs[formName].validate((valid) => {
  789. if (valid) {
  790. self.btnLoading = true;
  791. request({
  792. params: {
  793. r: 'plugin/stock/mall/level/edit'
  794. },
  795. method: 'post',
  796. data: {
  797. form: self.ruleForm,
  798. }
  799. }).then(e => {
  800. self.btnLoading = false;
  801. if (e.data.code == 0) {
  802. self.$message.success(e.data.msg);
  803. navigateTo({
  804. r: 'plugin/stock/mall/level/index'
  805. })
  806. } else {
  807. self.$message.error(e.data.msg);
  808. }
  809. }).catch(e => {
  810. self.$message.error(e.data.msg);
  811. self.btnLoading = false;
  812. });
  813. } else {
  814. console.log('error submit!!');
  815. return false;
  816. }
  817. });
  818. },
  819. loadData() {//请求详情的数据
  820. this.cardLoading = true;
  821. //console.log('请求详情前的参数=='+getQuery('id'))
  822. request({
  823. params: {
  824. r: 'cloud-stock-two/level/edit',//'plugin/stock/mall/level/edit',
  825. id: getQuery('id'),
  826. },
  827. method: 'get'
  828. }).then(e => {
  829. this.cardLoading = false;
  830. //console.log('请求详情的结果='+JSON.stringify(e))
  831. if (e.data.code == 0) {
  832. let data = e.data.data;
  833. this.ruleForm.id = data.id;
  834. this.ruleForm.level = data.level;
  835. this.ruleForm.name = data.name;
  836. this.ruleForm.is_open_fill_min = data.is_open_fill_min;
  837. this.ruleForm.fill_min = data.fill_min;
  838. this.ruleForm.status = data.status;
  839. this.ruleForm.checked_condition_keys = data.checked_condition_keys;
  840. this.ruleForm.checked_condition_keys.forEach((item)=>{
  841. if(item == 0){
  842. this.checkbox1isCheck = true;
  843. }
  844. if(item == 1){
  845. this.checkbox2isCheck = true;
  846. }
  847. if(item == 2){
  848. this.checkbox3isCheck = true;
  849. // localStorage.setItem("booType",1);
  850. // this.editCheckbox3isCheck(true);
  851. }
  852. if(item == 3){
  853. this.checkbox4isCheck = true;
  854. }
  855. if(item == 4){
  856. this.checkbox5isCheck = true;
  857. }
  858. })
  859. this.ruleForm.condition_type = data.condition_type;
  860. this.ruleForm.goods_list = data.checked_condition_values[0].value;//给商品进行赋值
  861. // if(!data.checked_condition_values[2]){
  862. // data.checked_condition_values.push({
  863. // key: 2,
  864. // radio_type: 1,
  865. // value: []
  866. // })
  867. // }
  868. // if(data.checked_condition_values[2] && data.checked_condition_values[2].value){
  869. // data.checked_condition_values[2].value.forEach(v => {
  870. // if(typeof(v.num) == "undefined"){
  871. // this.$set(v,'num',1);
  872. // }
  873. // })
  874. // }
  875. this.ruleForm.checked_condition_values = data.checked_condition_values;
  876. let arr = [];
  877. this.ruleForm.checked_condition_values[0].value.forEach((item)=>{
  878. let obj={
  879. goods_id:item.goods_id,
  880. cover_pic:item.cover_pic,
  881. goods_name:item.goods_name
  882. }
  883. arr.push(obj)
  884. })
  885. this.ruleForm.checked_condition_values[0].value = arr;
  886. /* end */
  887. this.ruleForm.give_quota = data.give_quota;
  888. /* 判断是否显示 等级赠送 start */
  889. let arr2 = [];
  890. arr2 = this.ruleForm.give_quota.filter((item)=>{
  891. return item.is_use == 1;
  892. })
  893. if(arr2.length){
  894. this.is_show_give=true;
  895. }else{
  896. this.is_show_give=false;
  897. }
  898. this.ruleForm.is_over = data.is_over;
  899. this.ruleForm.is_equal = data.is_equal;
  900. this.ruleForm.is_fill = data.is_fill;
  901. this.ruleForm.upgrade_type_condition = data.upgrade_type_condition;
  902. this.ruleForm.detail = data.detail;
  903. this.ruleForm.commission = data.commission;
  904. this.ruleForm.score = data.score;
  905. this.ruleForm.is_open_equal_settle_type = data.is_open_equal_settle_type;
  906. this.ruleForm.equal_settle_type = data.equal_settle_type;
  907. this.ruleForm.is_recommender_reward = data.is_recommender_reward;
  908. this.ruleForm.agent_setting_info = data.agent_setting_info;
  909. this.ruleForm.is_recommender_condition = data.is_recommender_condition;
  910. this.ruleForm.recommender_condition_prize = data.recommender_condition_prize;
  911. this.ruleForm.recommender_settle_prize = data.recommender_settle_prize;
  912. this.ruleForm.recommender_settle_rate = data.recommender_settle_rate;
  913. } else {
  914. this.$message.error(e.data.msg);
  915. }
  916. }).catch(e => {
  917. console.log(e);
  918. });
  919. },
  920. goodsSelect(param){
  921. for (let j in param) {
  922. let item = param[j];
  923. if (this.ruleForm.goods_list.length >= 10) {
  924. this.$message.error('指定商品不能大于10个');
  925. return;
  926. }
  927. let flag = true;
  928. for (let i in this.ruleForm.checked_condition_values[0].value) {
  929. if (this.ruleForm.checked_condition_values[0].value[i].goods_id == item.id) {
  930. flag = false;
  931. break;
  932. }
  933. }
  934. if (flag) {
  935. let obj={};
  936. obj.goods_id = item.id;
  937. obj.goods_name = item.goods_name;
  938. obj.cover_pic = item.cover_pic;
  939. obj.price = item.price;
  940. obj.stock = item.stock;
  941. this.ruleForm.checked_condition_values[0].value.push(obj);
  942. this.ruleForm.goods_list.push({
  943. id: item.id,
  944. goods_name: item.goods_name,
  945. cover_pic: item.cover_pic,
  946. price: item.price,
  947. stock: item.stock,
  948. });
  949. }
  950. }
  951. },
  952. deleteGoods(index) {
  953. //this.goods = null;
  954. this.ruleForm.checked_condition_values[0].value.splice(index, 1);
  955. this.ruleForm.goods_list.splice(index, 1);
  956. },
  957. deleteGoodsThree(index) {
  958. this.ruleForm.checked_condition_values[2].value.splice(index, 1);
  959. },
  960. addGoodsTree(param){
  961. for (let j in param) {
  962. let item = param[j];
  963. let obj = {
  964. id: item.id,
  965. name: item.goods_name,
  966. cover_pic: item.cover_pic,
  967. cost_price: item.cost_price,
  968. original_price: item.original_price,
  969. }
  970. this.$set(obj,'num',1);
  971. this.ruleForm.checked_condition_values[2].value.push(obj);
  972. console.info(this.ruleForm.checked_condition_values[2]);
  973. }
  974. console.log(obj);
  975. },
  976. selectionGoods(val){
  977. let boo = localStorage.getItem("booType");
  978. if(boo) return;
  979. let that = this;
  980. this.ruleForm.checked_condition_values[2].value.forEach((v,i) => {
  981. let index = val.findIndex(vv => vv.id == v.id);
  982. if(index != -1){
  983. v.isSelected = true;
  984. }else{
  985. v.isSelected = false;
  986. }
  987. })
  988. },
  989. editCheckbox3isCheck(v){
  990. if(v){
  991. // 等模板渲染完毕再加载
  992. this.$nextTick( () => {
  993. console.info(this.$refs,this.ruleForm.checked_condition_values[2].value);
  994. if(!this.ruleForm.checked_condition_values[2]) return
  995. this.ruleForm.checked_condition_values[2].value.forEach((v,i) => {
  996. if (v.isSelected) {
  997. this.$refs.goodsInfos.toggleRowSelection(v);
  998. }else {
  999. this.$refs.goodsInfos.clearSelection();
  1000. }
  1001. })
  1002. localStorage.removeItem("booType");
  1003. })
  1004. }
  1005. },
  1006. upgradeTypeSwitch(boo){
  1007. // if(boo == 1 && this.checkbox3isCheck){
  1008. // this.editCheckbox3isCheck(true)
  1009. // }
  1010. },
  1011. getLevel() {
  1012. request({
  1013. params: {
  1014. r: 'cloud-stock-two/default/get-level-list',//代理商等级列表
  1015. page: 1
  1016. }
  1017. }).then(res => {
  1018. this.edit.loading = false;
  1019. if (res.data.code == 0) {
  1020. this.edit.list =res.data.data;
  1021. } else {
  1022. this.$message.error(res.data.msg);
  1023. }
  1024. }).catch(res => {
  1025. });
  1026. },
  1027. }
  1028. });
  1029. </script>
  1030. <style>
  1031. .form-body {
  1032. padding: 20px;
  1033. background-color: #fff;
  1034. margin-bottom: 20px;
  1035. padding-right: 20%;
  1036. min-width: 900px;
  1037. }
  1038. .form-body .el-form-item {
  1039. padding-right: 25%;
  1040. min-width: 850px;
  1041. }
  1042. .form-button {
  1043. margin: 0;
  1044. }
  1045. .form-button .el-form-item__content {
  1046. margin-left: 0 !important;
  1047. }
  1048. .button-item {
  1049. padding: 9px 25px;
  1050. }
  1051. .check-group {
  1052. font-size: 14px !important;
  1053. }
  1054. .check-group .el-col {
  1055. display: flex;
  1056. }
  1057. .check-group .el-input {
  1058. margin: 0 5px;
  1059. }
  1060. .check-group .el-col .el-checkbox {
  1061. display: flex;
  1062. align-items: center;
  1063. }
  1064. .check-group .el-col .el-input {
  1065. width: 100px;
  1066. }
  1067. .check-group .el-col .el-input .el-input__inner {
  1068. height: 30px;
  1069. width: 100px;
  1070. }
  1071. .el-checkbox-group .el-col {
  1072. margin-bottom: 10px;
  1073. }
  1074. </style>