orderblackDetails.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. <template>
  2. <view class="container">
  3. <view class="top-state u-font24 u-00321E">
  4. <!--申请退货中-->
  5. <!-- 维权订单操作状态(0申请,1同意,2买家已发货,3商家已收到退货商品,4商家发起退款支付,5已支付退款,6拒绝,7自动关闭,8主动撤消 -->
  6. <view class="refund-underway obligation" v-if="status == 0">
  7. <view class="u-flex-center u-flex1">
  8. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  9. <view class="u-flex1">
  10. <view class="u-font32 u-bold">请等待商家处理</view>
  11. <view class="u-flex u-font26"
  12. >你的申请已经提交,还剩{{
  13. $mUtil.patTime(last_agree_time)
  14. }}商家自动同意申请。</view
  15. >
  16. </view>
  17. </view>
  18. </view>
  19. <!--商家同意,等待买家发货-->
  20. <view class="refund-underway obligation" v-if="type == 10 && status == 1">
  21. <view class="u-flex-center u-flex1">
  22. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  23. <view class="u-flex1">
  24. <view class="u-font32 u-bold">请退货并填写物流信息</view>
  25. <view class="u-flex u-font26"
  26. >还剩{{
  27. $mUtil.patTime(last_ship_time)
  28. }},如果未发货自动取消售后。</view
  29. >
  30. </view>
  31. </view>
  32. </view>
  33. <!--商家同意,等待买家发货-->
  34. <view class="refund-underway obligation" v-if="type == 5 && status == 1">
  35. <view class="u-flex-center u-flex1">
  36. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  37. <view class="u-flex1">
  38. <view class="u-font32 u-bold">商家已同意</view>
  39. <view class="u-flex u-font26"
  40. >还剩{{
  41. $mUtil.patTime(last_agree_time)
  42. }},如果未退款自动完成退款。</view
  43. >
  44. </view>
  45. </view>
  46. </view>
  47. <!--商家拒绝-->
  48. <view class="refund-underway obligation" v-if="status == 6">
  49. <view class="u-flex-center u-flex1">
  50. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  51. <view class="u-flex1">
  52. <view class="u-font32 u-bold">商家拒绝了你的售后申请</view>
  53. <view
  54. class="u-flex u-font26"
  55. style="word-break: break-all"
  56. v-if="statusRson"
  57. >原因为:{{ statusRson }}</view
  58. >
  59. </view>
  60. </view>
  61. </view>
  62. <!--商家拒绝-->
  63. <view class="refund-underway obligation" v-if="status == 7">
  64. <view class="u-flex-center u-flex1">
  65. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  66. <view class="u-flex1">
  67. <view class="u-font32 u-bold">自动关闭</view>
  68. <view class="u-flex u-font26"
  69. >该维权订单超时未发货,已自动关闭</view
  70. >
  71. </view>
  72. </view>
  73. </view>
  74. <!--商家拒绝-->
  75. <view class="refund-underway obligation" v-if="status == 8">
  76. <view class="u-flex-center u-flex1">
  77. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  78. <view class="u-flex1">
  79. <view class="u-font32 u-bold">自动关闭</view>
  80. <view class="u-flex u-font26"
  81. >该维权订单超时未发货,已自动关闭</view
  82. >
  83. </view>
  84. </view>
  85. </view>
  86. <!--待商家收货-->
  87. <view class="refund-underway obligation" v-if="type == 10 && status == 2">
  88. <view class="u-flex-center u-flex1">
  89. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  90. <view class="u-flex1">
  91. <view class="u-font32 u-bold">等待商家确认收货</view>
  92. <view class="u-flex u-font26"
  93. >还剩{{
  94. $mUtil.patTime(last_receipt_time)
  95. }},如果商家未确认收货则自动确认收货。</view
  96. >
  97. </view>
  98. </view>
  99. </view>
  100. <!--商家同意,待打款-->
  101. <view class="refund-underway obligation" v-if="type == 10 && status == 3">
  102. <view class="u-flex-center u-flex1">
  103. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  104. <view class="u-flex1">
  105. <view class="u-font32 u-bold">商家已同意申请,待打款</view>
  106. <view class="u-flex u-font26">预计1-3天内打款成功</view>
  107. </view>
  108. </view>
  109. </view>
  110. <!--退货完成-->
  111. <view class="refund-underway obligation" v-if="status == 5">
  112. <view class="u-flex-center u-flex1">
  113. <image class="timeImg" :src="$handleImageUrl('/time.png')"></image>
  114. <view class="u-flex1">
  115. <view class="u-font32 u-bold">退货/退款完成</view>
  116. <view class="u-flex u-font26"
  117. >款项已沿原路返回至您的付款账户。</view
  118. >
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="blackinfos u-p30 u-bg-fff u-border-one">
  124. <view class="u-font32 u-1A1A1A u-bold">退款说明</view>
  125. <view class="u-flex-center u-mt15">
  126. <text class="u-font26 u-1A1A1A">·</text>
  127. <text class="u-font24 u-999"
  128. >未与商家协商一致,请勿使用到付或平邮,以免商家拒签货物</text
  129. >
  130. </view>
  131. <view class="u-flex-center u-mt15">
  132. <text class="u-font26 u-1A1A1A">·</text>
  133. <text class="u-font24 u-999"
  134. >交易的欠款还在金字中间账户,确保您资金安全</text
  135. >
  136. </view>
  137. <view class="u-flex-center u-mt15">
  138. <text class="u-font26 u-1A1A1A">·</text>
  139. <text class="u-font24 u-999"
  140. >请填写真实退货物流信息,逾期未填写,退货申请将关闭</text
  141. >
  142. </view>
  143. </view>
  144. <view v-if="type == 10">
  145. <view
  146. v-if="
  147. status == 1 ||
  148. status == 2 ||
  149. status == 3 ||
  150. status == 4 ||
  151. status == 5
  152. "
  153. >
  154. <ldAddress :value="address" :link="false" :showProvinces="false"></ldAddress>
  155. </view>
  156. </view>
  157. <view class="u-plr30 u-bg-fff u-mt30" v-if="type == 10">
  158. <view v-if="status == 1">
  159. <view class="u-flex-center-sb u-border-one">
  160. <view class="u-font30 u-1A1A1A u-ptb30 u-bold">物流单号</view>
  161. <input
  162. class="u-flex1 u-text-right"
  163. type="text"
  164. placeholder="填写物流单号"
  165. @input="inputLog"
  166. value=""
  167. />
  168. </view>
  169. <picker
  170. @change="pickerChange"
  171. :value="typeIndex"
  172. range-key="companyName"
  173. :range="logisticsList"
  174. >
  175. <view class="u-flex-center-sb">
  176. <view class="u-font30 u-1A1A1A u-ptb30 u-bold">物流公司</view>
  177. <view class="u-flex-center">
  178. <view
  179. class="u-font30 u-1A1A1A u-ptb30"
  180. v-if="logisticsList[typeIndex]"
  181. >{{ logisticsList[typeIndex].companyName }}
  182. </view>
  183. <view
  184. class="u-font30 u-999 u-ptb30"
  185. v-else
  186. >请选择物流公司
  187. </view>
  188. <view class="iconfont u-font28 u-666">&#xe671;</view>
  189. </view>
  190. </view>
  191. </picker>
  192. </view>
  193. <view v-if="status == 2 || status == 3 || status == 4 || status == 5">
  194. <view class="u-flex-center-sb u-border-one">
  195. <view class="u-font30 u-1A1A1A u-ptb30 u-bold">物流单号</view>
  196. <view
  197. class="u-font30 u-1A1A1A u-ptb30"
  198. v-if="configInfo.shipRecordVo"
  199. >
  200. {{ configInfo.shipRecordVo.logisticCode }}
  201. </view>
  202. </view>
  203. <view class="u-flex-center-sb">
  204. <view class="u-font30 u-1A1A1A u-ptb30 u-bold">物流公司</view>
  205. <view
  206. class="u-font30 u-1A1A1A u-ptb30"
  207. v-if="configInfo.shipRecordVo"
  208. >
  209. {{ configInfo.shipRecordVo.expressName }}
  210. </view>
  211. </view>
  212. </view>
  213. </view>
  214. <view class="pabox">
  215. <view class="u-font30 u-1A1A1A u-border-one h90">退货信息</view>
  216. <view v-for="items in configInfo.rightsChildOrders || []" :key="items.id">
  217. <ldGoodsBalck :value="items"></ldGoodsBalck>
  218. </view>
  219. <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
  220. <view class="u-flex-center-sb u-border-one pt-pb25">
  221. <view>{{ type == 5 ? "退款原因" : "退货原因" }}</view>
  222. <view class="u-999 u-font3">{{ configInfo.reason }}</view>
  223. </view>
  224. <view class="u-flex-center-sb u-border-one pt-pb25">
  225. <view>退款金额</view>
  226. <view class="u-999 u-font30">¥{{ configInfo.refundMoney }} </view>
  227. </view>
  228. <view
  229. class="u-flex-center-sb u-border-one pt-pb25"
  230. v-if="configInfo.refundPoint > 0"
  231. >
  232. <view>退款积分</view>
  233. <view class="u-999 u-font30">{{ configInfo.refundPoint }} </view>
  234. </view>
  235. <view
  236. class="u-flex-center-sb u-border-one pt-pb25"
  237. v-if="type == 10 || type == 5"
  238. >
  239. <view>申请件数 <text class="u-999 u-font24"></text> </view>
  240. <view class="u-999 u-font30">{{ configInfo.refundNum }} 件</view>
  241. </view>
  242. <view class="u-flex-center-sb u-border-one pt-pb25">
  243. <view>申请时间</view>
  244. <view class="u-999 u-font30">{{ configInfo.createTime }}</view>
  245. </view>
  246. <view class="u-flex-center-sb u-border-one pt-pb25">
  247. <view>退款编号</view>
  248. <view class="u-999 u-font30">{{ configInfo.rightsCode }}</view>
  249. </view>
  250. <view class="u-flex-column-start pt-pb25">
  251. <view>退款备注</view>
  252. <view class="boxTextarea">{{
  253. configInfo.caption ? configInfo.caption : "无"
  254. }}</view>
  255. </view>
  256. <view class="u-flex-column-start pt-pb25">
  257. <view>退款凭证</view>
  258. <view class="imgListOne">
  259. <view
  260. class="imgList u-flex-center"
  261. v-for="(imgsurl, indexs) in configInfo.voucherImages || []"
  262. :key="indexs"
  263. >
  264. <image :src="imgsurl" mode="" class="imgsbox u-mr30"></image>
  265. </view>
  266. </view>
  267. </view>
  268. </view>
  269. </view>
  270. <view
  271. class="bg-fff btn"
  272. v-if="type == 10 && status == 1"
  273. @click="sendLogial"
  274. >
  275. <button class="u-btn-two u-FFF">确认提交</button>
  276. </view>
  277. </view>
  278. </template>
  279. <script setup>
  280. import { ref, onMounted, getCurrentInstance } from "vue";
  281. import { onLoad } from "@dcloudio/uni-app";
  282. import { saleRightsOrderInfo_Api } from "@/api/order";
  283. import {
  284. userBusinessReturnAddressInfo_Api,
  285. expressCompanyList_Api,
  286. } from "@/api/index";
  287. import {saleRightsOrderShip_Api} from "@/api/order"
  288. import ldGoodsBalck from "@/components/ld-goods/ld-goods-balck.vue";
  289. // 响应式数据
  290. const statusRson = ref("商家拒绝了你的售后申请");
  291. const configInfo = ref({});
  292. const address = ref({});
  293. const loading = ref(true);
  294. const type = ref(0);
  295. const status = ref(0);
  296. const last_agree_time = ref(0);
  297. const last_ship_time = ref(0);
  298. const last_receipt_time = ref(0);
  299. const typeIndex = ref(null);
  300. const logVal = ref("");
  301. const rightsId = ref(null);
  302. const logisticsList = ref([]); //申请类型
  303. const listAll = ref([]);
  304. const eventChannel = ref(null);
  305. onMounted(() => {
  306. const instance = getCurrentInstance().proxy;
  307. eventChannel.value = instance.getOpenerEventChannel();
  308. });
  309. const pickerChange = (e) => {
  310. // console.log(e, 222);
  311. typeIndex.value = e.detail.value;
  312. };
  313. const inputLog = (e) => {
  314. logVal.value = e.detail.value;
  315. };
  316. //确认收货
  317. const sendLogial = () => {
  318. if (logVal.value == "") {
  319. uni.$uv.toast("请填写物流单号");
  320. return false;
  321. }
  322. if (typeIndex.value == null || typeIndex.value == undefined) {
  323. uni.$uv.toast("请选择物流公司");
  324. return false;
  325. }
  326. let data = {
  327. rightsId: rightsId.value,
  328. expressName: logisticsList.value[typeIndex.value].companyName,
  329. expressCode: logisticsList.value[typeIndex.value].companyCode,
  330. logisticCode: logVal.value,
  331. };
  332. saleRightsOrderShip_Api(data).then((res) => {
  333. if (res && res.code == 200) {
  334. uni.$uv.toast("提交成功");
  335. setTimeout(() => {
  336. eventChannel.value.emit("handleReset");
  337. uni.navigateBack();
  338. }, 1000);
  339. }
  340. });
  341. };
  342. const getDetail = (id) => {
  343. uni.showLoading({
  344. title: "加载中...",
  345. mask: true,
  346. });
  347. saleRightsOrderInfo_Api(id)
  348. .then((res) => {
  349. uni.hideLoading();
  350. loading.value = false;
  351. if (res && res.code == 200) {
  352. configInfo.value = res.data;
  353. last_agree_time.value = res.data.lastAgreeTime;
  354. last_ship_time.value = res.data.lastShipTime;
  355. last_receipt_time.value = res.data.lastReceiptTime;
  356. type.value = res.data.rightsType;
  357. status.value = res.data.rightsOperateStatus;
  358. if (res.data.businessId) {
  359. shopAddress(res.data.businessId);
  360. }
  361. getLogistics();
  362. res.data.rightsOrderOperateRecords.forEach((e) => {
  363. if (e.rightsOperateStatus == 6) {
  364. statusRson.value = e.reason;
  365. }
  366. });
  367. }
  368. })
  369. .catch((err) => {
  370. // uni.hideLoading();
  371. });
  372. };
  373. //查看地址
  374. const shopAddress = (id) => {
  375. userBusinessReturnAddressInfo_Api(id).then((res) => {
  376. loading.value = false;
  377. if (res && res.code == 200) {
  378. address.value = res.data;
  379. }
  380. });
  381. };
  382. const getLogistics = () => {
  383. expressCompanyList_Api().then((res) => {
  384. loading.value = false;
  385. if (res && res.code == 200) {
  386. listAll.value = res.data;
  387. logisticsList.value = res.data;
  388. // res.data.forEach((items) => {
  389. // logisticsList.value.push({
  390. // name: items.company,
  391. // code: items.logistics_code,
  392. // });
  393. // });
  394. }
  395. });
  396. };
  397. // 页面加载
  398. onLoad((options) => {
  399. // console.log(options, "options");
  400. if (options.id) {
  401. getDetail(options.id);
  402. rightsId.value = options.id;
  403. }
  404. });
  405. </script>
  406. <style lang="scss">
  407. page {
  408. background-color: #f5f5f5;
  409. }
  410. .imgListOne {
  411. display: flex;
  412. flex-wrap: wrap;
  413. }
  414. .cccfont {
  415. font-size: 26rpx;
  416. color: #eee;
  417. }
  418. .imgsbox {
  419. margin-right: 50rpx;
  420. width: 176rpx;
  421. height: 158rpx;
  422. border-radius: 20rpx;
  423. overflow: hidden;
  424. margin-top: 40rpx;
  425. }
  426. .grade-active {
  427. color: #ff5112;
  428. }
  429. .u-B3B3B3 {
  430. color: #b3b3b3;
  431. }
  432. .user_remark {
  433. background-color: #fff;
  434. padding: 30rpx;
  435. border-top: 1px solid #eee;
  436. }
  437. .boxTextarea {
  438. width: 686rpx;
  439. border: 1px solid #ededed;
  440. border-radius: 20rpx;
  441. background-color: #fafafa;
  442. padding: 20rpx;
  443. box-sizing: border-box;
  444. margin-top: 20rpx;
  445. }
  446. .pabox {
  447. background-color: #fff;
  448. padding: 0 30rpx 140rpx;
  449. margin-top: 30rpx;
  450. .h90 {
  451. height: 90rpx;
  452. line-height: 90rpx;
  453. }
  454. }
  455. .upb120 {
  456. padding-bottom: 140rpx;
  457. }
  458. .bg-fff {
  459. background-color: #ffffff;
  460. }
  461. .ptb22 {
  462. padding-top: 22rpx;
  463. padding-bottom: 22rpx;
  464. }
  465. .pt-pb25 {
  466. padding-top: 25rpx;
  467. padding-bottom: 25rpx;
  468. }
  469. .pt28-pb24 {
  470. padding-top: 28rpx;
  471. padding-bottom: 24rpx;
  472. }
  473. .iconfont58 {
  474. font-size: 58rpx;
  475. }
  476. .mt44 {
  477. margin-top: 44rpx;
  478. }
  479. .ml38 {
  480. margin-left: 38rpx;
  481. }
  482. .ml82 {
  483. margin-left: 82rpx;
  484. }
  485. .wt378 {
  486. width: 378rpx;
  487. }
  488. .wt504 {
  489. width: 504rpx;
  490. }
  491. .u-br-999 {
  492. border: 1px solid #999999;
  493. }
  494. .u-br-f00 {
  495. border: 1px solid #ff0000;
  496. }
  497. .bg-00321e {
  498. background: #0b844a;
  499. }
  500. .account-paid {
  501. padding: 44rpx 0rpx;
  502. }
  503. .account-paid image {
  504. width: 202rpx;
  505. height: 124rpx;
  506. }
  507. .btn {
  508. width: 100%;
  509. position: fixed;
  510. bottom: 0rpx;
  511. box-sizing: border-box;
  512. padding: 22rpx 30rpx;
  513. button {
  514. background: #fa6138;
  515. }
  516. }
  517. .cancel-btn {
  518. margin-left: auto;
  519. }
  520. .cancel-btn,
  521. .pay-btn {
  522. width: 202rpx;
  523. height: 70rpx;
  524. line-height: 70rpx;
  525. border-radius: 35px;
  526. font-size: 28rpx;
  527. margin-right: 30rpx;
  528. }
  529. .top-state {
  530. background-color: #f2f5fc;
  531. color: #fa6138;
  532. padding: 35rpx 30rpx;
  533. // 待支付
  534. .obligation {
  535. display: flex;
  536. justify-content: space-between;
  537. .timeImg {
  538. display: none;
  539. width: 70rpx;
  540. height: 54rpx;
  541. margin-right: 40rpx;
  542. }
  543. }
  544. }
  545. .address {
  546. background-color: #ffffff;
  547. padding-top: 72rpx;
  548. .linkman {
  549. padding-bottom: 34rpx;
  550. }
  551. .remark {
  552. padding: 35rpx 0rpx 35rpx 50rpx;
  553. }
  554. }
  555. //弹窗填写物流信息
  556. .logisticsPopup {
  557. background-color: #ffffff;
  558. width: 100%;
  559. border-radius: 20rpx;
  560. .pd {
  561. padding: 15rpx 98rpx 68rpx;
  562. }
  563. input {
  564. height: 70rpx;
  565. line-height: 70rpx;
  566. border: 1rpx solid #cccccc;
  567. border-radius: 15rpx;
  568. padding-left: 8rpx;
  569. color: #999999;
  570. }
  571. .icon {
  572. margin-top: -65rpx;
  573. }
  574. .pl-pr {
  575. padding-left: 74rpx;
  576. }
  577. button {
  578. margin-top: 66rpx;
  579. background-color: #01331f;
  580. width: 345rpx;
  581. }
  582. }
  583. // 弹窗评价
  584. .popup {
  585. background-color: #f5f5f5;
  586. width: 100%;
  587. border-radius: 18rpx 18rpx 0px 0px;
  588. }
  589. .u-flex-sb {
  590. display: flex;
  591. justify-content: space-between;
  592. padding-top: 30rpx;
  593. padding-bottom: 30rpx;
  594. background-color: #ffffff;
  595. border-radius: 18rpx 18rpx 0px 0px;
  596. .pic {
  597. width: 155rpx;
  598. height: 155rpx;
  599. }
  600. }
  601. textarea {
  602. width: 100%;
  603. height: 210rpx;
  604. opacity: 0.66;
  605. border: 1rpx solid #e6e6e6;
  606. border-radius: 8rpx;
  607. padding-left: 22rpx;
  608. padding-top: 14rpx;
  609. box-sizing: border-box;
  610. }
  611. .evaluate-submit {
  612. margin-top: 58rpx;
  613. padding-bottom: 25rpx;
  614. }
  615. .evaluate-submit button {
  616. background-color: #0b844a;
  617. color: #ffffff;
  618. }
  619. .voucher-box {
  620. border-top: 1rpx solid #e6e6e6;
  621. padding-bottom: 20rpx;
  622. }
  623. .imgList {
  624. width: 200rpx;
  625. height: 200rpx;
  626. }
  627. .imgList .img {
  628. width: 200rpx !important;
  629. height: 200rpx !important;
  630. border-radius: 10rpx;
  631. }
  632. </style>