refund-return.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <div class="app-container">
  3. <!--<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
  4. <el-menu-item index="1" @click="backToList">订单列表</el-menu-item>
  5. <el-menu-item index="2">退款退货详情</el-menu-item>
  6. </el-menu>-->
  7. <div class="app-header-top" style="width: 100%;float: right;margin-bottom: 10px;">
  8. <div class="app-title">退款退货详情</div>
  9. <el-button type="primary" icon="el-icon-back" style="float: right;" @click="backToList">返回</el-button>
  10. </div>
  11. <el-card v-if="refundList.length === 0" class="box-card" style="text-align:center;color: #999;">暂无退款退货详情记录~</el-card>
  12. <template v-else>
  13. <el-card v-for="(refund,index) in refundList" :key="index" class="box-card">
  14. <div class="refund-item">
  15. <h3>审核信息</h3>
  16. <el-row :gutter="24" class="box-row">
  17. <el-col :span="6"><b>审核人:</b> {{ refund.reviewUserName }}</el-col>
  18. <el-col :span="6"><b>审核时间:</b> {{ refund.confirmReturnTime }}</el-col>
  19. </el-row>
  20. <el-row>
  21. <el-col :span="24"><b>审核备注:</b> {{ refund.reviewRemarks ? refund.reviewRemarks : '无' }}</el-col>
  22. </el-row>
  23. <el-row v-if="refund.reviewImage1 || refund.reviewImage2 || refund.reviewImage3 || refund.reviewImage4 || refund.reviewImage5 " :gutter="24" class="box-row">
  24. <el-col :span="2"><b>审核凭证:</b></el-col>
  25. </el-row>
  26. <el-row>
  27. <el-col :span="24">
  28. <img v-if="refund.reviewImage1" :src="refund.reviewImage1" width="65" alt="">
  29. <img v-if="refund.reviewImage2" :src="refund.reviewImage2" width="65" alt="">
  30. <img v-if="refund.reviewImage3" :src="refund.reviewImage3" width="65" alt="">
  31. <img v-if="refund.reviewImage4" :src="refund.reviewImage4" width="65" alt="">
  32. <img v-if="refund.reviewImage5" :src="refund.reviewImage5" width="65" alt="">
  33. </el-col>
  34. </el-row>
  35. </div>
  36. <div class="refund-item">
  37. <h3>申请信息</h3>
  38. <el-row :gutter="24" class="box-row">
  39. <el-col :span="6"><b>申请人:</b> {{ refund.applicationUserName }}</el-col>
  40. <el-col :span="6"><b>申请时间:</b> <template v-if="refund.returnTime">{{ refund.returnTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</template></el-col>
  41. </el-row>
  42. <el-row>
  43. <el-col :span="24"><b>退款备注:</b> {{ refund.remarks ? refund.remarks : '无' }}</el-col>
  44. </el-row>
  45. <el-row v-if="refund.image1 || refund.image2 || refund.image3 || refund.image4 || refund.image5 " :gutter="24" class="box-row">
  46. <el-col :span="4"><b>申请凭证:</b></el-col>
  47. </el-row>
  48. <el-row>
  49. <el-col :span="24">
  50. <img v-if="refund.image1" :src="refund.image1" width="65" alt="">
  51. <img v-if="refund.image2" :src="refund.image2" width="65" alt="">
  52. <img v-if="refund.image3" :src="refund.image3" width="65" alt="">
  53. <img v-if="refund.image4" :src="refund.image4" width="65" alt="">
  54. <img v-if="refund.image5" :src="refund.image5" width="65" alt="">
  55. </el-col>
  56. </el-row>
  57. </div>
  58. <div class="refund-item">
  59. <h3>退款信息</h3>
  60. <el-row :gutter="24" class="box-row">
  61. <el-col :span="6"><b>退款编号:</b> {{ refund.returnedNo }}</el-col>
  62. <el-col :span="6"><b>申请时间:</b> <template v-if="refund.returnTime">{{ refund.returnTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</template></el-col>
  63. <el-col :span="6"><b>申请金额:</b> ¥{{ refund.refundFee | toThousandFloatFilter }}</el-col>
  64. <!-- <el-col :span="6"><b>退款审核状态:</b>
  65. <el-tag v-if="refund.status*1===1" type="warning" size="small">待审核</el-tag>
  66. <el-tag v-if="refund.status*1===2" type="success" size="small">审核通过</el-tag>
  67. <el-tag v-if="refund.status*1===3" type="danger" size="small">审核不通过</el-tag>
  68. </el-col> -->
  69. </el-row>
  70. <el-row :gutter="24" class="box-row">
  71. <el-col :span="20"><b>退款方式:</b>
  72. <template v-if="refund.returnedWay*1===4">未支付无退款</template>
  73. <template v-else-if="refund.returnedWay*1===1">
  74. <span v-if="refund.refundBalanceFee*1 !== 0">余额账户:¥{{ refund.refundBalanceFee | toThousandFloatFilter }}</span>
  75. <span v-if="refund.refundOnlineFee*1 !== 0">线上退回:¥{{ refund.refundOnlineFee | toThousandFloatFilter }}</span>
  76. <span v-if="refund.refundOfflineFee*1 !== 0">线下转账:¥{{ refund.refundOfflineFee | toThousandFloatFilter }}</span>
  77. </template>
  78. <template v-else>----</template>
  79. </el-col>
  80. </el-row>
  81. <template v-if="refund.returnedWay*1===1 && refund.refundOfflineFee*1!==0">
  82. <el-row :gutter="24" class="box-row">
  83. <el-col v-if="refund.refundFee" :span="12"><b>退款银行:</b>
  84. <template v-if="refund.payType*1===1">建设银行7297</template>
  85. <template v-else-if="refund.payType*1===2">中信银行0897</template>
  86. <template v-else-if="refund.payType*1===3">中信银行7172</template>
  87. <template v-else-if="refund.payType*1===4">广发银行0115</template>
  88. <template v-else-if="refund.payType*1===5">广发银行5461</template>
  89. </el-col>
  90. <el-col v-else :span="12">暂无支付方式</el-col>
  91. </el-row>
  92. <el-row :gutter="24" class="box-row">
  93. <el-col :span="6"><b>开户名:</b> {{ refund.bankAccountName ? refund.bankAccountName : '' }}</el-col>
  94. <el-col :span="6"><b>账号:</b> {{ refund.bankAccountNo ? refund.bankAccountNo : '' }}</el-col>
  95. <el-col :span="6"><b>开户行:</b> {{ refund.openBank ? refund.openBank : '' }}</el-col>
  96. <el-col :span="6"><b>账户类型:</b>
  97. <el-tag v-if="refund.bankAccountType*1===1" type="warning" size="small">公账</el-tag>
  98. <el-tag v-if="refund.bankAccountType*1===2" type="danger" size="small">私账</el-tag>
  99. </el-col>
  100. </el-row>
  101. </template>
  102. </div>
  103. <div class="refund-item">
  104. <h3>订单信息</h3>
  105. <template v-if="order">
  106. <el-row :gutter="24" class="box-row">
  107. <el-col :span="6"><b>订单编号(ID):</b> {{ order.orderNo + '(' + order.orderID + ')' }}</el-col>
  108. <el-col :span="6"><b>下单时间:</b> <template v-if="order.orderTime">{{ order.orderTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</template></el-col>
  109. <el-col :span="6"><b>订单状态:</b>
  110. <template v-if="['11','12','13','21','22','23','31','32','33'].indexOf(order.status)>=0">
  111. <el-tag type="success" size="small">交易中</el-tag>
  112. </template>
  113. <template v-else>
  114. <el-tag :type="order.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
  115. </template>
  116. </el-col>
  117. </el-row>
  118. <el-row :gutter="24" class="box-row">
  119. <el-col :span="6"><b>订单金额:</b>¥{{ order.payTotalFee | toThousandFloatFilter }}</el-col>
  120. <el-col :span="6"><b>应收总额:</b>¥{{ order.payableAmount | toThousandFloatFilter }}</el-col>
  121. <el-col :span="6"><b>经理折扣:</b>¥{{ order.discountFee | toThousandFloatFilter }}</el-col>
  122. <el-col :span="6"><b>运费:</b>
  123. <span>{{ order.postageInfo }}</span>
  124. </el-col>
  125. </el-row>
  126. <el-row :gutter="24" class="box-row">
  127. <el-col :span="6"><b>收款状态:</b>
  128. <el-tag v-if="order.receiptStatus*1===1" type="danger" size="small">待收款</el-tag>
  129. <el-tag v-if="order.receiptStatus*1===2" type="warning" size="small">部分收款</el-tag>
  130. <el-tag v-if="order.receiptStatus*1===3" type="success" size="small">已收款</el-tag>
  131. </el-col>
  132. <el-col :span="6"><b>退款状态:</b>
  133. <el-tag v-if="order.refundType*1===1" type="warning" size="small">部分退款</el-tag>
  134. <el-tag v-else-if="order.refundType*1===2" type="danger" size="small">已退款</el-tag>
  135. <el-tag v-else type="info" size="small">无退款</el-tag>
  136. </el-col>
  137. <el-col :span="6"><b>发货状态:</b>
  138. <el-tag v-if="order.sendOutStatus*1===1" type="danger" size="small">待发货</el-tag>
  139. <el-tag v-if="order.sendOutStatus*1===2" type="warning" size="small">部分发货</el-tag>
  140. <el-tag v-if="order.sendOutStatus*1===3" type="success" size="small">已发货</el-tag>
  141. </el-col>
  142. </el-row>
  143. <el-row v-if="order.bpOrderUserinfo" :gutter="24" class="box-row">
  144. <el-col :span="6"><b>买家:</b> {{ order.bpOrderUserinfo.name }}</el-col>
  145. <el-col :span="6"><b>收货人:</b> {{ order.bpOrderUserinfo.shouHuoRen }}</el-col>
  146. <el-col :span="6"><b>手机:</b> {{ order.bpOrderUserinfo.mobile }}</el-col>
  147. <el-col :span="6"><b>地址:</b> {{ order.bpOrderUserinfo.province +' '+ order.bpOrderUserinfo.city +' '+ order.bpOrderUserinfo.town +' '+ order.bpOrderUserinfo.address }}</el-col>
  148. </el-row>
  149. </template>
  150. </div>
  151. <div class="refund-item">
  152. <div v-for="shopOrder in refund.shopOrderReturnedList" :key="shopOrder.shopOrderID" class="order-item">
  153. <el-row :gutter="22" class="box-row">
  154. <el-col :span="9"><b>子订单号(ID):</b> {{ shopOrder.shopOrderNo + '(' + shopOrder.shopOrderID + ')' }}</el-col>
  155. <el-col :span="5"><b>子订单金额:</b> ¥{{ shopOrder.productAmount | toThousandFloatFilter }}</el-col>
  156. <el-col :span="5"><b>发货状态:</b>
  157. <el-tag v-if="shopOrder.sendOutStatus*1===1" type="danger" size="small">待发货</el-tag>
  158. <el-tag v-if="shopOrder.sendOutStatus*1===2" type="warning" size="small">部分发货</el-tag>
  159. <el-tag v-if="shopOrder.sendOutStatus*1===3" type="success" size="small">已发货</el-tag>
  160. </el-col>
  161. </el-row>
  162. <el-row :gutter="22" class="box-row">
  163. <el-col :span="22"><b>供应商:</b> {{ shopOrder.shopName }}</el-col>
  164. </el-row>
  165. <el-row v-for="op in shopOrder.cmReturnedPurchaseProductList" :key="op.orderProductID" :gutter="22" class="product-row">
  166. <el-col :span="1.5">
  167. <img :src="op.mainImage" width="60" alt="">
  168. </el-col>
  169. <el-col :span="7">{{ op.name }}</el-col>
  170. <el-col :span="5">
  171. <div class="op-item"><b>单价:</b> ¥{{ op.price | toThousandFloatFilter }}</div>
  172. <div class="op-item"><b>已发货:</b> {{ op.num - op.notOutStore }}</div>
  173. <div class="op-item"><b>待发货:</b> {{ op.notOutStore - op.cancelProductNum }}</div>
  174. </el-col>
  175. <el-col :span="5">
  176. <div class="op-item"><b>数量:</b> {{ op.num }}</div>
  177. <div class="op-item"><b>已退货:</b> {{ op.returnedPurchaseProductNum }}</div>
  178. <div class="op-item"><b>已取消:</b> {{ op.cancelProductNum }}</div>
  179. </el-col>
  180. <el-col :span="5">
  181. <div class="op-item"><b>总额:</b> ¥{{ op.totalFee | toThousandFloatFilter }}</div>
  182. <div class="op-item"><b>本次退货:</b> {{ op.actualReturnedNum ? op.actualReturnedNum : 0 }}</div>
  183. <div class="op-item"><b>本次取消:</b> {{ op.actualCancelNum ? op.actualCancelNum : 0 }}</div>
  184. </el-col>
  185. </el-row>
  186. </div>
  187. </div>
  188. </el-card>
  189. </template>
  190. <template>
  191. <el-backtop style="right: 40px; bottom: 40px;">
  192. <i class="el-icon-upload2" />
  193. </el-backtop>
  194. </template>
  195. </div>
  196. </template>
  197. <script>
  198. import { getRefundReturn } from '@/api/order'
  199. export default {
  200. data() {
  201. return {
  202. activeIndex: '2',
  203. order: null,
  204. refundList: [],
  205. statusObj: {
  206. '0': '待确认',
  207. '4': '交易完成',
  208. '5': '订单完成',
  209. '6': '已关闭',
  210. '7': '交易全退',
  211. '11': '待收款、待发货',
  212. '12': '待收款、部分发货',
  213. '13': '待收款、全部发货',
  214. '21': '部分收款、待发货',
  215. '22': '部分收款、部分发货',
  216. '23': '部分收款、全部发货',
  217. '31': '全部收款、待发货',
  218. '32': '全部收款、部分发货',
  219. '33': '全部收款、全部发货'
  220. }
  221. }
  222. },
  223. computed: {
  224. orderId: function() {
  225. return this.$route.query.orderId * 1
  226. }
  227. },
  228. created() {
  229. this.fetchData()
  230. },
  231. methods: {
  232. async fetchData() {
  233. this.listLoading = true
  234. try {
  235. const res = await getRefundReturn({ orderId: this.orderId })
  236. this.order = res.data.order
  237. this.refundList = res.data.cmReturnedPurchaseList
  238. this.listLoading = false
  239. } catch (error) {
  240. this.listLoading = false
  241. }
  242. },
  243. backToList() {
  244. let parentPath = '/order/list'
  245. const parentView = this.$store.getters.visitedViews.slice(-2)[0]
  246. if (parentView) {
  247. const oid = parentView.fullPath.split('/').reverse()[0] * 1
  248. if (this.orderID === oid) {
  249. parentPath = parentView.fullPath
  250. }
  251. }
  252. this.$store.dispatch('tagsView/delView', this.$route).then(() => {
  253. this.$nextTick(() => {
  254. this.$router.replace({
  255. path: parentPath
  256. })
  257. })
  258. })
  259. }
  260. }
  261. }
  262. </script>
  263. <style scoped>
  264. .app-title{
  265. float: left;
  266. line-height: 36px;
  267. font-size: 18px;
  268. font-weight: bold;
  269. color: #999999;
  270. }
  271. h1{
  272. color: #409EFF;
  273. font-size: 24px;
  274. text-align: center;
  275. }
  276. h3{
  277. color: #409EFF;
  278. font-size: 16px;
  279. margin: 0;
  280. }
  281. .box-card{
  282. margin-top: 20px;
  283. font-size: 14px;
  284. }
  285. .box-row{
  286. padding: 10px 0;
  287. }
  288. .refund-item{
  289. border-bottom:1px dashed #E4E7ED;
  290. margin-bottom: 20px;
  291. }
  292. .order-item{
  293. border-bottom: 1px solid #DCDFE6;
  294. background:#F2F6FC;
  295. margin-top: 20px;
  296. padding: 5px 15px 0;
  297. border-radius: 5px;
  298. }
  299. .product-row{
  300. padding: 10px 0;
  301. background: #EBEEF5;
  302. border-top: 1px dashed #DCDFE6;
  303. }
  304. .op-item{
  305. padding: 5px 0;
  306. }
  307. </style>