show.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <template>
  2. <view>
  3. <view class="show">
  4. <!-- 售后 -->
  5. <view @click="jumpUrl('refund?id=' + id)" v-if="state >= 30">
  6. <view class="examine">
  7. <view class="cont dflex">
  8. <view v-if="(state == 39 && orderRefund.refundType == 1) || (state == 40 && orderRefund.refundType == 1) || state == 30 || state == 31">
  9. <view style="font-size: 14px; color: #fe0419">客户提交了退款申请,退款处理中</view>
  10. <view style="font-size: 12px; color: #999999">{{ orderRefund.createDate }}</view>
  11. </view>
  12. <view v-if="(state == 41 && orderRefund.refundType == 1) || (state == 35 && orderRefund.refundType == 2)">
  13. <view style="font-size: 14px; color: #fe0419">
  14. 客户提交了退款审核{{ state == 41 && orderRefund.refundType == 1 ? ',退款处理中' : ',等待用户寄货中' }}
  15. </view>
  16. <view style="font-size: 12px; color: #999999">
  17. {{ state == 41 && orderRefund.refundType == 1 ? orderRefund.refundReviewTime : orderRefund.refundGoodReviewTime }}
  18. </view>
  19. </view>
  20. <view v-if="state == 36 && orderRefund.refundType == 2 && orderRefund.refundMethod == 2">
  21. <view style="font-size: 14px; color: #fe0419">等待客户送回门店</view>
  22. <view style="font-size: 12px; color: #999999">
  23. {{ state == 41 && orderRefund.refundType == 1 ? orderRefund.refundReviewTime : orderRefund.refundGoodReviewTime }}
  24. </view>
  25. </view>
  26. <template v-if="orderRefund.refundType == 1">
  27. <view v-if="state == 32">
  28. <view style="font-size: 14px; color: #fe0419">审核失败</view>
  29. <view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
  30. </view>
  31. </template>
  32. <template v-if="orderRefund.refundType == 2">
  33. <view v-if="state == 32">
  34. <view style="font-size: 14px; color: #fe0419">审核失败</view>
  35. <view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
  36. </view>
  37. <view v-if="state == 36 && (orderRefund.refundMethod == 1 || orderRefund.refundMethod == 3)">
  38. <view style="font-size: 14px; color: #fe0419">
  39. 客户已退货
  40. <template v-if="orderRefund.refundMethod == 1">
  41. ,{{ orderRefund.express }}{{ orderRefund.expressNo }}
  42. </template>
  43. </view>
  44. <view style="font-size: 12px; color: #999999">
  45. {{ orderRefund.refundMethod == 1 ? orderRefund.expressTime : orderRefund.refundGoodReviewTime }}
  46. </view>
  47. </view>
  48. <view v-if="state == 40 || state == 39 || state == 41">
  49. <view style="font-size: 14px; color: #fe0419">商品已接收,等待支付中</view>
  50. <view style="font-size: 12px; color: #999999">{{ orderRefund.receiveTime }}</view>
  51. </view>
  52. </template>
  53. <view v-if="state >= 42">
  54. <view style="font-size: 14px; color: #fe0419">{{ state == 43 ? '退款完成' : '退款失败' }}</view>
  55. <view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
  56. </view>
  57. <image src="../merchant/static/images/tuikuan.png" />
  58. </view>
  59. </view>
  60. </view>
  61. <!-- <view class="tihuo dflex" v-if="mode == 1&&orderType != 17 && orderType != 18">
  62. <view class="tihuoma dflex" >
  63. <image src="../merchant/static/images/thico.png" />
  64. 提货号码:
  65. <span v-text="code"></span>
  66. </view>
  67. </view> -->
  68. <!-- 门店自提 -->
  69. <!-- 物流配送 -->
  70. <view class="ddtop">
  71. <ul class="ddstatus" v-if="state < 8 && state >= 1 && mode == 2">
  72. <li :class="{ ing: state >= 1 }">
  73. <span></span>
  74. 待付款
  75. </li>
  76. <li :class="{ ing: state >= 3 }">
  77. <span></span>
  78. 待发货
  79. </li>
  80. <li :class="{ ing: state >= 5 }" v-if="state != 4">
  81. <span></span>
  82. 待收货
  83. </li>
  84. <li :class="{ ing: state == 7 }">
  85. <span></span>
  86. 已完成
  87. </li>
  88. </ul>
  89. <!-- 退货 -->
  90. <ul class="ddstatus" v-if="state >= 39 || state >= 30">
  91. <li :class="{ ing: state >= 39 || state >= 30 }">
  92. <span></span>
  93. 待审核
  94. </li>
  95. <li :class="{ ing: state == 32 }" v-if="state == 32">
  96. <span></span>
  97. 审核失败
  98. </li>
  99. <template v-else>
  100. <template v-if="orderRefund.refundType == 2 && orderRefund.refundMethod == 1">
  101. <li :class="{ ing: state >= 35 }">
  102. <span></span>
  103. 待寄回
  104. </li>
  105. <li :class="{ ing: state >= 36 }">
  106. <span></span>
  107. 退货中
  108. </li>
  109. </template>
  110. <template v-if="(orderRefund.refundType == 2 && orderRefund.refundMethod == 2) || orderRefund.refundMethod == 3">
  111. <li :class="{ ing: state >= 36 }">
  112. <span></span>
  113. 退货中
  114. </li>
  115. </template>
  116. <li
  117. :class="{
  118. ing: (state >= 41 && orderRefund.refundType == 1) || (state >= 39 && orderRefund.refundType == 2)
  119. }"
  120. v-if="state != 4"
  121. >
  122. <span></span>
  123. 退款中
  124. </li>
  125. <li :class="{ ing: state >= 42 }">
  126. <span></span>
  127. 已退款
  128. </li>
  129. </template>
  130. </ul>
  131. <view class="addr" v-if="mode == 2">
  132. <span class="areas">地址:{{ order.address }}</span>
  133. <view
  134. style="
  135. display: flex;
  136. align-items: center;
  137. margin: 0.2rem 0 0;
  138. justify-content: space-between;
  139. "
  140. >
  141. <view>
  142. 收货人: {{ name }}
  143. <span>{{ phone }}</span>
  144. </view>
  145. </view>
  146. <image src="../merchant/static/images/dzbg.png" class="dzbg" />
  147. </view>
  148. <view class="addr" v-if="mode == 1&&orderType != 17 && orderType != 18">
  149. <span class="areas">门店:{{ shopName ? shopName : merchantName }}</span>
  150. <view
  151. style="
  152. display: flex;
  153. align-items: center;
  154. margin: 0.2rem 0 0;
  155. justify-content: space-between;
  156. "
  157. >
  158. <view>
  159. 提货人: {{ name }}
  160. <span>{{ phone }}</span>
  161. </view>
  162. </view>
  163. <image src="../merchant/static/images/dzbg.png" class="dzbg" />
  164. </view>
  165. <!-- 物流配送 -->
  166. <view class="lists ddlist">
  167. <ul class="list bgfff" v-for="(items, index) in order.deliverList" :key="index">
  168. <view class="lis" v-for="(pro, index1) in items.extendDTOList" :key="index1">
  169. <view class="cimgs"><image :src="pro.pic" class="cimg" /></view>
  170. <view class="zhinfo">
  171. <view class="zhtit" v-text="pro.productName"></view>
  172. <view v-if="pro.specsList&&pro.specsList.length>0" class="guige">规格:
  173. <text v-for="(itemGuige, index) in pro.specsList" :key="index" class="guige" decode="true">{{itemGuige.value}}&nbsp;
  174. </text>
  175. </view>
  176. <view class="jiage">
  177. <view class="price">
  178. <span>¥</span>
  179. {{ pro.money }}
  180. </view>
  181. <view class="num">×{{ pro.deliverQuantity }}</view>
  182. </view>
  183. <view class="pro-tui" v-if="pro.refundOrderList&&pro.refundOrderList.length>0"><text>售后</text>{{pro.refundOrderList.length}}</view>
  184. </view>
  185. </view>
  186. </ul>
  187. </view>
  188. </view>
  189. <ul class="ddinfo">
  190. <li>
  191. <span>订单编号</span>
  192. <view v-text="id"></view>
  193. </li>
  194. <li>
  195. <span>创建时间</span>
  196. <view v-text="createDate"></view>
  197. </li>
  198. <li v-if="deliverTime">
  199. <span>发货时间</span>
  200. <view v-text="deliverTime"></view>
  201. </li>
  202. <li>
  203. <span>订单金额</span>
  204. <view class="price">¥{{ money }}</view>
  205. </li>
  206. <li v-if="discountMoney">
  207. <span>优惠券</span>
  208. <view class="price">-¥{{ discountMoney }}</view>
  209. </li>
  210. <li>
  211. <span>支付金额</span>
  212. <view class="price">¥{{ payMoney }}</view>
  213. </li>
  214. </ul>
  215. <ul class="ddinfo">
  216. <li>
  217. <span>备注:</span>
  218. <view v-text="note ? note : '无'">速速发货!</view>
  219. </li>
  220. </ul>
  221. <view class="bot">
  222. <!-- <a href="javascript:;" class="sta-btn">取消</a> -->
  223. <view class="sta-btn" v-if="merchant.printer != 0 && (state == 3 || state == 4)" color="#FE0419" @click="orderPrinting(id, index)">打印小票</view>
  224. <!-- <view class="sta-btn" @click="jumpUrl('refund?id=' + id)" v-if="state > 29 && state < 41 && state != 32">审核</view> -->
  225. <view class="sta-btn" v-if="state == 3" @click="deliverGoods(id, merchantId, orderType)">确认发货</view>
  226. <block v-if="orderType != 17 && orderType != 18">
  227. <view class="sta-btn" @click="send(id)" color="#FE0419" v-if="state === 4">通知取件</view>
  228. <view class="sta-btn" @click="deliver(id, index,'订单提货成功')" color="#FE0419" v-if="state === 4">提货</view>
  229. </block>
  230. <block v-else>
  231. <view class="sta-btn" @click="deliver(id, index,'订单核销成功')" color="#FE0419" v-if="state === 4">核销</view>
  232. </block>
  233. </view>
  234. </view>
  235. </view>
  236. </template>
  237. <script>
  238. // import wx from 'weixin-jsapi'
  239. const req = require('../utils/request');
  240. export default {
  241. data() {
  242. return {
  243. isShowView: false,
  244. id: '',
  245. note: '',
  246. money: 0,
  247. mode: 1,
  248. code: '',
  249. createDate: '',
  250. discountMoney: '',
  251. payMoney: '',
  252. deliverTime: '',
  253. products: [],
  254. orderType: 1,
  255. state: 1,
  256. order: '',
  257. orderRefund: {},
  258. show: false,
  259. merchant: {},
  260. express: '',
  261. reason: '',
  262. merchantName: '',
  263. shopName: '',
  264. name: '',
  265. phone: '',
  266. imgUrl: [],
  267. imgIndex: 0,
  268. imgShow: false,
  269. index: '',
  270. Refundstate: '',
  271. title: '',
  272. hinde: false,
  273. receivingGoods: false,
  274. refundReason: {},
  275. refundFalseRes: '',
  276. refundType: '',
  277. refundMethod: '',
  278. action: false,
  279. actions: [
  280. {
  281. name: '只退款'
  282. },
  283. {
  284. name: '退货并退款'
  285. }
  286. ],
  287. refundTypenum: '',
  288. merchantId: ''
  289. };
  290. },
  291. onLoad(opt) {
  292. this.id = opt.id;
  293. this.merchantId = opt.merchantId;
  294. this.isPrinting();
  295. this.loadDetail();
  296. },
  297. onShow() {},
  298. methods: {
  299. jumpUrl(url) {
  300. uni.navigateTo({
  301. url: url
  302. });
  303. },
  304. // s是否开启云打印
  305. isPrinting() {
  306. let fromP = {};
  307. fromP.id = this.merchantId;
  308. req.getRequest('/api/merchant/detail', fromP, data => {
  309. this.merchant = data;
  310. });
  311. },
  312. // deliverGoods() {
  313. // uni.navigateTo({
  314. // url: 'express?orderId=' + this.orderId + '&id=' + this.deliverId + '&supplierId=' + this.supplierId
  315. // });
  316. // },
  317. // 确认发货
  318. deliverGoods(id, merchantId, orderType) {
  319. req.postRequest(
  320. '/api/order/deliverExtend',
  321. {
  322. id: id
  323. },
  324. res => {
  325. if (res && res.length > 1) {
  326. this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
  327. }
  328. if (res && res.length <= 1) {
  329. this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
  330. }
  331. },
  332. true
  333. );
  334. },
  335. // 已提货
  336. deliver(id, index,text) {
  337. req.postRequest(
  338. '/api/order/confirm',
  339. {
  340. id: id,
  341. mode: '1'
  342. },
  343. data => {
  344. uni.showModal({
  345. title: '提示',
  346. content: text,
  347. confirmText: '确定',
  348. success(res) {
  349. if (res.confirm) {
  350. uni.navigateBack();
  351. }
  352. }
  353. })
  354. },
  355. true
  356. );
  357. },
  358. // 通知取件
  359. send(id) {
  360. req.getRequest(
  361. '/api/wxmes/send',
  362. {
  363. orderId: id,
  364. bsusinessType: 11
  365. },
  366. data => {
  367. req.msg('通知成功');
  368. },
  369. true
  370. );
  371. },
  372. // 打印
  373. orderPrinting(id, index) {
  374. req.getRequest(
  375. '/api/merchant/printOrderInfo',
  376. id,
  377. data => {
  378. req.msg(data.msg);
  379. },
  380. true
  381. );
  382. },
  383. loadDetail() {
  384. let from = {
  385. id: this.id
  386. };
  387. req.getRequest(
  388. '/api/order/detail',
  389. from,
  390. data => {
  391. this.order = data;
  392. for (let key in data) {
  393. this[key] = data[key];
  394. }
  395. if (data.state >= 30 && data.state <= 43) {
  396. this.refundDetail();
  397. // this.refundExpress();
  398. }
  399. this.isShowView = true;
  400. },
  401. true
  402. );
  403. },
  404. //获取退货详情
  405. refundDetail() {
  406. req.getRequest(
  407. '/api/orderRefund/queryRefund',
  408. {
  409. orderId: this.id
  410. },
  411. data => {
  412. this.orderRefund = data;
  413. if (data.refundMethod == 1) {
  414. this.refundMethod = '邮寄';
  415. } else if (data.refundMethod == 2) {
  416. this.refundMethod = '送回门店';
  417. } else if (data.refundMethod == 3) {
  418. this.refundMethod = '货物拒收';
  419. }
  420. if (data.refundType == 1) {
  421. this.refundType = '只退款';
  422. } else if (data.refundType == 2) {
  423. this.refundType = '退款并退货';
  424. }
  425. },
  426. true
  427. );
  428. }
  429. }
  430. };
  431. </script>
  432. <style scoped>
  433. @import './static/css/main.css';
  434. .dpname {
  435. display: flex;
  436. display: -webkit-flex;
  437. align-items: center;
  438. font-size: 13px;
  439. color: #333;
  440. padding: 25rpx 20rpx;
  441. border-bottom: 2rpx solid #eee;
  442. }
  443. .dpname image {
  444. width: 32rpx;
  445. height: 27rpx;
  446. margin-right: 15rpx;
  447. }
  448. .tabe {
  449. font-size: 24rpx;
  450. color: #999;
  451. line-height: 40rpx;
  452. margin-top: 15rpx;
  453. }
  454. .expressinfo {
  455. display: flex;
  456. justify-content: space-between;
  457. margin-bottom: 10px;
  458. }
  459. .pad20 {
  460. padding: 20px;
  461. }
  462. .refundFalseRes {
  463. text-align: right;
  464. }
  465. .van-button:not(:last-child) {
  466. margin-right: 5px;
  467. }
  468. .bot {
  469. height: 70rpx;
  470. justify-content: center;
  471. }
  472. .sta-btn {
  473. /* background: #fe0419; */
  474. border-color: #fe0419;
  475. color: #fe0419;
  476. width: 100%;
  477. height: 70rpx;
  478. line-height: 70rpx;
  479. font-size: 30rpx;
  480. }
  481. </style>