record.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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 && item.orderType != 4 ">
  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. reOrderId:'',
  115. reasonList: [{
  116. name: '商品已使用',
  117. check: false,
  118. },
  119. {
  120. name: '服务已核销',
  121. check: false,
  122. }
  123. ],
  124. isRefuse: false,
  125. rejectData: {
  126. id: '',
  127. reOrderId: '',
  128. refuseReason: '',
  129. refuseReasonExplain: ''
  130. }
  131. }
  132. },
  133. methods: {
  134. //返回
  135. back() {
  136. uni.navigateBack({
  137. delta: 1
  138. });
  139. },
  140. getRecord() {
  141. let data = {
  142. orderNo: this.orderNo
  143. }
  144. this.$http.get("/app/order/locaOrder/afterSaleDetails?orderNo=" + this.orderNo).then(res => {
  145. if (res.data.code == 200) {
  146. this.list = res.data.result
  147. console.log(this.list)
  148. }
  149. })
  150. },
  151. selectReason(item, index) {
  152. console.log(item)
  153. this.reasonList.forEach(reason => {
  154. reason.check = false;
  155. });
  156. this.reasonList[index].check = true
  157. this.rejectData.refuseReason = item.value
  158. },
  159. cutPopup() {
  160. this.isRefuse = false
  161. },
  162. reject(item) {
  163. console.log(item)
  164. this.isRefuse = true
  165. this.rejectData.id = item.id
  166. this.rejectData.reOrderId = item.reOrderId
  167. },
  168. //提交拒绝
  169. refusalRefund() {
  170. if(this.rejectData.refuseReason==''){
  171. uni.showToast({
  172. icon: 'none',
  173. title: '选择拒绝原因'
  174. })
  175. return
  176. }else{
  177. this.$http.post("/app/order/locaOrder/refusalRefund", this.rejectData).then(res => {
  178. if (res.data.code == 200) {
  179. console.log(res)
  180. uni.showToast({
  181. icon: 'none',
  182. title: '拒绝成功'
  183. })
  184. this.isRefuse = false
  185. this.getRecord()
  186. // this.list = res.data.result
  187. }
  188. })
  189. }
  190. },
  191. getCodeList() {
  192. this.$http.get("/sys/api/getManyDictItems?dictCodeList=" + 'reason_refusal').then(res => {
  193. if (res.statusCode == 200) {
  194. //
  195. res.data.reason_refusal.forEach(item => {
  196. item.check = false
  197. })
  198. this.reasonList = res.data.reason_refusal
  199. }
  200. })
  201. },
  202. // 同意退款
  203. agree(item){
  204. let data = {
  205. reOrderId:this.reOrderId
  206. }
  207. this.$http.post("/app/order/locaOrder/agreeRefund",data).then(res => {
  208. console.log(res)
  209. if (res.data.code == 200) {
  210. uni.showToast({
  211. icon: 'none',
  212. title: '商家已同意退款'
  213. })
  214. this.getRecord()
  215. }
  216. else{
  217. uni.showToast({
  218. icon: 'none',
  219. title: res.data.message
  220. })
  221. }
  222. })
  223. }
  224. },
  225. mounted() {
  226. this.getRecord()
  227. this.getCodeList()
  228. },
  229. onLoad(options) {
  230. this.orderNo = options.orderId
  231. this.reOrderId = options.orderId
  232. }
  233. }
  234. </script>
  235. <style lang="scss" scoped>
  236. .record {
  237. width: 100vw;
  238. height: 100vh;
  239. background: #F7F8FC;
  240. display: flex;
  241. flex-direction: column;
  242. /*#ifdef APP-PLUS*/
  243. .top {
  244. width: 100%;
  245. height: var(--status-bar-height);
  246. background: #FFFFFF;
  247. }
  248. /*#endif*/
  249. .head {
  250. width: 100%;
  251. height: 112rpx;
  252. padding: 20rpx;
  253. display: flex;
  254. align-items: center;
  255. background: #FFFFFF;
  256. position: relative;
  257. .cuIcon-back {
  258. font-size: 40rpx;
  259. margin-right: 40rpx;
  260. }
  261. .case {
  262. position: absolute;
  263. left: 50%;
  264. transform: translateX(-50%);
  265. font-size: 36rpx;
  266. font-weight: 600;
  267. }
  268. }
  269. .product {
  270. display: flex;
  271. border-radius: 16rpx;
  272. padding: 20rpx 24rpx;
  273. background-color: #FFFFFF;
  274. border-top: 1px solid #eeeeee;
  275. .img {
  276. width: 132rpx;
  277. height: 132rpx;
  278. border-radius: 12rpx;
  279. overflow: hidden;
  280. margin-right: 16rpx;
  281. image {
  282. width: 132rpx;
  283. height: 132rpx;
  284. }
  285. }
  286. .name {
  287. flex: 1;
  288. display: flex;
  289. flex-direction: column;
  290. justify-content: space-between;
  291. font-size: 28rpx;
  292. color: #000000;
  293. line-height: 35rpx;
  294. .price {
  295. font-size: 26rpx;
  296. color: #666666;
  297. display: flex;
  298. align-items: center;
  299. justify-content: space-between;
  300. span {
  301. color: #666666;
  302. }
  303. }
  304. }
  305. }
  306. .history {
  307. flex: 1;
  308. overflow-y: auto;
  309. padding: 0px 24rpx;
  310. margin-top: 18rpx;
  311. .client {
  312. background-color: #FFFFFF;
  313. padding: 20rpx 16rpx;
  314. box-shadow: 0px 2rpx 8rpx 0px rgba(214, 225, 237, 0.1);
  315. border-radius: 16rpx;
  316. margin-bottom: 20rpx;
  317. .title {
  318. display: flex;
  319. border-bottom: 1px solid #EEEEEE;
  320. padding-bottom: 16rpx;
  321. margin-bottom: 16rpx;
  322. .img {
  323. width: 80rpx;
  324. height: 80rpx;
  325. margin-right: 12rpx;
  326. border-radius: 8rpx;
  327. overflow: hidden;
  328. image {
  329. width: 80rpx;
  330. height: 80rpx;
  331. }
  332. }
  333. .message {
  334. display: flex;
  335. flex-direction: column;
  336. justify-content: space-between;
  337. font-size: 28rpx;
  338. color: #000000;
  339. span {
  340. font-size: 24rpx;
  341. color: #999999;
  342. }
  343. }
  344. }
  345. .information {
  346. font-size: 26rpx;
  347. color: #333333;
  348. margin-bottom: 10rpx;
  349. word-wrap: break-word;
  350. }
  351. .request {
  352. display: flex;
  353. align-items: center;
  354. justify-content: end;
  355. margin-top: 16rpx;
  356. .btn {
  357. display: flex;
  358. align-items: center;
  359. justify-content: center;
  360. width: 112rpx;
  361. height: 47rpx;
  362. border-radius: 47rpx;
  363. border: 1px solid #449AFF;
  364. font-size: 24rpx;
  365. color: #449AFF;
  366. margin-left: 24rpx;
  367. }
  368. }
  369. }
  370. }
  371. .popup {
  372. width: 100vw;
  373. height: 100vh;
  374. position: fixed;
  375. top: 0;
  376. left: 0;
  377. background: rgba(0, 0, 0, 0.4);
  378. .content {
  379. width: 100%;
  380. background: #FFFFFF;
  381. border-radius: 20rpx 20rpx 0rpx 0px;
  382. padding: 20rpx 24rpx;
  383. padding-bottom: 16rpx;
  384. position: absolute;
  385. bottom: 0;
  386. left: 0;
  387. .title {
  388. display: flex;
  389. align-items: center;
  390. justify-content: center;
  391. position: relative;
  392. border-bottom: 1px solid #EEEEEE;
  393. padding-bottom: 20rpx;
  394. font-weight: 600;
  395. image {
  396. width: 37rpx;
  397. height: 37rpx;
  398. position: absolute;
  399. right: 0;
  400. }
  401. }
  402. .popup_title {
  403. font-size: 30rpx;
  404. color: #333333;
  405. margin-top: 20rpx;
  406. font-weight: 600;
  407. .input {
  408. width: 100%;
  409. // min-height: 196rpx;
  410. margin-top: 15rpx;
  411. padding: 16rpx 16rpx;
  412. background: #F1F1F2;
  413. border-radius: 4rpx;
  414. overflow-y: auto;
  415. font-weight: normal;
  416. textarea {
  417. width: 100%;
  418. height: 196rpx;
  419. }
  420. span {
  421. display: block;
  422. text-align: right;
  423. }
  424. }
  425. }
  426. .item {
  427. height: 70rpx;
  428. display: flex;
  429. align-items: center;
  430. justify-content: space-between;
  431. border-bottom: 1px solid #EEEEEE;
  432. image {
  433. width: 28rpx;
  434. height: 28rpx;
  435. }
  436. }
  437. .submit {
  438. height: 112rpx;
  439. display: flex;
  440. align-items: center;
  441. justify-content: space-around;
  442. border-top: 1px solid #eeeeee;
  443. margin-top: 20rpx;
  444. .cancel_btn {
  445. width: 324rpx;
  446. height: 76rpx;
  447. border-radius: 54rpx;
  448. border: 1px solid #CCCCCC;
  449. font-size: 28rpx;
  450. color: #999999;
  451. display: flex;
  452. align-items: center;
  453. justify-content: center;
  454. }
  455. .submit_btn {
  456. width: 324rpx;
  457. height: 76rpx;
  458. border-radius: 54rpx;
  459. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  460. border: 1px solid #CCCCCC;
  461. font-size: 28rpx;
  462. color: #FFFFFF;
  463. display: flex;
  464. align-items: center;
  465. justify-content: center;
  466. }
  467. }
  468. }
  469. }
  470. }
  471. </style>