show - 副本.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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">
  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">
  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">
  168. <view class="lis" v-for="(pro, ind) in products" :key="ind">
  169. <view class="cimgs"><image :src="pro.pic" class="cimg" /></view>
  170. <view class="zhinfo">
  171. <view class="zhtit" v-text="pro.title"></view>
  172. <view v-if="pro.propertiesList&&pro.propertiesList.length>0" class="guige">规格:
  173. <text v-for="(itemGuige, index) in pro.propertiesList" :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.salePrice }}
  180. </view>
  181. <view class="num">×{{ pro.quantity }}</view>
  182. </view>
  183. </view>
  184. </view>
  185. </ul>
  186. </view>
  187. </view>
  188. <ul class="ddinfo">
  189. <li>
  190. <span>订单编号</span>
  191. <view v-text="id"></view>
  192. </li>
  193. <li>
  194. <span>创建时间</span>
  195. <view v-text="createDate"></view>
  196. </li>
  197. <li v-if="deliverTime">
  198. <span>发货时间</span>
  199. <view v-text="deliverTime"></view>
  200. </li>
  201. <li>
  202. <span>订单金额</span>
  203. <view class="price">¥{{ money }}</view>
  204. </li>
  205. <li v-if="discountMoney">
  206. <span>优惠券</span>
  207. <view class="price">-¥{{ discountMoney }}</view>
  208. </li>
  209. <li>
  210. <span>支付金额</span>
  211. <view class="price">¥{{ payMoney }}</view>
  212. </li>
  213. </ul>
  214. <ul class="ddinfo">
  215. <li>
  216. <span>备注:</span>
  217. <view v-text="note ? note : '无'">速速发货!</view>
  218. </li>
  219. </ul>
  220. <view class="bot">
  221. <!-- <a href="javascript:;" class="sta-btn">取消</a> -->
  222. <view class="sta-btn" v-if="merchant.printer != 0 && (state == 3 || state == 4)" color="#FE0419" @click="orderPrinting(id, index)">打印小票</view>
  223. <!-- <view class="sta-btn" @click="jumpUrl('refund?id=' + id)" v-if="state > 29 && state < 41 && state != 32">审核</view> -->
  224. <view class="sta-btn" v-if="state == 3" @click="deliverGoods(id, merchantId, orderType)">确认发货</view>
  225. <view class="sta-btn" @click="send(id)" color="#FE0419" v-if="state === 4">通知取件</view>
  226. <view class="sta-btn" @click="deliver(id, index)" color="#FE0419" v-if="state === 4">已提货</view>
  227. </view>
  228. </view>
  229. </view>
  230. </template>
  231. <script>
  232. // import wx from 'weixin-jsapi'
  233. const req = require('../utils/request');
  234. export default {
  235. data() {
  236. return {
  237. isShowView: false,
  238. id: '',
  239. note: '',
  240. money: 0,
  241. mode: 1,
  242. code: '',
  243. createDate: '',
  244. discountMoney: '',
  245. payMoney: '',
  246. deliverTime: '',
  247. products: [],
  248. orderType: 1,
  249. state: 1,
  250. order: '',
  251. orderRefund: {},
  252. show: false,
  253. merchant: {},
  254. express: '',
  255. reason: '',
  256. merchantName: '',
  257. shopName: '',
  258. name: '',
  259. phone: '',
  260. imgUrl: [],
  261. imgIndex: 0,
  262. imgShow: false,
  263. id: '',
  264. index: '',
  265. Refundstate: '',
  266. title: '',
  267. hinde: false,
  268. receivingGoods: false,
  269. refundReason: {},
  270. refundFalseRes: '',
  271. refundType: '',
  272. refundMethod: '',
  273. action: false,
  274. actions: [
  275. {
  276. name: '只退款'
  277. },
  278. {
  279. name: '退货并退款'
  280. }
  281. ],
  282. refundTypenum: '',
  283. merchantId: ''
  284. };
  285. },
  286. onLoad(opt) {
  287. this.id = opt.id;
  288. this.merchantId = opt.merchantId;
  289. this.isPrinting();
  290. this.loadDetail();
  291. },
  292. onShow() {},
  293. methods: {
  294. jumpUrl(url) {
  295. uni.navigateTo({
  296. url: url
  297. });
  298. },
  299. // s是否开启云打印
  300. isPrinting() {
  301. let fromP = {};
  302. fromP.id = this.merchantId;
  303. req.getRequest('/api/merchant/detail', fromP, data => {
  304. this.merchant = data;
  305. });
  306. },
  307. deliverGoods() {
  308. uni.navigateTo({
  309. url: 'express?orderId=' + this.orderId + '&id=' + this.deliverId + '&supplierId=' + this.supplierId
  310. });
  311. },
  312. // 确认发货
  313. deliverGoods(id, merchantId, orderType) {
  314. req.postRequest(
  315. '/api/order/deliverExtend',
  316. {
  317. id: id
  318. },
  319. res => {
  320. if (res && res.length > 1) {
  321. this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
  322. }
  323. if (res && res.length <= 1) {
  324. this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
  325. }
  326. },
  327. true
  328. );
  329. },
  330. // 已提货
  331. deliver(id, index) {
  332. req.postRequest(
  333. '/api/order/confirm',
  334. {
  335. id: id,
  336. mode: '1'
  337. },
  338. data => {
  339. this.pageList[index].state = 6;
  340. this.pageList[index].stateName = '已签收';
  341. },
  342. true
  343. );
  344. },
  345. // 通知取件
  346. send(id) {
  347. req.getRequest(
  348. '/api/wxmes/send',
  349. {
  350. orderId: id,
  351. bsusinessType: 11
  352. },
  353. data => {
  354. req.msg('通知成功');
  355. },
  356. true
  357. );
  358. },
  359. // 打印
  360. orderPrinting(id, index) {
  361. req.getRequest(
  362. '/api/merchant/printOrderInfo',
  363. id,
  364. data => {
  365. req.msg(data.msg);
  366. },
  367. true
  368. );
  369. },
  370. loadDetail() {
  371. let from = {
  372. id: this.id
  373. };
  374. req.getRequest(
  375. '/api/order/detail',
  376. from,
  377. data => {
  378. this.order = data;
  379. for (let key in data) {
  380. this[key] = data[key];
  381. }
  382. if (data.state >= 30 && data.state <= 43) {
  383. this.refundDetail();
  384. // this.refundExpress();
  385. }
  386. this.isShowView = true;
  387. },
  388. true
  389. );
  390. },
  391. //获取退货详情
  392. refundDetail() {
  393. req.getRequest(
  394. '/api/orderRefund/queryRefund',
  395. {
  396. orderId: this.id
  397. },
  398. data => {
  399. this.orderRefund = data;
  400. if (data.refundMethod == 1) {
  401. this.refundMethod = '邮寄';
  402. } else if (data.refundMethod == 2) {
  403. this.refundMethod = '送回门店';
  404. } else if (data.refundMethod == 3) {
  405. this.refundMethod = '货物拒收';
  406. }
  407. if (data.refundType == 1) {
  408. this.refundType = '只退款';
  409. } else if (data.refundType == 2) {
  410. this.refundType = '退款并退货';
  411. }
  412. },
  413. true
  414. );
  415. }
  416. }
  417. };
  418. </script>
  419. <style scoped>
  420. @import './static/css/main.css';
  421. .dpname {
  422. display: flex;
  423. display: -webkit-flex;
  424. align-items: center;
  425. font-size: 13px;
  426. color: #333;
  427. padding: 25rpx 20rpx;
  428. border-bottom: 2rpx solid #eee;
  429. }
  430. .dpname image {
  431. width: 32rpx;
  432. height: 27rpx;
  433. margin-right: 15rpx;
  434. }
  435. .tabe {
  436. font-size: 24rpx;
  437. color: #999;
  438. line-height: 40rpx;
  439. margin-top: 15rpx;
  440. }
  441. .expressinfo {
  442. display: flex;
  443. justify-content: space-between;
  444. margin-bottom: 10px;
  445. }
  446. .pad20 {
  447. padding: 20px;
  448. }
  449. .refundFalseRes {
  450. text-align: right;
  451. }
  452. .van-button:not(:last-child) {
  453. margin-right: 5px;
  454. }
  455. .bot {
  456. height: 70rpx;
  457. justify-content: center;
  458. }
  459. .sta-btn {
  460. /* background: #fe0419; */
  461. border-color: #fe0419;
  462. color: #fe0419;
  463. width: 100%;
  464. height: 70rpx;
  465. line-height: 70rpx;
  466. font-size: 30rpx;
  467. }
  468. </style>