record.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <view class="record">
  3. <view class="top">
  4. </view>
  5. <view class="head">
  6. <span class="cuIcon-back" @click="back"></span>
  7. <view class="case">
  8. 协商记录
  9. </view>
  10. </view>
  11. <view class="product">
  12. <view class="img">
  13. <image :src="list.productImage" mode=""></image>
  14. </view>
  15. <view class="name">
  16. {{list.productName}}
  17. <view class="price">
  18. 退款金额:{{list.orderPrice}}
  19. </view>
  20. </view>
  21. </view>
  22. <view class="history">
  23. <view class="client" v-for="(item,index) in list.afterSaleReasonVo" :key="index">
  24. <view class="title">
  25. <view class="img" v-if="item.refundType == 0">
  26. <image :src="item.userAvatar" alt="" />
  27. </view>
  28. <view class="img" v-else>
  29. <image :src="item.logo" alt="" />
  30. </view>
  31. <view class="message" v-if="item.refundType == 0">
  32. {{item.nickName}}<br />
  33. <span>{{item.createTime}}</span>
  34. </view>
  35. <view class="message" v-else>
  36. {{item.corporateName}}<br />
  37. <span>{{item.rejectionTime}}</span>
  38. </view>
  39. </view>
  40. <!-- 用户提交 -->
  41. <view class="" v-if="item.refundType == 0">
  42. <view class="information">
  43. 退货金额:¥ {{item.refundPrice}}
  44. </view>
  45. <view class="information">
  46. 联系方式:{{item.phone}}
  47. </view>
  48. <view class="information">
  49. 申请原因:{{item.reason}}
  50. </view>
  51. <view class="information">
  52. 补充说明:{{item.reasonReasonExplain}}
  53. </view>
  54. </view>
  55. <!-- 商家拒绝 -->
  56. <view class="" v-if="item.refundType == 1">
  57. <view class="information" >
  58. 拒绝原因:{{item.refuseReason}}
  59. </view>
  60. <view class="information">
  61. 补充说明:{{item.refuseReasonExplain}}
  62. </view>
  63. </view>
  64. <!-- 商家同意 -->
  65. <!-- <view class="information" v-if="item.refundType == 0">
  66. 您已同意退货退款,平台会将退款原路退回。
  67. </view> -->
  68. <view class="request" v-if="item.auditType ==0">
  69. <view class="btn" @click="reject(item)">拒绝</view>
  70. <view class="btn" @click="agree(item)">同意</view>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- 拒绝原因弹窗 -->
  75. <view class="popup" v-if="isRefuse">
  76. <view class="content">
  77. <view class="title">
  78. <span>拒绝原因 </span>
  79. <image src="/static/index/cut.png" alt="" @click="cutPopup" />
  80. </view>
  81. <view class="popup_title">
  82. 拒绝原因
  83. </view>
  84. <view class="item" v-for="(item,index) in reasonList" :key="index" @click="selectReason(item,index)">
  85. {{item.text}}
  86. <image v-if="item.check" src="/static/product/select.png" mode=""></image>
  87. <image v-else src="/static/product/round.png" mode=""></image>
  88. </view>
  89. <view class="popup_title">
  90. 补充说明(选填)
  91. <view class="input">
  92. <textarea v-model="rejectData.refuseReasonExplain" type="textarea" :maxlength="500" rows="3" />
  93. <span>{{ rejectData.refuseReasonExplain.length }}/500</span>
  94. </view>
  95. </view>
  96. <view class="submit">
  97. <view class="cancel_btn" @click="cutPopup">
  98. 取消
  99. </view>
  100. <view class="submit_btn" @click="refusalRefund">
  101. 确定
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. list: [],
  113. orderNo: '',
  114. reasonList: [{
  115. name: '商品已使用',
  116. check: false,
  117. },
  118. {
  119. name: '服务已核销',
  120. check: false,
  121. }
  122. ],
  123. isRefuse: false,
  124. rejectData: {
  125. id: '',
  126. reOrderId: '',
  127. refuseReason: '',
  128. refuseReasonExplain: ''
  129. }
  130. }
  131. },
  132. methods: {
  133. //返回
  134. back() {
  135. uni.navigateBack({
  136. delta: 1
  137. });
  138. },
  139. getRecord() {
  140. let data = {
  141. orderNo: this.orderNo
  142. }
  143. this.$http.get("/app/order/locaOrder/afterSaleDetails?orderNo=" + this.orderNo).then(res => {
  144. if (res.data.code == 200) {
  145. console.log(res)
  146. this.list = res.data.result
  147. }
  148. })
  149. },
  150. selectReason(item, index) {
  151. console.log(item)
  152. this.reasonList.forEach(reason => {
  153. reason.check = false;
  154. });
  155. this.reasonList[index].check = true
  156. this.rejectData.refuseReason = item.value
  157. },
  158. cutPopup() {
  159. this.isRefuse = false
  160. },
  161. reject(item) {
  162. console.log(item)
  163. this.isRefuse = true
  164. this.rejectData.id = item.id
  165. this.rejectData.reOrderId = item.reOrderId
  166. },
  167. //提交拒绝
  168. refusalRefund() {
  169. if(this.rejectData.refuseReason==''){
  170. uni.showToast({
  171. icon: 'none',
  172. title: '选择拒绝原因'
  173. })
  174. return
  175. }else{
  176. this.$http.post("/app/order/locaOrder/refusalRefund", this.rejectData).then(res => {
  177. if (res.data.code == 200) {
  178. console.log(res)
  179. uni.showToast({
  180. icon: 'none',
  181. title: '拒绝成功'
  182. })
  183. this.isRefuse = false
  184. this.getRecord()
  185. // this.list = res.data.result
  186. }
  187. })
  188. }
  189. },
  190. getCodeList() {
  191. this.$http.get("/sys/api/getManyDictItems?dictCodeList=" + 'reason_refusal').then(res => {
  192. if (res.statusCode == 200) {
  193. //
  194. res.data.reason_refusal.forEach(item => {
  195. item.check = false
  196. })
  197. this.reasonList = res.data.reason_refusal
  198. }
  199. })
  200. },
  201. // 同意退款
  202. agree(item){
  203. let data = {
  204. reOrderId:this.orderNo
  205. }
  206. this.$http.post("/app/order/locaOrder/agreeRefund",data).then(res => {
  207. if (res.statusCode == 200) {
  208. uni.showToast({
  209. icon: 'none',
  210. title: '商家已同意退款'
  211. })
  212. this.getRecord()
  213. }
  214. })
  215. }
  216. },
  217. mounted() {
  218. this.getRecord()
  219. this.getCodeList()
  220. },
  221. onLoad(options) {
  222. this.orderNo = options.orderId
  223. }
  224. }
  225. </script>
  226. <style lang="scss" scoped>
  227. .record {
  228. width: 100vw;
  229. height: 100vh;
  230. background: #F7F8FC;
  231. display: flex;
  232. flex-direction: column;
  233. /*#ifdef APP-PLUS*/
  234. .top {
  235. width: 100%;
  236. height: var(--status-bar-height);
  237. background: #FFFFFF;
  238. }
  239. /*#endif*/
  240. .head {
  241. width: 100%;
  242. height: 112rpx;
  243. padding: 20rpx;
  244. display: flex;
  245. align-items: center;
  246. background: #FFFFFF;
  247. position: relative;
  248. .cuIcon-back {
  249. font-size: 40rpx;
  250. margin-right: 40rpx;
  251. }
  252. .case {
  253. position: absolute;
  254. left: 50%;
  255. transform: translateX(-50%);
  256. font-size: 36rpx;
  257. font-weight: 600;
  258. }
  259. }
  260. .product {
  261. display: flex;
  262. border-radius: 16rpx;
  263. padding: 20rpx 24rpx;
  264. background-color: #FFFFFF;
  265. border-top: 1px solid #eeeeee;
  266. .img {
  267. width: 132rpx;
  268. height: 132rpx;
  269. border-radius: 12rpx;
  270. overflow: hidden;
  271. margin-right: 16rpx;
  272. image {
  273. width: 132rpx;
  274. height: 132rpx;
  275. }
  276. }
  277. .name {
  278. flex: 1;
  279. display: flex;
  280. flex-direction: column;
  281. justify-content: space-between;
  282. font-size: 28rpx;
  283. color: #000000;
  284. line-height: 35rpx;
  285. .price {
  286. font-size: 26rpx;
  287. color: #666666;
  288. display: flex;
  289. align-items: center;
  290. justify-content: space-between;
  291. span {
  292. color: #666666;
  293. }
  294. }
  295. }
  296. }
  297. .history {
  298. flex: 1;
  299. overflow-y: auto;
  300. padding: 0px 24rpx;
  301. margin-top: 18rpx;
  302. .client {
  303. background-color: #FFFFFF;
  304. padding: 20rpx 16rpx;
  305. box-shadow: 0px 2rpx 8rpx 0px rgba(214, 225, 237, 0.1);
  306. border-radius: 16rpx;
  307. margin-bottom: 20rpx;
  308. .title {
  309. display: flex;
  310. border-bottom: 1px solid #EEEEEE;
  311. padding-bottom: 16rpx;
  312. margin-bottom: 16rpx;
  313. .img {
  314. width: 80rpx;
  315. height: 80rpx;
  316. margin-right: 12rpx;
  317. border-radius: 8rpx;
  318. overflow: hidden;
  319. image {
  320. width: 80rpx;
  321. height: 80rpx;
  322. }
  323. }
  324. .message {
  325. display: flex;
  326. flex-direction: column;
  327. justify-content: space-between;
  328. font-size: 28rpx;
  329. color: #000000;
  330. span {
  331. font-size: 24rpx;
  332. color: #999999;
  333. }
  334. }
  335. }
  336. .information {
  337. font-size: 26rpx;
  338. color: #333333;
  339. margin-bottom: 10rpx;
  340. word-wrap: break-word;
  341. }
  342. .request {
  343. display: flex;
  344. align-items: center;
  345. justify-content: end;
  346. margin-top: 16rpx;
  347. .btn {
  348. display: flex;
  349. align-items: center;
  350. justify-content: center;
  351. width: 112rpx;
  352. height: 47rpx;
  353. border-radius: 47rpx;
  354. border: 1px solid #449AFF;
  355. font-size: 24rpx;
  356. color: #449AFF;
  357. margin-left: 24rpx;
  358. }
  359. }
  360. }
  361. }
  362. .popup {
  363. width: 100vw;
  364. height: 100vh;
  365. position: fixed;
  366. top: 0;
  367. left: 0;
  368. background: rgba(0, 0, 0, 0.4);
  369. .content {
  370. width: 100%;
  371. background: #FFFFFF;
  372. border-radius: 20rpx 20rpx 0rpx 0px;
  373. padding: 20rpx 24rpx;
  374. padding-bottom: 16rpx;
  375. position: absolute;
  376. bottom: 0;
  377. left: 0;
  378. .title {
  379. display: flex;
  380. align-items: center;
  381. justify-content: center;
  382. position: relative;
  383. border-bottom: 1px solid #EEEEEE;
  384. padding-bottom: 20rpx;
  385. font-weight: 600;
  386. image {
  387. width: 37rpx;
  388. height: 37rpx;
  389. position: absolute;
  390. right: 0;
  391. }
  392. }
  393. .popup_title {
  394. font-size: 30rpx;
  395. color: #333333;
  396. margin-top: 20rpx;
  397. font-weight: 600;
  398. .input {
  399. width: 100%;
  400. // min-height: 196rpx;
  401. margin-top: 15rpx;
  402. padding: 16rpx 16rpx;
  403. background: #F1F1F2;
  404. border-radius: 4rpx;
  405. overflow-y: auto;
  406. font-weight: normal;
  407. textarea {
  408. width: 100%;
  409. height: 196rpx;
  410. }
  411. span {
  412. display: block;
  413. text-align: right;
  414. }
  415. }
  416. }
  417. .item {
  418. height: 70rpx;
  419. display: flex;
  420. align-items: center;
  421. justify-content: space-between;
  422. border-bottom: 1px solid #EEEEEE;
  423. image {
  424. width: 28rpx;
  425. height: 28rpx;
  426. }
  427. }
  428. .submit {
  429. height: 112rpx;
  430. display: flex;
  431. align-items: center;
  432. justify-content: space-around;
  433. border-top: 1px solid #eeeeee;
  434. margin-top: 20rpx;
  435. .cancel_btn {
  436. width: 324rpx;
  437. height: 76rpx;
  438. border-radius: 54rpx;
  439. border: 1px solid #CCCCCC;
  440. font-size: 28rpx;
  441. color: #999999;
  442. display: flex;
  443. align-items: center;
  444. justify-content: center;
  445. }
  446. .submit_btn {
  447. width: 324rpx;
  448. height: 76rpx;
  449. border-radius: 54rpx;
  450. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  451. border: 1px solid #CCCCCC;
  452. font-size: 28rpx;
  453. color: #FFFFFF;
  454. display: flex;
  455. align-items: center;
  456. justify-content: center;
  457. }
  458. }
  459. }
  460. }
  461. }
  462. </style>