vipNewActive.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. <template>
  2. <div class="m-container">
  3. <!-- <h2><div class="squrt"></div>VIP活动方案新增 </h2> -->
  4. <h2>
  5. <el-page-header
  6. @back="onCancel"
  7. :content="
  8. 'VIP/乐理课活动方案' + (pageType == 'create' ? '新增' : '修改')
  9. "
  10. ></el-page-header>
  11. </h2>
  12. <div class="m-core">
  13. <el-form
  14. :label-position="labelPosition"
  15. :model="vipform"
  16. ref="vipform"
  17. label-width="120px"
  18. :rules="vipformRules"
  19. class="vipform"
  20. >
  21. <el-form-item label="活动名称" prop="name">
  22. <el-input style="width: 400px" v-model.trim="vipform.name"></el-input>
  23. </el-form-item>
  24. <el-form-item label="适用分部" prop="organ">
  25. <select-all
  26. v-model.trim="vipform.organ"
  27. style="width: 400px"
  28. multiple
  29. filterable
  30. @visible-change="$forceUpdate()"
  31. @change="onOrganChange"
  32. clearable
  33. >
  34. <el-option
  35. v-for="(item, index) in selects.branchs"
  36. :key="index"
  37. :label="item.name"
  38. :value="item.id"
  39. ></el-option>
  40. </select-all>
  41. <!-- <el-button @click="onCheckAllBranch">适用所有分部</el-button> -->
  42. </el-form-item>
  43. <el-form-item label="课程形式" prop="stauts">
  44. <select-all
  45. v-model.trim="vipform.stauts"
  46. style="width: 400px"
  47. @visible-change="$forceUpdate()"
  48. clearable
  49. multiple
  50. >
  51. <el-option
  52. v-for="item in selects.vipGroupCategory"
  53. :key="item.id"
  54. :value="item.id"
  55. :label="item.name"
  56. ></el-option>
  57. </select-all>
  58. </el-form-item>
  59. <el-form-item label="活动描述" prop="desc">
  60. <el-input
  61. type="textarea"
  62. v-model.trim="vipform.desc"
  63. style="width: 400px"
  64. :rows="5"
  65. placeholder="请输入活动说明"
  66. ></el-input>
  67. </el-form-item>
  68. <el-form-item label="活动时间" prop="activeTime">
  69. <el-date-picker
  70. v-model.trim="vipform.activeTime"
  71. type="datetimerange"
  72. range-separator="至"
  73. value-format="yyyy-MM-dd HH:mm:ss"
  74. start-placeholder="开始日期"
  75. :picker-options="{
  76. firstDayOfWeek: 1,
  77. }"
  78. end-placeholder="结束日期"
  79. ></el-date-picker>
  80. </el-form-item>
  81. <el-form-item label="课程时间" prop="courseTime">
  82. <el-date-picker
  83. v-model.trim="vipform.courseTime"
  84. type="datetimerange"
  85. range-separator="至"
  86. value-format="yyyy-MM-dd HH:mm:ss"
  87. start-placeholder="开始日期"
  88. :picker-options="{
  89. firstDayOfWeek: 1,
  90. }"
  91. end-placeholder="结束日期"
  92. ></el-date-picker>
  93. </el-form-item>
  94. </el-form>
  95. <el-alert
  96. title="活动适用范围&结算标准:"
  97. type="info"
  98. :closable="false"
  99. class="alert"
  100. >
  101. </el-alert>
  102. <div class="activeRange" style="padding-left: 120px">
  103. <!-- <div class="left">
  104. <p>活动适用范围&结算标准:</p>
  105. </div> -->
  106. <div class="right">
  107. <div class="chioseWrap">
  108. <el-checkbox label="线上课" v-model.trim="online"></el-checkbox>
  109. <el-select
  110. v-model.trim="onlineSalary"
  111. disabled
  112. clearable
  113. filterable
  114. >
  115. <el-option
  116. label="老师默认课酬"
  117. value="TEACHER_DEFAULT"
  118. ></el-option>
  119. <el-option
  120. label="实际课程单价比例折扣"
  121. value="RATIO_DISCOUNT"
  122. ></el-option>
  123. <el-option label="固定课酬" value="FIXED_SALARY"></el-option>
  124. </el-select>
  125. <el-input
  126. placeholder="请输入"
  127. v-if="onlineSalary == 'RATIO_DISCOUNT'"
  128. style="width: 200px"
  129. type="number"
  130. @mousewheel.native.prevent
  131. v-model.trim="onlineprice"
  132. >
  133. <template slot="append">%</template>
  134. </el-input>
  135. <el-input
  136. placeholder="请输入"
  137. v-if="onlineSalary == 'FIXED_SALARY'"
  138. style="width: 200px"
  139. type="number"
  140. @mousewheel.native.prevent
  141. v-model.trim="onlineprice"
  142. >
  143. <template slot="append">元</template>
  144. </el-input>
  145. <div
  146. style="width: 200px"
  147. v-if="onlineSalary == 'TEACHER_DEFAULT'"
  148. ></div>
  149. <!-- <el-checkbox label="是否参加梯度"
  150. style="margin-left:20px;"
  151. v-model.trim="onlineClassJoinGradientRewards"></el-checkbox> -->
  152. </div>
  153. <div class="chioseWrap">
  154. <el-checkbox label="线下课" v-model.trim="unonline"></el-checkbox>
  155. <el-select
  156. v-model.trim="unonlineSalary"
  157. clearable
  158. disabled
  159. filterable
  160. >
  161. <el-option
  162. label="老师默认课酬"
  163. value="TEACHER_DEFAULT"
  164. ></el-option>
  165. <el-option
  166. label="实际课程单价比例折扣"
  167. value="RATIO_DISCOUNT"
  168. ></el-option>
  169. <el-option label="固定课酬" value="FIXED_SALARY"></el-option>
  170. </el-select>
  171. <el-input
  172. placeholder="请输入"
  173. v-if="unonlineSalary == 'RATIO_DISCOUNT'"
  174. style="width: 200px"
  175. type="number"
  176. @mousewheel.native.prevent
  177. v-model.trim="unonlineprice"
  178. >
  179. <template slot="append">%</template>
  180. </el-input>
  181. <el-input
  182. placeholder="请输入"
  183. style="width: 200px"
  184. v-if="unonlineSalary == 'FIXED_SALARY'"
  185. type="number"
  186. @mousewheel.native.prevent
  187. v-model.trim="unonlineprice"
  188. >
  189. <template slot="append">元</template>
  190. </el-input>
  191. <div
  192. style="width: 200px"
  193. v-if="unonlineSalary == 'TEACHER_DEFAULT'"
  194. ></div>
  195. <!-- <el-checkbox label="是否参加梯度"
  196. style="margin-left:20px;"
  197. v-model.trim="offlineClassJoinGradientRewards"></el-checkbox> -->
  198. </div>
  199. <!-- <div class="chioseWrap">
  200. <el-checkbox v-model.trim="paymentReadonlyFlag"
  201. label="可自定义单价"></el-checkbox>
  202. <el-checkbox v-model.trim="salaryReadonlyFlag"
  203. label="可自定义课酬"></el-checkbox>
  204. </div> -->
  205. </div>
  206. </div>
  207. <el-alert
  208. title="活动类型:"
  209. type="info"
  210. style="margin-bottom: 15px"
  211. :closable="false"
  212. class="alert"
  213. >
  214. </el-alert>
  215. <div class="activeType">
  216. <!-- <div class="left">
  217. <p>活动类型</p>
  218. </div> -->
  219. <div class="right">
  220. <div>
  221. <div
  222. class="head"
  223. :class="activeType == 'BASE_ACTIVITY' ? 'active' : ''"
  224. @click="
  225. () => {
  226. this.$refs['form'].resetFields();
  227. activeType = 'BASE_ACTIVITY';
  228. courseNumForm = {
  229. minCourseNum: null,
  230. maxCourseNum: null,
  231. };
  232. }
  233. "
  234. >
  235. 基础活动
  236. </div>
  237. <p class="title" v-if="activeType == 'BASE_ACTIVITY'">课程原价</p>
  238. </div>
  239. <div>
  240. <div
  241. class="head"
  242. :class="activeType == 'DISCOUNT' ? 'active' : ''"
  243. @click="activeType = 'DISCOUNT'"
  244. >
  245. 折扣
  246. </div>
  247. <el-input
  248. v-if="activeType == 'DISCOUNT'"
  249. v-model.trim="attribute1"
  250. style="width: 200px !important"
  251. placeholder="请输入折扣数值"
  252. >
  253. <template slot="append">%</template>
  254. </el-input>
  255. <el-form
  256. :model="courseNumForm"
  257. :inline="true"
  258. ref="form"
  259. v-show="activeType == 'DISCOUNT'"
  260. :rules="activeType == 'DISCOUNT' ? courseNumrules : {}"
  261. >
  262. <el-form-item prop="minCourseNum">
  263. <el-input
  264. @change="handleMinChange"
  265. v-model.number="courseNumForm.minCourseNum"
  266. type="number"
  267. style="margin-left: 10px; width: 120px !important"
  268. placeholder="最小课时数"
  269. >
  270. </el-input>
  271. </el-form-item>
  272. <el-form-item prop="maxCourseNum">
  273. <el-input
  274. @change="handleMaxChange"
  275. v-model.number="courseNumForm.maxCourseNum"
  276. type="number"
  277. style="margin-left: 10px; width: 120px !important"
  278. placeholder="最大课时数"
  279. >
  280. </el-input>
  281. </el-form-item>
  282. </el-form>
  283. </div>
  284. <div>
  285. <div
  286. class="head"
  287. :class="activeType == 'GIVE_CLASS' ? 'active' : ''"
  288. @click="
  289. () => {
  290. this.$refs['form'].resetFields();
  291. activeType = 'GIVE_CLASS';
  292. courseNumForm = {
  293. minCourseNum: null,
  294. maxCourseNum: null,
  295. };
  296. }
  297. "
  298. >
  299. 赠送课时
  300. </div>
  301. <el-input
  302. placeholder="多少节开始赠"
  303. v-if="activeType == 'GIVE_CLASS'"
  304. v-model.trim="attribute1"
  305. type="number"
  306. @mousewheel.native.prevent
  307. style="margin-right: 10px; width: 200px !important"
  308. >
  309. <template slot="append">节</template>
  310. </el-input>
  311. <span v-if="activeType == 'GIVE_CLASS'">赠</span>
  312. <el-input
  313. v-if="activeType == 'GIVE_CLASS'"
  314. placeholder="请输入赠送课时数"
  315. type="number"
  316. @mousewheel.native.prevent
  317. v-model.trim="attribute2"
  318. style="margin: 0 10px; width: 200px !important"
  319. >
  320. <template slot="append">节</template>
  321. </el-input>
  322. <!-- <el-checkbox
  323. v-if="activeType=='GIVE_CLASS'"
  324. v-model.trim="giveClassPaySalaryFlag"
  325. label="赠送课时结算课酬"
  326. ></el-checkbox> -->
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. <div
  332. class="btnWrap"
  333. style="justify-content: flex-start; padding-left: 120px"
  334. >
  335. <el-button type="info" @click="onReSet">重置</el-button>
  336. <el-button type="primary" @click="submitFrom">确定</el-button>
  337. <!-- <div class="okBtn"
  338. @click="submitFrom">确定</div> -->
  339. </div>
  340. </div>
  341. </template>
  342. <script>
  343. import { vipGroupCategory, addVipActive } from "@/api/vipSeting";
  344. import { getEmployeeOrgan } from "@/api/buildTeam";
  345. import cleanDeep from "clean-deep";
  346. const MIN_NUMBER = 1;
  347. const MAX_NUMBER = 999;
  348. export default {
  349. name: "vipNewActive",
  350. data() {
  351. return {
  352. pageType: "",
  353. labelPosition: "right",
  354. vipform: {
  355. name: "",
  356. desc: "",
  357. activeTime: [],
  358. courseTime: [],
  359. organ: [],
  360. },
  361. vipformRules: {
  362. name: [
  363. { required: true, message: "请输入活动名称", trigger: "blur" },
  364. {
  365. min: 1,
  366. max: 25,
  367. message: "长度在 1 到 25 个字符",
  368. trigger: "blur",
  369. },
  370. ],
  371. desc: [
  372. { required: false, message: "请输入文字描述", trigger: "blur" },
  373. {
  374. min: 1,
  375. max: 200,
  376. message: "长度在 1 到 200 个字符",
  377. trigger: "blur",
  378. },
  379. ],
  380. activeTime: [
  381. { required: false, message: "请选择活动时间", trigger: "blur" },
  382. ],
  383. courseTime: [
  384. { required: false, message: "请选择课程时间", trigger: "blur" },
  385. ],
  386. organ: [{ required: true, message: "请选择适用分部", trigger: "blur" }],
  387. stauts: [
  388. { required: true, message: "请选择活动形式", trigger: "blur" },
  389. ],
  390. },
  391. courseStatusList: [], // 获取所有课程形式
  392. activeType: "",
  393. online: true,
  394. unonline: true,
  395. onlineSalary: "TEACHER_DEFAULT",
  396. unonlineSalary: "TEACHER_DEFAULT",
  397. onlineprice: "",
  398. unonlineprice: "",
  399. salaryReadonlyFlag: false,
  400. paymentReadonlyFlag: false,
  401. attribute1: "",
  402. attribute2: "",
  403. courseNumForm: {
  404. minCourseNum: "",
  405. maxCourseNum: "",
  406. },
  407. giveClassPaySalaryFlag: true,
  408. organList: [],
  409. onlineClassJoinGradientRewards: false,
  410. offlineClassJoinGradientRewards: false,
  411. courseNumrules: {
  412. minCourseNum: [
  413. { required: true, message: "请输入最小课时数", trigger: "blur" },
  414. { validator: this.validateCom, trigger: "blur" },
  415. { validator: this.validateMin, trigger: "blur" },
  416. ],
  417. maxCourseNum: [
  418. { required: true, message: "请输入最大课时数", trigger: "blur" },
  419. { validator: this.validateCom, trigger: "blur" },
  420. { validator: this.validateMax, trigger: "blur" },
  421. ],
  422. },
  423. };
  424. },
  425. activated() {
  426. this.onReSet();
  427. // if (this.$route.query.rules) {
  428. // this.rules = this.$route.query.rules;
  429. // }
  430. // if (this.$route.query.searchForm) {
  431. // this.searchForm = this.$route.query.searchForm;
  432. // }
  433. this.pageType = this.$route.query.type;
  434. this.$refs.vipform.resetFields();
  435. },
  436. async mounted() {
  437. // 首先获取课程形式
  438. // vipGroupCategory().then(res => {
  439. // if (res.code == 200) {
  440. // this.courseStatusList = res.data;
  441. // }
  442. // });
  443. // // 适用分部
  444. // getEmployeeOrgan().then(res => {
  445. // if (res.code == 200) {
  446. // this.organList = res.data;
  447. // }
  448. // });
  449. // 获取类型
  450. await this.$store.dispatch("setVipGroupCategory");
  451. // 获取分部
  452. await this.$store.dispatch("setBranchs");
  453. this.onReSet();
  454. // if (this.$route.query.rules) {
  455. // this.rules = this.$route.query.rules;
  456. // }
  457. // if (this.$route.query.searchForm) {
  458. // this.searchForm = this.$route.query.searchForm;
  459. // }
  460. this.pageType = this.$route.query.type;
  461. this.$refs.vipform.resetFields();
  462. },
  463. methods: {
  464. resetForm() {
  465. this.$refs.form.resetFields();
  466. },
  467. handleMinChange() {
  468. this.$refs.form.validateField("maxCourseNum");
  469. },
  470. handleMaxChange() {
  471. this.$refs.form.validateField("minCourseNum");
  472. },
  473. validateCom(rule, value, callback) {
  474. const one = Number(value);
  475. if (Number.isInteger(one)) {
  476. if (one < MIN_NUMBER) {
  477. return callback(new Error("输入值必须大于0"));
  478. } else if (one > MAX_NUMBER) {
  479. return callback(new Error("输入值必须小于999"));
  480. }
  481. return callback();
  482. }
  483. return callback(new Error("输入值必须为正整数"));
  484. },
  485. validateMin(rule, value, callback) {
  486. const one = Number(value);
  487. const max = Number(this.courseNumForm.maxCourseNum);
  488. if (!max || one <= max) {
  489. return callback();
  490. }
  491. return callback(new Error("输入值不得大于最大课时数"));
  492. },
  493. validateMax(rule, value, callback) {
  494. const one = Number(value);
  495. const min = Number(this.courseNumForm.minCourseNum);
  496. if (!min || one >= min) {
  497. return callback();
  498. }
  499. return callback(new Error("输入值不得小于最小课时数"));
  500. },
  501. changeStauts(val) {
  502. console.log(val);
  503. },
  504. submitFrom() {
  505. this.$refs.form.validate((isok) => {
  506. if (isok) {
  507. this.$refs["vipform"].validate((valid) => {
  508. if (valid) {
  509. // 验证通过
  510. let coursesStartTime = null,
  511. coursesEndTime = null,
  512. startTime = null,
  513. endTime = null;
  514. if (
  515. this.vipform.courseTime &&
  516. this.vipform.courseTime.length > 0
  517. ) {
  518. coursesStartTime = this.vipform.courseTime[0];
  519. coursesEndTime = this.vipform.courseTime[1];
  520. }
  521. if (
  522. this.vipform.activeTime &&
  523. this.vipform.activeTime.length > 0
  524. ) {
  525. startTime = this.vipform.activeTime[0];
  526. endTime = this.vipform.activeTime[1];
  527. }
  528. let organId = this.vipform.organ.join(",");
  529. let type = this.activeType;
  530. if (!type) {
  531. this.$message.error("请选择活动类型");
  532. return;
  533. }
  534. if (!this.online && !this.unonline) {
  535. this.$message.error("请选择活动适用范围");
  536. return;
  537. }
  538. if (type == "DISCOUNT") {
  539. if (!this.attribute1 || this.attribute1 < 0) {
  540. this.$message.error("折扣必须大于等于0");
  541. return;
  542. }
  543. } else if (type == "GIVE_CLASS") {
  544. if (!this.attribute1) {
  545. this.$message.error("请输入多少节开始赠");
  546. return;
  547. }
  548. if (!this.attribute2) {
  549. this.$message.error("请输入赠送课时数");
  550. return;
  551. }
  552. }
  553. let vipGroupCategoryIdList = this.vipform.stauts.join(",");
  554. let onlineSalarySettlement;
  555. let offlineSalarySettlement;
  556. if (this.online) {
  557. // 勾选线上
  558. if (this.onlineSalary == "RATIO_DISCOUNT") {
  559. if (this.onlineprice < 0 || this.onlineprice > 100) {
  560. this.$message.error("折扣比必须大于0且小于100");
  561. return;
  562. }
  563. } else if (this.onlineSalary == "TEACHER_DEFAULT") {
  564. this.onlineprice = 0;
  565. }
  566. onlineSalarySettlement = {
  567. salarySettlementType: this.onlineSalary,
  568. settlementValue: this.onlineprice,
  569. };
  570. } else {
  571. onlineSalarySettlement = null;
  572. }
  573. if (this.unonline) {
  574. // 勾选线下
  575. if (this.unonlineSalary == "RATIO_DISCOUNT") {
  576. if (this.unonlineprice < 0 || this.unonlineprice > 100) {
  577. this.$message.error("折扣比必须大于0且小于100");
  578. return;
  579. }
  580. } else if (this.unonlineSalary == "TEACHER_DEFAULT") {
  581. this.unonlineprice = 0;
  582. }
  583. offlineSalarySettlement = {
  584. salarySettlementType: this.unonlineSalary,
  585. settlementValue: this.unonlineprice,
  586. };
  587. } else {
  588. offlineSalarySettlement = null;
  589. }
  590. let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
  591. let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
  592. // let giveClassPaySalaryFlag = this.giveClassPaySalaryFlag * 1;
  593. let vipGroupSalarySettlement = {
  594. onlineSalarySettlement,
  595. offlineSalarySettlement,
  596. };
  597. // 发请求创建活动
  598. addVipActive(
  599. cleanDeep({
  600. coursesStartTime,
  601. coursesEndTime,
  602. startTime,
  603. endTime,
  604. name: this.vipform.name,
  605. description: this.vipform.desc,
  606. organId,
  607. type,
  608. vipGroupCategoryIdList,
  609. vipGroupSalarySettlement,
  610. salaryReadonlyFlag,
  611. paymentReadonlyFlag,
  612. giveClassPaySalaryFlag: 1,
  613. attribute1: this.attribute1,
  614. attribute2: this.attribute2,
  615. minCourseNum: this.courseNumForm.minCourseNum,
  616. maxCourseNum: this.courseNumForm.maxCourseNum,
  617. offlineClassJoinGradientRewards:
  618. this.offlineClassJoinGradientRewards * 1,
  619. onlineClassJoinGradientRewards:
  620. this.onlineClassJoinGradientRewards * 1,
  621. })
  622. ).then((res) => {
  623. if (res.code == 200) {
  624. this.$message.success("恭喜你,活动创建成功");
  625. this.onReSet();
  626. this.$store.dispatch("delVisitedViews", this.$route);
  627. this.$router.push({
  628. path: "/vipActiveManager/vipActiveList",
  629. });
  630. }
  631. });
  632. } else {
  633. this.$nextTick(() => {
  634. let isError = document.getElementsByClassName("is-error");
  635. isError[0].scrollIntoView({
  636. block: "center",
  637. behavior: "smooth",
  638. });
  639. });
  640. // this.$message.error("请填写必要参数");
  641. }
  642. });
  643. }
  644. });
  645. // 线上线下课 勾选就传不勾选就不传
  646. // addVipActive().then(res => { })
  647. },
  648. onOrganChange() {
  649. this.$forceUpdate();
  650. },
  651. onCheckAllBranch() {
  652. // 选择所有分部
  653. let vipform = this.vipform;
  654. vipform.organ = [];
  655. this.selects.branchs.forEach((item) => {
  656. vipform.organ.push(item.id);
  657. });
  658. this.$forceUpdate();
  659. },
  660. onCancel() {
  661. this.$store.dispatch("delVisitedViews", this.$route);
  662. this.$router.push({
  663. path: "/vipActiveManager/vipActiveList",
  664. query: { rules: this.rules, searchForm: this.searchForm },
  665. });
  666. },
  667. onReSet() {
  668. this.vipform = {
  669. name: "",
  670. desc: "",
  671. activeTime: [],
  672. courseTime: [],
  673. };
  674. this.activeType = "";
  675. this.online = true;
  676. this.unonline = true;
  677. this.salaryReadonlyFlag = false;
  678. this.onlineSalary = "TEACHER_DEFAULT";
  679. this.unonlineSalary = "TEACHER_DEFAULT";
  680. this.onlineprice = "";
  681. this.unonlineprice = "";
  682. this.onlineClassJoinGradientRewards = false;
  683. this.offlineClassJoinGradientRewards = false;
  684. this.attribute1 = "";
  685. this.attribute2 = "";
  686. this.courseNumForm.maxCourseNum = "";
  687. this.courseNumForm.minCourseNum = "";
  688. this.$refs.vipform.resetFields();
  689. },
  690. },
  691. };
  692. </script>
  693. <style lang="scss" scoped>
  694. .m-core {
  695. font-size: 14px;
  696. width: 100%;
  697. display: flex;
  698. flex-direction: column;
  699. justify-content: center;
  700. // text-align: center;
  701. .activeRange {
  702. display: flex;
  703. flex-direction: row;
  704. justify-content: flex-start;
  705. .left {
  706. height: 72px;
  707. line-height: 72px;
  708. }
  709. .right {
  710. .chioseWrap {
  711. display: flex;
  712. flex-direction: row;
  713. justify-content: flex-start;
  714. height: 72px;
  715. line-height: 72px;
  716. align-items: center;
  717. .el-checkbox {
  718. margin-right: 20px;
  719. }
  720. .el-select {
  721. margin-right: 20px;
  722. }
  723. }
  724. }
  725. }
  726. .activeType {
  727. display: flex;
  728. flex-direction: row;
  729. justify-content: flex-start;
  730. .left {
  731. margin-right: 20px;
  732. p {
  733. height: 40px;
  734. line-height: 40px;
  735. }
  736. }
  737. .right {
  738. > div {
  739. display: flex;
  740. flex-direction: row;
  741. justify-content: flex-start;
  742. height: 40px;
  743. line-height: 40px;
  744. margin-bottom: 20px;
  745. .head {
  746. width: 120px;
  747. height: 40px;
  748. line-height: 40px;
  749. border: 1px solid #ccc;
  750. text-align: center;
  751. border-radius: 5px;
  752. cursor: pointer;
  753. margin-right: 10px;
  754. }
  755. > .head.active {
  756. background-color: #13817a;
  757. color: #fff;
  758. border: none;
  759. }
  760. .title {
  761. line-height: 40px;
  762. height: 40px;
  763. }
  764. }
  765. }
  766. }
  767. }
  768. </style>
  769. <style lang="scss">
  770. .m-core {
  771. .vipform {
  772. .el-select {
  773. width: 400px !important;
  774. .el-input__inner {
  775. width: 400px;
  776. }
  777. }
  778. }
  779. .activeType {
  780. .right {
  781. .el-input {
  782. width: 150px !important;
  783. }
  784. }
  785. }
  786. }
  787. </style>