details.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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 type="number" 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. <h3 v-if="orderDetail.status=='OVER'">退款记录</h3>
  134. <div v-if="orderDetail.status=='OVER'" class="order-main" style="border:none;">
  135. <!-- 订单表格 -->
  136. <el-table :data="[orderDetail]" style="width: 100%" border>
  137. <el-table-column label="处理结果" min-width="200">
  138. <template slot-scope="scope">
  139. {{({REFUND: "退款", GOODS_REFUND: "退货退款", FAIL: "驳回", GOODS: "退货"})[scope.row.refundType]}}
  140. </template>
  141. </el-table-column>
  142. <el-table-column prop="refundNum" label="退货数量" align="center"></el-table-column>
  143. <el-table-column prop="refundPrice" label="退款金额" align="center"></el-table-column>
  144. <el-table-column prop="refundRemark" label="备注" align="center" min-width="100"></el-table-column>
  145. <el-table-column prop="refundName" label="退款人" align="center"></el-table-column>
  146. <el-table-column prop="refundTime" label="退款时间" align="center"></el-table-column>
  147. </el-table>
  148. </div>
  149. </div>
  150. </div>
  151. </zj-page-fill>
  152. <div v-if="~['WAIT'].indexOf(orderDetail.status)" style="box-sizing: border-box; padding: 10px; text-align: right;">
  153. <el-button type="primary" size="small" @click="faqituikuan">确定</el-button>
  154. </div>
  155. </zj-page-container>
  156. </template>
  157. <script>
  158. import { esOrderDetailRefund, esOrderRefundPrice } from "@/api/orderManagement";
  159. export default {
  160. props:{
  161. detailsId: {
  162. type: [String, Number],
  163. default: ""
  164. },
  165. detailsType: {
  166. type: [String, Number],
  167. default: ""
  168. },
  169. },
  170. data() {
  171. return {
  172. detailsTypeCp: this.detailsType,
  173. // 退货退款表单
  174. formTH: {
  175. },
  176. // 订单详情
  177. orderDetail: {
  178. },
  179. }
  180. },
  181. computed:{
  182. zhuangtai(){
  183. return !!~['WAIT'].indexOf(this.orderDetail.status)?2:!!~['OVER'].indexOf(this.orderDetail.status)?3:-1
  184. }
  185. },
  186. watch: {
  187. detailsId: {
  188. handler(newVal, oldVal) {
  189. this.getEsOrderDetail()
  190. },
  191. deep: true,
  192. immediate: true,
  193. },
  194. },
  195. methods: {
  196. getEsOrderDetail(){
  197. esOrderDetailRefund({
  198. esOrderRefundId: this.detailsId
  199. }).then(res=>{
  200. this.orderDetail = {
  201. ...res.data
  202. }
  203. })
  204. },
  205. faqituikuan(){
  206. this.$refs.formTHref.validate((valid) => {
  207. if (valid) {
  208. esOrderRefundPrice({
  209. ...this.formTH,
  210. esOrderRefundId: this.detailsId
  211. }).then(res=>{
  212. this.$message({ type: 'success', message: `确定退货退款成功!` })
  213. this.$emit("removeTab")
  214. })
  215. }
  216. });
  217. },
  218. }
  219. }
  220. </script>
  221. <style scoped lang="scss">
  222. .info {
  223. .info_title {
  224. font-size: 16px;
  225. font-weight: 700;
  226. }
  227. .info_bottom {
  228. display: flex;
  229. margin: 10px 0;
  230. .info_bottom_lt {
  231. width: 40px;
  232. height: 40px;
  233. }
  234. .info_bottom_rt {
  235. padding: 0 0 0 10px;
  236. line-height: 30px;
  237. .photoPZ {
  238. display: inline-block;
  239. vertical-align: text-top;
  240. }
  241. }
  242. }
  243. }
  244. .order-main {
  245. margin-top: 15px;
  246. border: 1px solid #e5e5e5;
  247. .order-main-title {
  248. font-size: 14px;
  249. }
  250. .order-main-title span {
  251. margin-right: 15px;
  252. }
  253. .order-main-status {
  254. padding: 15px 0;
  255. font-size: 24px;
  256. color: #409EFF;
  257. }
  258. .order-main-opt-btn {
  259. padding: 15px 0;
  260. }
  261. }
  262. .order-receive-info {
  263. margin: 15px 0 30px;
  264. padding: 15px;
  265. background: #f5f7fa;
  266. :first-child div span {
  267. padding-right: 15px;
  268. }
  269. }
  270. .order-detail {
  271. background: #f5f7fa;
  272. .order-amount-info {
  273. padding: 15px 0;
  274. font-size: 12px;
  275. font-weight: bold;
  276. }
  277. ::v-deep .el-table tr,
  278. ::v-deep .el-table th {
  279. background-color: #f5f7fa;
  280. }
  281. }
  282. .main-detail {
  283. .title {
  284. font-size: 16px;
  285. font-weight: 700;
  286. margin-bottom: 20px;
  287. }
  288. .item {
  289. display: flex;
  290. font-size: 14px;
  291. color: #666;
  292. padding-bottom: 12px;
  293. .label {
  294. white-space: nowrap;
  295. }
  296. }
  297. }
  298. .order-evaluate-info {
  299. margin: 15px 0;
  300. padding: 30px 15px;
  301. background: #f5f7fa;
  302. .title {
  303. display: flex;
  304. justify-content: space-between;
  305. align-items: center;
  306. .left {
  307. font-size: 16px;
  308. font-weight: 700;
  309. span {
  310. font-weight: normal;
  311. margin-left: 20px;
  312. font-size: 14px;
  313. color: #666;
  314. }
  315. }
  316. .right {
  317. display: flex;
  318. align-items: center;
  319. font-size: 14px;
  320. span {
  321. margin-right: 10px;
  322. }
  323. }
  324. }
  325. .main {
  326. margin-top: 20px;
  327. display: flex;
  328. .rate-list {
  329. font-size: 14px;
  330. flex-shrink: 0;
  331. }
  332. .tag-list {
  333. margin-left: 30px;
  334. ::v-deep .el-tag {
  335. margin-right: 10px;
  336. margin-bottom: 10px;
  337. }
  338. }
  339. }
  340. .content {
  341. width: 400px;
  342. line-height: 20px;
  343. font-size: 14px;
  344. color: #333;
  345. margin-top: 10px;
  346. }
  347. .img-list {
  348. display: flex;
  349. flex-wrap: wrap;
  350. margin-top: 10px;
  351. width: 400px;
  352. ::v-deep .el-image {
  353. width: 100px;
  354. height: 100px;
  355. margin-right: 10px;
  356. margin-bottom: 10px;
  357. border: 1px solid #eaeaea;
  358. }
  359. }
  360. }
  361. </style>