refund-detail.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('component/order-refund', __DIR__);
  4. ?>
  5. <style>
  6. .card-box {
  7. border: none;
  8. }
  9. .marign-b-20 {
  10. margin-bottom: 20px;
  11. }
  12. .step-box {
  13. margin-top: 10px;
  14. padding-top: 10px;
  15. }
  16. .step-inactive {
  17. position: absolute;
  18. top: 50%;
  19. left: 50%;
  20. width: 34px;
  21. height: 34px;
  22. border-radius: 50%;
  23. background-color: #e8e8e8;
  24. transform: translate(-50%, -50%);
  25. }
  26. .step-inside {
  27. position: absolute;
  28. top: 50%;
  29. left: 50%;
  30. width: 25px;
  31. height: 25px;
  32. border-radius: 50%;
  33. background-color: #cccbcb;
  34. transform: translate(-50%, -50%);
  35. text-align: center;
  36. line-height: 24px;
  37. z-index: 9;
  38. color: #fff;
  39. font-size: 12px;
  40. }
  41. .step-active {
  42. background-color: var(--primary, #fb6638);
  43. }
  44. .step-outside {
  45. background-color: transparent;
  46. }
  47. .step-box .el-step__title {
  48. font-size: 14px;
  49. }
  50. .text-other {
  51. padding: 10px 0;
  52. font-size: 12px;
  53. }
  54. .text-other>span:nth-child(1) {
  55. display: block;
  56. width: 100%;
  57. padding-left: 20px;
  58. text-align: left;
  59. }
  60. .text-child {
  61. padding: 5px 0 0 30px;
  62. color: #999;
  63. }
  64. .text-child>span {
  65. display: block;
  66. padding-top: 10px;
  67. }
  68. .text-item {
  69. padding: 10px 0;
  70. font-size: 12px;
  71. }
  72. .row-card-header {
  73. font-weight: 700;
  74. font-size: 14px;
  75. }
  76. .text-item>span:nth-child(1) {
  77. display: inline-block;
  78. width: 105px;
  79. padding-right: 20px;
  80. text-align: right;
  81. }
  82. .el-row-flex {
  83. display: flex;
  84. flex-flow: row wrap;
  85. }
  86. .el-row-flex .card-box {
  87. height: 100%;
  88. }
  89. .order-goods .el-table th>.cell,
  90. .order-goods .el-table {
  91. font-size: 13px;
  92. }
  93. .package-item {
  94. padding: 10px 0;
  95. font-size: 12px;
  96. }
  97. .package-item>span:nth-child(1) {
  98. display: inline-block;
  99. width: 105px;
  100. padding: 0 20px;
  101. text-align: left;
  102. }
  103. .package-item img {
  104. width: 55px;
  105. height: 55px;
  106. border-radius: 5px;
  107. margin-right: 10px;
  108. }
  109. .range-right {
  110. margin-right: 20px;
  111. }
  112. .color-red {
  113. color: red;
  114. }
  115. .color-green {
  116. color: green;
  117. }
  118. .consult {
  119. max-height: 600px;
  120. width: 100%;
  121. overflow-x: hidden;
  122. overflow-y: auto;
  123. }
  124. .consult li {
  125. border-bottom: 1px solid #EBEEF5;
  126. font-size: 12px;
  127. padding: 10px 0 20px 10px;
  128. }
  129. .consult li div {
  130. /* display: block; */
  131. padding: 5px 0;
  132. }
  133. .handle-btn {
  134. display: inline-block;
  135. position: absolute;
  136. right: 0px;
  137. top: -5px;
  138. }
  139. .el-dialog {
  140. border-radius: 5px;
  141. }
  142. .el-dialog__header {
  143. padding:10px 30px;
  144. border-bottom: 1px solid #f2f2f2;
  145. }
  146. .el-form-item--small {
  147. margin:10px 0;
  148. }
  149. .el-form-item--small {
  150. margin-bottom:0 !important;
  151. }
  152. </style>
  153. <div id="app" v-cloak>
  154. <el-card shadow="never" style="border: none;" body-style="background-color: #f3f3f3;padding: 10px 0 0;" v-loading="cardLoading">
  155. <div slot="header">
  156. <span>订单详情</span>
  157. </div>
  158. <el-card class="card-box step-box marign-b-20" shadow="never">
  159. <el-steps :active="stepArrActive">
  160. <el-step v-for="(item,index) in stepArr" :key="index" :title="item.title" :description="item.created_at|dateTimeFormat('Y-m-d H:i:s')">
  161. <template slot="icon">
  162. <div class="step-inactive" :class="item.is_step == 1 ? 'step-outside' : ''">
  163. <div class="step-inside" :class="item.is_step == 1 ? 'step-active' : ''">{{ index + 1 }}</div>
  164. </div>
  165. </template>
  166. </el-step>
  167. </el-steps>
  168. </el-card>
  169. <el-row :gutter="20" class="el-row-flex marign-b-20">
  170. <el-col :span="8">
  171. <el-card class="card-box" shadow="never">
  172. <div slot="header" class="clearfix row-card-header" style="position: relative;">
  173. <span>售后信息</span>
  174. <template v-if="step_status != -1 || step_status != -2">
  175. <!-- 仅退款 -->
  176. <!-- <div class="handle-btn" v-if="orderDetail.type == 1">
  177. <el-button type="primary" size="small" v-if="step_status == 5" @click="handle('handle', orderDetail, 6)">同意退款</el-button>
  178. <el-button plain size="small" v-if="step_status == 5" @click="handle('handle', orderDetail, -1)">拒绝售后申请</el-button>
  179. </div> -->
  180. <!-- 退货退款 -->
  181. <!-- <div class="handle-btn" v-if="orderDetail.type == 2">
  182. <el-button type="primary" size="small" v-if="step_status == 1" @click="handle('send_address', orderDetail, 2)">同意退货,发送退货地址</el-button>
  183. <el-button plain size="small" v-if="step_status == 1" @click="handle('handle', orderDetail, -1)">拒绝售后申请</el-button>
  184. <el-button plain size="small" v-if="step_status == 2" @click="handle('handle', orderDetail, 4)">已收到退货,同意退款</el-button>
  185. <el-button type="primary" size="small" v-if="step_status == 3" @click="handle('handle', orderDetail, 4)">确认收货并退款</el-button>
  186. <el-button plain size="small" v-if="step_status == 3" @click="handle('handle', orderDetail, -2)">拒绝确认收货</el-button>
  187. </div> -->
  188. <!-- 换货 -->
  189. <!-- <div class="handle-btn" v-if="orderDetail.type == 3">
  190. <el-button type="primary" size="small" v-if="step_status == 7" @click="handle('send_address', orderDetail, 8)">同意换货,发送退货地址</el-button>
  191. <el-button plain size="small" v-if="step_status == 7" @click="handle('handle', orderDetail, -1)">拒绝售后申请</el-button>
  192. <el-button plain size="small" v-if="step_status == 8" @click="handle('exchange', orderDetail, 10)">已收到退货,立即发货</el-button>
  193. <el-button type="primary" size="small" v-if="step_status == 9" @click="handle('exchange', orderDetail, 10)">确认收货并重新发货</el-button>
  194. <el-button plain size="small" v-if="step_status == 9" @click="handle('handle', orderDetail, -2)">拒绝确认收货</el-button>
  195. </div> -->
  196. </template>
  197. </div>
  198. <div class="text-item">
  199. <span>售后状态</span><span class="text-color-primary">{{ stepText.title }}</span>
  200. </div>
  201. <div class="text-item">
  202. <span>退款金额</span><span>¥{{ orderDetail.refund_price }} <span v-if="orderDetail.discount">+ {{orderDetail.discount}}</span></span>
  203. </div>
  204. <div class="text-item">
  205. <span>需返</span><span>{{ orderDetail.discount || '-' }}</span>
  206. </div>
  207. <div class="text-item">
  208. <span>售后原因</span><span>{{ orderDetail.reason || '-' }}</span>
  209. </div>
  210. <div class="text-item">
  211. <span>售后说明</span><span>{{ orderDetail.remark || '-' }}</span>
  212. </div>
  213. <div class="text-item">
  214. <span>售后编号</span><span>{{ orderDetail.order_no }}</span>
  215. </div>
  216. </el-card>
  217. </el-col>
  218. <el-col :span="8">
  219. <el-card class="card-box " shadow="never">
  220. <div slot="header" class="clearfix row-card-header">
  221. <span>买家及收货信息</span>
  222. </div>
  223. <div class="text-item">
  224. <span>买家</span><span>{{ orderDetail.base_user.nickname }}</span>
  225. </div>
  226. <div class="text-item">
  227. <span>买家备注</span><span>{{ orderDetail.remark || '--' }}</span>
  228. </div>
  229. <div class="text-item" v-if="orderDetail.order.is_virtual == 0">
  230. <span>配送方式</span><span>{{ shipping_type_list[orderDetail.order.shipping_type] }}</span>
  231. </div>
  232. <div class="text-item">
  233. <span>收货人</span><span>{{ orderDetail.order.receiver_name || '--' }}</span>
  234. </div>
  235. <div class="text-item">
  236. <span>收货地址</span><span>{{ orderDetail.order.region_name }} {{ orderDetail.order.address }}</span>
  237. </div>
  238. <div class="text-item">
  239. <span>手机号码</span><span>{{ orderDetail.order.mobile }}</span>
  240. </div>
  241. <div v-if="orderDetail.order.pickup_info">
  242. <h4>自提点信息</h4>
  243. <div class="text-item">
  244. <span>联系人姓名</span><span>{{ orderDetail.order.pickup_info.head_info.contact_name }}</span>
  245. </div>
  246. <div class="text-item">
  247. <span>手机号码</span><span>{{ orderDetail.order.pickup_info.head_info.contact_phone }}</span>
  248. </div>
  249. <div class="text-item">
  250. <span>详细地址</span><span>{{ orderDetail.order.pickup_info.head_info.address }}</span>
  251. </div>
  252. </div>
  253. <div v-if="orderDetail.refund_status == 4" class="text-other" style="padding-bottom: 0px;">
  254. <span>客户退回信息</span>
  255. <div class="text-child">
  256. <span>快递公司:{{ orderDetail.express }}</span>
  257. <span>快递单号:{{ orderDetail.express_no }}</span>
  258. </div>
  259. </div>
  260. <div class="text-other">
  261. <span v-if="orderDetail.type == 1 && orderDetail.refund_status == 1">退款已完成,退款金额:{{ orderDetail.reality_refund_price }} 元 <span v-if="orderDetail.discount">+ {{orderDetail.discount}}</span></span><span></span>
  262. <span v-if="orderDetail.type == 2 && orderDetail.refund_status == 1">退款退货已完成,退款金额:{{ orderDetail.reality_refund_price }} 元 <span v-if="orderDetail.discount">+ {{orderDetail.discount}}</span></span><span></span>
  263. <span v-if="orderDetail.type == 3 && orderDetail.refund_status == 1">换货已完成</span><span></span>
  264. </div>
  265. </el-card>
  266. </el-col>
  267. <el-col :span="8">
  268. <el-card class="card-box" shadow="never">
  269. <div slot="header" class="clearfix row-card-header">
  270. <span>订单信息</span>
  271. </div>
  272. <div class="text-item">
  273. <span>订单状态</span><span :class="orderGoods.is_feedback == 1 ? 'color-red' : 'color-green'">{{ feedback_type_list[orderGoods.is_feedback] }}</span>
  274. </div>
  275. <div class="text-item">
  276. <span>订单编号</span><span>{{ orderDetail.order.order_no }}</span>
  277. </div>
  278. <div class="text-item">
  279. <span>交易单号</span><span>{{ orderDetail.order.out_trade_no || '-' }}</span>
  280. </div>
  281. <div class="text-item">
  282. <span>支付方式</span><span>{{ payment_type_list[orderDetail.order.payment_type] }}</span>
  283. </div>
  284. </el-card>
  285. </el-col>
  286. </el-row>
  287. <el-card class="card-box marign-b-20" shadow="never">
  288. <div slot="header" class="clearfix row-card-header">
  289. <span>商品信息</span>
  290. </div>
  291. <div class="order-goods">
  292. <el-table :data="orderGoodsList" style="width: 100%;" :header-cell-style="{background:'#F7F7F7','border-bottom': 0}">
  293. <el-table-column label="商品" width="260">
  294. <template slot-scope="scope">
  295. <div style="display: flex;align-items: center;">
  296. <el-image style="width: 50px; height: 50px;border-radius: 5px;margin-right: 10px" :src="scope.row.pic_url"></el-image>
  297. <com-ellipsis :line="2">
  298. {{ scope.row.goods_name }}
  299. </com-ellipsis>
  300. </div>
  301. </template>
  302. </el-table-column>
  303. <el-table-column label="规格" width="210">
  304. <template slot-scope="scope">
  305. <el-tag size="small">
  306. {{ scope.row.goods_attr_name || '无规格' }}
  307. </el-tag>
  308. </template>
  309. </el-table-column>
  310. <el-table-column label="单价" width="210">
  311. <template slot-scope="scope">
  312. <div>{{ getOrderPrice(scope.row) }}
  313. <span v-if="scope.row.adjust_money != 0">(调价:¥{{ scope.row.adjust_money }})</span>
  314. </div>
  315. </template>
  316. </el-table-column>
  317. <el-table-column label="购买数量" width="210">
  318. <template slot-scope="scope">
  319. <div>{{ scope.row.num }}</div>
  320. </template>
  321. </el-table-column>
  322. <el-table-column label="优惠" width="210">
  323. <template slot-scope="scope">
  324. <div>¥{{ (scope.row.price * scope.row.num - scope.row.goods_price).toFixed(2) }}</div>
  325. </template>
  326. </el-table-column>
  327. <el-table-column label="小计" width="210">
  328. <template slot-scope="scope">
  329. <div>{{ getOrderPrice(scope.row) }}</div>
  330. </template>
  331. </el-table-column>
  332. <el-table-column label="状态">
  333. <template slot-scope="scope">
  334. <div>{{ feedback_type_list[scope.row.is_feedback] }}</div>
  335. </template>
  336. </el-table-column>
  337. </el-table>
  338. </div>
  339. </el-card>
  340. <el-card v-if="orderDetail.step.length > 0" class="card-box marign-b-20" shadow="never">
  341. <div slot="header" class="clearfix row-card-header">
  342. <span>协商记录</span>
  343. </div>
  344. <ul class="consult">
  345. <li v-for="(item,index) in orderDetail.step">
  346. <div><span style="color: #409eff; padding-right: 10px;">{{ item.role == 1 ? '买家' : '商家' }}</span> {{ item.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  347. <template v-for="val in JSON.parse(item.content)">
  348. <template v-if="typeof val == 'object'">
  349. <el-image
  350. v-for="img,k in val"
  351. style="width: 100px; height: 100px; margin-right: 20px; display: inline-block;"
  352. :src="img"
  353. :key="k"
  354. :preview-src-list="val">
  355. </el-image>
  356. </template>
  357. <div v-else>{{ val }}</div>
  358. </template>
  359. </li>
  360. </ul>
  361. </el-card>
  362. <el-card>
  363. <el-button type="primary" v-if="orderDetail.order_status == 1" size="small" @click="handle('shipping', orderDetail)">发货</el-button>
  364. <el-button type="primary" v-if="orderDetail.order_status == 2" size="small" @click="handle('take-delivery', orderDetail)">确认收货</el-button>
  365. <el-button type="primary" v-if="orderDetail.order_status == 3" size="small" @click="handle('sales', orderDetail)">订单完成</el-button>
  366. </el-card>
  367. </el-card>
  368. <!-- 修改退货地址 -->
  369. <order-refund :is_show="isShowChangeShipping"
  370. :handle_step_status="handleStepStatus"
  371. :handle_type="handleType"
  372. :change-shipping-loading="changeShippingLoading"
  373. :refund_info="orderDetail"
  374. :default_address="default_address"
  375. @submit="handleShipping"
  376. @close="isShowChangeShipping = false"
  377. :address_list = "address_list"
  378. @address = "selectAddress"
  379. ></order-refund>
  380. </div>
  381. <script>
  382. const app = new Vue({
  383. el: '#app',
  384. data() {
  385. return {
  386. id: 0,
  387. store_id: 0,
  388. detail: {},
  389. isShowChangeShipping: false,
  390. changeShippingLoading: false,
  391. shipping_form: {},
  392. activePackage: '0',
  393. handleType: '',
  394. cardLoading: false,
  395. logLoading: false,
  396. step_status: 0,
  397. orderGoodsList: [],
  398. goodDetails: [],
  399. orderAction: [],
  400. feedback_type_list: {},
  401. stepArrs: {
  402. "1": [
  403. {
  404. title: '买家下单',
  405. created_at: '0',
  406. is_step: 0,
  407. },
  408. {
  409. title: '买家付款',
  410. created_at: '0',
  411. is_step: 0,
  412. },
  413. {
  414. title: '商家发货',
  415. created_at: '0',
  416. is_step: 0,
  417. },
  418. {
  419. title: '交易完成',
  420. created_at: '0',
  421. is_step: 0,
  422. }
  423. ],
  424. },
  425. stepArr: [
  426. {
  427. title: '售后申请',
  428. created_at: '0',
  429. is_step: 0,
  430. },
  431. {
  432. title: '处理售后申请',
  433. created_at: '0',
  434. is_step: 0,
  435. },
  436. {
  437. title: '售后完成',
  438. created_at: '0',
  439. is_step: 0,
  440. },
  441. ],
  442. stepArrActive: 0,
  443. handleStepStatus: 0,
  444. orderDetail: {
  445. express: [],
  446. step: [],
  447. order: {}
  448. },
  449. orderGoods: {},
  450. orderExpress: [],
  451. stepText: {},
  452. order_status_list: {
  453. '0': "待付款",
  454. '1': "待发货",
  455. '2': "已发货",
  456. '3': "已收货",
  457. '4': "已完成",
  458. '-1': "售后申请",
  459. '-2': "退款中",
  460. '-3': "售后完成",
  461. '-4': "已关闭",
  462. '-5': "撤销申请",
  463. },
  464. payment_type_list: {
  465. '0': "在线支付",
  466. '1': "微信",
  467. '2': "支付宝",
  468. '3': "银联卡",
  469. '5': "余额支付",
  470. '7': "汇聚支付",
  471. '8': "汇聚快捷支付",
  472. '100': "线下支付"
  473. },
  474. shipping_type_list: {
  475. '1': "物流配送",
  476. '2': "买家自提",
  477. '3': "货到付款",
  478. '4': "本地配送"
  479. },
  480. default_address: {},
  481. address_list : [],
  482. };
  483. },
  484. created() {
  485. this.id = getQuery('id');
  486. this.store_id = getQuery('store_id');
  487. },
  488. mounted() {
  489. this.getDetail();
  490. },
  491. methods: {
  492. handleShipping(data) {
  493. this.handle('send_address', data, null, true);
  494. },
  495. selectAddress(data) {
  496. this.handle('select_address', data);
  497. },
  498. getDetail() {
  499. let self = this;
  500. self.cardLoading = true;
  501. request({
  502. params: {
  503. r: 'store/store-order/refund-detail',
  504. id: self.id,
  505. store_id: self.store_id
  506. },
  507. method: 'get',
  508. }).then(e => {
  509. self.cardLoading = false;
  510. if (e.data.code == 0) {
  511. var data = e.data.data;
  512. self.orderDetail = data.refund;
  513. self.orderGoods = data.refund.orderDetail;
  514. self.orderGoodsList = [data.refund.orderDetail];
  515. self.address_list = data.address_list;
  516. self.stepText = data.step_text;
  517. self.default_address = data.address_list[0];
  518. self.feedback_type_list = data.feedback_type_list;
  519. self.step_status = self.orderDetail.step[0].step_status;
  520. if (!isEmpty(data.step_arr)) self.getStepArr(data.step_arr, data.refund.step);
  521. } else {
  522. self.$message.error(e.data.msg);
  523. }
  524. }).catch(e => {
  525. console.log(e);
  526. });
  527. },
  528. getStepArr(stepArr, order) {
  529. var stepNumArr = [];
  530. var last_num = order[0].step_num;
  531. order.forEach(function (item) {
  532. stepNumArr[item.step_num] = item.created_at;
  533. });
  534. var newStepArr = [];
  535. stepArr.forEach(function (item) {
  536. let step = {};
  537. step['title'] = item.title;
  538. step['is_step'] = 1;
  539. if (stepNumArr[item.step_num]) {
  540. step['created_at'] = stepNumArr[item.step_num];
  541. } else if (last_num >= item.step_num && stepNumArr[last_num]) {// 如果一步到完成则获取最后一条时间
  542. console.info(last_num+'--'+item.step_num,'123')
  543. step['created_at'] = stepNumArr[last_num];
  544. } else {
  545. step['created_at'] = 0;
  546. step['is_step'] = 0;
  547. }
  548. newStepArr.push(step);
  549. });
  550. this.stepArrActive = this.orderDetail.step[0].step_num;
  551. this.stepArr = newStepArr;
  552. },
  553. handle(type, data, step_status = null, submit = false) {
  554. let id = data ? parseInt(data.id) : '';
  555. let store_id = data ? parseInt(data.store_id) : 0;
  556. switch (type) {
  557. // 订单详情
  558. case 'detail':
  559. let params = {
  560. r: 'store/store-order/detail'
  561. };
  562. if (id) params = Object.assign(params, {
  563. id: id
  564. });
  565. if (store_id) params = Object.assign(params, {
  566. store_id: store_id
  567. });
  568. navigateTo(params);
  569. break;
  570. // 删除订单
  571. case 'destroy':
  572. param = {
  573. id: id,
  574. store_id: store_id,
  575. type
  576. };
  577. this.$confirm('删除该条数据后不可以恢复, 是否继续?', '警告', {
  578. type: 'warning'
  579. }).then(() => {
  580. this.send(param)
  581. }).catch((err) => {})
  582. break;
  583. // 售后处理
  584. case 'handle':
  585. param = {
  586. id: id,
  587. store_id: store_id,
  588. step_status: step_status,
  589. };
  590. this.send('store/store-order/handle-refund', param);
  591. break;
  592. case 'exchange':// 换货
  593. case 'send_address':// 发送退货地址
  594. if (submit) {
  595. this.changeShippingLoading = true;
  596. this.send('store/store-order/handle-refund', data, (resp) => {
  597. if (resp.code == 0) this.isShowChangeShipping = false;
  598. });
  599. setTimeout(() => {
  600. this.changeShippingLoading = false;
  601. }, 100);
  602. } else {
  603. this.isShowChangeShipping = true
  604. this.handleStepStatus = step_status;
  605. this.handleType = type;
  606. }
  607. break;
  608. //选择优惠券
  609. case 'select_address':
  610. for(let i = 0; i < this.address_list.length; i++) {
  611. if (this.address_list[i]['address'] == data) {
  612. this.default_address = this.address_list[i];
  613. }
  614. }
  615. }
  616. },
  617. send(url, params, callback) {
  618. let self = this;
  619. request({
  620. params: {
  621. r: url,
  622. },
  623. method: 'post',
  624. data: params
  625. }).then(e => {
  626. if (e.data.code == 0) {
  627. self.$message.success(e.data.msg);
  628. self.getDetail();
  629. } else {
  630. self.$message.error(e.data.msg);
  631. }
  632. if (callback) callback(e.data);
  633. }).catch(e => {
  634. console.log(e);
  635. });
  636. },
  637. getOrderPrice(data){
  638. let text = '';
  639. switch (data.marketing_type) {
  640. case 'ScoreMall' :
  641. text = data.extra_info;
  642. break;
  643. default :
  644. text = '¥'+data.goods_price;
  645. }
  646. return text;
  647. },
  648. }
  649. });
  650. </script>