order-detail.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. <template>
  2. <!--pages/order-detail/order-detail.wxml-->
  3. <view class="container">
  4. <view class="order-detail">
  5. <!-- 订单状态 -->
  6. <view class="order-status">
  7. <view class="status-bg"><image src="/static/images/icon/status-bg.png" /></view>
  8. <view class="status-text">{{ ['','等待买家支付','等待商家发货','等待买家收货','订单已完成','订单已完成','订单已取消','正在拼团中'][status] }}</view>
  9. <view class="step">
  10. <view :class="['item',status==2 || (orderMold == 1 && status == 3) || (status == 6 && orderItemDtos[0].refundSn) || status==4 || status==5 ? 'active' : '']">
  11. <view class="select" />
  12. <view class="des">买家付款</view>
  13. </view>
  14. <!-- <view :class="['item',(dvyType == 2 && status==2) || (dvyType != 2 && status==3)?'active':'']">
  15. <view class="select"></view>
  16. <view class="des">商家发货</view>
  17. </view> -->
  18. <view v-if="dvyType == 2" :class="['item',status==3 || status==4 || status==5 ? 'active' : '']">
  19. <view class="select" />
  20. <view class="des">买家提货</view>
  21. </view>
  22. <view :class="['item',status==4||status==5?'active':'']">
  23. <view class="select" />
  24. <view class="des">交易完成</view>
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 配送地址 -->
  29. <!-- <view class="address-box" v-if="dvyType == 1 && userAddrDto">
  30. <view class="img"><image src="/static/images/icon/addr.png"></image></view>
  31. <view class="user-info">
  32. <view class="name">{{userAddrDto.receiver}}</view>
  33. <view class="phone">{{userAddrDto.mobile}}</view>
  34. </view>
  35. <view class="address-detail">{{userAddrDto.province}}{{userAddrDto.city}}{{userAddrDto.area}}{{userAddrDto.area}}{{userAddrDto.addr}}</view>
  36. </view> -->
  37. <!-- 自提地址 -->
  38. <!-- <view class="delivery-certificate" v-if="dvyType == 2">
  39. <view class="tit">提货凭证</view>
  40. <view class="address">
  41. <view class="text">{{stationAddress}}</view>
  42. <view class="icon-box">
  43. <view class="icon" @tap="callStation"><image src="/static/images/icon/phone.png"></image></view>
  44. <view class="icon bl" @tap="openMap"><image src="/static/images/icon/addr.png"></image></view>
  45. </view>
  46. </view>
  47. <view class="code-box no-code" v-if="status == 1">
  48. <view class="text-box">
  49. <view class="item">
  50. <view class="i-lable">提 货 码:</view>
  51. <view class="i-text fw">{{stationCode?stationCode:'暂无提货码'}}</view>
  52. </view>
  53. <view class="item">
  54. <view class="i-lable">提 货 人:</view>
  55. <view class="i-text">{{stationUserName+' '+stationUserMobile}}</view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="code-box code-det" @tap="viewCertificate" v-if="status == 2">
  60. <view class="code">
  61. <image :src="stationQrCode"></image>
  62. </view>
  63. <view class="text-box">
  64. <view class="item">
  65. <view class="i-lable">提 货 码:</view>
  66. <view class="i-text fw">{{stationCode}}</view>
  67. </view>
  68. <view class="item">
  69. <view class="i-lable">提 货 人:</view>
  70. <view class="i-text">{{stationUserName+' '+stationUserMobile}}</view>
  71. </view>
  72. <view class="item">
  73. <view class="i-lable">预约时间:</view>
  74. <view class="i-text">{{stationTime}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view> -->
  79. <!-- 商品信息 -->
  80. <view class="prod-item">
  81. <!-- 店铺 -->
  82. <view class="shop-box">
  83. <view class="shop-icon"><image src="/static/images/icon/shop.png" /></view>
  84. <view class="shop-name">{{ shopName }}</view>
  85. <view v-if="refundStatus !=0" class="refund-sts">
  86. <!-- refundStatus 订单退款状态 1.申请退款 2.退款完成 3.部分退款完成 4.退款失败 -->
  87. <text>({{ ['','退款中','退款完成','部分退款','退款关闭'][refundStatus] }})</text>
  88. </view>
  89. </view>
  90. <!-- /店铺 -->
  91. <view v-for="(item, prodId) in prodList" :key="prodId" class="prod-box">
  92. <view class="item-cont" :data-prodid="item.prodId" @tap="toProdPage">
  93. <view class="prod-pic">
  94. <image :src="item.pic.indexOf('http') === -1 ? picDomain + item.pic : item.pic" />
  95. </view>
  96. <!-- 拼团商品展示icon -->
  97. <view class="prod-info">
  98. <view class="prodname">
  99. <view v-if="orderType" class="a-icon">{{ ['','拼团','秒杀','积分'][orderType] }}</view>
  100. <view class="text">{{ item.prodName }}</view>
  101. </view>
  102. <view class="sku-name">
  103. <text
  104. v-if="orderItemDtos.length === 1 && item.giveawayOrderItemId"
  105. class="gift-icon"
  106. >赠品</text>
  107. <text>{{ item.skuName }}</text>
  108. </view>
  109. <view class="price-nums">
  110. <!-- <view class="prodprice"><text v-if="item.price" class="symbol">¥</text>
  111. <text v-if="item.price" class="big-num">{{wxs.parsePrice(item.price)[0]}}</text>
  112. <text v-if="item.price" class="small-num">.{{wxs.parsePrice(item.price)[1]}}</text>
  113. <text v-if="item.price && orderType==3" class="small-num">+</text>
  114. <text class="small-num" v-if="orderType==3">{{item.useScore}} 积分</text>
  115. </view> -->
  116. <view class="number">
  117. <text>{{ orderMold == 1 ? totalNum : item.prodCount }}</text>件
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <!-- 赠品:多个商品时展示 -->
  123. <view v-if="orderItemDtos.length > 1 && item.giveawayList && item.giveawayList.length" class="gift-prods">
  124. <view
  125. v-for="giftItem in item.giveawayList"
  126. :key="giftItem.orderItemId"
  127. class="gift-item"
  128. @tap="toProdDetail(giftItem.prodId)"
  129. >
  130. <text class="name">【赠品】{{ giftItem.prodName }}</text>
  131. <text class="num">×{{ giftItem.prodCount }}</text>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 订单信息 -->
  137. <view class="order-msg">
  138. <view class="msg-item">
  139. <view class="item">
  140. <text class="item-tit">订单编号:</text>
  141. <text class="item-txt">{{ orderNumber }}</text>
  142. <!-- #ifdef APP-PLUS -->
  143. <text class="copy-btn" @tap="copyBtn">复制</text>
  144. <!-- #endif -->
  145. </view>
  146. <view class="item">
  147. <text class="item-tit">下单时间:</text>
  148. <text class="item-txt">{{ createTime }}</text>
  149. </view>
  150. </view>
  151. <view class="msg-item">
  152. <view v-if="payType !== null" class="item">
  153. <text class="item-tit">支付方式:</text>
  154. <text class="item-txt">{{ ['积分支付','微信支付','支付宝支付','微信支付','微信支付','微信支付','支付宝支付','支付宝支付','微信支付','余额支付','PayPal支付'][payType] }}</text>
  155. </view>
  156. <view class="item">
  157. <text class="item-tit">配送方式:</text>
  158. <text class="item-txt">{{ ['','卖家配送','到店自提','无需快递'][dvyType] }}</text>
  159. </view>
  160. <!-- 全部留言(虚拟商品) -->
  161. <view v-if="orderMold === 1 && virtualRemarkList.length >= 0" class="item all-msg" @tap="showViewMsgPopup">
  162. <view class="item-tit">全部留言:</view>
  163. <view class="item-txt" :class="{'pd': isExtraLong}"><span v-for="(item, index) in virtualRemarkList" :key="index">{{ item[0] }}&nbsp;&nbsp;&nbsp;&nbsp;{{ item[1] }}</span></view>
  164. <view v-if="isExtraLong" class="more-msg" />
  165. </view>
  166. </view>
  167. <view v-if="remarks" class="msg-item">
  168. <view class="item">
  169. <text class="item-tit remarks-tit">订单备注:</text>
  170. <text class="item-txt remarks-txt">{{ remarks }}</text>
  171. </view>
  172. </view>
  173. </view>
  174. <!-- 虚拟商品-券码情况 -->
  175. <view
  176. v-if="orderMold === 1"
  177. class="order-msg voucher-code-con"
  178. >
  179. <view class="msg-item">
  180. <view class="item">
  181. <view class="item-left">
  182. <view class="txt strong">已使用({{ totalNum }}张)</view>
  183. <view class="txt weak flex-item">
  184. <view class="lf">有效期限:</view>
  185. <view class="rg">
  186. <text v-if="writeOffStart && !writeOffEnd">购买后长期有效</text>
  187. <text v-if="writeOffStart && writeOffEnd">{{ writeOffStart }} 至 {{ writeOffEnd }}</text>
  188. </view>
  189. </view>
  190. <view class="txt weak flex-item">
  191. <view class="lf">核销次数:</view>
  192. <view class="rg">
  193. <text v-if="writeOffNum === -1">多次核销</text>
  194. <text v-if="writeOffNum === 1">单次核销</text>
  195. <text v-if="writeOffNum === 0">无需核销</text>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. </view>
  201. <!-- 券码列表 -->
  202. <view v-if="virtualInfoList && virtualInfoList.length" class="msg-item voucher-code-list">
  203. <view v-for="(item, index) in virtualInfoList" :key="index" class="item" :class="{'used': item.isWriteOff === 1}">
  204. <view v-if="item.isWriteOff === 1" class="code-row">
  205. 券码<text v-if="virtualInfoList.length > 1">{{ index+1 }}</text>:<text class="code">{{ item.writeOffCode }}</text>
  206. </view>
  207. <view v-if="item.isWriteOff === 1" class="tips">已使用</view>
  208. </view>
  209. </view>
  210. </view>
  211. <view class="order-msg payment">
  212. <view class="msg-item">
  213. <view class="item">
  214. <view class="item-tit">商品总额:</view>
  215. <view class="item-txt">¥{{ wxs.parsePrice(productTotalAmount)[0] }}.{{ wxs.parsePrice(productTotalAmount)[1] }}</view>
  216. </view>
  217. <view v-if="transfee" class="item">
  218. <view class="item-tit">运费:</view>
  219. <view class="item-txt">¥{{ wxs.parsePrice(transfee)[0] }}.{{ wxs.parsePrice(transfee)[1] }}</view>
  220. </view>
  221. <view v-if="reduceAmount" class="item">
  222. <view class="item-tit"><text v-if="orderType && orderType!=3" class="item-tit">{{ orderType==1?'团购':'秒杀' }}</text>优惠:</view>
  223. <view class="item-txt">-¥{{ wxs.parsePrice(reduceAmount)[0] }}.{{ wxs.parsePrice(reduceAmount)[1] }}</view>
  224. </view>
  225. <view class="item price">
  226. <view class="item-txt">
  227. <!-- <text class="gray">订单总额:</text>
  228. <text class="symbol" v-if="actualTotal">¥</text>
  229. <text class="big-num" v-if="actualTotal">{{wxs.parsePrice(actualTotal)[0]}}</text>
  230. <text class="small-num" v-if="actualTotal">.{{wxs.parsePrice(actualTotal)[1]}}</text>
  231. <text class="small-num" v-if="actualTotal && orderType==3">+</text>
  232. <text class="small-num" v-if="orderType==3">{{orderItemDtos[0].useScore}} 积分</text> -->
  233. <text class="gray">订单总额:</text>
  234. <text v-if="actualTotal && actualTotal > 0" class="symbol">¥</text>
  235. <text v-if="actualTotal && actualTotal > 0" class="big-num">{{ wxs.parsePrice(actualTotal)[0] }}</text>
  236. <text v-if="actualTotal && actualTotal > 0 || actualTotal > 0" class="small-num">.{{ wxs.parsePrice(actualTotal)[1] }}</text>
  237. <text v-if="(actualTotal && actualTotal > 0) && (orderType==3 || orderScore > 0)" class="small-num">+</text>
  238. <text v-if="orderType==3 || orderScore > 0" class="big-num">{{ orderScore }} <text class="small-num">积分</text></text>
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. <!-- 团购底部 -->
  244. <!-- <view class="order-detail-footer" v-if="orderType==1&& status>1">
  245. <view class="group-det" @tap="toGroupDetails" :data-ordernumber="orderNumber">查看团购详情</view>
  246. </view> -->
  247. </view>
  248. <!-- 查看留言(虚拟商品) -->
  249. <view class="popup-hide" :hidden="!showViewMsg">
  250. <view class="popup-box virtual-goods-msg-pop">
  251. <view class="con-tit">
  252. <view class="tit-text">查看留言</view>
  253. <view class="close" @tap="closeMsgPopup" />
  254. </view>
  255. <view class="msg-pop-con">
  256. <view class="msg-list">
  257. <view v-for="(item, index) in virtualRemark" :key="index" class="msg-item">
  258. <view class="item-con weak">{{ item.name }}</view>
  259. <view class="item-con">{{ item.value }}</view>
  260. </view>
  261. </view>
  262. <view class="pop-foot">
  263. <view class="foot-btn" @tap="closeMsgPopup">我知道了</view>
  264. </view>
  265. </view>
  266. </view>
  267. </view>
  268. </view>
  269. </template>
  270. <script module="wxs" lang="wxs" src="../../wxs/number.wxs"></script>
  271. <script>
  272. // pages/order-detail/order-detail.js
  273. var http = require("../../utils/http.js")
  274. // var qrCode = require("../../utils/weapp-qrcode.js")
  275. import config from "../../utils/config.js";
  276. export default {
  277. data() {
  278. return {
  279. //图片地址
  280. picDomain: config.picDomain,
  281. orderItemDtos: [],
  282. remarks: "",
  283. actualTotal: 0,
  284. userAddrDto: null,
  285. orderNumber: "",
  286. orderScore: 0, // 整单使用积分
  287. createTime: "",
  288. status: 0, // 订单状态 0全部 1待支付 2待发货 3待收货 4待评价 5已完成 6已取消 7拼团中
  289. productTotalAmount: '',
  290. transfee: '',
  291. reduceAmount: '',
  292. prodid: '',
  293. orderType: 0,
  294. shopName: '',
  295. //店铺名称
  296. canRefund: false,
  297. // 能否退款
  298. canAllRefund: false, // 能否增单退款
  299. isLastProd: false, //最后一款商品
  300. irrevocable: false, //不可撤销
  301. sum: [], //本单已申请单个退款的商品数组
  302. dvyType: 1, //配送类型 1:快递 2:自提 3:无需快递
  303. id: 0, // 自提信息id
  304. stationAddress: '', // 自提点的地址
  305. stationCode: '', // 提货码
  306. stationId: 0, // 自提点id
  307. stationPhone: '', // 自提点的联系电话
  308. stationTime: '', // 自提时间(用户下单时选择)
  309. stationUserMobile: '', // 自提人的手机
  310. stationUserName: '', // 自提人的名字
  311. stationQrCode: '', // 提货码二维码
  312. stationName: '', // 自提点名称
  313. payType: '', // 支付方式
  314. // 虚拟商品
  315. orderMold: '', // 订单类型 1虚拟商品
  316. virtualRemark: [], // 留言
  317. virtualRemarkList: [],
  318. virtualInfoList: [], // 券码
  319. writeOffNum: 0,
  320. writeOffStart: null,
  321. writeOffEnd: null,
  322. isExtraLong: false, // 虚拟商品留言是否超长
  323. showViewMsg: false, // 查看全部留言弹窗
  324. totalNum: null, // 已核销的商品总件数
  325. // 商品列表
  326. prodList: [],
  327. // 退款状态
  328. refundStatus: 0
  329. };
  330. },
  331. components: {},
  332. props: {},
  333. /**
  334. * 生命周期函数--监听页面加载
  335. */
  336. onLoad: function (options) {
  337. this.loadOrderDetail(options.orderNum);
  338. this.refundStatus = options.refundStatus
  339. },
  340. /**
  341. * 生命周期函数--监听页面初次渲染完成
  342. */
  343. onReady: function () {},
  344. /**
  345. * 生命周期函数--监听页面显示
  346. */
  347. onShow: function () {},
  348. /**
  349. * 生命周期函数--监听页面隐藏
  350. */
  351. onHide: function () {},
  352. /**
  353. * 生命周期函数--监听页面卸载
  354. */
  355. onUnload: function () {},
  356. /**
  357. * 页面相关事件处理函数--监听用户下拉动作
  358. */
  359. onPullDownRefresh: function () {},
  360. /**
  361. * 页面上拉触底事件的处理函数
  362. */
  363. onReachBottom: function () {},
  364. /**
  365. * 用户点击右上角分享
  366. */
  367. onShareAppMessage: function () {},
  368. methods: {
  369. //跳转商品详情页
  370. toProdPage: function (e) {
  371. var prodid = e.currentTarget.dataset.prodid;
  372. if (this.orderType == 3) {
  373. console.log('积分商品');
  374. wx.navigateTo({
  375. url: '/pages/convertProdDet/convertProdDet?prodid=' + prodid
  376. });
  377. } else {
  378. wx.navigateTo({
  379. url: '/pages/prod/prod?prodid=' + prodid
  380. });
  381. }
  382. },
  383. /**
  384. * 加载订单数据
  385. */
  386. loadOrderDetail: function (orderNum) {
  387. wx.showLoading(); //加载订单详情
  388. var params = {
  389. url: "/p/myOrder/orderDetail",
  390. method: "GET",
  391. data: {
  392. orderNumber: orderNum
  393. },
  394. callBack: res => {
  395. wx.hideLoading();
  396. this.setData({
  397. orderNumber: orderNum,
  398. actualTotal: res.actualTotal,
  399. //实际支付总额(商品总额+运费)
  400. userAddrDto: res.userAddrDto,
  401. remarks: res.remarks,
  402. orderItemDtos: res.orderItemDtos,
  403. createTime: res.createTime,
  404. status: res.status,
  405. productTotalAmount: res.total,
  406. //所有商品总额
  407. transfee: res.transfee,
  408. //运费
  409. reduceAmount: res.reduceAmount,
  410. orderType: res.orderType,
  411. orderScore: res.orderScore, // 整单使用积分
  412. shopName: res.shopName,
  413. canRefund: res.canRefund,
  414. canAllRefund: res.canAllRefund,
  415. dvyType: res.dvyType, // 配送类型 1:快递 2:自提 3:无需快递
  416. payType: res.payType, // 支付方式
  417. orderMold: res.orderMold, // 订单类型 1虚拟商品
  418. virtualInfoList: res.virtualInfoList, // 券码
  419. virtualRemark: res.virtualRemark ? JSON.parse(res.virtualRemark) : [], // 留言
  420. writeOffNum: res.writeOffNum, // 核销次数 -1多次 0无需核销 1单次核销
  421. writeOffStart: res.writeOffStart, // 核销有效期开始时间
  422. writeOffEnd: res.writeOffEnd, // 核销有效期结束时间(仅有开始时间没有结束时间标识长期有效)
  423. totalNum: res.totalNum
  424. });
  425. if(res.dvyType == 2) {
  426. this.loadStationDetail(orderNum)
  427. }
  428. // 虚拟商品留言处理
  429. this.handlevirtualRemark()
  430. this.prodList = res.orderItemDtos
  431. // 赠品:单个商品时
  432. if (res.orderItemDtos.length === 1 &&
  433. res.orderItemDtos[0].giveawayList &&
  434. res.orderItemDtos[0].giveawayList.length) {
  435. this.prodList = [...res.orderItemDtos, ...res.orderItemDtos[0].giveawayList]
  436. }
  437. console.log('prodList:', this.prodList)
  438. console.log('orderItemDtos:', this.orderItemDtos)
  439. },
  440. errCallBack: err => {
  441. console.log('err:', err)
  442. uni.hideLoading()
  443. this.requestPageError = true
  444. uni.showModal({
  445. title: '提示',
  446. content: err.data,
  447. showCancel: false,
  448. confirmText: '确定',
  449. success: (err) => {
  450. if (err.confirm) {
  451. uni.redirectTo({
  452. url: '/pages/order-list/order-list'
  453. })
  454. }
  455. }
  456. })
  457. }
  458. };
  459. http.request(params);
  460. },
  461. /**
  462. * 加载订单详情自提信息
  463. */
  464. loadStationDetail: function (orderNum) {
  465. wx.showLoading(); //加载订单详情
  466. var params = {
  467. url: "/p/myStationOrder/stationDetail",
  468. method: "GET",
  469. data: {
  470. orderNumber: orderNum
  471. },
  472. callBack: (res) => {
  473. wx.hideLoading();
  474. this.id = res.id, // 自提信息id
  475. this.stationAddress = res.stationAddress, // 自提点的地址
  476. this.stationCode = res.stationCode, // 提货码
  477. this.stationId = res.stationId, // 自提点id
  478. this.stationPhone = res. stationPhone, // 自提点的联系电话
  479. this.stationTime = res.stationTime, // 自提时间(用户下单时选择)
  480. this.stationUserMobile = res.stationUserMobile, // 自提人的手机
  481. this.stationUserName = res.stationUserName, // 自提人的名字
  482. this.stationName = res.stationName // 自提点名称
  483. // this.getQrcode(this.stationCode)
  484. }
  485. };
  486. http.request(params);
  487. },
  488. // 虚拟商品-留言列表处理
  489. handlevirtualRemark() {
  490. if (this.virtualRemark && this.virtualRemark.length) {
  491. // 过滤掉没有填写的留言
  492. this.virtualRemark = this.virtualRemark.filter(el => el.value)
  493. let virtualRemarkList = []
  494. let virtualRemarks = []
  495. // 如果留言总数大于3条,先展示前一条(完整留言在弹窗中展示)
  496. if (this.virtualRemark.length > 3) {
  497. const list = JSON.parse(JSON.stringify(this.virtualRemark))
  498. virtualRemarks = list.splice(0, 1)
  499. this.isExtraLong = true
  500. } else {
  501. virtualRemarks = this.virtualRemark
  502. this.isExtraLong = false
  503. }
  504. // 全部留言拼接
  505. virtualRemarks.forEach((el, index) => {
  506. // if (index < virtualRemarks.length - 1) {
  507. // virtualRemarkList = virtualRemarkList + el.name + ' ' + el.value + ','
  508. // } else {
  509. // virtualRemarkList = virtualRemarkList + el.name + ' ' + el.value
  510. // }
  511. virtualRemarkList.push([el.name, el.value])
  512. })
  513. if (this.isExtraLong) {
  514. this.virtualRemarkList = virtualRemarkList.push('......')
  515. } else {
  516. this.virtualRemarkList = virtualRemarkList
  517. }
  518. }
  519. },
  520. // 查看留言弹窗
  521. showViewMsgPopup: function() {
  522. if (this.isExtraLong) {
  523. this.showViewMsg = true
  524. }
  525. },
  526. closeMsgPopup: function() {
  527. this.showViewMsg = false
  528. },
  529. /**
  530. * 拨打自提点电话
  531. */
  532. // callStation: function() {
  533. // uni.makePhoneCall({
  534. // // 手机号
  535. // phoneNumber: this.stationPhone,
  536. // // 成功回调
  537. // success: (res) => {
  538. // console.log('调用成功!')
  539. // },
  540. // // 失败回调
  541. // fail: (res) => {
  542. // console.log('调用失败!')
  543. // }
  544. // });
  545. // },
  546. /**
  547. * 打开地图
  548. */
  549. // openMap: function (latitude,longitude,name) {
  550. // console.log('打开地图')
  551. // uni.getLocation({
  552. // // type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  553. // success: (res) => {
  554. // console.log('成功res',res)
  555. // uni.openLocation({
  556. // latitude: res.latitude,
  557. // longitude: res.longitude,
  558. // success: function () {
  559. // console.log('success');
  560. // }
  561. // });
  562. // },
  563. // fail: () => {
  564. // console.log('fail')
  565. // }
  566. // });
  567. // },
  568. /**
  569. * 生成二维码
  570. */
  571. // getQrcode: function(stationCode) {
  572. // this.stationQrCode = Qr.createQrCodeImg(stationCode)
  573. // },
  574. /* 生成二维码 */
  575. // getQrcode: function (stationCode) {
  576. // new qrCode('orderQrcode', {
  577. // text: "pages/self-mention-order/self-mention-order?pickCode=" + stationCode,
  578. // width: 70,
  579. // height: 70,
  580. // colorDark: "#333333",
  581. // colorLight: "#FFFFFF",
  582. // correctLevel: qrCode.CorrectLevel.H
  583. // })
  584. // },
  585. // #ifdef APP-PLUS
  586. /**
  587. * 一键复制事件
  588. */
  589. // 设置系统剪贴板的内容。
  590. copyBtn () {
  591. // 除了h5以外都可用的复制方法
  592. uni.setClipboardData({
  593. data: this.orderNumber,
  594. success: function () {
  595. wx.showToast({
  596. title: '复制成功',
  597. icon: 'none',
  598. duration: 1000
  599. })
  600. }
  601. });
  602. },
  603. // #endif
  604. // 查看提货凭证
  605. // viewCertificate() {
  606. // var cont = {
  607. // stationCode: this.stationCode, // 提货码
  608. // stationAddress: this.stationAddress, // 自提点的地址
  609. // stationPhone: this.stationPhone, // 自提点的联系电话
  610. // stationTime: this.stationTime, // 自提时间(用户下单时选择)
  611. // orderNumber: this.orderNumber, // 订单编号
  612. // stationName: this.stationName
  613. // }
  614. // uni.setStorageSync('stationCont', cont)
  615. // uni.navigateTo({
  616. // url: '/pages/deliveryCertificate/deliveryCertificate'
  617. // })
  618. // },
  619. }
  620. };
  621. </script>
  622. <style>
  623. @import "./order-detail.css";
  624. </style>