index.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  1. <template>
  2. <div class="order">
  3. <div class="warp">
  4. <div class="refreshBtn">
  5. <el-button
  6. class="refresh"
  7. type="primary"
  8. @click="refreshList"
  9. :loading="refresh"
  10. >{{ refresh ? "加载中..." : "刷新" }}</el-button
  11. >
  12. </div>
  13. <el-tabs type="border-card" @tab-click="changeTab" v-model="activeName">
  14. <el-tab-pane label="项目订单" name="first">
  15. <div class="user-list">
  16. <el-table
  17. ref="multipleTable"
  18. :data="projectData"
  19. tooltip-effect="dark"
  20. height="354"
  21. style="width: 100%; border-radius: 8px"
  22. @row-click="handleSelectionChange"
  23. >
  24. <el-table-column prop="goods" label="项目名称" width="200">
  25. <template slot-scope="scope">
  26. <div v-for="(val, index) in scope.row.goods" :key="index">
  27. <div>{{ val.name }}</div>
  28. </div>
  29. </template>
  30. </el-table-column>
  31. <el-table-column prop="goods" label="数量" show-overflow-tooltip>
  32. <template slot-scope="scope">
  33. <div>{{ scope.row.goods.length }}</div>
  34. </template>
  35. </el-table-column>
  36. <el-table-column
  37. prop="price"
  38. label="总价格"
  39. show-overflow-tooltip
  40. ></el-table-column>
  41. <el-table-column
  42. prop="order_time"
  43. label="预约时间"
  44. width="180"
  45. show-overflow-tooltip
  46. ></el-table-column>
  47. <el-table-column
  48. prop="store_name"
  49. label="预约店铺"
  50. show-overflow-tooltip
  51. ></el-table-column>
  52. <el-table-column prop="status" label="状态" show-overflow-tooltip>
  53. <template slot-scope="scope">
  54. <div :class="'color' + scope.row.status">
  55. <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
  56. {{
  57. scope.row.status == 0
  58. ? "已预约"
  59. : scope.row.status == 1
  60. ? "待使用"
  61. : scope.row.status == 2
  62. ? "正在使用"
  63. : scope.row.status == 3
  64. ? "已结算"
  65. : scope.row.status == -1
  66. ? "已取消"
  67. : scope.row.status == -2
  68. ? "退款审核中"
  69. : "已退款"
  70. }}
  71. </div>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. <div class="pagin">
  76. <el-pagination
  77. background
  78. layout="prev, pager, next"
  79. @current-change="handleCurrentChange"
  80. :current-page.sync="currentPage1"
  81. :total="total"
  82. ></el-pagination>
  83. </div>
  84. </div>
  85. </el-tab-pane>
  86. <el-tab-pane label="次卡订单" name="second">
  87. <div class="user-list">
  88. <el-table
  89. ref="multipleTable"
  90. :data="cardListData"
  91. tooltip-effect="dark"
  92. height="354"
  93. @row-click="openDetail"
  94. style="width: 100%; border-radius: 8px"
  95. >
  96. <el-table-column prop="card_name" label="卡券名称" width="200">
  97. <template slot-scope="scope">
  98. <div>{{ scope.row.card_name | ellipsis(8) }}</div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. prop="total_num"
  103. label="总次数"
  104. show-overflow-tooltip
  105. align="center"
  106. >
  107. <template slot-scope="{ row }" v-if="row.card_type == 1">
  108. {{ row.total_num }}
  109. </template>
  110. </el-table-column>
  111. <el-table-column
  112. prop="num"
  113. label="剩余次数"
  114. show-overflow-tooltip
  115. align="center"
  116. >
  117. <template slot-scope="{ row }" v-if="row.card_type == 1">
  118. {{ row.num }}
  119. </template>
  120. </el-table-column>
  121. <el-table-column
  122. prop="used_num"
  123. label="已用次数"
  124. width="180"
  125. show-overflow-tooltip
  126. align="center"
  127. ></el-table-column>
  128. <el-table-column
  129. prop="expir_time"
  130. label="过期时间"
  131. width="180"
  132. show-overflow-tooltip
  133. >
  134. <template slot-scope="{ row }">
  135. <div class="expir_time" @click.stop="amendCardTime(row)">
  136. {{ row.expir_time }}
  137. </div>
  138. </template>
  139. </el-table-column>
  140. <el-table-column
  141. prop="create_time"
  142. label="创建时间"
  143. width="180"
  144. show-overflow-tooltip
  145. ></el-table-column>
  146. <el-table-column prop="status" label="状态" show-overflow-tooltip>
  147. <template slot-scope="scope">
  148. <div :class="'color' + scope.row.status">
  149. {{
  150. scope.row.status == -1
  151. ? "已过期"
  152. : scope.row.status == -0
  153. ? "已使用"
  154. : "待使用"
  155. }}
  156. </div>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <div class="pagin">
  161. <el-pagination
  162. background
  163. layout="prev, pager, next"
  164. @current-change="handleCurrentChange"
  165. :current-page.sync="currentPage1"
  166. :total="total"
  167. ></el-pagination>
  168. </div>
  169. </div>
  170. </el-tab-pane>
  171. <el-tab-pane label="商品订单" name="third">
  172. <div class="user-list">
  173. <el-table
  174. ref="multipleTable"
  175. :data="goodData"
  176. tooltip-effect="dark"
  177. height="354"
  178. style="width: 100%; border-radius: 8px"
  179. >
  180. <!-- create_time: "2022-03-19 22:53:40"
  181. goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
  182. id: 47
  183. price: "0.01"
  184. status: 5 -->
  185. <el-table-column prop="goods" label="商品名称" width="200">
  186. <template slot-scope="scope">
  187. <div v-for="(val, index) in scope.row.goods" :key="index">
  188. <div>{{ val.name }}</div>
  189. </div>
  190. </template>
  191. </el-table-column>
  192. <el-table-column prop="goods" label="数量" show-overflow-tooltip>
  193. <template slot-scope="scope">
  194. <div>{{ scope.row.goods.length }}</div>
  195. </template>
  196. </el-table-column>
  197. <el-table-column
  198. prop="price"
  199. label="实付款"
  200. show-overflow-tooltip
  201. ></el-table-column>
  202. <el-table-column
  203. prop="create_time"
  204. label="下单时间"
  205. width="180"
  206. show-overflow-tooltip
  207. ></el-table-column>
  208. <el-table-column prop="status" label="状态" show-overflow-tooltip>
  209. <template slot-scope="scope">
  210. <div :class="'color' + scope.row.status">
  211. <!-- 状态,0未支付,1已支付,待取货,2已取货,-1已取消,-2退款审核中,-3已退款 -->
  212. {{
  213. scope.row.status == 0
  214. ? "未支付"
  215. : scope.row.status == 1
  216. ? "待取货"
  217. : scope.row.status == 2
  218. ? "已取货"
  219. : scope.row.status == -1
  220. ? "已取消"
  221. : scope.row.status == -2
  222. ? "退款审核中"
  223. : "已退款"
  224. }}
  225. </div>
  226. </template>
  227. </el-table-column>
  228. </el-table>
  229. <div class="pagin">
  230. <el-pagination
  231. background
  232. layout="prev, pager, next"
  233. @current-change="handleCurrentChange"
  234. :current-page.sync="currentPage1"
  235. :total="total"
  236. ></el-pagination>
  237. </div>
  238. </div>
  239. </el-tab-pane>
  240. <el-tab-pane label="优惠券" name="fourth">
  241. <div class="user-list">
  242. <el-table
  243. ref="multipleTable"
  244. :data="couponData"
  245. tooltip-effect="dark"
  246. height="354"
  247. style="width: 100%; border-radius: 8px"
  248. >
  249. <!-- create_time: "2022-03-10 10:39:19"
  250. ex_time: "2022.03.17 23:59"
  251. id: 2517
  252. name: "新人体验券"
  253. status: 2
  254. type: "全额券" -->
  255. <el-table-column prop="name" label="卡卷名称"></el-table-column>
  256. <el-table-column
  257. prop="type"
  258. label="卡卷类型"
  259. show-overflow-tooltip
  260. width="100"
  261. ></el-table-column>
  262. <el-table-column
  263. prop="ex_time"
  264. label="到期时间"
  265. width="180"
  266. show-overflow-tooltip
  267. ></el-table-column>
  268. <el-table-column
  269. prop="create_time"
  270. label="创建时间"
  271. width="180"
  272. show-overflow-tooltip
  273. ></el-table-column>
  274. <el-table-column
  275. width="100"
  276. prop="status"
  277. label="状态"
  278. show-overflow-tooltip
  279. >
  280. <template slot-scope="scope">
  281. <div :class="'colorA' + scope.row.status">
  282. {{ couponStatus[scope.row.status] }}
  283. </div>
  284. </template>
  285. </el-table-column>
  286. <el-table-column
  287. prop=""
  288. label="操作"
  289. width="100"
  290. show-overflow-tooltip
  291. >
  292. <template slot-scope="scope" v-if="scope.row.status == 0">
  293. <div
  294. class="cancleCoupon"
  295. @click.stop="cancleCoupon(scope.row)"
  296. >
  297. 操作
  298. </div>
  299. </template>
  300. </el-table-column>
  301. </el-table>
  302. <div class="pagin">
  303. <el-pagination
  304. background
  305. layout="prev, pager, next"
  306. @current-change="handleCurrentChange"
  307. :current-page.sync="currentPage1"
  308. :total="total"
  309. ></el-pagination>
  310. </div>
  311. </div>
  312. </el-tab-pane>
  313. </el-tabs>
  314. </div>
  315. <!-- 次卡详情 -->
  316. <mine-pupop :show="isPore">
  317. <div class="pore-block">
  318. <div class="delete-pupop" @click="isPore = false">
  319. <img
  320. src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
  321. alt
  322. />
  323. </div>
  324. <div class="pore-content">
  325. <div class="card-title">订单详情</div>
  326. <div class="project">
  327. <div class="project-title">项目名称:</div>
  328. <div class="project-list">
  329. <div
  330. class="project-info"
  331. v-for="(item, index) in cardInfo.project_list"
  332. :key="index"
  333. >
  334. <div class="name-text">{{ item.project_name }}</div>
  335. <div class="change-num" v-if="cardInfo.card_type == 1">
  336. <div class="num-content">
  337. <div class="content-left" @click="reduce(index)">-</div>
  338. <div class="content-num">{{ item.num || 0 }}</div>
  339. <div class="content-right" @click="item.num++">+</div>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. </div>
  345. <div class="common">
  346. <span class="common-title">支付方式:</span
  347. ><span>{{ cardInfo.pay_way }}</span>
  348. </div>
  349. <div class="common">
  350. <span class="common-title">有效期限:</span
  351. ><span>{{ cardInfo.ex_time }}</span>
  352. </div>
  353. <div class="common">
  354. <span class="common-title">实付金额:</span
  355. ><span>¥{{ cardInfo.price }}</span>
  356. </div>
  357. <div class="consume-list">
  358. <div class="consume-title">消耗信息:</div>
  359. <div
  360. class="consume-info min-size"
  361. v-for="(item, index) in cardLogList"
  362. :key="index"
  363. >
  364. <div class="shop">{{ item.store_name }}</div>
  365. <div class="project-tips">{{ item.remark }}</div>
  366. <div class="project-ts">{{ item.create_time }}</div>
  367. </div>
  368. </div>
  369. </div>
  370. <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">
  371. 确定
  372. </div>
  373. </div>
  374. </mine-pupop>
  375. <!-- 修改次卡时间 -->
  376. <mine-pupop :show="isAmend">
  377. <div class="amendTime">
  378. <div class="image">
  379. <img
  380. src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
  381. alt
  382. @click="closeAmend"
  383. />
  384. </div>
  385. <div class="admendTime-content">
  386. <div class="oldTime">
  387. 次卡过期时间 :<span> {{ amendCardInfo.expir_time }}</span>
  388. </div>
  389. <div class="newTime">
  390. 选择更改日期:
  391. <el-date-picker
  392. class="date"
  393. v-model="cardTime"
  394. type="date"
  395. placeholder="选择日期"
  396. value-format="yyyy-MM-dd"
  397. @focus="forbid"
  398. >
  399. </el-date-picker>
  400. </div>
  401. <div class="radio">
  402. <button class="cancelBtn" @click="cancel">取消</button>
  403. <button class="affirmBtn" @click="affirm">确定</button>
  404. </div>
  405. </div>
  406. </div>
  407. </mine-pupop>
  408. <!-- 操作核销优惠券 -->
  409. <mine-pupop :show="isCancelCoupon">
  410. <div class="CouponPop">
  411. <div class="image">
  412. <img
  413. src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
  414. alt
  415. @click="closeCouponPop"
  416. />
  417. </div>
  418. <div class="title">核销优惠券</div>
  419. <div class="couponName">
  420. <div class="one">优惠券名称:</div>
  421. <div>{{ cancelCouponInfo.name }}</div>
  422. </div>
  423. <div class="couponRemark">
  424. <div class="one">备注信息:</div>
  425. <el-input v-model.trim="couponRemark"></el-input>
  426. </div>
  427. <div class="radio">
  428. <button class="affirmBtn" @click="checkCoupon">确定</button>
  429. </div>
  430. </div>
  431. </mine-pupop>
  432. </div>
  433. </template>
  434. <script>
  435. import api from "../../../server/home";
  436. import minePupop from "../../../components/minePupop/index.vue";
  437. export default {
  438. components: {
  439. minePupop,
  440. },
  441. data() {
  442. return {
  443. couponList: [
  444. {
  445. value: "选项1",
  446. label: "黄金糕",
  447. },
  448. {
  449. value: "选项2",
  450. label: "双皮奶",
  451. },
  452. ],
  453. tableData: [
  454. {
  455. date: "2022.04.25 14:30",
  456. name: "滴滴滴",
  457. headImg:
  458. "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
  459. phone: "13346783645",
  460. numberList: 2,
  461. price: 100,
  462. shop: "运用店",
  463. status: 2,
  464. },
  465. {
  466. date: "2022.04.25 14:30",
  467. name: "滴滴滴",
  468. headImg:
  469. "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
  470. phone: "13346783645",
  471. numberList: 5,
  472. price: 800,
  473. shop: "武昌店",
  474. status: 1,
  475. },
  476. ],
  477. couponStatus: ["待使用", "已使用", "已过期"],
  478. goodStatus: ["未支付", "已支付", "已取货"],
  479. activeName: "first",
  480. currentPage1: 1,
  481. couponData: [],
  482. goodData: [],
  483. projectData: [],
  484. cardOrderData: [],
  485. total: 100,
  486. limit: 10,
  487. isPore: false,
  488. cardInfo: {}, //订单详情
  489. cardLogList: [], //次卡消耗记录
  490. cardListData: [], //用户次卡列表
  491. isAmend: false, //修改次卡时间弹窗
  492. amendCardInfo: "", // 要修改次卡的信息
  493. cardTime: "", //次卡修改时间(年月日)
  494. isCancelCoupon: false, //核销优惠券界面
  495. cancelCouponInfo: "", //核销优惠券名称
  496. couponRemark: "", //核销优惠券备注信息
  497. refresh: false, //刷新页面数据
  498. };
  499. },
  500. computed: {},
  501. watch: {},
  502. methods: {
  503. // 刷新页面数据
  504. refreshList() {
  505. this.refresh = true;
  506. api.syncErpOrder({}).then((res) => {
  507. if (res.code == 200) {
  508. this.currentPage1 = 1;
  509. if (this.activeName == "first") {
  510. this.getUserProject();
  511. } else if (this.activeName == "second") {
  512. this.getCardList();
  513. } else if (this.activeName == "third") {
  514. this.getUserGoods();
  515. } else if (this.activeName == "fourth") {
  516. this.getUserCoupon();
  517. }
  518. }
  519. });
  520. },
  521. // 打开核销优惠券界面
  522. cancleCoupon(e) {
  523. this.isCancelCoupon = true;
  524. this.cancelCouponInfo = e;
  525. },
  526. // 关闭核销优惠券页面
  527. closeCouponPop() {
  528. this.isCancelCoupon = false;
  529. this.couponRemark = "";
  530. },
  531. // 核销优惠券
  532. checkCoupon() {
  533. if (this.couponRemark == "") {
  534. this.$message.error("请填写备注信息");
  535. return;
  536. }
  537. api
  538. .checkCoupon({
  539. id: this.cancelCouponInfo.id,
  540. remark: this.couponRemark,
  541. })
  542. .then((res) => {
  543. if (res.code == 200) {
  544. this.$message.success("核销成功");
  545. this.isCancelCoupon = false;
  546. // 刷新优惠券列表
  547. this.getUserCoupon();
  548. }
  549. });
  550. },
  551. // 阻止修改次卡时间时键盘弹出
  552. forbid() {
  553. //禁止软键盘弹出
  554. document.activeElement.blur();
  555. },
  556. // 修改次卡时间取消
  557. cancel() {
  558. this.isAmend = false;
  559. this.cardTime = "";
  560. },
  561. // 修改次卡时间确定
  562. affirm() {
  563. this.amendCardTimeApi();
  564. },
  565. // 修改次卡时间
  566. amendCardTime(e) {
  567. this.isAmend = true;
  568. this.amendCardInfo = e;
  569. console.log(e);
  570. },
  571. // 关闭修改次卡时间弹窗
  572. closeAmend() {
  573. this.isAmend = false;
  574. this.cardTime = "";
  575. },
  576. // 发起修改次卡订单请求
  577. amendCardTimeApi() {
  578. api
  579. .amendCardTime({
  580. id: this.amendCardInfo.id,
  581. expire_date: this.cardTime,
  582. })
  583. .then((res) => {
  584. if (res.code == 200) {
  585. this.$message({
  586. message: res.msg,
  587. type: "success",
  588. });
  589. this.isAmend = false;
  590. // 更新次卡列表
  591. this.getCardList();
  592. }
  593. });
  594. },
  595. // 获取优惠券订单
  596. getUserCoupon() {
  597. let params = {
  598. page: this.currentPage1,
  599. limit: this.limit,
  600. id: this.id,
  601. };
  602. api.getUserCoupon(params).then((res) => {
  603. this.couponData = res.data.list;
  604. this.total = res.data.total;
  605. // 关闭刷新动画
  606. this.refresh = false;
  607. });
  608. },
  609. reduce(index) {
  610. this.cardInfo.project_list[index].num--;
  611. if (this.cardInfo.project_list[index].num < 0) {
  612. this.cardInfo.project_list[index].num = 0;
  613. }
  614. },
  615. //次卡订单详情
  616. openDetail(row, column, event) {
  617. this.isPore = true;
  618. api.cardInfo({ id: row.id }).then((res) => {
  619. if (res.code == 200) {
  620. res.data.card_type = row.card_type;
  621. this.cardInfo = res.data;
  622. }
  623. });
  624. api.cardLog({ id: row.id }).then((res) => {
  625. if (res.code == 200) {
  626. this.cardLogList = res.data.list;
  627. }
  628. });
  629. },
  630. confirm() {
  631. // 项目ID,json字符,格式如:[{"project_id":"10","num":5}],project_id:适用项目ID,num:剩余次数
  632. let project_data = [],
  633. project_info = {};
  634. this.cardInfo.project_list.forEach((res) => {
  635. project_info = {
  636. project_id: res.id,
  637. num: res.num,
  638. };
  639. project_data.push(project_info);
  640. });
  641. api
  642. .cardUpdate({
  643. id: this.cardInfo.id,
  644. project_data: JSON.stringify(project_data),
  645. })
  646. .then((res) => {
  647. if (res.code == 200) {
  648. this.$message.success("更改成功!");
  649. this.isPore = false;
  650. // 刷新次卡列表
  651. this.getCardList();
  652. }
  653. });
  654. },
  655. // 获取商品订单
  656. getUserGoods() {
  657. let params = {
  658. page: this.currentPage1,
  659. limit: this.limit,
  660. id: this.id,
  661. };
  662. api.getUserGoods(params).then((res) => {
  663. this.goodData = res.data.list;
  664. this.total = res.data.total;
  665. // 关闭刷新动画
  666. this.refresh = false;
  667. });
  668. },
  669. // 获取获取项目订单
  670. getUserProject() {
  671. let params = {
  672. page: this.currentPage1,
  673. limit: this.limit,
  674. id: this.id,
  675. };
  676. api.getUserProject(params).then((res) => {
  677. this.projectData = res.data.list;
  678. this.total = res.data.total;
  679. // 关闭刷新动画
  680. this.refresh = false;
  681. });
  682. },
  683. // 获取卡券订单
  684. // async getCardOrders() {
  685. // let params = {
  686. // page: this.currentPage1,
  687. // limit: this.limit,
  688. // id: this.id,
  689. // };
  690. // let resp = await api.getCardOrders(params);
  691. // if (resp.code === 200) {
  692. // console.log(resp, "adadasdasdadsadsadasd");
  693. // this.cardOrderData = resp.data.list;
  694. // this.total = resp.data.total;
  695. // }
  696. // },
  697. //获取用户次卡列表
  698. async getCardList() {
  699. let params = {
  700. page: this.currentPage1,
  701. limit: this.limit,
  702. id: this.id,
  703. };
  704. let resp = await api.getCardList(params);
  705. if (resp.code === 200) {
  706. this.cardListData = resp.data.list;
  707. this.total = resp.data.total;
  708. // 关闭刷新动画
  709. this.refresh = false;
  710. }
  711. },
  712. handleCurrentChange(val) {
  713. this.currentPage1 = val;
  714. if (this.activeName == "first") {
  715. this.getUserProject();
  716. } else if (this.activeName == "second") {
  717. // this.getCardOrders();
  718. this.getCardList();
  719. } else if (this.activeName == "third") {
  720. this.getUserGoods();
  721. } else if (this.activeName == "fourth") {
  722. this.getUserCoupon();
  723. }
  724. },
  725. handleSelectionChange(row, column, event) {
  726. this.$router.push({
  727. path: "/historicalOrder/details",
  728. query: {
  729. id: row.id,
  730. },
  731. });
  732. },
  733. onSubmit() {},
  734. submitFrequency() {},
  735. changeTab(e) {
  736. this.currentPage1 = 1;
  737. if (e.index == 0) {
  738. this.getUserProject();
  739. } else if (e.index == 1) {
  740. // this.getCardOrders();
  741. this.getCardList();
  742. } else if (e.index == 2) {
  743. this.getUserGoods();
  744. } else if (e.index == 3) {
  745. this.getUserCoupon();
  746. }
  747. },
  748. },
  749. created() {
  750. let id = this.$route.query.id;
  751. let activeName = this.$route.query.activeName;
  752. this.activeName = activeName;
  753. this.id = id;
  754. if (this.activeName == "first") {
  755. this.getUserProject();
  756. } else if (this.activeName == "second") {
  757. // this.getCardOrders();
  758. this.getCardList();
  759. } else if (this.activeName == "third") {
  760. this.getUserGoods();
  761. } else if (this.activeName == "fourth") {
  762. this.getUserCoupon();
  763. }
  764. },
  765. mounted() {},
  766. };
  767. </script>
  768. <style lang='less' scoped>
  769. .order {
  770. height: 100%;
  771. width: 100%;
  772. .refreshBtn {
  773. width: 100%;
  774. display: flex;
  775. justify-content: flex-end;
  776. margin-bottom: 10px;
  777. .refresh {
  778. width: 100px;
  779. background: #fa7d22;
  780. border-radius: 2px;
  781. border-color: #fa7d22;
  782. }
  783. }
  784. .cancleCoupon {
  785. width: 50px;
  786. height: 25px;
  787. background: #fa7d22;
  788. border-radius: 2px;
  789. line-height: 25px;
  790. text-align: center;
  791. color: #fff;
  792. }
  793. .pagin {
  794. padding: 20px 0;
  795. .el-pagination {
  796. text-align: center;
  797. }
  798. }
  799. .colorList {
  800. color: green;
  801. }
  802. }
  803. .color0 {
  804. color: #3ef3ed;
  805. }
  806. .color1 {
  807. color: #61d09d;
  808. }
  809. .color2 {
  810. color: #00eeee;
  811. }
  812. .color3 {
  813. color: #a999ea;
  814. }
  815. .color-2 {
  816. color: #3115cc;
  817. }
  818. .color-1 {
  819. color: #fc3019;
  820. }
  821. .color-3 {
  822. color: #fc3019;
  823. }
  824. .colorA1 {
  825. color: #333;
  826. }
  827. .colorA2 {
  828. color: #fc3019;
  829. }
  830. .colorA0 {
  831. color: #61d09d;
  832. }
  833. .priceColor {
  834. color: #ff3007;
  835. }
  836. .pore-block {
  837. width: 540px;
  838. height: 400px;
  839. background: #ffffff;
  840. border-radius: 8px;
  841. position: relative;
  842. padding: 26px 72px 80px 30px;
  843. .delete-pupop {
  844. width: 32px;
  845. position: absolute;
  846. right: 5px;
  847. top: 5px;
  848. img {
  849. width: 100%;
  850. }
  851. }
  852. .pore-content {
  853. overflow: scroll;
  854. height: 310px;
  855. .card-title {
  856. font-size: 14px;
  857. font-family: PingFangSC-Medium, PingFang SC;
  858. font-weight: 500;
  859. color: #333333;
  860. line-height: 20px;
  861. text-align: center;
  862. }
  863. .project {
  864. display: flex;
  865. font-size: 13px;
  866. font-family: PingFangSC-Regular, PingFang SC;
  867. font-weight: 400;
  868. color: #333333;
  869. line-height: 18px;
  870. .project-title {
  871. color: #999999;
  872. }
  873. .project-list {
  874. flex: 1;
  875. .project-info {
  876. flex: 1;
  877. .change-num {
  878. margin-top: 6px;
  879. width: 100%;
  880. display: flex;
  881. justify-content: end;
  882. .num-content {
  883. width: 104px;
  884. height: 28px;
  885. background: #ffffff;
  886. border-radius: 2px;
  887. border: 1px solid #fa7d22;
  888. display: flex;
  889. align-items: center;
  890. .content-left,
  891. .content-right {
  892. width: 28px;
  893. height: 100%;
  894. background: #fa7d22;
  895. font-size: 20px;
  896. line-height: 24px;
  897. color: #ffffff;
  898. text-align: center;
  899. }
  900. .content-num {
  901. flex: 1;
  902. font-size: 12px;
  903. font-family: PingFangSC-Regular, PingFang SC;
  904. font-weight: 400;
  905. color: rgba(0, 0, 0, 0.65);
  906. text-align: center;
  907. }
  908. }
  909. }
  910. }
  911. }
  912. }
  913. .common {
  914. margin-top: 6px;
  915. font-size: 13px;
  916. font-family: PingFangSC-Regular, PingFang SC;
  917. font-weight: 400;
  918. color: #333333;
  919. line-height: 18px;
  920. .common-title {
  921. color: #999999;
  922. }
  923. }
  924. .consume-list {
  925. margin-top: 6px;
  926. .consume-title {
  927. font-size: 13px;
  928. font-family: PingFangSC-Regular, PingFang SC;
  929. font-weight: 400;
  930. color: #999999;
  931. line-height: 18px;
  932. }
  933. .consume-info {
  934. margin-top: 6px;
  935. font-size: 10px;
  936. font-family: PingFangSC-Regular, PingFang SC;
  937. font-weight: 400;
  938. color: #333333;
  939. line-height: 14px;
  940. display: flex;
  941. justify-content: space-between;
  942. .shop {
  943. }
  944. .project-tips {
  945. flex: 1;
  946. margin: 0 10px;
  947. }
  948. .project-ts {
  949. }
  950. }
  951. }
  952. }
  953. .confirm {
  954. background: #fa7d22;
  955. border-radius: 14px;
  956. position: absolute;
  957. bottom: 42px;
  958. left: 50%;
  959. transform: translateX(-50%);
  960. width: 176px;
  961. height: 28px;
  962. font-size: 14px;
  963. font-family: PingFangSC-Medium, PingFang SC;
  964. font-weight: 500;
  965. color: #ffffff;
  966. line-height: 28px;
  967. text-align: center;
  968. }
  969. }
  970. // 修改次卡时间
  971. .amendTime {
  972. width: 440px;
  973. height: 300px;
  974. background-color: #fff;
  975. border-radius: 12px;
  976. padding: 15px;
  977. .image {
  978. height: 30px;
  979. width: 30px;
  980. img {
  981. width: 100%;
  982. }
  983. }
  984. .oldTime {
  985. color: #333;
  986. margin-left: 20px;
  987. margin-top: 30px;
  988. span {
  989. margin-left: 20px;
  990. }
  991. }
  992. .newTime {
  993. margin-left: 20px;
  994. margin-top: 10px;
  995. .time {
  996. margin-top: 20px;
  997. margin-left: 110px;
  998. }
  999. .date {
  1000. margin-top: 20px;
  1001. margin-left: 20px;
  1002. }
  1003. }
  1004. .radio {
  1005. width: 100%;
  1006. display: flex;
  1007. justify-content: space-evenly;
  1008. button {
  1009. width: 176px;
  1010. height: 28px;
  1011. border-radius: 14px;
  1012. background-color: #fff;
  1013. border: none;
  1014. margin-top: 90px;
  1015. }
  1016. .cancelBtn {
  1017. border: 1px solid #fa7d22;
  1018. color: #fa7d22;
  1019. }
  1020. .affirmBtn {
  1021. background-color: #fa7d22;
  1022. color: #fff;
  1023. margin-left: 15px;
  1024. }
  1025. }
  1026. }
  1027. // 核销优惠券
  1028. .CouponPop {
  1029. width: 440px;
  1030. height: 300px;
  1031. background-color: #fff;
  1032. border-radius: 12px;
  1033. padding: 15px;
  1034. .image {
  1035. height: 30px;
  1036. width: 30px;
  1037. img {
  1038. width: 100%;
  1039. }
  1040. }
  1041. .title {
  1042. text-align: center;
  1043. font-weight: 700;
  1044. font-size: 16px;
  1045. margin-bottom: 40px;
  1046. }
  1047. .couponName {
  1048. display: flex;
  1049. margin-bottom: 40px;
  1050. .one {
  1051. font-weight: 600;
  1052. margin-right: 20px;
  1053. width: 90px;
  1054. }
  1055. }
  1056. .couponRemark {
  1057. display: flex;
  1058. align-items: center;
  1059. .one {
  1060. margin-right: 22px;
  1061. font-weight: 600;
  1062. width: 90px;
  1063. }
  1064. .el-input {
  1065. width: 300px;
  1066. /deep/.el-input__inner:focus {
  1067. // el-input输入时设置边框颜色
  1068. border: #fa7d22 1px solid;
  1069. }
  1070. }
  1071. }
  1072. .radio {
  1073. width: 100%;
  1074. display: flex;
  1075. justify-content: space-evenly;
  1076. button {
  1077. width: 176px;
  1078. height: 28px;
  1079. border-radius: 14px;
  1080. background-color: #fff;
  1081. border: none;
  1082. margin-top: 50px;
  1083. }
  1084. .affirmBtn {
  1085. background-color: #fa7d22;
  1086. color: #fff;
  1087. margin-left: 15px;
  1088. }
  1089. }
  1090. }
  1091. .expir_time {
  1092. color: #3115cc;
  1093. }
  1094. </style>