details.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <template>
  2. <zj-page-container>
  3. <zj-page-fill>
  4. <div style="box-sizing: border-box; padding:10px;">
  5. <div>
  6. <div class="order-main">
  7. <el-row style="padding: 15px 15px 10px">
  8. <el-col :span="24">
  9. <div class="order-main-title">
  10. <span>售后编号:{{ orderDetail.esOrderRefundId }}</span>
  11. <span>下单时间:{{ orderDetail.createTime }}</span>
  12. </div>
  13. </el-col>
  14. </el-row>
  15. <div style="width: 100%; padding: 10px 15px 15px 15px">
  16. <el-row>
  17. <el-col :span="10">
  18. <div v-if="~['WAIT'].indexOf(orderDetail.status)">
  19. <el-form ref="formTHref" :model="formTH" label-width="80px" size="mini">
  20. <el-form-item label="处理结果" prop="refundType" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
  21. <el-radio-group v-model="formTH.refundType">
  22. <el-radio label="GOODS">仅退货</el-radio>
  23. <el-radio label="REFUND">仅退款</el-radio>
  24. <el-radio label="GOODS_REFUND">退货退款</el-radio>
  25. <el-radio label="FAIL">驳回</el-radio>
  26. </el-radio-group>
  27. </el-form-item>
  28. <el-form-item v-if="~['GOODS','GOODS_REFUND'].indexOf(formTH.refundType)" label="退货数量" prop="refundNum" :rules="[{ required: true, message: '请填写', trigger: 'blur' }]">
  29. <el-input v-model="formTH.refundNum"></el-input>
  30. </el-form-item>
  31. <el-form-item v-if="~['REFUND','GOODS_REFUND'].indexOf(formTH.refundType)" label="退款金额" prop="refundPrice" :rules="[{ required: true, message: '请填写', trigger: 'blur' }]">
  32. <el-input v-model="formTH.refundPrice"></el-input>
  33. </el-form-item>
  34. <el-form-item label="备注">
  35. <el-input type="textarea" v-model="formTH.refundRemark"></el-input>
  36. </el-form-item>
  37. </el-form>
  38. </div>
  39. <div v-else style="display: flex;">
  40. <div>
  41. <div class="order-main-status">
  42. <span>{{ ({WAIT: "平台处理", OVER: "完成"})[orderDetail.status] }}</span>
  43. </div>
  44. </div>
  45. </div>
  46. </el-col>
  47. <el-col :span="14" style="padding-top: 10px;">
  48. <el-steps :active="zhuangtai" align-center>
  49. <el-step title="买家申请" ></el-step>
  50. <el-step title="平台处理" ></el-step>
  51. <el-step title="维权完成" ></el-step>
  52. </el-steps>
  53. </el-col>
  54. </el-row>
  55. </div>
  56. </div>
  57. <div class="order-receive-info">
  58. <el-row :gutter="10">
  59. <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
  60. <div class='info'>
  61. <div class='info_title'>卖家信息</div>
  62. <div class='info_bottom'>
  63. <div v-if="orderDetail.sellUrl" class='info_bottom_lt'>
  64. <el-image style='width: 40px; height: 40px' :src="orderDetail.sellUrl"></el-image>
  65. </div>
  66. <div class='info_bottom_rt'>
  67. <div>昵称:{{orderDetail.sellName}}</div>
  68. <div>手机号:{{orderDetail.sellMobile}}</div>
  69. <div>发布时间:{{orderDetail.sellTime}}</div>
  70. </div>
  71. </div>
  72. </div>
  73. </el-col>
  74. <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
  75. <div class='info'>
  76. <div class='info_title'>买家信息</div>
  77. <div class='info_bottom'>
  78. <div v-if="orderDetail.wechatUserUrl" class='info_bottom_lt'>
  79. <el-image style='width: 40px; height: 40px' :src="orderDetail.wechatUserUrl">
  80. </el-image>
  81. </div>
  82. <div class='info_bottom_rt'>
  83. <div v-if="orderDetail.wechatUserName">昵称:{{orderDetail.wechatUserName}}</div>
  84. <div v-if="orderDetail.wechatUserMobile">手机号:{{orderDetail.wechatUserMobile}}</div>
  85. <div>收货人信息:({{orderDetail.userName}}){{orderDetail.userMobile}}</div>
  86. <div>收货人地址:{{ orderDetail.province + orderDetail.city + orderDetail.area + orderDetail.street + orderDetail.receAddress }}</div>
  87. <div>支付方式:{{({WECHAT:"微信支付", CASH:"到店支付", TRANSFER:"转账支付"})[orderDetail.payType]}}</div>
  88. </div>
  89. </div>
  90. </div>
  91. </el-col>
  92. <el-col v-if="orderDetail.status=='OVER'" :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
  93. <div class='info'>
  94. <div class='info_title'>维权信息</div>
  95. <div class='info_bottom'>
  96. <div class='info_bottom_rt'>
  97. <div>退款方式:{{({REFUND: "退款", GOODS_REFUND: "退货退款", FAIL: "驳回", GOODS: "退货"})[orderDetail.refundType]}}</div>
  98. <div>退款原因:{{orderDetail.refundNote}}</div>
  99. <div>退款凭证:<el-image v-for="(url,index) in (orderDetail.refundUrl ? orderDetail.refundUrl.split(',') : [])" :preview-src-list="(orderDetail.refundUrl ? orderDetail.refundUrl.split(',') : [])" :key="index" style="width: 60px; height: 60px" :src="url"></el-image>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </el-col>
  105. </el-row>
  106. </div>
  107. <h3>商品信息</h3>
  108. <div class="order-main" style="border:none;">
  109. <!-- 订单表格 -->
  110. <el-table :data="[orderDetail]" style="width: 100%" border>
  111. <el-table-column label="商品信息" min-width="200">
  112. <template slot-scope="scope">
  113. <el-row>
  114. <el-col :span="6">
  115. <el-image style="width: 40px; height: 40px" :src="scope.row.goodsUrl">
  116. <div slot="error" class="image-slot">
  117. <i class="el-icon-picture-outline"></i>
  118. </div>
  119. </el-image>
  120. </el-col>
  121. <el-col :span="18">
  122. <div>{{ scope.row.esGoodsName }}</div>
  123. </el-col>
  124. </el-row>
  125. </template>
  126. </el-table-column>
  127. <el-table-column prop="goodsPrice" label="单价" align="center"></el-table-column>
  128. <el-table-column prop="num" label="数量" align="center"></el-table-column>
  129. <el-table-column prop="totalAmount" label="商品总金额" align="center" min-width="100"></el-table-column>
  130. <el-table-column prop="refundPrice" label="退款金额" align="center"></el-table-column>
  131. </el-table>
  132. </div>
  133. </div>
  134. </div>
  135. </zj-page-fill>
  136. <div v-if="~['WAIT'].indexOf(orderDetail.status)" style="box-sizing: border-box; padding: 10px; text-align: right;">
  137. <el-button type="primary" size="small" @click="faqituikuan">确定</el-button>
  138. </div>
  139. </zj-page-container>
  140. </template>
  141. <script>
  142. import { esOrderDetailRefund, esOrderRefundPrice } from "@/api/orderManagement";
  143. export default {
  144. props:{
  145. detailsId: {
  146. type: [String, Number],
  147. default: ""
  148. },
  149. detailsType: {
  150. type: [String, Number],
  151. default: ""
  152. },
  153. },
  154. data() {
  155. return {
  156. detailsTypeCp: this.detailsType,
  157. // 退货退款表单
  158. formTH: {
  159. },
  160. // 订单详情
  161. orderDetail: {
  162. },
  163. }
  164. },
  165. computed:{
  166. zhuangtai(){
  167. return !!~['WAIT'].indexOf(this.orderDetail.status)?2:!!~['OVER'].indexOf(this.orderDetail.status)?3:-1
  168. }
  169. },
  170. watch: {
  171. detailsId: {
  172. handler(newVal, oldVal) {
  173. this.getEsOrderDetail()
  174. },
  175. deep: true,
  176. immediate: true,
  177. },
  178. },
  179. methods: {
  180. getEsOrderDetail(){
  181. esOrderDetailRefund({
  182. esOrderRefundId: this.detailsId
  183. }).then(res=>{
  184. this.orderDetail = {
  185. ...res.data
  186. }
  187. })
  188. },
  189. faqituikuan(){
  190. this.$refs.formTHref.validate((valid) => {
  191. if (valid) {
  192. esOrderRefundPrice({
  193. ...this.formTH,
  194. esOrderRefundId: this.detailsId
  195. }).then(res=>{
  196. this.$message({ type: 'success', message: `确定退货退款成功!` })
  197. this.$emit("removeTab")
  198. })
  199. }
  200. });
  201. },
  202. }
  203. }
  204. </script>
  205. <style scoped lang="scss">
  206. .info {
  207. .info_title {
  208. font-size: 16px;
  209. font-weight: 700;
  210. }
  211. .info_bottom {
  212. display: flex;
  213. margin: 10px 0;
  214. .info_bottom_lt {
  215. width: 40px;
  216. height: 40px;
  217. }
  218. .info_bottom_rt {
  219. padding: 0 0 0 10px;
  220. line-height: 30px;
  221. .photoPZ {
  222. display: inline-block;
  223. vertical-align: text-top;
  224. }
  225. }
  226. }
  227. }
  228. .order-main {
  229. margin-top: 15px;
  230. border: 1px solid #e5e5e5;
  231. .order-main-title {
  232. font-size: 14px;
  233. }
  234. .order-main-title span {
  235. margin-right: 15px;
  236. }
  237. .order-main-status {
  238. padding: 15px 0;
  239. font-size: 24px;
  240. color: #409EFF;
  241. }
  242. .order-main-opt-btn {
  243. padding: 15px 0;
  244. }
  245. }
  246. .order-receive-info {
  247. margin: 15px 0 30px;
  248. padding: 15px;
  249. background: #f5f7fa;
  250. :first-child div span {
  251. padding-right: 15px;
  252. }
  253. }
  254. .order-detail {
  255. background: #f5f7fa;
  256. .order-amount-info {
  257. padding: 15px 0;
  258. font-size: 12px;
  259. font-weight: bold;
  260. }
  261. ::v-deep .el-table tr,
  262. ::v-deep .el-table th {
  263. background-color: #f5f7fa;
  264. }
  265. }
  266. .main-detail {
  267. .title {
  268. font-size: 16px;
  269. font-weight: 700;
  270. margin-bottom: 20px;
  271. }
  272. .item {
  273. display: flex;
  274. font-size: 14px;
  275. color: #666;
  276. padding-bottom: 12px;
  277. .label {
  278. white-space: nowrap;
  279. }
  280. }
  281. }
  282. .order-evaluate-info {
  283. margin: 15px 0;
  284. padding: 30px 15px;
  285. background: #f5f7fa;
  286. .title {
  287. display: flex;
  288. justify-content: space-between;
  289. align-items: center;
  290. .left {
  291. font-size: 16px;
  292. font-weight: 700;
  293. span {
  294. font-weight: normal;
  295. margin-left: 20px;
  296. font-size: 14px;
  297. color: #666;
  298. }
  299. }
  300. .right {
  301. display: flex;
  302. align-items: center;
  303. font-size: 14px;
  304. span {
  305. margin-right: 10px;
  306. }
  307. }
  308. }
  309. .main {
  310. margin-top: 20px;
  311. display: flex;
  312. .rate-list {
  313. font-size: 14px;
  314. flex-shrink: 0;
  315. }
  316. .tag-list {
  317. margin-left: 30px;
  318. ::v-deep .el-tag {
  319. margin-right: 10px;
  320. margin-bottom: 10px;
  321. }
  322. }
  323. }
  324. .content {
  325. width: 400px;
  326. line-height: 20px;
  327. font-size: 14px;
  328. color: #333;
  329. margin-top: 10px;
  330. }
  331. .img-list {
  332. display: flex;
  333. flex-wrap: wrap;
  334. margin-top: 10px;
  335. width: 400px;
  336. ::v-deep .el-image {
  337. width: 100px;
  338. height: 100px;
  339. margin-right: 10px;
  340. margin-bottom: 10px;
  341. border: 1px solid #eaeaea;
  342. }
  343. }
  344. }
  345. </style>