baseInfo.vue 25 KB

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