details.vue 13 KB

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