details.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. <template>
  2. <view>
  3. <!--标题栏-->
  4. <bar-title bgColor="bg-white" isBack>
  5. <block slot="content">订单详情</block>
  6. </bar-title>
  7. <!--步骤条区域-->
  8. <!-- 有退款 -->
  9. <view class="bg-white padding solid-top" v-if="info.refund_status == 1">
  10. <!--步骤条-->
  11. <view class="cu-steps">
  12. <block v-for="(item,index) in info.refund_status_list" :key="index">
  13. <view class="cu-item" :class="item.selected?'select':''">
  14. <view class="icon-view" v-if="!item.selected">
  15. <text class="text-red" :class="'cuIcon-' + iconlist[index-1]"></text>
  16. </view>
  17. <view class="bg-red icon-view" v-else>
  18. <text :class="'cuIcon-' + iconlist[index-1]"></text>
  19. </view>
  20. <view class="text-sm text-black" v-if="!item.selected">{{item.name}}</view>
  21. <view class="text-sm text-black" v-else>{{item.name}}</view>
  22. </view>
  23. </block>
  24. </view>
  25. <!--提示-->
  26. <view class="text-sm text-center margin-top">
  27. <view class="text-black">{{info.refund.desc}}</view>
  28. </view>
  29. </view>
  30. <!-- 无退款 -->
  31. <view class="bg-white padding solid-top" v-if="info.status !== 9">
  32. <!--步骤条-->
  33. <view class="cu-steps">
  34. <block v-for="(item,index) in info.status_list" :key="index">
  35. <view class="cu-item" :class="item.selected?'select':''">
  36. <view class="icon-view" v-if="!item.selected">
  37. <text class="text-red" :class="'cuIcon-' + iconlist[index-1]"></text>
  38. </view>
  39. <view class="bg-red icon-view" v-else>
  40. <text :class="'cuIcon-' + iconlist[index-1]"></text>
  41. </view>
  42. <view class="text-sm text-black" v-if="!item.selected">{{item.name}}</view>
  43. <view class="text-sm text-black" v-else>{{item.name}}</view>
  44. </view>
  45. </block>
  46. </view>
  47. <!--提示-->
  48. <view class="text-sm text-center margin-top" v-if="info.status !== 5">
  49. <view class="text-black">{{info.status_msg}}</view>
  50. <view class="text-black" v-if="info.status == 4">
  51. <text class="text-red">9天23小时57分</text>
  52. <text>后将自动确认收货</text>
  53. </view>
  54. <view class="text-black" v-if="info.status == 1">
  55. <text class="text-red">{{info.time}}分</text>
  56. <text>后未支付,订单将自动关闭。</text>
  57. </view>
  58. </view>
  59. </view>
  60. <!--状态图标-->
  61. <view class="bg-white padding solid-top text-center zaiui-status-img-view" v-if="info.status == 5">
  62. <view class="are-img-view" @tap="cancel = true">
  63. <image class="are-img" src="/static/zaiui/img/are.png" mode="widthFix"/>
  64. </view>
  65. <view class="text-sm text-black">交易成功,待发表评价</view>
  66. </view>
  67. <!--状态图标-->
  68. <view class="bg-white padding solid-top text-center zaiui-status-img-view" v-if="info.status == 9">
  69. <view class="are-img-view" @tap="cancel = false">
  70. <image class="are-img" src="/static/zaiui/img/arg.png" mode="widthFix"/>
  71. </view>
  72. <view class="text-sm text-black">订单已取消</view>
  73. </view>
  74. <!--广告区域-->
  75. <!-- <view class="bg-white zaiui-card-box" v-if="basics == 0">
  76. <view class="zaiui-card-view zaiui-goods-ad-view">
  77. <view class="cu-avatar radius lg" :style="[{backgroundImage:'url('+ bg_img +')'}]"/>
  78. <view class="goods-info-view">
  79. <text class="cu-tag bg-gradual-pink">现在卖最值钱</text>
  80. <view class="text-black">手机即刻变现</view>
  81. <view class="text-sm">
  82. <text>比回收平均多卖</text>
  83. <text class="text-red text-xl">42%</text>
  84. </view>
  85. </view>
  86. <view class="goods-btn-view">
  87. <button class="cu-btn bg-red radius sm">立即卖钱</button>
  88. </view>
  89. </view>
  90. </view> -->
  91. <!--物流信息-->
  92. <view class="bg-white zaiui-card-box" v-if="info.address">
  93. <view class="zaiui-card-view zaiui-address-view">
  94. <view class="text-lg text-bold text-black">物流信息</view>
  95. <view class="solid-line"></view>
  96. <view class="cu-list menu-avatar">
  97. <view class="cu-item">
  98. <view class="bg-grey icon-view">
  99. <text class="cuIcon-locationfill"/>
  100. </view>
  101. <view class="content">
  102. <view class="text-black">
  103. <text>收货人:</text>
  104. <text>{{info.address.name}}</text>
  105. <text class="margin-left">{{info.address.phone}}</text>
  106. </view>
  107. <view class="text-gray text-sm flex">
  108. <view class="text-cut">{{info.address.area_string}}{{info.address.address}}</view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <!--商品信息-->
  116. <view class="bg-white zaiui-card-box">
  117. <view class="zaiui-card-view zaiui-shop-view">
  118. <view class="shop-info-view">
  119. <view class="cu-avatar round sm" :style="[{backgroundImage:'url('+ info.pic +')'}]"/>
  120. <view class="text-black text-bold text-lg title-view">{{info.order_num}}</view>
  121. </view>
  122. <view class="goods-list-view" v-for="item in info.detail" :key="item.id">
  123. <view class="cu-avatar radius" :style="[{backgroundImage:'url('+ item.pic +')'}]"/>
  124. <view class="goods-info-view">
  125. <view class="text-black text-cut name">{{item.name}} </view>
  126. <view class="text-gray text-sm text-cut introduce">数量:x{{item.num}}, {{item.sku_name}}</view>
  127. <view class="text-cut tag-view">
  128. <!-- <text class="cu-tag sm line-blue radius">支持验机</text>
  129. <text class="cu-tag sm line-blue radius">专业质检</text> -->
  130. </view>
  131. <view class="text-red text-lg">{{item.cash}}</view>
  132. </view>
  133. </view>
  134. <!-- <view class="zaiui-foot-view">
  135. <view class="left-view">
  136. <image class="af5-img" src="/static/zaiui/img/af5.png" mode="widthFix"/>
  137. <text class="text-black">{{info.info}}</text>
  138. </view>
  139. <text class="text-black text-right">{{info.cash}}</text>
  140. </view> -->
  141. </view>
  142. </view>
  143. <!--商品金额-->
  144. <view class="bg-white zaiui-card-box">
  145. <view class="zaiui-card-view zaiui-price-view">
  146. <view class="text-black title-view">
  147. <view class="title">商品总额</view>
  148. <view class="text-right">
  149. <text>{{info.cash}}</text>
  150. </view>
  151. </view>
  152. <view class="text-black title-view">
  153. <view class="title">运费</view>
  154. <view class="text-right">
  155. <text class="margin-right-xs"></text>
  156. <text class="">{{info.yun}}</text>
  157. </view>
  158. </view>
  159. <!-- <view class="text-black title-view">
  160. <view class="title">特色服务费</view>
  161. <view class="text-right">
  162. <text class="margin-right-xs">+</text>
  163. <text class="text-price">39.00</text>
  164. </view>
  165. </view> -->
  166. <view class="text-black text-bold title-right-view">
  167. <text class="margin-right-xs">付款:</text>
  168. <text>{{info.cash}}</text>
  169. </view>
  170. <!-- <view class="solid-line"></view> -->
  171. <!-- <view class="text-center text-black">联系客服</view> -->
  172. </view>
  173. </view>
  174. <!--订单信息-->
  175. <view class="bg-white zaiui-card-box">
  176. <view class="zaiui-card-view zaiui-order-view">
  177. <view class="text-lg text-bold text-black">订单信息</view>
  178. <view class="solid-line"></view>
  179. <view class="text-black title-view">
  180. <view class="title">订单编号</view>
  181. <view class="text-right">
  182. <text class="margin-right-xs">{{info.order_num}}</text>
  183. <button class="cu-btn sm line-black" @click="copy">复制</button>
  184. </view>
  185. </view>
  186. <view class="text-black title-view">
  187. <view class="title">支付方式</view>
  188. <view class="text-right">
  189. <text>微信<block v-if="info.status<2">(未支付)</block></text>
  190. </view>
  191. </view>
  192. <view class="text-black title-view">
  193. <view class="title">下单时间</view>
  194. <view class="text-right">
  195. <text>{{info.cdate_str}}</text>
  196. </view>
  197. </view>
  198. <view class="text-black title-view" v-if="info.pdate_str">
  199. <view class="title">支付时间</view>
  200. <view class="text-right">
  201. <text>{{info.pdate_str}}</text>
  202. </view>
  203. </view>
  204. <view class="text-black title-view" v-if="info.ddate_str">
  205. <view class="title">发货时间</view>
  206. <view class="text-right">
  207. <text>{{info.ddate_str}}</text>
  208. </view>
  209. </view>
  210. <view class="text-black title-view" v-if="info.qdate_str">
  211. <view class="title">签收时间</view>
  212. <view class="text-right">
  213. <text>{{info.qdate_str}}</text>
  214. </view>
  215. </view>
  216. <view class="text-black title-view" v-if="info.fdate_str">
  217. <view class="title">完成时间</view>
  218. <view class="text-right">
  219. <text>{{info.fdate_str}}</text>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. <view class="bg-white zaiui-card-hight-box"/>
  225. <!--为您推荐-->
  226. <!-- <view class="zaiui-title-view">
  227. <view class="flex flex-wrap">
  228. <view class="basis-sm text-right">
  229. <image class="img-anc" src="/static/zaiui/img/anc.png" mode="widthFix"/>
  230. </view>
  231. <view class="basis-xs text-center">
  232. <text class="text-black text-lg">为您推荐</text>
  233. </view>
  234. <view class="basis-sm text-left">
  235. <image class="img-anc" src="/static/zaiui/img/anc.png" mode="widthFix"/>
  236. </view>
  237. </view>
  238. </view>
  239. -->
  240. <!--推荐列表-->
  241. <!-- <view class="zaiui-recommend-goods-list-view">
  242. <view class="flex flex-wrap">
  243. <view class="basis-df padding-sm padding-right-xs">
  244. <view class="bg-white margin-bottom-sm list-itme">
  245. <view class="cu-avatar" :style="[{backgroundImage:'url('+ bg_img +')'}]"/>
  246. <view class="goods-info-view">
  247. <view class="text-cut text-black">苹果X 苹果X256G无锁99新 有现货</view>
  248. <view class="text-price text-red text-lg">2199</view>
  249. <view class="foot-box">
  250. <view class="text-gray text-sm address">重庆 渝北</view>
  251. <text class="cu-tag line-red sm radius">找相似</text>
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. <view class="basis-df padding-sm padding-right-xs">
  257. <view class="bg-white margin-bottom-sm list-itme">
  258. <view class="cu-avatar" :style="[{backgroundImage:'url('+ bg_img +')'}]"/>
  259. <view class="goods-info-view">
  260. <view class="text-cut text-black">苹果X 苹果X256G无锁99新 有现货</view>
  261. <view class="text-price text-red text-lg">2199</view>
  262. <view class="foot-box">
  263. <view class="text-gray text-sm address">重庆 渝北</view>
  264. <text class="cu-tag line-red sm radius">找相似</text>
  265. </view>
  266. </view>
  267. </view>
  268. </view>
  269. <view class="basis-df padding-sm padding-right-xs">
  270. <view class="bg-white margin-bottom-sm list-itme">
  271. <view class="cu-avatar" :style="[{backgroundImage:'url('+ bg_img +')'}]"/>
  272. <view class="goods-info-view">
  273. <view class="text-cut text-black">苹果X 苹果X256G无锁99新 有现货</view>
  274. <view class="text-price text-red text-lg">2199</view>
  275. <view class="foot-box">
  276. <view class="text-gray text-sm address">重庆 渝北</view>
  277. <text class="cu-tag line-red sm radius">找相似</text>
  278. </view>
  279. </view>
  280. </view>
  281. </view>
  282. <view class="basis-df padding-sm padding-right-xs">
  283. <view class="bg-white margin-bottom-sm list-itme">
  284. <view class="cu-avatar" :style="[{backgroundImage:'url('+ bg_img +')'}]"/>
  285. <view class="goods-info-view">
  286. <view class="text-cut text-black">苹果X 苹果X256G无锁99新 有现货</view>
  287. <view class="text-price text-red text-lg">2199</view>
  288. <view class="foot-box">
  289. <view class="text-gray text-sm address">重庆 渝北</view>
  290. <text class="cu-tag line-red sm radius">找相似</text>
  291. </view>
  292. </view>
  293. </view>
  294. </view>
  295. </view>
  296. </view>
  297. -->
  298. <!--底部-->
  299. <view class="foot-hight-view"/>
  300. <block v-if="info.refund_status == 1">
  301. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom" v-if="info.refund.status == 2">
  302. <!-- <button class="cu-btn bg-orange sm" @tap="nextTap">测试下一步</button> -->
  303. <button class="cu-btn line-black radius" @click="refundGoods">退货发货</button>
  304. </view>
  305. </block>
  306. <block v-else>
  307. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom" v-if="info.status == 1">
  308. <!-- <button class="cu-btn bg-orange sm" @tap="nextTap">测试下一步</button> -->
  309. <button class="cu-btn line-black radius" @click="cancelOrder">取消订单</button>
  310. <button class="cu-btn bg-red">确认支付</button>
  311. </view>
  312. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom" v-if="info.status == 2">
  313. <!-- <button class="cu-btn bg-orange sm" @tap="nextTap">测试下一步</button> -->
  314. <button class="cu-btn line-black radius" @click="toRefund">申请退款</button>
  315. <!-- <button class="cu-btn bg-red">提醒发货</button> -->
  316. </view>
  317. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom" v-if="info.status == 3">
  318. <!-- <button class="cu-btn bg-orange sm" @tap="nextTap">测试下一步</button> -->
  319. <button class="cu-btn line-black radius" @click="toRefund">申请退款</button>
  320. </view>
  321. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom" v-if="info.status == 4">
  322. <!-- <button class="cu-btn bg-orange sm" @tap="nextTap">测试下一步</button> -->
  323. <button class="cu-btn line-black radius" @click="toRefund">申请退款</button>
  324. <button class="cu-btn bg-red" @tap="confirmReceipt">确认收货</button>
  325. </view>
  326. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom" v-if="info.status == 5">
  327. <!-- <button class="cu-btn bg-orange sm" @tap="nextTap">测试第一步</button> -->
  328. <button class="cu-btn line-black radius" @tap="appraiseTap">发表评价</button>
  329. <!-- <button class="cu-btn bg-red">查看钱款去向</button> -->
  330. </view>
  331. </block>
  332. <!--弹出框-->
  333. <view class="cu-modal bottom-modal" :class="bottomModal?'show':''">
  334. <view class="cu-dialog">
  335. <view class="cu-form-group margin-top">
  336. <view class="title">申请类型</view>
  337. <picker @change="expressPickerChange" :value="expressIndex" :range="expressList" range-key="name">
  338. <view class="picker">
  339. {{expressList[expressIndex] && expressList[expressIndex].name}}
  340. </view>
  341. </picker>
  342. </view>
  343. <view class="cu-form-group">
  344. <view class="title">快递单号</view>
  345. <input placeholder="请输入快递单号" v-model="number"></input>
  346. </view>
  347. <view class="zaiui-footer" style="padding: 20upx;">
  348. <view class="flex flex-direction">
  349. <button class="cu-btn bg-red lg" @click="submitExpress">确定</button>
  350. </view>
  351. </view>
  352. </view>
  353. </view>
  354. </view>
  355. </template>
  356. <script>
  357. import barTitle from '@/components/zaiui-common/basics/bar-title';
  358. import _tool from '@/static/zaiui/util/tools.js'; //工具函数
  359. export default {
  360. components: {
  361. barTitle
  362. },
  363. data() {
  364. return {
  365. id: '',
  366. basics: 0, bg_img: '/static/images/home/goods/1.png', avatar: '/static/images/avatar/1.jpg', cancel: false,
  367. iconlist: ['cartfill','card','deliver_fill','formfill','presentfill'],
  368. bottomModal: false,
  369. codeKey: [],
  370. btnKey: true,
  371. info: {},
  372. expressList: [],
  373. expressIndex: 0,
  374. number: ''
  375. }
  376. },
  377. onLoad(options) {
  378. this.id = options.id;
  379. this.loadInfo()
  380. },
  381. onReady() {
  382. _tool.setBarColor(true);
  383. uni.pageScrollTo({
  384. scrollTop: 0,
  385. duration: 0
  386. });
  387. },
  388. methods: {
  389. copy() {
  390. uni.setClipboardData({
  391. data: this.info.order_num
  392. })
  393. },
  394. expressPickerChange(e) {
  395. this.expressIndex = e.detail.value
  396. },
  397. refundGoods() {
  398. this.loadExpress()
  399. this.bottomModal = true
  400. },
  401. loadExpress() {
  402. this.reqByuser({
  403. url: '?l=resource.express',
  404. data: {
  405. type: 3,
  406. id: this.id
  407. },
  408. success: res => {
  409. if(res.data.status == 1) {
  410. this.expressList = res.data.data.express;
  411. }else {
  412. uni.showToast({
  413. icon: 'error',
  414. title: res.data.msg
  415. })
  416. }
  417. }
  418. })
  419. },
  420. submitExpress() {
  421. this.reqByuser({
  422. url: '?l=resource.expressAct',
  423. data: {
  424. type: 3,
  425. id: this.id,
  426. number: this.number,
  427. express_id: this.expressList[this.expressIndex].id
  428. },
  429. success: res => {
  430. if(res.data.status == 1) {
  431. uni.showToast({
  432. icon: 'success',
  433. title: '提交成功'
  434. })
  435. this.bottomModal = false
  436. }else {
  437. uni.showToast({
  438. icon: 'error',
  439. title: res.data.msg
  440. })
  441. }
  442. }
  443. })
  444. },
  445. loadInfo() {
  446. this.reqByuser({
  447. url: '?l=resource.getOrderView',
  448. data: {
  449. type: 3,
  450. id: this.id
  451. },
  452. success: res => {
  453. if(res.data.status == 1) {
  454. this.info = res.data.data.info;
  455. }else {
  456. uni.showToast({
  457. icon: 'error',
  458. title: res.data.msg
  459. })
  460. }
  461. }
  462. })
  463. },
  464. cancelOrder() {
  465. uni.showModal({
  466. title: '提醒',
  467. content: '您确认要取消订单吗',
  468. confirmText: '确认',
  469. class: 'zaiui-modal',
  470. success: res => {
  471. if (res.confirm) {
  472. this.reqByuser({
  473. url: '?l=resource.upOrderCancel',
  474. data: {
  475. type: 3,
  476. id: this.id
  477. },
  478. success: res => {
  479. if(res.data.status == 1) {
  480. uni.showToast({
  481. icon: 'success',
  482. title: '提交成功'
  483. })
  484. this.loadInfo()
  485. }else {
  486. uni.showToast({
  487. icon: 'error',
  488. title: res.data.msg
  489. })
  490. }
  491. }
  492. })
  493. }
  494. }
  495. });
  496. },
  497. confirmReceipt() {
  498. uni.showModal({
  499. title: '收货提醒',
  500. content: '请务必确认已收到商品后再确认收货,让您提前确认收货的都是骗子、不走平台交易的都是骗子、让您私下打款的都是骗子',
  501. confirmText: '确认收货',
  502. confirmColor: '#0081ff',
  503. class: 'zaiui-modal',
  504. success: res => {
  505. if (res.confirm) {
  506. this.reqByuser({
  507. url: '?l=resource.upOrderFinish',
  508. data: {
  509. type: 3,
  510. id: this.id
  511. },
  512. success: res => {
  513. if(res.data.status == 1) {
  514. uni.showToast({
  515. icon: 'success',
  516. title: '提交成功'
  517. })
  518. this.loadInfo()
  519. }else {
  520. uni.showToast({
  521. icon: 'error',
  522. title: res.data.msg
  523. })
  524. }
  525. }
  526. })
  527. }
  528. }
  529. });
  530. },
  531. closeModalTap () {
  532. this.bottomModal = false;
  533. },
  534. codeKeyTap (index) {
  535. if(this.codeKey.length < 4) {
  536. this.codeKey.push(index);
  537. }
  538. },
  539. codeKeyDelTap() {
  540. this.codeKey.pop();
  541. },
  542. getCodeKey() {
  543. this.btnKey = false;
  544. },
  545. appraiseTap() {
  546. uni.navigateTo({
  547. url: "/pages/order/appraise?id="+this.id
  548. });
  549. },
  550. toRefund() {
  551. uni.navigateTo({
  552. url: '/pages/order/refund?id='+this.id
  553. })
  554. }
  555. }
  556. }
  557. </script>
  558. <style lang="scss">
  559. /* #ifdef APP-PLUS */
  560. @import "../../static/colorui/main.css";
  561. @import "../../static/colorui/icon.css";
  562. @import "../../static/zaiui/style/app.scss";
  563. /* #endif */
  564. @import "../../static/zaiui/style/order-details.scss";
  565. </style>