detail.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211
  1. <!-- 订单详情页面 -->
  2. <template>
  3. <scroll-view class="container" scroll-y @scrolltolower='getData' v-if="allData && isShow">
  4. <view class="main_content" :class="{noPaddingBottom20:allData.orderState == 20}" :style="{backgroundImage:'url('+imgUrl+'point/goods/order_detail_bg.png)'}">
  5. <!-- 订单状态 start -->
  6. <view class="order_state">
  7. <!-- 待付款 start orderState == 10-->
  8. <block v-if="allData.orderState == 10">
  9. <view class="state_title">
  10. <image :src="imgUrl+'order-detail/to_pay.png'" mode=""></image>
  11. <text>{{allData.orderStateValue}}</text>
  12. </view>
  13. <view class="state_time" v-if="stateTime">{{$L('剩余')}}{{stateTime}}{{$L('自动关闭')}}</view>
  14. </block>
  15. <!-- 待付款 end-->
  16. <!-- 待发货 orderState == 20-->
  17. <block v-if="allData.orderState == 20">
  18. <view class="state_title await">
  19. <image :src="imgUrl+'order-detail/delivered.png'" mode=""></image>
  20. <text>{{allData.orderStateValue}}</text>
  21. </view>
  22. </block>
  23. <!-- 待发货 end-->
  24. <!-- 待收货 -->
  25. <block v-if="allData.orderState == 30">
  26. <view class="state_title">
  27. <image :src="imgUrl+'order-detail/wait_receive.png'" mode="" style="width: 71rpx;height: 45rpx;"></image>
  28. <text>{{allData.orderStateValue}}</text>
  29. </view>
  30. <view class="state_time" v-if="stateTime">{{$L('还剩')}}{{stateTime}}{{$L('自动确认')}}</view>
  31. </block>
  32. <!-- 待收货 end-->
  33. <!-- 已完成 start-->
  34. <block v-if="allData.orderState == 40">
  35. <view class="state_title await">
  36. <image :src="imgUrl+'order-detail/success.png'" mode="" style="width: 46rpx;height: 51rpx;"></image>
  37. <text>{{allData.orderStateValue}}</text>
  38. </view>
  39. </block>
  40. <!-- 已完成 end-->
  41. <!-- 取消订单,交易关闭 start orderState == 0-->
  42. <block v-if="allData.orderState == 0">
  43. <view class="state_title">
  44. <image :src="imgUrl+'order-detail/to_pay.png'" mode=""></image>
  45. <text>{{allData.orderStateValue}}</text>
  46. </view>
  47. <view class="state_reason">{{allData.cancelReasonContent}}</view>
  48. <!-- 注: allData.cancelRemark 不为空 时为平台取消 否则为会员取消 -->
  49. <view class="state_remark" v-if="allData.cancelRemark">{{allData.cancelRemark}}</view>
  50. </block>
  51. <!-- 取消订单,交易关闭 end-->
  52. </view>
  53. <!-- 订单状态 end -->
  54. <!-- 物流信息 start -->
  55. <view class="logistics_information" v-if="allData.orderState >= 30 && allData.routeList && allData.routeList.length > 0">
  56. <image :src="imgUrl+'order-detail/wuliu.png'" mode="" class="logistics_image"></image>
  57. <view class="logistics_des_right">
  58. <view class="logistics_info">
  59. <view class="logistics_des">{{allData.routeList[0].acceptStation}}</view>
  60. <view class="logistics_time">{{allData.routeList[0].acceptTime}}</view>
  61. </view>
  62. <image :src="imgUrl+'order-detail/right_down.png'" mode="" class="right_down" @click="lookLogistics()"></image>
  63. </view>
  64. </view>
  65. <!-- 物流信息 end -->
  66. <!-- 买家个人信息 start-->
  67. <view class="buyer_info">
  68. <image :src="imgUrl+'order-detail/map.png'" mode="" class="buyer_map"></image>
  69. <view class="info_det">
  70. <view class="info_detail">
  71. <view class="info_name">
  72. <text class="buyer_namer">{{allData.receiverName}}</text>
  73. <text class="buyer_phone">{{allData.receiverMobile}}</text>
  74. </view>
  75. <view class="info_address">{{allData.receiverAddress}}</view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 买家个人信息 end-->
  80. <!-- 订单内商品信息 start -->
  81. <view class="order_goods">
  82. <view class="goods_list">
  83. <view>
  84. <view class="goods_pre" v-for="(item,index) in orderProductList" :key="index" @click="goProductDetail(item.productId,item.goodsId)">
  85. <view class="goods_image">
  86. <image :src="item.productImage" mode="aspectFill"></image>
  87. </view>
  88. <view class="goods_pre_right flex_column_between_start">
  89. <view class="goods_pre_top">
  90. <view class="goods_name">{{item.goodsName}}</view>
  91. <view class="goods_des flex_row_between_end">
  92. <view class="goods_spec">{{item.specValues ? item.specValues : ''}}</view>
  93. <view class="goods_num">*{{item.productNum}}</view>
  94. </view>
  95. </view>
  96. <view class="goods_prices flex_row_start_end">
  97. <view class="goods_prices_point">{{item.integral}}{{$L('积分')}}</view>
  98. <view class="goods_prices_point" v-if="item.integralPrice && item.cashAmount">+</view>
  99. <view class="goods_price" v-if="item.cashAmount">¥{{$getPartNumber(item.cashAmount,'int')}}{{$getPartNumber(item.cashAmount,'decimal')}}</view>
  100. </view>
  101. </view>
  102. </view>
  103. <!-- 订单内商品信息 end -->
  104. <view class="store_price_info no_top" v-if="allData.orderState != 10">
  105. <view class="actual_payment">
  106. <view class="actual_payment_title">
  107. <text>{{$L('实付款')}}</text>
  108. </view>
  109. <view class="actual_payment_price">
  110. <text v-if="allData.integral">{{allData.integral}}{{$L('积分')}}</text>
  111. <text v-if="allData.integral && allData.cashAmount">+</text>
  112. <text v-if="allData.cashAmount">¥{{allData.cashAmount}}</text>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <!-- 订单信息 start-->
  120. <view class="order_des">
  121. <view class="order_des_title">{{$L('订单信息')}}</view>
  122. <view class="order_des_pre">
  123. <text>{{$L('订单编号')}}:</text>
  124. <text>{{allData.orderSn}}</text>
  125. </view>
  126. <block v-if="orderLogs && orderLogs.length > 0">
  127. <view class="order_des_pre" v-for="(item,index) in orderLogs" :key="index">
  128. <text>{{item.orderStateLog == 10 ? '创建时间:' : item.orderStateLog == 20 ? '付款时间:' : item.orderStateLog == 30 ? '发货时间:' : item.orderStateLog == 40 ? '完成时间:' : '取消时间:'}}</text>
  129. <text>{{item.logTime}}</text>
  130. </view>
  131. </block>
  132. </view>
  133. <!-- 订单信息 end-->
  134. <!-- 拨打电话 start-->
  135. <view class="share_btn" @click="goCall()">
  136. <image :src="imgUrl+'order-detail/dadianhua.png'" mode=""></image>
  137. <text>{{$L('拨打电话')}}</text>
  138. </view>
  139. <!-- 拨打电话 end-->
  140. <!-- 推荐商品 start-->
  141. <view class="recomment">
  142. <recommendList ref="recommendList"></recommendList>
  143. </view>
  144. <!-- 推荐商品 end-->
  145. </view>
  146. <!-- 详情底部操作按钮 start-->
  147. <view class="order_det_bottom" v-if="allData.orderState != 20">
  148. <!-- 待付款 -->
  149. <block v-if="allData.orderState == 10">
  150. <view class="cancel_order" @click="cancelPopup()">{{$L('取消订单')}}</view>
  151. <view class="go_pay" @click="goPay">{{$L('立即支付')}}</view>
  152. </block>
  153. <!-- 待收货 -->
  154. <block v-if="allData.orderState == 30">
  155. <view class="cancel_order" @click="lookLogistics()">{{$L('查看物流')}}</view>
  156. <view class="confirm_receipt" @click="confirmReceipt()">{{$L('确认收货')}}</view>
  157. </block>
  158. <!-- 订单完成 -->
  159. <block v-if="allData.orderState == 40">
  160. <view class="cancel_order" @click="lookLogistics()">{{$L('查看物流')}}</view>
  161. </block>
  162. <!-- 订单取消 -->
  163. <block v-if="allData.orderState == 0 || allData.orderState == 40">
  164. <view class="edit_address_btn" @click="delOrder()">{{$L('删除订单')}}</view>
  165. </block>
  166. </view>
  167. <!-- 详情底部操作按钮 end-->
  168. <!-- 取消订单选择原因弹框 -->
  169. <uni-popup ref="cancelPopup" type="bottom">
  170. <view class="cancel_popup">
  171. <view class="popup_top">
  172. <text>{{$L('取消原因')}}</text>
  173. <image :src="imgUrl+'order-detail/guanbi.png'" mode="" @click="notCancel"></image>
  174. </view>
  175. <scroll-view class="uni-list cancel_list" scroll-x="true">
  176. <radio-group @change="radioChange">
  177. <label class="cancle_pre" v-for="(item,index) in cancelList" :key="index">
  178. <text>{{item.content}}</text>
  179. <radio :value="item.value" :checked="item.value === current" color="#fc1c1c" style="transform:scale(0.8);margin-right:0;" />
  180. </label>
  181. </radio-group>
  182. </scroll-view>
  183. <view class="cancel_popup_btn">
  184. <text class="" @click="notCancel()">{{$L('暂不取消')}}</text>
  185. <text class="" @click="confirmCancel()">{{$L('确定取消')}}</text>
  186. </view>
  187. </view>
  188. </uni-popup>
  189. </scroll-view>
  190. </template>
  191. <script>
  192. import {
  193. mapState
  194. } from 'vuex';
  195. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  196. import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue';
  197. import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue';
  198. import recommendList from "../components/recommend_list.vue";
  199. let startY = 0,
  200. moveY = 0,
  201. pageAtTop = true;
  202. export default {
  203. components: {
  204. uniPopup,
  205. uniPopupMessage,
  206. uniPopupDialog,
  207. recommendList
  208. },
  209. data() {
  210. return {
  211. imgUrl: getApp().globalData.imgUrl,
  212. coverTransform: 'translateY(0px)',
  213. coverTransition: '0s',
  214. moving: false,
  215. orderSn: '', //订单号
  216. parentSn:'',
  217. allData: {}, //订单详细信息
  218. orderProductList: [], //订单商品列表
  219. cancelList: [], //取消原因列表
  220. current: '0', //取消原因当前点击的是第0项
  221. reasonId: -1, //取消原因当前点击的原因id
  222. stateTime: '', //等待买家付款的剩余时间
  223. isShow: false,
  224. orderLogs:[], //订单日志
  225. secInterval:'', //定时器
  226. }
  227. },
  228. async onLoad(option) {
  229. //订单号
  230. this.orderSn = option.orderSn;
  231. },
  232. onShow(option) {
  233. this.initData();
  234. this.getOrderDetail();
  235. },
  236. // #ifndef MP
  237. onNavigationBarButtonTap(e) {
  238. const index = e.index;
  239. if (index === 0) {
  240. this.navTo('/pages/set/set');
  241. } else if (index === 1) {
  242. // #ifdef APP-PLUS
  243. const pages = getCurrentPages();
  244. const page = pages[pages.length - 1];
  245. const currentWebview = page.$getAppWebview();
  246. currentWebview.hideTitleNViewButtonRedDot({
  247. index
  248. });
  249. // #endif
  250. uni.navigateTo({
  251. url: '/pages/notice/notice'
  252. })
  253. }
  254. },
  255. // #endif
  256. computed: {
  257. ...mapState(['hasLogin', 'userInfo', 'userCenterData'])
  258. },
  259. methods: {
  260. initData() {
  261. },
  262. //去店铺
  263. goStore(storeid){
  264. uni.navigateTo({
  265. url:'/pages/store/shopHomePage?vid='+storeid
  266. })
  267. },
  268. /**
  269. * 统一跳转接口,拦截未登录路由
  270. * navigator标签现在默认没有转场动画,所以用view
  271. */
  272. navTo(url) {
  273. if (!this.hasLogin) {
  274. url = '/pages/public/login';
  275. }
  276. uni.navigateTo({
  277. url
  278. })
  279. },
  280. /**
  281. * 会员卡下拉和回弹
  282. * 1.关闭bounce避免ios端下拉冲突
  283. * 2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
  284. * transition设置0.1秒延迟,让css来过渡这段空窗期
  285. * 3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
  286. */
  287. coverTouchstart(e) {
  288. if (pageAtTop === false) {
  289. return;
  290. }
  291. this.coverTransition = 'transform .1s linear';
  292. startY = e.touches[0].clientY;
  293. },
  294. coverTouchmove(e) {
  295. moveY = e.touches[0].clientY;
  296. let moveDistance = moveY - startY;
  297. if (moveDistance < 0) {
  298. this.moving = false;
  299. return;
  300. }
  301. this.moving = true;
  302. if (moveDistance >= 80 && moveDistance < 100) {
  303. moveDistance = 80;
  304. }
  305. if (moveDistance > 0 && moveDistance <= 80) {
  306. this.coverTransform = `translateY(${moveDistance}px)`;
  307. }
  308. },
  309. coverTouchend() {
  310. if (this.moving === false) {
  311. return;
  312. }
  313. this.moving = false;
  314. this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
  315. this.coverTransform = 'translateY(0px)';
  316. },
  317. //获取订单详情信息
  318. getOrderDetail() {
  319. uni.showLoading({
  320. title: '加载中'
  321. });
  322. let that = this;
  323. let param = {};
  324. param.url = 'v3/integral/front/integral/order/detail';
  325. param.method = 'POST';
  326. param.data = {};
  327. param.data.orderSn = that.orderSn;
  328. that.$request(param).then(res => {
  329. if (res.state == 200) {
  330. let result = res.data;
  331. that.orderProductList = result.orderProductList;
  332. that.orderLogs = result.orderLogList.reverse();
  333. that.allData = result || {};
  334. that.isShow = true;
  335. that.parentSn=res.data.orderSn
  336. uni.hideLoading();
  337. that.countup();
  338. } else {
  339. this.$api.msg(res.msg);
  340. }
  341. }).catch((e) => {
  342. //异常处理
  343. })
  344. },
  345. //计算时间差
  346. countup() {
  347. let that = this;
  348. let createTime = that.allData.createTime;
  349. let startStrs = createTime.split(" ");
  350. let createTimeStamp = that.strtotime(startStrs[0], startStrs[1]); //开始时间时间戳(毫秒)
  351. if (that.allData.orderState == 10) { //等待买家付款 ,24小时过期
  352. let endTimeStamp = createTimeStamp + 86400000; //结束时间时间戳 86400000是1天的
  353. that.countDown(endTimeStamp);
  354. } else if (that.allData.orderState == 30) { //等待买家收货
  355. let endTime = that.allData.autoReceiveTime; //结束时间时间戳
  356. let endStrs = endTime.split(" ");
  357. let endTimeStamp = that.strtotime(endStrs[0], endStrs[1]); //开始时间时间戳(毫秒)
  358. that.countDown(endTimeStamp);
  359. }
  360. },
  361. //倒计时
  362. countDown(endTimeStamp) {
  363. let that = this;
  364. that.secInterval = setInterval(()=> {
  365. let currentTimestamp = new Date().getTime(); //当前时间时间戳 (毫秒数)
  366. let diffrentTimeStamp = endTimeStamp - currentTimestamp; //相差时间 毫秒数
  367. if(diffrentTimeStamp == 0){
  368. that.stateTime = '';
  369. clearInterval(that.secInterval);
  370. that.getOrderDetail();
  371. }else if(diffrentTimeStamp > 0){
  372. //将时间戳转换为天,时,分,秒 并倒计时
  373. that.stateTime = that.formatDuring(diffrentTimeStamp)
  374. }else{
  375. that.stateTime = ''
  376. }
  377. }, 1000)
  378. },
  379. //将标准格式(2014-08-02 11:23:12)转化为时间戳 函数 参数:time_str为(2014-08-02) fix_time为(11:23:12)
  380. strtotime(time_str, fix_time) {
  381. let time = (new Date()).getTime();
  382. if (time_str) {
  383. let str = time_str.split('-');
  384. if (3 === str.length) {
  385. let year = str[0] - 0;
  386. let month = str[1] - 0 - 1;
  387. var day = str[2] - 0;
  388. if (fix_time) {
  389. let fix = fix_time.split(':');
  390. if (3 === fix.length) {
  391. let hour = fix[0] - 0;
  392. let minute = fix[1] - 0;
  393. time = (new Date(year, month, day, hour, minute)).getTime();
  394. }
  395. } else {
  396. time = (new Date(year, month, day)).getTime();
  397. }
  398. }
  399. }
  400. return time;
  401. },
  402. //将时间戳转换为时分秒
  403. formatDuring(mss) {
  404. let days = parseInt(mss / (1000 * 60 * 60 * 24));
  405. let hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  406. let minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
  407. let seconds = ((mss % (1000 * 60)) / 1000).toFixed(0);
  408. if (days > 0) {
  409. return days + " 天 " + hours + " 小时 " + minutes + " 分钟 ";
  410. } else if (hours > 0) {
  411. return hours + " 小时 " + minutes + " 分钟 ";
  412. } else if (minutes > 1) {
  413. return minutes + " 分钟 ";
  414. }else { //如果剩 1分钟之内就不让显示
  415. return ''
  416. }
  417. },
  418. //推荐商品
  419. getData() {
  420. this.$refs.recommendList.getMoreData();
  421. },
  422. //拨打电话
  423. goCall() {
  424. if (!this.allData.servicePhone) {
  425. uni.showToast({
  426. title: '商铺未设置客服电话',
  427. icon: 'none'
  428. })
  429. return
  430. }
  431. uni.makePhoneCall({
  432. phoneNumber: this.allData.servicePhone
  433. });
  434. },
  435. //打开取消订单弹框
  436. cancelPopup() {
  437. this.$refs.cancelPopup.open();
  438. this.getCancelList();
  439. },
  440. //获取取消订单原因列表
  441. getCancelList() {
  442. let param = {};
  443. param.url = 'v3/system/front/reason/list';
  444. param.method = 'GET';
  445. param.data = {};
  446. param.data.type = 104;
  447. this.$request(param).then(res => {
  448. if (res.state == 200) {
  449. this.cancelList = res.data || [];
  450. this.cancelList && this.cancelList.map((item, index) => item.value = '' + index);
  451. this.reasonId = this.cancelList[0].reasonId;
  452. } else {
  453. this.$api.msg(res.msg);
  454. }
  455. }).catch((e) => {
  456. //异常处理
  457. })
  458. },
  459. //取消原因单选框切换
  460. radioChange(e) {
  461. for (let i = 0; i < this.cancelList.length; i++) {
  462. if (this.cancelList[i].value === e.target.value) {
  463. this.reasonId = this.cancelList[i].reasonId;
  464. break;
  465. }
  466. }
  467. },
  468. //暂不取消订单
  469. notCancel() {
  470. this.$refs.cancelPopup.close();
  471. this.goRefresh();
  472. },
  473. //确定取消订单
  474. confirmCancel() {
  475. let that = this;
  476. uni.showModal({
  477. title: '提示',
  478. content: '确定取消该订单?',
  479. success: function(res) {
  480. if (res.confirm) {
  481. let param = {};
  482. param.url = 'v3/integral/front/integral/orderOperate/cancel';
  483. param.method = 'POST';
  484. param.data = {};
  485. param.data.orderSn = that.parentSn;
  486. param.data.reasonId = that.reasonId;
  487. that.$request(param).then(res => {
  488. if (res.state == 200) {
  489. that.$api.msg(res.msg);
  490. that.$refs.cancelPopup.close();
  491. that.goRefresh();
  492. } else {
  493. that.$api.msg(res.msg);
  494. }
  495. }).catch((e) => {
  496. //异常处理
  497. })
  498. } else if (res.cancel) {
  499. that.$refs.cancelPopup.close();
  500. }
  501. }
  502. })
  503. },
  504. //去付款
  505. goPay() {
  506. uni.navigateTo({
  507. url: '/standard/point/product/pay?paySn=' + this.allData.paySn + '&payMethodType=orderDetail'
  508. })
  509. },
  510. //查看物流
  511. lookLogistics() {
  512. uni.navigateTo({
  513. url: '/standard/point/order/lookLogistics?orderSn=' + this.orderSn + '&productLeadLittle=' + this.orderProductList[0].productLeadLittle
  514. })
  515. },
  516. //更新当前页面方法
  517. goRefresh() {
  518. let pages = getCurrentPages();
  519. let currPage = pages[pages.length - 1]; //当前页面
  520. let beforePage = pages[pages.length - 2]; //上一页
  521. currPage.$vm.getOrderDetail(); //更新当前页面数据
  522. beforePage.$vm.loadData(); //更新上一页数据
  523. },
  524. //删除订单
  525. delOrder() {
  526. let that = this;
  527. uni.showModal({
  528. title: '提示',
  529. content: '确定删除该订单?',
  530. success: function(res) {
  531. if (res.confirm) {
  532. let param = {};
  533. param.url = 'v3/integral/front/integral/orderOperate/delete';
  534. param.method = 'POST';
  535. param.data = {};
  536. param.data.orderSn = that.orderSn;
  537. that.$request(param).then(res => {
  538. if (res.state == 200) {
  539. that.$api.msg(res.msg);
  540. that.goRefresh();
  541. uni.navigateBack({ //返回上一页
  542. delta: 1
  543. })
  544. } else {
  545. that.$api.msg(res.msg);
  546. }
  547. }).catch((e) => {
  548. //异常处理
  549. })
  550. } else if (res.cancel) {
  551. }
  552. }
  553. })
  554. },
  555. //确认收货
  556. confirmReceipt() {
  557. let that = this;
  558. uni.showModal({
  559. title: '提示',
  560. content: '确认收货?',
  561. success: function(res) {
  562. if (res.confirm) {
  563. let param = {};
  564. param.url = 'v3/integral/front/integral/orderOperate/receive';
  565. param.method = 'POST';
  566. param.data = {};
  567. param.data.orderSn = that.orderSn;
  568. that.$request(param).then(res => {
  569. if (res.state == 200) {
  570. that.$api.msg(res.msg);
  571. that.goRefresh();
  572. uni.navigateBack({ //返回上一页
  573. delta: 1
  574. })
  575. } else {
  576. that.$api.msg(res.msg);
  577. }
  578. }).catch((e) => {
  579. //异常处理
  580. })
  581. }
  582. }
  583. })
  584. },
  585. //去商品详情页
  586. goProductDetail(productId, goodsId) {
  587. uni.navigateTo({
  588. url: '/standard/point/product/detail?productId=' + productId + '&goodsId=' + goodsId
  589. })
  590. },
  591. }
  592. }
  593. </script>
  594. <style lang='scss'>
  595. page {
  596. background: $bg-color-split;
  597. width: 750rpx;
  598. margin: 0 auto;
  599. }
  600. .container {
  601. display: flex;
  602. flex: 1;
  603. width: 100%;
  604. height: 100vh;
  605. position: relative;
  606. background-color: #FFFFFF;
  607. .main_content {
  608. width: 100%;
  609. /* background: url('/static/order/detail_bg.png') no-repeat; */
  610. min-height: calc(var(--status-bar-height) + 452rpx);
  611. padding-top: var(--status-bar-height);
  612. background-repeat: no-repeat;
  613. background-size: 750rpx 452rpx;
  614. padding-bottom: 90rpx;
  615. &.noPaddingBottom20{
  616. padding-bottom: 0rpx;
  617. }
  618. .order_state {
  619. padding-top: 96rpx;
  620. box-sizing: border-box;
  621. display: flex;
  622. flex-direction: column;
  623. align-items: center;
  624. justify-content: center;
  625. width: 100%;
  626. margin-bottom: 19rpx;
  627. height: 296rpx;
  628. .state_title {
  629. display: flex;
  630. align-items: center;
  631. justify-content: center;
  632. width: 100%;
  633. image {
  634. width: 45rpx;
  635. height: 45rpx;
  636. margin-right: 20rpx;
  637. }
  638. text {
  639. font-size: 38rpx;
  640. font-family: PingFang SC;
  641. font-weight: bold;
  642. color: #FFFFFF;
  643. line-height: 32rpx;
  644. }
  645. }
  646. .state_reason {
  647. font-size: 24rpx;
  648. font-family: PingFang SC;
  649. font-weight: 500;
  650. color: #FFFFFF;
  651. line-height: 32rpx;
  652. margin: 20rpx 0;
  653. }
  654. .state_remark {
  655. font-size: 24rpx;
  656. font-family: PingFang SC;
  657. font-weight: 500;
  658. color: #FFFFFF;
  659. line-height: 32rpx;
  660. }
  661. .await {
  662. margin-bottom: 139rpx;
  663. }
  664. .state_time {
  665. font-size: 24rpx;
  666. font-family: PingFang SC;
  667. font-weight: 500;
  668. color: #FFFFFF;
  669. line-height: 32rpx;
  670. margin: 22rpx 0 32rpx;
  671. }
  672. }
  673. .logistics_information {
  674. display: flex;
  675. background: #FFFFFF;
  676. box-shadow: 1rpx 3rpx 30rpx 0rpx rgba(102, 102, 102, 0.1);
  677. width: 710rpx;
  678. margin: 0 auto;
  679. padding: 40rpx 0 30rpx 20rpx;
  680. border-radius: 15rpx 15rpx 0 0;
  681. border-bottom: 1rpx solid #F4F4F4;
  682. .logistics_image {
  683. width: 34rpx;
  684. height: 28rpx;
  685. margin-right: 18rpx;
  686. }
  687. .logistics_des_right {
  688. display: flex;
  689. align-items: center;
  690. .logistics_info {
  691. display: flex;
  692. flex-direction: column;
  693. justify-content: space-between;
  694. width: 565rpx;
  695. .logistics_des {
  696. font-size: 28rpx;
  697. font-family: PingFang SC;
  698. font-weight: 500;
  699. color: #333333;
  700. line-height: 39rpx;
  701. width: 519rpx;
  702. text-overflow: -o-ellipsis-lastline;
  703. overflow: hidden;
  704. text-overflow: ellipsis;
  705. display: -webkit-box;
  706. -webkit-line-clamp: 2;
  707. line-clamp: 2;
  708. -webkit-box-orient: vertical;
  709. margin-bottom: 21rpx;
  710. }
  711. .logistics_time {
  712. font-size: 26rpx;
  713. font-family: PingFang SC;
  714. font-weight: 500;
  715. color: #949494;
  716. line-height: 45rpx;
  717. }
  718. }
  719. .right_down {
  720. width: 46rpx;
  721. height: 46rpx;
  722. }
  723. }
  724. }
  725. .buyer_info {
  726. width: 710rpx;
  727. background: #FFFFFF;
  728. box-shadow: 1rpx 3rpx 30rpx 0rpx rgba(102, 102, 102, 0.1);
  729. border-radius: 15rpx;
  730. margin: 0 auto;
  731. display: flex;
  732. padding: 41rpx 20rpx;
  733. box-sizing: border-box;
  734. .buyer_map {
  735. width: 34rpx;
  736. height: 34rpx;
  737. margin-right: 20rpx;
  738. }
  739. .info_det {
  740. display: flex;
  741. width: 100%;
  742. justify-content: space-between;
  743. .info_detail {
  744. display: flex;
  745. flex-direction: column;
  746. .info_name {
  747. display: flex;
  748. align-items: center;
  749. font-size: 28rpx;
  750. font-family: PingFang SC;
  751. color: #2E2E2E;
  752. line-height: 28rpx;
  753. .buyer_namer {
  754. color: #2E2E2E;
  755. font-weight: bold;
  756. }
  757. .buyer_phone {
  758. color: #666666;
  759. margin-left: 20rpx;
  760. font-weight: 600;
  761. }
  762. }
  763. .info_address {
  764. width: 528rpx;
  765. font-size: 28rpx;
  766. font-family: PingFang SC;
  767. font-weight: 500;
  768. color: #343434;
  769. line-height: 39rpx;
  770. margin-top: 28rpx;
  771. }
  772. }
  773. }
  774. }
  775. .order_goods {
  776. .goods_list {
  777. padding: 20rpx 0 0 0;
  778. .goods_pre {
  779. display: flex;
  780. margin: 0 20rpx;
  781. box-sizing: border-box;
  782. padding-bottom: 22rpx;
  783. border-bottom: 1rpx solid #f2f2f2;
  784. .goods_image {
  785. width: 200rpx;
  786. height: 200rpx;
  787. background: #F3F3F3;
  788. border-radius: 14px;
  789. image {
  790. width: 200rpx;
  791. height: 200rpx;
  792. border-radius: 14rpx;
  793. }
  794. }
  795. .goods_pre_right {
  796. display: flex;
  797. margin-left: 20rpx;
  798. width: 485rpx;
  799. padding: 9rpx 0 20rpx;
  800. .goods_pre_top{
  801. .goods_name {
  802. width: 485rpx;
  803. font-size: 28rpx;
  804. font-family: PingFang SC;
  805. font-weight: 500;
  806. color: #343434;
  807. line-height: 39rpx;
  808. text-overflow: -o-ellipsis-lastline;
  809. overflow: hidden;
  810. text-overflow: ellipsis;
  811. display: -webkit-box;
  812. -webkit-line-clamp: 2;
  813. line-clamp: 2;
  814. -webkit-box-orient: vertical;
  815. }
  816. .goods_des {
  817. padding-top: 8rpx;
  818. box-sizing: border-box;
  819. .goods_spec {
  820. font-size: 24rpx;
  821. font-family: PingFang SC;
  822. font-weight: 400;
  823. color: #949494;
  824. line-height: 30rpx;
  825. margin-top: 20rpx;
  826. }
  827. .goods_num {
  828. font-size: 24rpx;
  829. font-family: PingFang SC;
  830. font-weight: 500;
  831. color: #2D2D2D;
  832. line-height: 30rpx;
  833. }
  834. }
  835. }
  836. .goods_prices {
  837. width: 485rpx;
  838. font-size: 30rpx;
  839. font-family: PingFang SC;
  840. font-weight: bold;
  841. color: #FC1C1C;
  842. line-height: 30rpx;
  843. }
  844. }
  845. }
  846. }
  847. }
  848. .order_des {
  849. border-top: 20rpx solid #F5F5F5;
  850. padding: 29rpx 20rpx 0;
  851. box-sizing: border-box;
  852. .order_des_title {
  853. font-size: 28rpx;
  854. font-family: PingFang SC;
  855. font-weight: 500;
  856. color: #343434;
  857. line-height: 24rpx;
  858. margin-bottom: 19rpx;
  859. }
  860. .order_des_pre {
  861. font-size: 26rpx;
  862. font-family: PingFang SC;
  863. font-weight: 500;
  864. color: #9A9A9A;
  865. line-height: 24rpx;
  866. display: flex;
  867. margin-bottom: 17rpx;
  868. line-height: 30rpx;
  869. text:nth-child(1) {
  870. color: #9A9A9A;
  871. }
  872. text:nth-child(2) {
  873. color: #343434;
  874. }
  875. }
  876. }
  877. .share_btn {
  878. width: 100%;
  879. height: 100rpx;
  880. background: #FFFFFF;
  881. display: flex;
  882. align-items: center;
  883. border-top: 1rpx solid #F2F2F2;
  884. box-sizing: border-box;
  885. justify-content: center;
  886. image {
  887. width: 24rpx;
  888. height: 29rpx;
  889. }
  890. text {
  891. font-size: 26rpx;
  892. font-family: PingFang SC;
  893. font-weight: 500;
  894. color: #333333;
  895. line-height: 24rpx;
  896. margin-left: 15rpx;
  897. }
  898. }
  899. .recomment {
  900. background: #F5F5F5;
  901. box-sizing: border-box;
  902. padding-top: 10rpx;
  903. }
  904. }
  905. .order_det_bottom {
  906. position: fixed;
  907. bottom: 0;
  908. width: 100%;
  909. height: 90rpx;
  910. background: #FFFFFF;
  911. box-shadow: 1rpx 1rpx 20rpx 0rpx rgba(86, 86, 86, 0.11);
  912. display: flex;
  913. justify-content: flex-end;
  914. align-items: center;
  915. padding-right: 20rpx;
  916. box-sizing: border-box;
  917. .edit_address_btn {
  918. width: 131rpx;
  919. height: 50rpx;
  920. border: 1rpx solid #eeeeee;
  921. border-radius: 25rpx;
  922. font-size: 24rpx;
  923. font-family: PingFang SC;
  924. font-weight: 400;
  925. color: #343434;
  926. display: flex;
  927. align-items: center;
  928. justify-content: center;
  929. }
  930. .cancel_order {
  931. width: 131rpx;
  932. height: 50rpx;
  933. border: 1rpx solid #eeeeee;
  934. border-radius: 25rpx;
  935. font-size: 24rpx;
  936. font-family: PingFang SC;
  937. font-weight: 400;
  938. color: #343434;
  939. display: flex;
  940. align-items: center;
  941. justify-content: center;
  942. margin: 0 10rpx;
  943. }
  944. .go_pay {
  945. width: 109rpx;
  946. height: 50rpx;
  947. background: #F30300;
  948. box-shadow: 1rpx 3rpx 15rpx 0rpx rgba(252, 28, 28, 0.26);
  949. border-radius: 25rpx;
  950. font-size: 24rpx;
  951. font-family: PingFang SC;
  952. font-weight: 400;
  953. color: #FFFFFF;
  954. display: flex;
  955. align-items: center;
  956. justify-content: center;
  957. }
  958. .confirm_receipt {
  959. width: 140rpx;
  960. height: 50rpx;
  961. background: #F30300;
  962. border-radius: 25rpx;
  963. font-size: 24rpx;
  964. font-family: PingFang SC;
  965. font-weight: 400;
  966. color: #FFFFFF;
  967. display: flex;
  968. justify-content: center;
  969. align-items: center;
  970. }
  971. }
  972. }
  973. .cancel_popup {
  974. width: 100%;
  975. height: 700rpx;
  976. background: #FFFFFF;
  977. border-radius: 15rpx 15rpx 0 0;
  978. position: fixed;
  979. width: 100% !important;
  980. z-index: 20;
  981. bottom: 0;
  982. .popup_top {
  983. height: 100rpx;
  984. width: 100%;
  985. display: flex;
  986. padding: 0 39rpx;
  987. align-items: center;
  988. justify-content: space-between;
  989. border-bottom: 1rpx solid #F8F8F8;
  990. text {
  991. font-size: 32rpx;
  992. font-family: PingFang SC;
  993. font-weight: 500;
  994. color: #343434;
  995. line-height: 32rpx;
  996. }
  997. image {
  998. width: 30rpx;
  999. height: 30rpx;
  1000. }
  1001. }
  1002. .cancel_list {
  1003. padding-bottom: 128rpx;
  1004. box-sizing: border-box;
  1005. height: 600rpx;
  1006. .cancle_pre {
  1007. width: 100%;
  1008. padding: 29rpx 40rpx;
  1009. box-sizing: border-box;
  1010. display: flex;
  1011. justify-content: space-between;
  1012. text {
  1013. font-size: 28rpx;
  1014. font-family: PingFang SC;
  1015. font-weight: 500;
  1016. color: #666666;
  1017. line-height: 32rpx;
  1018. }
  1019. }
  1020. }
  1021. .cancel_popup_btn {
  1022. position: fixed;
  1023. bottom: 40rpx;
  1024. z-index: 30;
  1025. display: flex;
  1026. width: 100%;
  1027. justify-content: center;
  1028. text:nth-child(1) {
  1029. width: 334rpx;
  1030. height: 70rpx;
  1031. background: linear-gradient(-90deg, #FE9820 0%, #FFB72B 100%);
  1032. border-radius: 35rpx 0 0 35rpx;
  1033. font-size: 28rpx;
  1034. font-family: PingFang SC;
  1035. font-weight: 500;
  1036. color: #FFFFFF;
  1037. line-height: 32rpx;
  1038. display: flex;
  1039. align-items: center;
  1040. justify-content: center;
  1041. }
  1042. text:nth-child(2) {
  1043. width: 334rpx;
  1044. height: 70rpx;
  1045. background: linear-gradient(-90deg, #FC1D1C 0%, #FF7A18 100%);
  1046. border-radius: 0 35rpx 35rpx 0;
  1047. font-size: 28rpx;
  1048. font-family: PingFang SC;
  1049. font-weight: 500;
  1050. color: #FFFFFF;
  1051. line-height: 32rpx;
  1052. display: flex;
  1053. align-items: center;
  1054. justify-content: center;
  1055. }
  1056. }
  1057. }
  1058. .store_name {
  1059. padding-left: 20rpx;
  1060. padding-bottom: 30rpx;
  1061. margin-top: 30rpx;
  1062. display: flex;
  1063. align-items: center;
  1064. image {
  1065. width: 34rpx;
  1066. height: 32rpx;
  1067. }
  1068. .store_name_text {
  1069. font-size: 32rpx;
  1070. color: #2d2d2d;
  1071. font-weight: bold;
  1072. margin-left: 10rpx;
  1073. }
  1074. .iconfont {
  1075. // width: 13rpx;
  1076. // height: 22rpx;
  1077. font-size: 24rpx;
  1078. margin-left: 10rpx;
  1079. }
  1080. }
  1081. .store_price_info {
  1082. .store_price_all{
  1083. margin: 18rpx 0;
  1084. }
  1085. .freight {
  1086. display: flex;
  1087. padding: 0 20rpx;
  1088. box-sizing: border-box;
  1089. justify-content: space-between;
  1090. .freight_title {
  1091. font-size: 26rpx;
  1092. font-family: PingFang SC;
  1093. font-weight: 500;
  1094. color: #343434;
  1095. line-height: 30rpx;
  1096. }
  1097. .freight_price {
  1098. font-size: 24rpx;
  1099. font-family: PingFang SC;
  1100. font-weight: 500;
  1101. color: #2E2E2E;
  1102. line-height: 30rpx;
  1103. }
  1104. }
  1105. .actual_payment {
  1106. display: flex;
  1107. justify-content: space-between;
  1108. padding: 0 20rpx;
  1109. box-sizing: border-box;
  1110. align-items: center;
  1111. height: 90rpx;
  1112. .actual_payment_title {
  1113. display: flex;
  1114. font-size: 26rpx;
  1115. font-family: PingFang SC;
  1116. font-weight: 500;
  1117. line-height: 30rpx;
  1118. color: #343434;
  1119. text:nth-child(2) {
  1120. color: #949494;
  1121. }
  1122. }
  1123. .actual_payment_price {
  1124. font-size: 28rpx;
  1125. font-family: PingFang SC;
  1126. font-weight: 500;
  1127. color: #FC1C1C;
  1128. line-height: 30rpx;
  1129. }
  1130. }
  1131. }
  1132. </style>