1import { OrderApi } from './order-api.bd8fabfa.js'; 2import { UserCenterTab } from './tabs.aa3645d6.js'; 3import { useRouter } from './__federation_shared_vue-router.js'; 4import { EmptyStatus } from './index.9a484a4a.js'; 5import { PublicTrainingCampApi } from './publictrainingcamp-api.61bc84ec.js'; 6import { CtSourceApi } from './ctsource-api.bb8ba336.js'; 7import { ToolUtils } from './tool-utils.82d77e92.js'; 8import { defineComponent, reactive, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode as createBaseVNode, renderList, createCommentVNode, normalizeStyle, toDisplayString, createVNode, createBlock, onBeforeUnmount, ref, withCtx, createTextVNode } from './__federation_shared_vue.js'; 9import { _export_sfc } from './index.72728a3a.js'; 10import './base.d49d4c12.js'; 11import './el-overlay.1043778b.js'; 12import { ElMessageBox, ElMessage } from './__federation_shared_element-plus.js'; 13 14const _hoisted_1$2 = { class: "refund-list" }; 15const _hoisted_2$2 = { class: "live" }; 16const _hoisted_3$2 = { class: "orders-wrapper" }; 17const _hoisted_4$2 = ["onClick"]; 18const _hoisted_5$2 = ["src"]; 19const _hoisted_6$2 = { class: "info" }; 20const _hoisted_7$1 = { class: "title" }; 21const _hoisted_8$1 = { class: "desc" }; 22const _hoisted_9$1 = { class: "order-info" }; 23const _hoisted_10$1 = { class: "amount" }; 24const _hoisted_11$1 = { class: "price" }; 25const _hoisted_12$1 = { class: "price-num" }; 26const _hoisted_13$1 = { class: "state" }; 27const _hoisted_14$1 = { class: "operate" }; 28const _hoisted_15$1 = ["onClick"]; 29const _hoisted_16$1 = { class: "paging" }; 30const _sfc_main$2 = /* @__PURE__ */ defineComponent({ 31 __name: "refund-list", 32 emits: ["refundChange"], 33 setup(__props, { expose, emit }) { 34 const router = useRouter(); 35 const data = reactive({ 36 orderData: [], 37 total: 0, 38 order: { 39 pageIndex: 1, 40 showItem: 10, 41 status: 0, 42 userId: 0 43 } 44 }); 45 const goToDetail = (goodsData) => { 46 if (goodsData.categoryId === 3) { 47 router.push(`/course-detail/${goodsData.goodsId}`); 48 } else if (goodsData.categoryId === 5) { 49 router.push(`/live/${goodsData.goodsId}`); 50 } else if (goodsData.categoryId === 1) { 51 router.push(`/school/books/${goodsData.goodsId}`); 52 } else if (goodsData.categoryId === 7) { 53 router.push(`/giftBag/giftBagGoods/${goodsData.goodsId}`); 54 } else if (goodsData.categoryId === 10) { 55 getCampPeriodByGoodsId(goodsData.goodsId); 56 } else if (goodsData.categoryId === 13) { 57 getCtPeriodByGoodsId(goodsData.goodsId); 58 } else if (goodsData.categoryId === 9) { 59 router.push("/user-center/cardbag"); 60 } 61 }; 62 const getCampPeriodByGoodsId = (goodsId) => { 63 PublicTrainingCampApi.getCampPeriodByGoodsId(goodsId).then((res) => { 64 router.push(`/traincamp/detail?trainingCampId=${res.data.trainingCampId}`); 65 }); 66 }; 67 const getCtPeriodByGoodsId = (goodsId) => { 68 CtSourceApi.GetCtPeriodByGoodsId(goodsId).then((res) => { 69 router.push(`/trainauth/detail/${res.data.ctId}`); 70 }); 71 }; 72 const refundFun = (item) => { 73 emit("refundChange", item); 74 }; 75 const getStateColor = (state) => { 76 switch (state) { 77 case 0: 78 case 1: 79 return "#FFBE00"; 80 case 2: 81 return "#FF1E10"; 82 case 3: 83 case 4: 84 return "#1AAD19"; 85 default: 86 return ""; 87 } 88 }; 89 const getStateText = (state) => { 90 switch (state) { 91 case 0: 92 case 1: 93 return "\u9000\u6B3E\u4E2D"; 94 case 2: 95 return "\u7533\u8BF7\u88AB\u62D2"; 96 case 3: 97 return "\u901A\u8FC7"; 98 case 4: 99 return "\u5DF2\u9000\u6B3E"; 100 default: 101 return ""; 102 } 103 }; 104 const serialize = (data2) => { 105 let jsonData;
106 try { 107 jsonData = JSON.parse(data2); 108 } catch (error) { 109 jsonData = ""; 110 } 111 if (typeof jsonData == "object") { 112 return jsonData; 113 } else if (jsonData == "") { 114 jsonData = { 115 state: 0, 116 bgColor: "", 117 urlImg: "" 118 }; 119 return jsonData; 120 } else { 121 serialize(jsonData); 122 } 123 return JSON.parse(jsonData); 124 }; 125 const getUserRefundRecords = () => { 126 OrderApi.GetUserRefundRecords(data.order).then((res) => { 127 (res?.data?.items || []).forEach((item, index) => { 128 item.goodsList.forEach((element, idx) => { 129 if (element.categoryId == 9) { 130 element.bannerImg = serialize(element.bannerImg); 131 } 132 }); 133 item.saleItems = item.goodsList; 134 }); 135 data.orderData = res.data.items || []; 136 data.total = res.data.totalItems; 137 }); 138 }; 139 const disInit = (time) => { 140 if (time) { 141 return ToolUtils.timeDifference(new Date(time)); 142 } 143 }; 144 getUserRefundRecords(); 145 expose({ 146 getUserRefundRecords 147 }); 148 return (_ctx, _cache) => { 149 const _component_el_pagination = resolveComponent("el-pagination"); 150 return openBlock(), createElementBlock("div", _hoisted_1$2, [ 151 data.orderData.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ 152 createBaseVNode("div", _hoisted_2$2, [ 153 createBaseVNode("div", _hoisted_3$2, [ 154 (openBlock(true), createElementBlock(Fragment, null, renderList(data.orderData, (order, index) => { 155 return openBlock(), createElementBlock("div", { 156 key: index, 157 class: "order-card" 158 }, [ 159 (openBlock(true), createElementBlock(Fragment, null, renderList(order.saleItems, (saleItem, index2) => { 160 return openBlock(), createElementBlock("div", { 161 key: index2, 162 class: "row saleItems",
163 style: { "cursor": "pointer" } 164 }, [ 165 createBaseVNode("div", { 166 class: "col", 167 onClick: ($event) => goToDetail(saleItem) 168 }, [ 169 saleItem.categoryId != 9 ? (openBlock(), createElementBlock("img", { 170 key: 0, 171 src: saleItem.bannerImg || saleItem.smallImg, 172 class: "card-img" 173 }, null, 8, _hoisted_5$2)) : createCommentVNode("", true), 174 saleItem.categoryId == 9 ? (openBlock(), createElementBlock("div", { 175 key: 1, 176 class: "card-ul-li", 177 style: normalizeStyle({ 178 background: saleItem.bannerImg.state == 0 ? saleItem.bannerImg.bgColor || "#009bff" : `url(${saleItem.bannerImg.urlImg}) no-repeat` 179 }) 180 }, null, 4)) : createCommentVNode("", true), 181 createBaseVNode("div", _hoisted_6$2, [ 182 createBaseVNode("div", _hoisted_7$1, toDisplayString(saleItem.name), 1), 183 createBaseVNode("p", _hoisted_8$1, [ 184 createBaseVNode("span", null, "\u5546\u54C1\u5206\u7C7B:" + toDisplayString(saleItem.categoryName), 1) 185 ]), 186 createBaseVNode("p", _hoisted_9$1, "\u8BA2\u5355\u7F16\u53F7\uFF1A" + toDisplayString(order.orderNo), 1) 187 ]) 188 ], 8, _hoisted_4$2), 189 createBaseVNode("div", _hoisted_10$1, " x" + toDisplayString(saleItem.amount), 1), 190 createBaseVNode("div", _hoisted_11$1, [ 191 createBaseVNode("div", _hoisted_12$1, " \uFFE5" + toDisplayString(order.totalFee / 100), 1) 192 ]), 193 createBaseVNode("div", _hoisted_13$1, [ 194 createBaseVNode("span", { 195 style: normalizeStyle({ color: getStateColor(order.status) }) 196 }, toDisplayString(getStateText(order.status)), 5) 197 ]), 198 createBaseVNode("div", _hoisted_14$1, [ 199 saleItem.categoryId != 11 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ 200 disInit(order.createDate) && order.status == 2 && order.totalFee / 100 > 0 ? (openBlock(), createElementBlock("span", { 201 key: 0, 202 class: "refund-btn", 203 onClick: ($event) => refundFun(order) 204 }, "\u9000\u6B3E", 8, _hoisted_15$1)) : createCommentVNode("", true) 205 ], 64)) : createCommentVNode("", true) 206 ]) 207 ]); 208 }), 128)) 209 ]); 210 }), 128)) 211 ]) 212 ]), 213 createBaseVNode("div", _hoisted_16$1, [ 214 createVNode(_component_el_pagination, { 215 "current-page": data.order.pageIndex, 216 "onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => data.order.pageIndex = $event), 217 background: "", 218 layout: "prev, pager, next", 219 total: data.total, 220 onCurrentChange: getUserRefundRecords 221 }, null, 8, ["current-page", "total"]) 222 ]) 223 ], 64)) : (openBlock(), createBlock(EmptyStatus, { 224 key: 1, 225 currentType: `noData` 226 })) 227 ]); 228 }; 229 } 230}); 231 232const refundList_vue_vue_type_style_index_0_scoped_13a7907c_lang = ''; 233 234const refundList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-13a7907c"]]); 235 236const _hoisted_1$1 = { id: "order-list" }; 237const _hoisted_2$1 = { class: "live" }; 238const _hoisted_3$1 = { 239 key: 0, 240 class: "orders-wrapper" 241}; 242const _hoisted_4$1 = ["onClick"]; 243const _hoisted_5$1 = ["src"]; 244const _hoisted_6$1 = { class: "info" }; 245const _hoisted_7 = { class: "title ellipsis" }; 246const _hoisted_8 = { class: "desc" }; 247const _hoisted_9 = { class: "order-info" }; 248const _hoisted_10 = { class: "order-info" }; 249const _hoisted_11 = { class: "amount" }; 250const _hoisted_12 = { class: "price" }; 251const _hoisted_13 = { class: "price-num" }; 252const _hoisted_14 = { class: "state" }; 253const _hoisted_15 = { class: "operate" }; 254const _hoisted_16 = ["onClick"]; 255const _hoisted_17 = ["onClick"]; 256const _hoisted_18 = ["onClick"]; 257const _hoisted_19 = { class: "paging" }; 258const _sfc_main$1 = /* @__PURE__ */ defineComponent({ 259 __name: "order-list", 260 emits: ["refundChange"], 261 setup(__props, { expose, emit }) { 262 const router = useRouter(); 263 const data = reactive({ 264 closeSetTimer: null, 265 pagination: { 266 pageSize: 5, 267 current: 1, 268 total: 0 269 }, 270 liveList: [] 271 }); 272 const goPurchase = async (order) => { 273 let url = ""; 274 if (order.saleItems[0].isPackage == 1) { 275 if (order.saleItems[0].categoryId == 3) { 276 url = `/school/collectionList/${order.saleItems[0].goodsId}?type=course`; 277 } else if (order.saleItems[0].categoryId == 10) 278 PublicTrainingCampApi.getCampPeriodByGoodsId(order.saleItems[0].goodsId).then((res) => { 279 url = `/school/collectionList/${order.saleItems[0].goodsId}?trainingCampId=${res.data.trainingCampId}&campPeriodId=${res.data.id}&type=traincamp`; 280 router.push({ 281 path: "/purchase", 282 query: { id: order.orderNO, url } 283 }); 284 }); 285 return; 286 } else if (order.saleItems[0].categoryId == 3) { 287 url = `/course-detail/${order.saleItems[0].goodsId}`; 288 } else if (order.saleItems[0].categoryId == 5) { 289 url = `/live/${order.saleItems[0].goodsId}`; 290 } else if (order.saleItems[0].categoryId == 7) { 291 url = `/giftBag/giftBagGoods/${order.saleItems[0].goodsId}`; 292 } else if (order.saleItems[0].categoryId == 10) { 293 let res = await PublicTrainingCampApi.getCampPeriodByGoodsId( 294 order.saleItems[0].goodsId 295 ); 296 url = `/traincamp/detail?trainingCampId=${res.data.trainingCampId}&campPeriodId=${res.data.id}`; 297 } else if (order.saleItems[0].categoryId == 9) { 298 url = "/user-center/cardbag"; 299 } else if (order.saleItems[0].categoryId == 13) { 300 let res = await CtSourceApi.GetCtPeriodByGoodsId( 301 order.saleItems[0].goodsId 302 ); 303 url = `/trainauth/detail/${res.data.ctId}`; 304 } 305 router.push({ 306 path: "/purchase", 307 query: { id: order.orderNO, url } 308 }); 309 }; 310 const cancelFun = (row, item) => { 311 ElMessageBox.confirm( 312 `\u786E\u5B9A\u53D6\u6D88\u201C${row.name}\u201D\u5417\uFF1F`, 313 "\u8BA2\u5355\u53D6\u6D88", 314 { 315 confirmButtonText: "\u786E\u8BA4", 316 cancelButtonText: "\u53D6\u6D88", 317 type: "warning", 318 center: false 319 } 320 ).then(() => { 321 OrderApi.cancelOrder(item.orderNO).then((res) => { 322 closeTimer(item); 323 }); 324 }); 325 }; 326 const closeTimer = (item) => { 327 data.closeSetTimer = setTimeout(() => { 328 OrderApi.GetOrderDetailInfo(item.orderNO).then((res) => { 329 console.log("\u53D6\u6D88\u652F\u4ED8", res); 330 if (item.status != res.data.goodsList[0].status) { 331 clearTimeout(data.closeSetTimer); 332 ElMessage.success("\u8BA2\u5355\u53D6\u6D88\u6210\u529F"); 333 getMyOrder(); 334 } else { 335 closeTimer(item); 336 } 337 }); 338 }, 2e3); 339 }; 340 const refundFun = (row, order) => { 341 let orderForm = { 342 orderName: row.name, 343 applyRemark: "", 344 orderNo: order.orderNO, 345 refundFee: order.totalPrice, 346 refundNo: "" 347 }; 348 emit("refundChange", orderForm); 349 }; 350 const goToDetail = (goodsData) => { 351 if (goodsData.isPackage == 1 && goodsData.categoryId === 3) { 352 router.push( 353 `/school/collectionList/${goodsData.goodsId}?type=course` 354 ); 355 } else if (goodsData.categoryId === 3) { 356 router.push(`/course-detail/${goodsData.goodsId}`); 357 } else if (goodsData.categoryId === 5) { 358 router.push(`/live/${goodsData.goodsId}`); 359 } else if (goodsData.categoryId === 1) { 360 router.push(`/school/books/${goodsData.goodsId}`); 361 } else if (goodsData.categoryId === 7) { 362 router.push(`/giftBag/giftBagGoods/${goodsData.goodsId}`); 363 } else if (goodsData.categoryId === 10) { 364 getCampPeriodByGoodsId(goodsData); 365 } else if (goodsData.categoryId === 13) { 366 getCtPeriodByGoodsId(goodsData.goodsId); 367 } else if (goodsData.categoryId === 9) { 368 router.push("/user-center/card-bag/equity"); 369 } 370 }; 371 const getCampPeriodByGoodsId = (goodsData) => { 372 PublicTrainingCampApi.getCampPeriodByGoodsId(goodsData.goodsId).then((res) => { 373 if (goodsData.isPackage == 1) { 374 router.push( 375 `/school/collectionList/${res.data.trainingCampId}?type=traincamp` 376 ); 377 return; 378 } 379 router.push(`/traincamp/detail?trainingCampId=${res.data.trainingCampId}`); 380 }); 381 }; 382 const getCtPeriodByGoodsId = (goodsId) => { 383 CtSourceApi.GetCtPeriodByGoodsId(goodsId).then((res) => { 384 router.push(`/trainauth/detail/${res.data.ctId}`); 385 }); 386 }; 387 const serialize = (data2) => { 388 let jsonData;
389 try { 390 jsonData = JSON.parse(data2); 391 } catch (e) { 392 jsonData = ""; 393 } 394 if (typeof jsonData == "object") { 395 return jsonData; 396 } else if (jsonData == "") { 397 jsonData = { 398 state: 0, 399 bgColor: "", 400 urlImg: "" 401 }; 402 return jsonData; 403 } else { 404 serialize(jsonData); 405 } 406 return JSON.parse(jsonData); 407 }; 408 const getMyOrder = () => { 409 OrderApi.GetOrderByPage({ 410 pageIndex: data.pagination.current, 411 showItem: data.pagination.pageSize 412 }).then((res) => { 413 data.liveList = res.data.items; 414 data.pagination.total = res.data.totalItems; 415 (res.data.items || []).forEach((item, index) => { 416 item.goodsList.forEach((element, idx) => { 417 if (element.categoryId == 9) { 418 element.bannerImg = serialize(element.bannerImg); 419 } 420 }); 421 data.liveList[index].saleItems = item.goodsList; 422 }); 423 }); 424 }; 425 const getStateColor = (state) => { 426 switch (state) { 427 case 0: 428 case 1: 429 return "#FFBE00"; 430 case 2: 431 return "#42CEBA"; 432 case 3: 433 case 4: 434 return "#EF7878"; 435 case 5: 436 return "#EF7878"; 437 case 6: 438 return "#FFBE00"; 439 case 7: 440 return "#42CEBA"; 441 case 8: 442 return "#FFBE00"; 443 case 9: 444 return "#42CEBA"; 445 case 10: 446 return "#EF7878"; 447 default: 448 return ""; 449 } 450 }; 451 const getStateText = (state) => { 452 switch (state) { 453 case 0: 454 case 1: 455 return "\u5F85\u652F\u4ED8"; 456 case 2: 457 return "\u652F\u4ED8\u5B8C\u6210"; 458 case 3: 459 case 4: 460 return "\u652F\u4ED8\u5931\u8D25"; 461 case 5: 462 return "\u53D6\u6D88\u652F\u4ED8"; 463 case 6: 464 return "\u9000\u6B3E\u4E2D"; 465 case 7: 466 return "\u9000\u6B3E\u6210\u529F"; 467 case 8: 468 return "\u62FC\u56E2\u4E2D"; 469 case 9: 470 return "\u62FC\u56E2\u6210\u529F"; 471 case 10: 472 return "\u62FC\u56E2\u5931\u8D25"; 473 default: 474 return ""; 475 } 476 }; 477 const disInit = (time) => { 478 if (time) { 479 return ToolUtils.timeDifference(new Date(time)); 480 } 481 }; 482 getMyOrder(); 483 onBeforeUnmount(() => { 484 clearTimeout(data.closeSetTimer); 485 }); 486 expose({ 487 getMyOrder 488 }); 489 return (_ctx, _cache) => { 490 const _component_el_pagination = resolveComponent("el-pagination"); 491 return openBlock(), createElementBlock("div", _hoisted_1$1, [ 492 createBaseVNode("div", _hoisted_2$1, [ 493 data.liveList && data.liveList.length ? (openBlock(), createElementBlock("div", _hoisted_3$1, [ 494 (openBlock(true), createElementBlock(Fragment, null, renderList(data.liveList, (order, index) => { 495 return openBlock(), createElementBlock("div", { 496 key: index, 497 class: "order-card" 498 }, [ 499 (openBlock(true), createElementBlock(Fragment, null, renderList(order.saleItems, (saleItem, index2) => { 500 return openBlock(), createElementBlock("div", { 501 key: index2, 502 class: "row",
503 style: { "cursor": "pointer" } 504 }, [ 505 createBaseVNode("div", { 506 class: "col left", 507 onClick: ($event) => goToDetail(saleItem) 508 }, [ 509 saleItem.categoryId != 9 ? (openBlock(), createElementBlock("img", { 510 key: 0, 511 src: saleItem.bannerImg || saleItem.smallImg, 512 class: "card-img" 513 }, null, 8, _hoisted_5$1)) : createCommentVNode("", true), 514 saleItem.categoryId == 9 ? (openBlock(), createElementBlock("div", { 515 key: 1, 516 class: "card-ul-li", 517 style: normalizeStyle({ 518 background: saleItem.bannerImg.state == 0 ? saleItem.bannerImg.bgColor || "#009bff" : `url(${saleItem.bannerImg.urlImg}) no-repeat` 519 }) 520 }, null, 4)) : createCommentVNode("", true), 521 createBaseVNode("div", _hoisted_6$1, [ 522 createBaseVNode("div", _hoisted_7, toDisplayString(saleItem.name), 1), 523 createBaseVNode("p", _hoisted_8, [ 524 createBaseVNode("span", null, "\u5546\u54C1\u5206\u7C7B\uFF1A" + toDisplayString(saleItem.categoryName), 1) 525 ]), 526 createBaseVNode("p", _hoisted_9, "\u4E0B\u5355\u65F6\u95F4\uFF1A" + toDisplayString(order.createDate), 1), 527 createBaseVNode("p", _hoisted_10, "\u8BA2\u5355\u7F16\u53F7\uFF1A" + toDisplayString(order.orderNO), 1) 528 ]) 529 ], 8, _hoisted_4$1), 530 createBaseVNode("div", _hoisted_11, " \xD7 " + toDisplayString(saleItem.amount), 1), 531 createBaseVNode("div", _hoisted_12, [ 532 createBaseVNode("div", _hoisted_13, [ 533 createBaseVNode("span", null, "\uFFE5" + toDisplayString(order.totalPrice / 100), 1) 534 ]) 535 ]), 536 createBaseVNode("div", _hoisted_14, [ 537 createBaseVNode("span", { 538 style: normalizeStyle({ color: getStateColor(order.status) }) 539 }, toDisplayString(getStateText(order.status)), 5) 540 ]), 541 createBaseVNode("div", _hoisted_15, [ 542 order.status === 1 ? (openBlock(), createElementBlock("span", { 543 key: 0, 544 class: "pay-btn", 545 onClick: ($event) => goPurchase(order) 546 }, "\u53BB\u652F\u4ED8", 8, _hoisted_16)) : createCommentVNode("", true), 547 order.status === 1 ? (openBlock(), createElementBlock("span", { 548 key: 1, 549 class: "cancel-btn", 550 onClick: ($event) => cancelFun(saleItem, order) 551 }, "\u53D6\u6D88\u8BA2\u5355", 8, _hoisted_17)) : createCommentVNode("", true), 552 saleItem.categoryId != 11 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [ 553 disInit(order.createDate) && order.status == 2 && order.totalPrice / 100 > 0 ? (openBlock(), createElementBlock("span", { 554 key: 0, 555 class: "refund-btn", 556 onClick: ($event) => refundFun(saleItem, order) 557 }, "\u9000\u6B3E", 8, _hoisted_18)) : createCommentVNode("", true) 558 ], 64)) : createCommentVNode("", true) 559 ]) 560 ]); 561 }), 128)) 562 ]); 563 }), 128)), 564 createBaseVNode("div", _hoisted_19, [ 565 createVNode(_component_el_pagination, { 566 "current-page": data.pagination.current, 567 "onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => data.pagination.current = $event), 568 background: "", 569 layout: "prev, pager, next", 570 total: data.pagination.total, 571 onCurrentChange: getMyOrder 572 }, null, 8, ["current-page", "total"]) 573 ]) 574 ])) : (openBlock(), createBlock(EmptyStatus, { 575 key: 1, 576 currentType: `noData` 577 })) 578 ]) 579 ]); 580 }; 581 } 582}); 583
584const orderList_vue_vue_type_style_index_0_scoped_2c9c84ec_lang = ''; 585 586const orderList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2c9c84ec"]]); 587 588const _hoisted_1 = { id: "my-orders" }; 589const _hoisted_2 = { class: "tab-content" }; 590const _hoisted_3 = { class: "refund-dialog" }; 591const _hoisted_4 = { style: { "margin-top": "10px" } }; 592const _hoisted_5 = { class: "refundFee" }; 593const _hoisted_6 = { class: "dialog-footer" }; 594const _sfc_main = /* @__PURE__ */ defineComponent({ 595 __name: "index", 596 setup(__props) { 597 const refundListRef = ref(); 598 const orderListRef = ref(); 599 const data = reactive({ 600 tabList: [ 601 { 602 id: 1, 603 name: "\u8BA2\u5355\u5217\u8868" 604 }, 605 { 606 id: 2, 607 name: "\u9000\u6B3E\u5217\u8868" 608 } 609 ], 610 tabIndex: 1, 611 orderTag: "orderList", 612 refundModal: false, 613 orderForm: { 614 orderName: "", 615 applyRemark: "", 616 orderNo: "", 617 refundFee: 0, 618 refundNo: "" 619 } 620 }); 621 const handleToTarget = (item) => { 622 data.tabIndex = item.id; 623 }; 624 const refundChange = (row) => { 625 data.orderForm = { 626 orderName: row.name, 627 applyRemark: "", 628 orderNo: row.orderNo, 629 refundFee: row.refundFee, 630 refundNo: row.refundNo 631 }; 632 data.refundModal = true; 633 }; 634 const refundSubmit = () => { 635 if (data.orderForm.refundNo) { 636 OrderApi.ReapplyRefundOrder(data.orderForm).then((res) => { 637 ElMessage.success("\u64CD\u4F5C\u6210\u529F"); 638 data.refundModal = false; 639 refundListRef.value.getUserRefundRecords(); 640 data.orderTag = "refund"; 641 }).catch((res) => { 642 }); 643 } else { 644 OrderApi.ApplyRefundOrder(data.orderForm).then((res) => { 645 ElMessage.success("\u64CD\u4F5C\u6210\u529F"); 646 data.refundModal = false; 647 orderListRef.value.getMyOrder(); 648 data.orderTag = "refund"; 649 }).catch((res) => { 650 }); 651 } 652 }; 653 return (_ctx, _cache) => { 654 const _component_el_input = resolveComponent("el-input"); 655 const _component_el_form_item = resolveComponent("el-form-item"); 656 const _component_el_form = resolveComponent("el-form"); 657 const _component_el_button = resolveComponent("el-button"); 658 const _component_el_dialog = resolveComponent("el-dialog"); 659 return openBlock(), createElementBlock("section", _hoisted_1, [ 660 createVNode(UserCenterTab, { 661 modelValue: data.tabIndex, 662 "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.tabIndex = $event), 663 tabUl: data.tabList, 664 onToTarget: handleToTarget 665 }, null, 8, ["modelValue", "tabUl"]), 666 createBaseVNode("div", _hoisted_2, [ 667 data.tabIndex === 1 ? (openBlock(), createBlock(orderList, { 668 key: 0, 669 ref_key: "orderListRef", 670 ref: orderListRef, 671 onRefundChange: refundChange 672 }, null, 512)) : data.tabIndex === 2 ? (openBlock(), createBlock(refundList, { 673 key: 1, 674 ref_key: "refundListRef", 675 ref: refundListRef, 676 onRefundChange: refundChange 677 }, null, 512)) : createCommentVNode("", true) 678 ]), 679 createBaseVNode("div", _hoisted_3, [ 680 createVNode(_component_el_dialog, { 681 modelValue: data.refundModal, 682 "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.refundModal = $event), 683 title: "\u7533\u8BF7\u9000\u6B3E", 684 width: "400px" 685 }, { 686 footer: withCtx(() => [ 687 createBaseVNode("span", _hoisted_6, [ 688 createVNode(_component_el_button, { 689 class: "btn center-btn normal", 690 onClick: _cache[3] || (_cache[3] = ($event) => data.refundModal = false) 691 }, { 692 default: withCtx(() => [ 693 createTextVNode("\u53D6 \u6D88") 694 ]), 695 _: 1 696 }), 697 createVNode(_component_el_button, { 698 class: "btn center-btn primary", 699 type: "primary", 700 onClick: refundSubmit 701 }, { 702 default: withCtx(() => [ 703 createTextVNode("\u786E \u5B9A") 704 ]), 705 _: 1 706 }) 707 ]) 708 ]), 709 default: withCtx(() => [ 710 createBaseVNode("div", _hoisted_4, [ 711 createVNode(_component_el_form, { 712 ref: "form", 713 model: data.orderForm, 714 labelWidth: 100 715 }, { 716 default: withCtx(() => [ 717 createVNode(_component_el_form_item, { 718 label: "\u9000\u6B3E\u5546\u54C1\uFF1A", 719 prop: "userName" 720 }, { 721 default: withCtx(() => [ 722 createVNode(_component_el_input, { 723 modelValue: data.orderForm.orderName, 724 "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.orderForm.orderName = $event), 725 modelModifiers: { trim: true }, 726 disabled: "", 727 placeholder: "\u9000\u6B3E\u5546\u54C1" 728 }, null, 8, ["modelValue"]) 729 ]), 730 _: 1 731 }), 732 createVNode(_component_el_form_item, { 733 label: "\u9000\u6B3E\u91D1\u989D\uFF1A", 734 prop: "userName" 735 }, { 736 default: withCtx(() => [ 737 createBaseVNode("p", _hoisted_5, "\uFFE5" + toDisplayString(data.orderForm.refundFee / 100), 1) 738 ]), 739 _: 1 740 }), 741 createVNode(_component_el_form_item, { 742 label: "\u9000\u6B3E\u7406\u7531\uFF1A", 743 prop: "applyRemark" 744 }, { 745 default: withCtx(() => [ 746 createVNode(_component_el_input, { 747 modelValue: data.orderForm.applyRemark, 748 "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.orderForm.applyRemark = $event), 749 modelModifiers: { trim: true }, 750 type: "textarea", 751 autosize: { minRows: 4, maxRows: 5 }, 752 placeholder: "\u7533\u8BF7\u9000\u6B3E\u7406\u7531" 753 }, null, 8, ["modelValue"]) 754 ]), 755 _: 1 756 }) 757 ]), 758 _: 1 759 }, 8, ["model"]) 760 ]) 761 ]), 762 _: 1 763 }, 8, ["modelValue"]) 764 ]) 765 ]); 766 }; 767 } 768}); 769 770const index_vue_vue_type_style_index_0_scoped_83569b2a_lang = ''; 771 772const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-83569b2a"]]); 773 774export { index as default };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.