多租户商城-客户PC端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

355 lines
10 KiB

3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
  1. <template>
  2. <div class="orderList">
  3. <div class="head">
  4. <div style="flex:4;padding-left:20px;">
  5. <span style="flex:2;">{{ $t('common.beautiproduct') }}</span>
  6. <span style="flex:1;">单价</span>
  7. <span style="flex:1;">数量</span>
  8. </div>
  9. <div style="flex:4;padding-right:20px;">
  10. <span style="flex:1;">退款金额</span>
  11. <span style="flex:1;">申请时间</span>
  12. <span style="flex:1;">状态</span>
  13. <span style="flex:1;">操作</span>
  14. </div>
  15. </div>
  16. <div v-if="afterSaleList.length>0">
  17. <div class="content" v-for="(item,index) in afterSaleList" :key="index">
  18. <div class="top">
  19. <div class="left">
  20. <span class="shopName" @click="toStore(item.shopId)"><img :src="item.shopLogo" alt="">{{item.shopName}}</span>
  21. <span class="orderCode">售后编号{{item.afterFormid}}</span>
  22. </div>
  23. </div>
  24. <div class="productBox">
  25. <div class="product">
  26. <div class="left fs13">
  27. <div class="box" v-for="(pro,inx) in item.skus" :key="inx">
  28. <div class="desc cur-poi" @click="toProductDetail(pro,item.shopId)">
  29. <img :src="pro.image" alt="">
  30. <div>
  31. <p class="name">{{pro.productName}}</p>
  32. <p class="size font-color-999"><span v-for="(val,idx) in pro.values" :key="idx">{{val}}</span></p>
  33. </div>
  34. </div>
  35. <div class="price">¥{{pro.price}}</div>
  36. <div class="num">{{pro.number}}</div>
  37. </div>
  38. </div>
  39. <div class="right" :class="item.skus.length>1?'right_line':''">
  40. <div class="actualPay">
  41. <div>
  42. <p class="fs13 mar-bot-5">¥{{item.price}}</p>
  43. </div>
  44. </div>
  45. <div class="applicationTime">{{item.createTime}}</div>
  46. <div class="status">
  47. <div>
  48. <p class="fs13 mar-bot-5" v-if="item.afterState==1">审核中</p>
  49. <p class="fs13 mar-bot-5" v-if="item.afterState==2">退款中</p>
  50. <p class="fs13 mar-bot-5" v-if="item.afterState==3">退货中</p>
  51. <p class="fs13 mar-bot-5" v-if="item.afterState==4">退款成功</p>
  52. <p class="fs13 mar-bot-5" v-if="item.afterState==5">退款失败</p>
  53. <p class="fs13 mar-bot-5" v-if="item.afterState==6">审核不通过</p>
  54. <p class="fs13 mar-bot-5" v-if="item.afterState==7">评审中</p>
  55. <p class="fs13 mar-bot-5 font-color-999" v-if="item.afterState==8">退货完成拒绝退款</p>
  56. <p class="fs13 mar-bot-5 font-color-999" v-if="item.afterState==9">已关闭</p>
  57. <p class="fs13 mar-bot-5 font-color-71B" v-if="item.afterState==10">审核通过</p>
  58. </div>
  59. </div>
  60. <div class="operate">
  61. <el-button size="small"
  62. @click="toAfterSaleDetail(item.afterId,item.orderId)"
  63. >售后详情</el-button>
  64. <p class="fs13 tex-und cur-poi mar-top-10"
  65. @click="platform(item.afterId,item.orderId)"
  66. v-if="item.afterState==6 || item.afterState==8"
  67. v-throttle
  68. >申请平台介入</p>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <el-pagination
  75. :current-page="page"
  76. :page-size="5"
  77. :total='total'
  78. @current-change="handleCurrentChange"
  79. background
  80. layout='prev, pager, next'
  81. ></el-pagination>
  82. </div>
  83. <div class="noorder" v-else>
  84. <icon-svg style="width: 240px; height: 240px; margin-bottom: 20px;" icon-class="user-order-nodata" />
  85. <p class="fs20 font-color-999">你还没有售后订单哦</p>
  86. </div>
  87. <el-dialog
  88. title="申请平台介入"
  89. :visible.sync="interventionShow"
  90. width="25%"
  91. center
  92. >
  93. <el-input
  94. type="textarea"
  95. :rows="7"
  96. placeholder="请输入内容"
  97. v-model="reason">
  98. </el-input>
  99. <span slot="footer" class="dialog-footer">
  100. <el-button type="primary" @click="interventionFn"> </el-button>
  101. <el-button @click="closeIntervention"> </el-button>
  102. </span>
  103. </el-dialog>
  104. </div>
  105. </template>
  106. <script>
  107. import {
  108. requestPlatform
  109. } from '@/api/user/afterSale.js'
  110. export default {
  111. props: ['afterSaleList', 'page', 'total'],
  112. data () {
  113. return {
  114. state: 1,
  115. reason: '',
  116. images: '',
  117. interventionShow: false,
  118. afterId: '',
  119. orderId: ''
  120. }
  121. },
  122. methods: {
  123. // 分页器跳转
  124. handleCurrentChange (val) {
  125. this.$emit('handleCurrentChange', val)
  126. },
  127. // 跳转到店铺
  128. toStore (id) {
  129. this.$router.push({
  130. path: '/store',
  131. query: {
  132. shopData: {shopId: id}
  133. }
  134. })
  135. },
  136. // 跳转到售后详情
  137. toAfterSaleDetail (aid, oid) {
  138. this.$router.push({
  139. path: '/orderDetail',
  140. query: {
  141. afterId: aid, // 售后id
  142. orderId: oid, // 订单id
  143. type: 3
  144. }
  145. })
  146. },
  147. // 平台介入
  148. platform (afterId, orderId) {
  149. this.afterId = afterId
  150. this.orderId = orderId
  151. this.interventionShow = true
  152. },
  153. // 跳转到商品详情
  154. toProductDetail (item, id) {
  155. let data = {
  156. productId: item.productId,
  157. skuId: item.skuId,
  158. shopId: id
  159. }
  160. this.$router.push({
  161. path: '/productDetail',
  162. query: {
  163. proData: JSON.stringify(data)
  164. }
  165. })
  166. },
  167. closeIntervention () {
  168. this.afterId = ''
  169. this.orderId = ''
  170. this.reason = ''
  171. this.interventionShow = false
  172. },
  173. // 申请平台介入
  174. async interventionFn () {
  175. const response = await requestPlatform({
  176. afterId: this.afterId,
  177. orderId: this.orderId,
  178. image: this.images,
  179. reason: this.reason
  180. })
  181. const res = response.data
  182. if (res.code === '200') {
  183. this.$message.success('申请平台介入成功')
  184. this.interventionShow = false
  185. } else {
  186. this.$message.warning(res.message)
  187. this.interventionShow = false
  188. }
  189. }
  190. }
  191. }
  192. </script>
  193. <style lang="scss" scoped>
  194. .orderList{
  195. width: 100%;
  196. .noorder{
  197. width: 100%;
  198. text-align: center;
  199. padding: 100px 0;
  200. p{
  201. margin-bottom: 20px;
  202. }
  203. .el-button{
  204. background-color: $mainColor;
  205. color: $mainBtnFontColor;
  206. font-weight: normal;
  207. border-radius: 0;
  208. }
  209. }
  210. .head{
  211. box-sizing: border-box;
  212. width: 100%;
  213. height: 44px;
  214. background-color: #F1F2F7;
  215. display: flex;
  216. align-items: center;
  217. text-align: center;
  218. margin-bottom: 20px;
  219. div{
  220. display: flex;
  221. }
  222. }
  223. .content{
  224. width: 100%;
  225. margin-bottom: 20px;
  226. border: 1px solid #E5E5E5;
  227. border-bottom: 0;
  228. box-sizing: border-box;
  229. .top{
  230. width: 100%;
  231. font-size: 13px;
  232. height: 40px;
  233. display: flex;
  234. justify-content: space-between;
  235. align-items: center;
  236. background-color: #F3F3F3;
  237. .left{
  238. display: flex;
  239. .shopName{
  240. margin-left: 20px;
  241. margin-right: 60px;
  242. cursor: pointer;
  243. display: flex;
  244. align-items: center;
  245. img{
  246. width: 16px;
  247. height: 16px;
  248. vertical-align: middle;
  249. margin-right: 5px;
  250. }
  251. }
  252. .time{
  253. margin-right: 60px;
  254. }
  255. }
  256. }
  257. .productBox{
  258. width: 100%;
  259. box-sizing: border-box;
  260. .product{
  261. width: 100%;
  262. display: flex;
  263. .left{
  264. flex: 4;
  265. .box{
  266. padding: 20px 0 20px 20px;
  267. display: flex;
  268. border-bottom: 1px solid #E5E5E5;
  269. .desc{
  270. flex: 2;
  271. display: flex;
  272. img{
  273. width: 86px;
  274. height: 86px;
  275. margin-right: 10px;
  276. }
  277. div{
  278. display: flex;
  279. flex-direction: column;
  280. justify-content: space-between;
  281. .name{
  282. font-size: 14px;
  283. }
  284. .size{
  285. font-size: 13px;
  286. span{
  287. margin-right: 10px;
  288. }
  289. span:last-child{
  290. margin-right: 0;
  291. }
  292. }
  293. }
  294. }
  295. .price,.num{
  296. flex: 1;
  297. display: flex;
  298. align-items: center;
  299. justify-content: center;
  300. }
  301. }
  302. }
  303. .right{
  304. padding: 20px 20px 20px 0;
  305. flex: 4;
  306. display: flex;
  307. border-bottom: 1px solid #E5E5E5;
  308. .actualPay,.applicationTime,.status,.operate{
  309. flex: 1;
  310. display: flex;
  311. justify-content: center;
  312. align-items: center;
  313. text-align: center;
  314. div{
  315. text-align: center;
  316. }
  317. .el-button{
  318. border: 1px solid $mainGlod;
  319. color: $mainGlod;
  320. border-radius: 0;
  321. }
  322. }
  323. .status{
  324. p{
  325. color: #C83732;
  326. }
  327. }
  328. .operate{
  329. flex-direction: column;
  330. }
  331. }
  332. .right_line{
  333. border-left: 1px solid #E5E5E5;
  334. }
  335. }
  336. }
  337. }
  338. >>>.el-pagination{
  339. margin-top: 40px;
  340. text-align: right;
  341. .el-pager{
  342. li:not(.disabled):hover{
  343. color: $mainGlod;
  344. }
  345. li:not(.disabled).active{
  346. background-color: $mainGlod;
  347. }
  348. li:not(.disabled).active:hover{
  349. color: #F4F4F5;
  350. }
  351. }
  352. }
  353. }
  354. </style>