order.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079
  1. <template>
  2. <view>
  3. <!-- <sjs src="../../../utils/formatFuc.sjs" module="utils" /> -->
  4. <view class="poster" v-if="myqr_show">
  5. <view>
  6. <image :src="myqr_url" :style="'width:' + myqr_width + 'rpx;'" mode="widthFix"></image>
  7. <view class="tool">
  8. <view>
  9. <button open-type="share" class="share-btn">
  10. <image class="img" style="width: 85rpx; margin-right: 25rpx" mode="widthFix" src="/static/images/share/p_dy.png"></image>
  11. </button>
  12. </view>
  13. <view>
  14. <image class="img" mode="widthFix" @tap="goSaveQrcode" src="/static/images/share/p_save.png"></image>
  15. </view>
  16. </view>
  17. <view style="text-align: center">
  18. <image class="closeImg" @tap="hidePoster" src="/static/images/share/close.png"></image>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="appoint-tabs-wrapper">
  23. <view :class="'appoint-tab-item ' + (showType == 0 ? 'active' : '')" data-tab="0" @tap="onTabChange">全 部</view>
  24. <view :class="'appoint-tab-item ' + (showType == 1 ? 'active' : '')" data-tab="1" @tap="onTabChange">待支付</view>
  25. <view :class="'appoint-tab-item ' + (showType == 2 ? 'active' : '')" data-tab="2" @tap="onTabChange">待服务</view>
  26. <view :class="'appoint-tab-item ' + (showType == 3 ? 'active' : '')" data-tab="3" @tap="onTabChange">售后</view>
  27. <!-- <view class="appoint-tab-item {{showType==4?'active':''}}" data-tab="4" bindtap="onTabChange">待评价</view> -->
  28. </view>
  29. <view class="container" :style="'filter:blur(' + myqr_blur + 'rpx)'">
  30. <!-- <view class="orders-switch">
  31. <view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
  32. <view class="txt">全部</view>
  33. </view>
  34. <view class="item {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
  35. <view class="txt">待付款</view>
  36. </view> -->
  37. <!-- <view class="item {{ showType == 2 ? 'active' : ''}}" bindtap="switchTab" data-index='2'>
  38. <view class="txt">待发货</view>
  39. </view> -->
  40. <!-- <view class="item {{ showType == 3 ? 'active' : ''}}" bindtap="switchTab" data-index='3'>
  41. <view class="txt">待上门</view>
  42. </view>
  43. <view class="item {{ showType == 4 ? 'active' : ''}}" bindtap="switchTab" data-index='4'>
  44. <view class="txt">待评价</view>
  45. </view>
  46. </view> -->
  47. <!-- <van-tabs active="{{showType }}" color="#09afff" bind:change="onTabChange">
  48. <van-tab title="全部" name="0"></van-tab>
  49. <van-tab title="待付款" name="1"></van-tab>
  50. <van-tab title="服务中" name="3"></van-tab>
  51. <van-tab title="待评价" name="4"></van-tab>
  52. </van-tabs> -->
  53. <!--
  54. <view class="appoint-tabs-wrapper">
  55. <view class="appoint-tab-item {{showType==0?'active':''}}" data-tab="0" bindtap="onTabChange">全 部</view>
  56. <view class="appoint-tab-item {{showType==1?'active':''}}" data-tab="1" bindtap="onTabChange">待付款</view>
  57. <view class="appoint-tab-item {{showType==3?'active':''}}" data-tab="3" bindtap="onTabChange">服务中</view>
  58. <view class="appoint-tab-item {{showType==4?'active':''}}" data-tab="4" bindtap="onTabChange">待评价</view>
  59. </view> -->
  60. <view class="no-order" v-if="orderList.length <= 0">
  61. <view class="c">
  62. <text>还没有任何订单呢</text>
  63. </view>
  64. </view>
  65. <view class="orders">
  66. <!-- 工单提醒 -->
  67. <block v-if="showType == 0">
  68. <view v-for="(item, index) in tipsList" :key="index" class="tips-item">
  69. <view class="tips-item-title">
  70. <view class="item-title-left">
  71. <image mode="aspectFit"
  72. src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-store.png"></image>
  73. <text>服务提醒</text>
  74. </view>
  75. <view class="item-title-right">{{item.statusName}}</view>
  76. </view>
  77. <view class="tips-item-line">
  78. <view class="line-left">
  79. 预约时间
  80. </view>
  81. <view class="line-right" v-if="item.bookDateTime.split(',').length>=3">
  82. {{item.bookDateTime.split(',')[0]}}
  83. <text>{{item.bookDateTime.split(',')[1]}}</text>
  84. {{item.bookDateTime.split(',')[2]}}
  85. </view>
  86. <view class="line-right" v-else>
  87. {{item.bookDateTime.split(',')[0]}}
  88. {{item.bookDateTime.split(',')[1]}}
  89. </view>
  90. </view>
  91. <view class="tips-item-line">
  92. <view class="line-left">
  93. 服务项目
  94. </view>
  95. <view class="line-right">
  96. {{item.skuName}}
  97. </view>
  98. </view>
  99. <view class="tips-item-line">
  100. <view class="line-left">
  101. 上门信息
  102. </view>
  103. <view class="line-right">
  104. {{item.bookInfo.split('|')[0]}}
  105. </view>
  106. </view>
  107. <view class="tips-item-line" style="margin-top:-18rpx;">
  108. <view class="line-left">
  109. </view>
  110. <view class="line-right">
  111. {{item.bookInfo.split('|')[1]}}
  112. </view>
  113. </view>
  114. <view class="tips-item-content" v-if="item.tip">
  115. 提醒:{{item.tip}}
  116. </view>
  117. </view>
  118. </block>
  119. <view v-if="orderList.length>0&&tipsList.length>0&&showType == 0" class="order-devide">
  120. <view class="line"></view>
  121. <view class="devide-text">订单列表</view>
  122. <view class="line"></view>
  123. </view>
  124. <view class="order" v-for="(item, index) in orderList" :key="index" :data-status="item.orderStatusVal" :data-id="item.id">
  125. <view @tap="goOrderDetailNew" :data-status="item.orderStatusVal" :data-id="item.id">
  126. <view class="h">
  127. <view class="l" v-if="item.orderStatusVal == '待预约' || item.orderStatusVal == '服务中' || item.orderStatusVal == '服务已完成'|| item.orderStatusVal == '退款中'">已支付</view>
  128. <view class="l" v-else>{{ item.orderStatusVal }}</view>
  129. <view class="r" v-if="item.orderStatusVal == '待预约' || item.orderStatusVal == '服务中' || item.orderStatusVal == '服务已完成'|| item.orderStatusVal == '退款中'">
  130. {{ item.orderStatusVal }}
  131. </view>
  132. <view class="r" v-else></view>
  133. </view>
  134. <!-- open-type="redirect" -->
  135. <!-- <navigator :url="'../orderDetail/orderDetail?id=' + item.id"> -->
  136. <view class="goods" >
  137. <view class="img">
  138. <image :src="item.picUrl + '?w=200'"></image>
  139. </view>
  140. <view class="info">
  141. <!-- <view class="info-orderSn" >订单编号: {{item.orderSn}}</view> -->
  142. <view class="info-main">
  143. <text class="product-name">{{ item.goodsName }}</text>
  144. <text class="price">¥{{ item.orderPrice }}</text>
  145. </view>
  146. <view class="sku-name" v-if="item.increaseSumPrice">
  147. <view>加购: {{ item.unitDescribe }}*{{ item.unitIncreaseNumber }}</view>
  148. <view>¥{{ item.increaseSumPrice }}</view>
  149. </view>
  150. <view class="sku-name">规格:{{ item.skuName }}</view>
  151. <!-- <text class="number">共{{item.number}}件商品</text> -->
  152. <text class="other-info">服务{{ item.serviceTimes }}次</text>
  153. <!-- <text class="other-info" wx:if="{{utils.getNotServiceTimes(item.serviceTimes,item.servedTimes)>0}}"> {{utils.getNotServiceTimes(item.serviceTimes,item.servedTimes)}}次未服务</text> -->
  154. <!-- 支付倒计时 payOverTime -->
  155. <view v-if="item.payOverTime > 0" class="over-time">{{ formatOverTime(item.payOverTime) }} 后订单关闭</view>
  156. </view>
  157. <!-- <view class="status">
  158. </view> -->
  159. </view>
  160. <!-- </navigator> -->
  161. <view class="b">
  162. <view class="l">
  163. <text>实付款:¥{{ item.actualPrice }}</text>
  164. </view>
  165. </view>
  166. <!-- 提醒 -->
  167. <view class="status-tips" v-if="item.orderStatusVal == '已退款'">
  168. <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-refund-tips.png"></image>
  169. <view class="tips-title">已退款</view>
  170. <view>已按照原支付路径退回</view>
  171. </view>
  172. <view class="status-tips" v-if="item.orderStatusVal == '服务已完成'" :data-id="item.id" @tap="goCheck">
  173. <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-customer-msg.png"></image>
  174. <view class="tips-title">服务验收:</view>
  175. <view>服务已完成,请评价</view>
  176. </view>
  177. <view class="customer-msg" v-if="item.customerServiceReminder">
  178. <view class="msg-title">提醒:</view>
  179. <view class="msg-text">{{ item.customerServiceReminder }}</view>
  180. </view>
  181. <view class="customer-msg" v-if="item.ticketStatus == 1">
  182. <view class="msg-title">提醒:</view>
  183. <view class="msg-text">您的售后工单正在处理中,请耐心等待</view>
  184. </view>
  185. <view class="customer-msg" v-if="item.ticketStatus == 2" :data-id="item.id" @tap="orderDetail">
  186. <view class="msg-title">提醒:</view>
  187. <view class="msg-text">您的售后工单已完成,可以去评价了哦</view>
  188. </view>
  189. </view>
  190. <!-- 操作事件 -->
  191. <view class="order-operate-wrapper">
  192. <!-- <view catchtap="deleteOrder" wx:if="{{item.handleOption.delete}}" data-id="{{item.id}}" class="del">删除订单
  193. </view> -->
  194. <view @tap.stop.prevent="cancelOrder" v-if="item.handleOption.cancel" :data-id="item.id" class="del">取消订单</view>
  195. <view @tap.stop.prevent="showRefundDia" v-if="item.handleOption.refund" :data-id="item.id" :data-ordersn="item.orderSn" :data-channelid="item.orderChannel" class="del">申请退款</view>
  196. <!-- v-if="item.handleOption.refund" -->
  197. <!-- <view data-id="{{item.id}}" data-sn="{{item.orderSn}}" data-aid="{{item.addressId}}"
  198. data-type="{{item.type}}" wx:if="{{item.handleOption.book}}" class="eval-btn">评价</view> -->
  199. <!-- 抖音评价 20231007屏蔽 by leo 启用工单上的服务验收
  200. <rate-button class="eval-btn" order-id="{{item.orderSn}}" bind:init="handleInit" bind:success="handleSuccess" bind:error="handleError" />-->
  201. <!-- <view catchtap="confirmOrder" wx:if="{{item.handleOption.confirm}}" data-id="{{item.id}}">待上门</view> -->
  202. <!-- <view catchtap="refundOrder" wx:if="{{item.handleOption.refund&&item.goodsList[0].goodsSn!='1036016'}}" data-id="{{item.id}}">申请退款</view> -->
  203. <!-- <view data-id="{{item.goodsList[0].goodsId}}" catchtap="shareFriendOrCircle" >分享商品</view> -->
  204. <view
  205. @tap.stop.prevent="appointService"
  206. :data-id="item.id"
  207. :data-sn="item.orderSn"
  208. :data-aid="item.addressId"
  209. :data-type="item.type"
  210. v-if="item.handleOption.book"
  211. :data-detail="item.detailId"
  212. :data-voucherId="item.voucherId"
  213. class="appoint"
  214. >
  215. 预约服务
  216. </view>
  217. <view @tap.stop.prevent="cancelAppoint" :data-serid="item.bookedDetailId" :data-id="item.id" :data-times="item.serviceTimes" v-if="item.handleOption.canCancelBook" class="del">取消预约</view>
  218. <view
  219. @tap.stop.prevent="modifyAppoint"
  220. :data-id="item.id"
  221. :data-serid="item.bookedDetailId"
  222. :data-times="item.serviceTimes"
  223. :data-sn="item.orderSn"
  224. :data-aid="item.addressId"
  225. :data-type="item.type"
  226. v-if="item.handleOption.canModify"
  227. class="warning-color">
  228. 修改预约
  229. </view>
  230. <view @tap.stop.prevent="payOrder" :data-id="item.id" :data-sn="item.orderSn" v-if="item.handleOption.pay" class="appoint">继续支付</view>
  231. <view class="btn-rebuy" @tap.stop.prevent="buyAgain" :data-id="item.goodsId" v-if="item.handleOption.rebuy">再来一单</view>
  232. </view>
  233. </view>
  234. </view>
  235. </view>
  236. <contact-mov :pageX="30" :pageY="420"></contact-mov>
  237. <view class="refund-order-overlay" v-if="refundTipShow">
  238. <view class="refund-order-dialog">
  239. <view class="refund-dia-tips">您遇到任何问题都可联系在线客服,我们将竭诚为您解决问题!</view>
  240. <view >
  241. <view class="dia-cancel-btn" style="width:240rpx;float:left;" @tap="refundOrder">继续退款</view>
  242. <view v-if="false" style="width:240rpx;float:left;">
  243. <!-- https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/industry/trading-system/pay-button-sdk#e606dcbb -->
  244. <pay-button class="paybt" :mode="refundBt.mode" :order-status="refundBt.orderStatus" :refund-total-amount="refundBt.refundTotalAmount" :order-id="refundBt.orderId" :biz-line="refundBt.bizLine"
  245. @error="refundError" >
  246. </pay-button> <!--@applyrefund ="applyrefund" @getGoodsInfo="getGoodsInfo" -->
  247. </view>
  248. <view class="dia-conf-btn" @tap="goIM">联系在线客服</view>
  249. </view>
  250. </view>
  251. </view>
  252. <!-- 修改预约/预约 -->
  253. <view class="refund-order-overlay" v-if="appointDiaShow">
  254. <view class="refund-order-dialog refund-order-dia-success">
  255. <view class="refund-dia-title">请选择您要修改的服务</view>
  256. <view class="modify-list">
  257. <view class="modify-item" v-for="(item,index) in serModifyList" :key="index" @tap="switchSer" :data-serid="item.id">
  258. <image src="https://mall.zhaijieshi.cc/file/wx-dy/radio-select.png" mode="aspectFit"
  259. v-if="item.id==serviceId"></image>
  260. <image src="https://mall.zhaijieshi.cc/file/wx-dy/radio-unselect.png" mode="aspectFit"
  261. v-else></image>
  262. <view :class="(item.id==serviceId?'current-modify':'')">{{item.bookTime}}</view>
  263. </view>
  264. </view>
  265. <view class="dia-btn-wrapper">
  266. <view class="dia-cancel-btn" @tap="appointModifyConf">确定</view>
  267. </view>
  268. </view>
  269. <image @tap="closeModify" src="https://jzmall.lifejingzhi.com/file/mall-uni/icon-close.png" class="modify-close"></image>
  270. </view>
  271. <!-- 选择取消原因 -->
  272. <!-- 第一步 -->
  273. <view class="appoint-overlay-wrapper remark-overlay" v-if="cancelFirstShow" @tap="onCancelPopupCloseFir">
  274. <view class="remark-select" @tap.stop.prevent="onCancelClick">
  275. <view class="title" style="text-align: left;">请选择要取消的服务</view>
  276. <view class="remark-list ser-list">
  277. <view :class="'remark-item ser-item '+(item.id==serviceId?'current-ser':'')" @tap="switchSer" :data-serid="item.id"
  278. v-for="(item, index) in serModifyList" :key="index" style="justify-content:flex-start;">
  279. <image mode="aspectFit"
  280. src="https://jzmall.lifejingzhi.com/file/mall-uni/icon-ser-selected.png"
  281. class="radio-img" v-if="item.id==serviceId"></image>
  282. <image mode="aspectFit"
  283. src="https://jzmall.lifejingzhi.com/file/mall-uni/icon-ser-unselect.png"
  284. class="radio-img" v-else></image>
  285. <view :class="'remark-value '+(item.id==serviceId?'current-cancel':'')">{{ item.bookTime }}</view>
  286. <view class="ser-right">已预约</view>
  287. </view>
  288. </view>
  289. <view class="remark-conf-btn" @tap.stop.prevent="cancelFirstConfirm">下一步</view>
  290. </view>
  291. </view>
  292. <view class="appoint-overlay-wrapper remark-overlay" v-if="cancelShow" @tap="onCancelPopupClose">
  293. <view class="remark-select" @tap.stop.prevent="onCancelClick">
  294. <view class="title">选择取消原因</view>
  295. <view class="remark-list">
  296. <view class="remark-item" :data-id="item.id" @tap.stop.prevent="cancelItemSelect"
  297. v-for="(item, index) in cancelList" :key="index">
  298. <view class="remark-value">{{ item.value }}</view>
  299. <image mode="aspectFit"
  300. src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-select-popup.png"
  301. class="radio-img" v-if="cancelReason == item.id"></image>
  302. <image mode="aspectFit"
  303. src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-unselect-popup.png"
  304. class="radio-img" v-else></image>
  305. </view>
  306. </view>
  307. <view class="remark-conf-btn" @tap.stop.prevent="cancelItemConfirm">取消预约</view>
  308. </view>
  309. </view>
  310. </view>
  311. </template>
  312. <script>
  313. var util = require('../../../utils/util.js');
  314. var api = require('../../../config/api.js');
  315. var app = getApp();
  316. import contactMov from '@/components/contact-mov';
  317. export default {
  318. components:{contactMov },
  319. data() {
  320. return {
  321. timer: '',
  322. orderList: [],
  323. showType: 0,
  324. page: 1,
  325. limit: 10,
  326. totalPages: 1,
  327. myqr_show: false,
  328. //我的分享二维码
  329. myqr_url: null,
  330. myqr_blur: 0,
  331. //背景模糊值
  332. myqr_width: 0,
  333. hasLogin: false,
  334. goodsId: '',
  335. tipsList:[],
  336. refundTipShow:false,
  337. channelid:0,
  338. refundBt:{
  339. mode:'',
  340. bizLine:'',
  341. orderStatus:'',
  342. orderId:'0',
  343. refundId:'',
  344. refundTotalAmount:''
  345. },
  346. refundId:'',
  347. serModifyList:[],
  348. serviceId:'',
  349. appointOrderId:'',
  350. appointDiaType:'',//1修改预约 2取消预约
  351. appointDiaShow:false,
  352. cancelShow:false,
  353. cancelList: [{
  354. id: 19,
  355. value: '【个人原因】临时有事暂时不预约'
  356. },
  357. {
  358. id: 20,
  359. value: '【个人原因】先囤着以后再约'
  360. },
  361. {
  362. id: 22,
  363. value: '【个人原因】计划有变不需要了'
  364. },
  365. {
  366. id: 21,
  367. value: '【商家原因】保洁师无法上门服务'
  368. },
  369. {
  370. id: 23,
  371. value: ' 其他'
  372. }
  373. ],
  374. cancelReason: '',
  375. cancelFirstShow:false,
  376. };
  377. },
  378. onLoad: function (options) {
  379. // 页面初始化 options为页面跳转所带来的参数
  380. if (options.tab) {
  381. this.setData({
  382. showType: options.tab
  383. });
  384. } else {
  385. try {
  386. let query = uni.getEnterOptionsSync().query;
  387. let keys = Object.keys(query);
  388. if (keys.length > 0) {
  389. let str = keys[0]; //{\"showType\": 1}
  390. let json = str.replace(/\"/g, '').replace(/\\/g, '"');
  391. let tab = JSON.parse(json).showType;
  392. if (tab != null && tab != '' && tab != undefined) {
  393. this.setData({
  394. showType: '0' //全部订单,写死因为历史后台传的是1
  395. });
  396. }
  397. }
  398. } catch (error) {
  399. console.log('CatchClause', error);
  400. console.log('CatchClause', error);
  401. console.info(error);
  402. }
  403. }
  404. },
  405. onHide: function () {
  406. console.log('onHide');
  407. clearInterval(this.timer);
  408. },
  409. onUnload: function () {
  410. console.log('onunload');
  411. clearInterval(this.timer);
  412. },
  413. onReachBottom() {
  414. if (this.totalPages > this.page) {
  415. this.setData({
  416. page: this.page + 1
  417. });
  418. this.getOrderList();
  419. } else if (this.orderList.length > 0) {
  420. uni.showToast({
  421. title: '没有更多订单了',
  422. icon: 'none',
  423. duration: 2000
  424. });
  425. return false;
  426. }
  427. },
  428. onReady: function () {
  429. // 页面渲染完成
  430. },
  431. onShow: function () {
  432. // 页面显示
  433. this.setData({
  434. orderList: [],
  435. page: 1
  436. });
  437. // wx.pageScrollTo({
  438. // scrollTop: 0,
  439. // duration: 1000,
  440. // });
  441. this.getOrderList();
  442. //兼容交易退款组件弹窗后,回退隐藏
  443. consolel.log('兼容交易退款组件弹窗后,回退隐藏');
  444. this.setData({
  445. refundTipShow:false
  446. })
  447. },
  448. methods: {
  449. formatOverTime(time){
  450. var minute='00';
  451. var second='00';
  452. if(time>0){
  453. minute=(Math.floor(time/60)<10?('0'+Math.floor(time/60)):Math.floor(time/60));
  454. second=(Number(time%60).toFixed(0)<10?('0'+Number(time%60).toFixed(0)):Number(time%60).toFixed(0));
  455. }
  456. var result="00:"+minute+":"+second;
  457. return result;
  458. },
  459. getOrderList() {
  460. uni.showLoading({
  461. title: '加载中'
  462. });
  463. let that = this;
  464. util.request(api.OrderList, {
  465. showType: that.showType,
  466. page: that.page,
  467. limit: that.limit
  468. }).then((res) => {
  469. uni.hideLoading();
  470. if (res.errno === 0) {
  471. console.log(res.data);
  472. that.setData({
  473. orderList: that.orderList.concat(res.data.data.orders),
  474. totalPages: res.data.pages,
  475. tipsList:res.data.data.tips
  476. });
  477. clearInterval(this.timer);
  478. // 如果有未支付订单,倒计时定时器
  479. let isHasOver = this.orderList.some((item) => {
  480. return item.payOverTime > 0;
  481. });
  482. console.log(isHasOver);
  483. if (isHasOver) {
  484. let timer = setInterval(() => {
  485. let list = this.orderList;
  486. let newList = [];
  487. list.forEach((item) => {
  488. let obj = item;
  489. if (item.payOverTime > 0) {
  490. obj.payOverTime = item.payOverTime - 1;
  491. }
  492. newList.push(obj);
  493. });
  494. this.setData({
  495. orderList: newList
  496. });
  497. }, 1000);
  498. this.setData({
  499. timer: timer
  500. });
  501. }
  502. }
  503. });
  504. },
  505. orderDetail(e) {
  506. let id = e.currentTarget.dataset.id;
  507. uni.navigateTo({
  508. url: '/pages/ucenter/orderDetail/orderDetail?id=' + id
  509. });
  510. },
  511. switchTab: function (event) {
  512. let showType = event.currentTarget.dataset.index;
  513. this.setData({
  514. orderList: [],
  515. showType: showType,
  516. page: 1,
  517. // limit: 10,
  518. totalPages: 1
  519. });
  520. this.getOrderList();
  521. },
  522. onTabChange(e) {
  523. // let showType = e.detail.name;
  524. let showType = e.currentTarget.dataset.tab;
  525. this.setData({
  526. orderList: [],
  527. showType: showType,
  528. page: 1,
  529. // limit: 10,
  530. totalPages: 1
  531. });
  532. this.getOrderList();
  533. },
  534. appointServiceOld(e) {
  535. let id = e.currentTarget.dataset.id;
  536. let addressId = e.currentTarget.dataset.aid;
  537. let type = e.currentTarget.dataset.type;
  538. if (type && type == 5) {
  539. uni.navigateTo({
  540. url: '/pages/ucenter/coupon/couponGoods?id=1'
  541. });
  542. return;
  543. }
  544. if (addressId == null || addressId == 0) {
  545. uni.navigateTo({
  546. url: '/pages/ucenter/appointOrder/appointOrder?orderId=' + id
  547. });
  548. } else {
  549. //买约分离 没有地址的预约
  550. uni.navigateTo({
  551. url: '/pages/ucenter/serviceDetail/serviceDetail?orderId=' + id
  552. });
  553. }
  554. },
  555. appointService(e) {
  556. let id = e.currentTarget.dataset.id;
  557. let addressId = e.currentTarget.dataset.aid;
  558. let type = e.currentTarget.dataset.type;
  559. let detailId = e.currentTarget.dataset.detail;
  560. let voucherId = e.currentTarget.dataset.voucherId;
  561. uni.navigateTo({
  562. url: '/pages/ucenter/appointOrder/appointOrder?orderId=' + id + '&serviceId=' + detailId+'&voucherId='+voucherId
  563. });
  564. },
  565. qrtouchstart: function () {
  566. this.setData({
  567. myqr_blur: 0,
  568. myqr_show: false
  569. });
  570. },
  571. shareFriendOrCircle: function (e) {
  572. // let that = this;
  573. // if (!app.globalData.hasLogin) {
  574. // wx.navigateTo({
  575. // url: "/pages/auth/login/login"
  576. // });
  577. // return;
  578. // }
  579. // //获取分享id 用来追踪链接
  580. // //引荐人和非引荐人的 链接不同
  581. // let imgUrl = that.data.goods.shareWxUrl ? that.data.goods.shareWxUrl : that.data.goods.gallery[0];
  582. // var path = '/pages/goods/goods?id=' + that.data.id + '&rId=' + that.data.userInfo.id;
  583. // if (that.data.userInfo.isDis) { //是引荐人
  584. // path = '/pages/goods/goods?id=' + that.data.id + '&shareId=' + that.data.wxShareId;
  585. // }
  586. // this.hidePoster();
  587. // return {
  588. // title: that.data.goods.name,
  589. // desc: that.data.myqr_ads,
  590. // path: path,
  591. // imageUrl: imgUrl
  592. // }
  593. },
  594. // 保存分享图
  595. saveShare: function () {
  596. let that = this;
  597. uni.showLoading({
  598. title: '图片保存中'
  599. });
  600. console.log(that);
  601. uni.downloadFile({
  602. url: that.myqr_url,
  603. success: function (res) {
  604. console.log(res);
  605. uni.saveImageToPhotosAlbum({
  606. filePath: res.tempFilePath,
  607. success: function (res) {
  608. uni.hideLoading();
  609. uni.showModal({
  610. title: '存图成功',
  611. content: '图片成功保存到相册了,可以分享到朋友圈了',
  612. showCancel: false,
  613. confirmText: '好的',
  614. confirmColor: '#a78845',
  615. success: function (res) {
  616. if (res.confirm) {
  617. console.log('用户点击确定');
  618. that.setData({
  619. myqr_show: false,
  620. myqr_blur: 0
  621. });
  622. }
  623. }
  624. });
  625. },
  626. fail: function (res) {
  627. uni.hideLoading();
  628. uni.showModal({
  629. title: '警告',
  630. content: '不授权无法保存',
  631. showCancel: false
  632. });
  633. that.setData({
  634. myqr_show: false,
  635. myqr_blur: 0
  636. });
  637. }
  638. });
  639. },
  640. fail: function (res) {
  641. uni.hideLoading();
  642. console.log(res);
  643. }
  644. });
  645. },
  646. // “去付款”按钮点击效果
  647. payOrder: function (e) {
  648. // #ifdef MP-TOUTIAO
  649. this.orderPrepay(e);
  650. // #endif
  651. // #ifdef MP-ALIPAY
  652. this.aliPrepay(e);
  653. // #endif
  654. },
  655. orderPrepay(e){
  656. let that = this;
  657. let id = e.currentTarget.dataset.id;
  658. let ordern = e.currentTarget.dataset.sn;
  659. util.request(
  660. api.OrderPayCheck,
  661. {
  662. orderId: id
  663. },
  664. 'POST'
  665. ).then(function (res) {
  666. if (res.errno === 0) {
  667. const outOrderNo = res.data;
  668. console.log(res);
  669. uni.continueToPay({
  670. // orderId: this.data.orderId, // 内部订单号
  671. outOrderNo: outOrderNo,
  672. // 外部订单号 2个订单号必填一个
  673. success: (res) => {
  674. console.log(res);
  675. const { orderId, outOrderNo } = res;
  676. console.log('success res', res);
  677. console.log('orderId', orderId, 'outOrderNo', outOrderNo);
  678. uni.redirectTo({
  679. url: '/pages/ucenter/order/order'
  680. });
  681. },
  682. fail: (res) => {
  683. console.log(res);
  684. const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
  685. if (errLogId) {
  686. console.log('查询订单信息失败', errNo, errMsg, errLogId);
  687. }
  688. if (orderId || outOrderNo) {
  689. console.log('支付失败', errNo, errMsg, orderId, outOrderNo);
  690. console.log('订单号' + outOrderNo);
  691. // wx.navigateTo({
  692. // url: '/pages/ucenter/orderDetail/orderDetail?id='+outOrderNo
  693. // });
  694. }
  695. util.showErrorToast('支付失败');
  696. }
  697. });
  698. }
  699. });
  700. },
  701. aliPrepay(e){
  702. let that = this;
  703. let id = e.currentTarget.dataset.id;
  704. let ordern = e.currentTarget.dataset.sn;
  705. uni.showLoading({
  706. title: '加载中'
  707. });
  708. util.request(api.aliPrepay, {
  709. orderId:id
  710. }).then(function (res) {
  711. if (res.errno === 0) {
  712. //是否跳转新支付结果页面
  713. let goNewPage=res.data.goNewPage;
  714. let tradeNo=res.data.payment.tradeNo;
  715. let outOrderNo=res.data.payment.outTradeNo;
  716. my.tradePay({
  717. tradeNO:tradeNo,
  718. success: (payres) => {
  719. uni.hideLoading();
  720. console.log('ali调起支付成功');
  721. console.log(payres);
  722. let resultCode=payres.resultCode;
  723. if(resultCode=='9000'){
  724. uni.redirectTo({
  725. url: '/pages/ucenter/order/order'
  726. });
  727. }else{
  728. uni.showModal({
  729. title: '提示',
  730. content: payres.memo,
  731. showCancel: false,
  732. });
  733. }
  734. },
  735. fail: (failres) => {
  736. console.log(failres);
  737. uni.hideLoading();
  738. }
  739. });
  740. } else {
  741. uni.hideLoading();
  742. uni.showModal({
  743. title: '提醒',
  744. showCancel: false,
  745. content: res.errmsg
  746. });
  747. }
  748. })
  749. .catch((res) => {
  750. uni.hideLoading();
  751. util.showErrorToast(res.errmsg);
  752. });
  753. },
  754. // “删除”点击效果
  755. deleteOrder: function (e) {
  756. let that = this;
  757. let id = e.currentTarget.dataset.id;
  758. uni.showModal({
  759. title: '',
  760. content: '确定要删除此订单?',
  761. success: function (res) {
  762. if (res.confirm) {
  763. util.request(
  764. api.OrderDelete,
  765. {
  766. orderId: id
  767. },
  768. 'POST'
  769. ).then(function (res) {
  770. if (res.errno === 0) {
  771. uni.showToast({
  772. title: '删除订单成功'
  773. });
  774. util.redirect('/pages/ucenter/order/order');
  775. } else {
  776. util.showErrorToast(res.errmsg);
  777. }
  778. });
  779. }
  780. }
  781. });
  782. },
  783. // “取消订单”点击效果
  784. cancelOrder: function (e) {
  785. let that = this;
  786. let id = e.currentTarget.dataset.id;
  787. uni.showModal({
  788. title: '',
  789. content: '确定要取消此订单?',
  790. success: function (res) {
  791. if (res.confirm) {
  792. util.request(
  793. api.OrderCancel,
  794. {
  795. orderId: id
  796. },
  797. 'POST'
  798. ).then(function (res) {
  799. if (res.errno === 0) {
  800. uni.showToast({
  801. title: '取消订单成功'
  802. });
  803. util.redirect('/pages/ucenter/order/order');
  804. } else {
  805. util.showErrorToast(res.errmsg);
  806. }
  807. });
  808. }
  809. }
  810. });
  811. },
  812. // “待上门”点击效果
  813. confirmOrder: function (e) {
  814. let that = this;
  815. let id = e.currentTarget.dataset.id;
  816. uni.showModal({
  817. title: '',
  818. content: '确认上门服务?',
  819. success: function (res) {
  820. if (res.confirm) {
  821. util.request(
  822. api.OrderConfirm,
  823. {
  824. orderId: id
  825. },
  826. 'POST'
  827. ).then(function (res) {
  828. if (res.errno === 0) {
  829. uni.showToast({
  830. title: '确认上门成功!'
  831. });
  832. util.redirect('/pages/ucenter/order/order');
  833. } else {
  834. util.showErrorToast(res.errmsg);
  835. }
  836. });
  837. }
  838. }
  839. });
  840. },
  841. // “取消订单并退款”点击效果
  842. refundOrderOld: function (e) {
  843. let that = this;
  844. let id = e.currentTarget.dataset.id;
  845. uni.showModal({
  846. title: '',
  847. content: '确定要取消此订单?',
  848. success: function (res) {
  849. if (res.confirm) {
  850. util.request(
  851. api.OrderRefund,
  852. {
  853. orderId: id
  854. },
  855. 'POST'
  856. ).then(function (res) {
  857. if (res.errno === 0) {
  858. uni.showToast({
  859. title: '取消订单成功'
  860. });
  861. util.redirect('/pages/ucenter/order/order');
  862. } else {
  863. util.showErrorToast(res.errmsg);
  864. }
  865. });
  866. }
  867. }
  868. });
  869. },
  870. getGoodsInfo(goodsId) {
  871. return new Promise((resolve) => {
  872. console.log("user goodsId", goodsId);
  873. resolve({
  874. currentPrice: 1,
  875. minLimits: 2,
  876. maxLimits: 10,
  877. dateRule: "",
  878. goodsName: "循礼门M+丨【释集烤肉】99元 原价206.4元超值套餐",
  879. goodsPhoto:
  880. "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.ibaotu.com%2Fgif%2F19%2F48%2F47%2F76Z888piCd6W.gif%21fwpaa50%2Ffw%2F700&refer=http%3A%2F%2Fpic.ibaotu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1644654365&t=5fc9b5fdad0a16264a9a9c09c14b3af9",
  881. goodsLabels: [
  882. { type: "REFUND_ANYTIME" },
  883. { type: "BOOK_IN_ADVANCE", value: 98 },
  884. ],
  885. extra: { test: 123 },
  886. });
  887. });
  888. },
  889. applyrefund:function(event) {
  890. console.log(event);
  891. const extra = { refundBt:this.refundBt };
  892. // return JSON.stringify(extra);
  893. return new Promise(resolve => {
  894. resolve(extra);// extra 透传至服务端时,当中的 itemOrderList 会被删除
  895. });
  896. },
  897. refundError:function(e) {
  898. console.log(e.detail);
  899. const { errNo, errMsg } = e.detail;
  900. console.log("errNo", errNo, "errMsg", errMsg);
  901. if (errNo === 21514) {
  902. tt.showToast({
  903. title: "失败", // 内容
  904. icon: "none", // 图标
  905. });
  906. } else if (errNo === 21513) {
  907. tt.showToast({
  908. title: "获取中", // 内容
  909. icon: "none", // 图标
  910. });
  911. }else{
  912. tt.showToast({
  913. title: "失败:"+e.detail.errMsg+',errNo:'+e.detail.errNo, // 内容
  914. icon: "none", // 图标
  915. });
  916. }
  917. },
  918. showRefundDia:function(e){
  919. let id = e.currentTarget.dataset.id;
  920. let channelid=e.currentTarget.dataset.channelid;
  921. // if(channelid==107){//交易组件
  922. // let bt={
  923. // mode:'',
  924. // bizLine:'',
  925. // orderStatus:'',
  926. // orderId:'10',
  927. // refundId:'',
  928. // refundTotalAmount:'',
  929. // };
  930. // this.setData({
  931. // refundBt:bt
  932. // })
  933. // util.request(api.GetRefundButton, {
  934. // orderId:id
  935. // }).then((res) => {
  936. // console.log(res)
  937. // if (res.errno === 0) {
  938. // this.setData({
  939. // refundBt:res.data
  940. // })
  941. // }
  942. // });
  943. // }
  944. this.setData({
  945. refundTipShow:true,
  946. refundId:id,
  947. channelid:channelid
  948. });
  949. },
  950. refundOrder: function (e) {
  951. this.setData({
  952. refundTipShow:false
  953. });
  954. uni.navigateTo({
  955. url: '/pages/ucenter/applyRefund/applyRefund?id=' + this.refundId
  956. });
  957. },
  958. buyAgain(e) {
  959. let id = e.currentTarget.dataset.id;
  960. uni.navigateTo({
  961. url: '/pages/goods/goods?id=' + id
  962. });
  963. },
  964. goCheck(e) {
  965. let id = e.currentTarget.dataset.id;
  966. uni.navigateTo({
  967. url: '/pages/ucenter/orderDetail/orderDetail?id=' + id
  968. });
  969. },
  970. goOrderDetailNew(e) {
  971. let status= e.currentTarget.dataset.status;
  972. let id = e.currentTarget.dataset.id;
  973. console.log(status);
  974. if(status=='未支付'){
  975. uni.navigateTo({
  976. url: '/pages/ucenter/orderDetail/orderDetailPay?id=' + id
  977. });
  978. }else{
  979. uni.navigateTo({
  980. url: '/pages/ucenter/orderDetail/orderDetail?id=' + id
  981. });
  982. }
  983. },
  984. handleInit(event) {
  985. const { status } = event.detail;
  986. console.log(status);
  987. },
  988. handleSuccess(event) {
  989. const { result } = event.detail;
  990. // 团购订单不支持查看评价,此时可决定按钮是否展示
  991. console.log(result);
  992. },
  993. handleError(event) {
  994. const { errMsg, errNo } = event.detail;
  995. // errNo(错误码,对应某种具体报错原因)
  996. // errMsg(报错信息)
  997. console.log(errMsg, errNo);
  998. },
  999. goSaveQrcode() {
  1000. console.log('占位:函数 goSaveQrcode 未声明');
  1001. },
  1002. hidePoster() {
  1003. console.log('占位:函数 hidePoster 未声明');
  1004. },
  1005. goIM() {
  1006. this.setData({
  1007. refundTipShow:false
  1008. });
  1009. console.info('goIm');
  1010. uni.navigateTo({
  1011. url: '/pages/chat/im/im'
  1012. });
  1013. },
  1014. switchSer(e){
  1015. let serid = e.currentTarget.dataset.serid;
  1016. this.setData({
  1017. serviceId:serid
  1018. });
  1019. },
  1020. appointModifyConf(){
  1021. if(this.serviceId==''||this.serviceId==null){
  1022. uni.showToast({
  1023. title: '请选择要修改的服务',
  1024. icon:'none'
  1025. });
  1026. return false;
  1027. }else{
  1028. this.setData({
  1029. appointDiaShow:false
  1030. });
  1031. uni.navigateTo({
  1032. url: '/pages/ucenter/appointOrder/appointOrder?orderId=' + this.appointOrderId + '&serviceId=' +
  1033. this.serviceId
  1034. });
  1035. }
  1036. },
  1037. closeModify(){
  1038. this.setData({
  1039. appointDiaShow:false
  1040. });
  1041. },
  1042. modifyAppoint(e){
  1043. let id = e.currentTarget.dataset.id;
  1044. let serid = e.currentTarget.dataset.serid;
  1045. let times = e.currentTarget.dataset.times;
  1046. this.setData({
  1047. appointOrderId:id
  1048. });
  1049. if(times>1){
  1050. this.setData({
  1051. appointDiaShow:true,
  1052. serviceId:''
  1053. });
  1054. util.request(
  1055. api.getBooked,
  1056. {orderId: id},
  1057. 'GET'
  1058. ).then(res=> {
  1059. if (res.errno === 0) {
  1060. this.setData({
  1061. serModifyList:res.data
  1062. })
  1063. }
  1064. });
  1065. }else{
  1066. uni.navigateTo({
  1067. url: '/pages/ucenter/appointOrder/appointOrder?orderId=' + id + '&serviceId=' +
  1068. serid
  1069. });
  1070. }
  1071. },
  1072. onCancelClick() {
  1073. },
  1074. cancelAppoint(e){
  1075. let id = e.currentTarget.dataset.id;
  1076. let serid = e.currentTarget.dataset.serid;
  1077. let times = e.currentTarget.dataset.times;
  1078. this.setData({
  1079. appointOrderId:id
  1080. });
  1081. if(times>1){
  1082. this.setData({
  1083. cancelFirstShow:true,
  1084. serviceId:''
  1085. });
  1086. util.request(
  1087. api.getBooked,
  1088. {orderId: id},
  1089. 'GET'
  1090. ).then(res=> {
  1091. if (res.errno === 0) {
  1092. this.setData({
  1093. serModifyList:res.data
  1094. })
  1095. }
  1096. });
  1097. }else{
  1098. this.setData({
  1099. cancelShow:true,
  1100. serviceId:serid
  1101. });
  1102. }
  1103. },
  1104. cancelItemSelect(e) {
  1105. this.setData({
  1106. cancelReason: e.currentTarget.dataset.id
  1107. });
  1108. },
  1109. onCancelPopupClose() {
  1110. this.setData({
  1111. cancelShow: false
  1112. });
  1113. },
  1114. onCancelPopupCloseFir(){
  1115. this.setData({
  1116. cancelFirstShow: false
  1117. });
  1118. },
  1119. cancelFirstConfirm(){
  1120. if(this.serviceId==''||this.serviceId==null){
  1121. uni.showToast({
  1122. title: '请选择要取消的服务',
  1123. icon:'none'
  1124. });
  1125. return false;
  1126. }
  1127. this.setData({
  1128. cancelFirstShow: false,
  1129. cancelShow: true
  1130. });
  1131. },
  1132. cancelItemConfirm() {
  1133. let that = this;
  1134. if (that.cancelReason == '') {
  1135. util.showErrorToast('请选择取消原因');
  1136. return;
  1137. }
  1138. uni.showLoading({
  1139. title: '提交中'
  1140. });
  1141. util.request(
  1142. api.OrderBookCancel, {
  1143. detailId: this.serviceId,
  1144. cancelReason: this.cancelReason
  1145. },
  1146. 'POST'
  1147. ).then((res) => {
  1148. uni.hideLoading();
  1149. if (res.errno === 0) {
  1150. uni.showToast({
  1151. title: '提交成功'
  1152. });
  1153. this.setData({
  1154. cancelShow: false,
  1155. orderList: [],
  1156. page: 1
  1157. });
  1158. this.getOrderList();
  1159. }else{
  1160. uni.showToast({
  1161. title: res.errmsg,
  1162. icon: 'none',
  1163. duration: 2000
  1164. });
  1165. }
  1166. });
  1167. },
  1168. }
  1169. };
  1170. </script>
  1171. <style>
  1172. page {
  1173. /* height: 100%; */
  1174. width: 100%;
  1175. background: #f4f4f4;
  1176. }
  1177. .orders-switch {
  1178. width: 100%;
  1179. background: #fff;
  1180. height: 84rpx;
  1181. /* border-bottom: 1px solid rgba(0,0,0,.15); */
  1182. }
  1183. .orders-switch .item {
  1184. display: inline-block;
  1185. height: 82rpx;
  1186. width: 18%;
  1187. padding: 0 15rpx;
  1188. text-align: center;
  1189. }
  1190. .orders-switch .item .txt {
  1191. display: inline-block;
  1192. height: 82rpx;
  1193. padding: 0 20rpx;
  1194. line-height: 82rpx;
  1195. color: #9a9ba1;
  1196. font-size: 30rpx;
  1197. width: 170rpx;
  1198. }
  1199. .orders-switch .item.active .txt {
  1200. color: #ab956d;
  1201. border-bottom: 4rpx solid #ab956d;
  1202. }
  1203. .no-order {
  1204. width: 100%;
  1205. height: auto;
  1206. margin: 0 auto;
  1207. }
  1208. .no-order .c {
  1209. width: 100%;
  1210. height: auto;
  1211. padding-top: 400rpx;
  1212. }
  1213. .no-order .c text {
  1214. margin: 0 auto;
  1215. display: block;
  1216. width: 258rpx;
  1217. height: 29rpx;
  1218. line-height: 29rpx;
  1219. text-align: center;
  1220. font-size: 29rpx;
  1221. color: #999;
  1222. }
  1223. .orders {
  1224. height: auto;
  1225. width: 750rpx;
  1226. /* overflow: hidden; */
  1227. padding: 0 24rpx;
  1228. margin-top: 110rpx;
  1229. }
  1230. .order {
  1231. /* margin-top: 20rpx; */
  1232. background: #fff;
  1233. padding: 0 24rpx 24rpx 24rpx;
  1234. border-radius: 24rpx;
  1235. margin-bottom: 24rpx;
  1236. }
  1237. .order .h {
  1238. height: 72rpx;
  1239. border-bottom: 2rpx solid #e0e0e0;
  1240. color: #191919;
  1241. font-size: 28rpx;
  1242. font-weight: bold;
  1243. display: flex;
  1244. align-items: center;
  1245. justify-content: space-between;
  1246. }
  1247. .order .h .l {
  1248. }
  1249. .order .h .r {
  1250. }
  1251. .order .goods {
  1252. display: flex;
  1253. /* align-items: center; */
  1254. padding: 24rpx 0 0;
  1255. position: relative;
  1256. }
  1257. .order .goods .img {
  1258. height: 190rpx;
  1259. width: 190rpx;
  1260. background: #f4f4f4;
  1261. }
  1262. .order .goods .img image {
  1263. height: 190rpx;
  1264. width: 190rpx;
  1265. overflow: hidden;
  1266. border-radius: 10rpx;
  1267. }
  1268. .order .goods .info {
  1269. height: 145.83rpx;
  1270. flex: 1;
  1271. padding-left: 20rpx;
  1272. }
  1273. .info-orderSn {
  1274. font-size: 28rpx;
  1275. font-weight: bold;
  1276. }
  1277. .info-main {
  1278. display: flex;
  1279. height: 40rpx;
  1280. align-items: center;
  1281. justify-content: space-between;
  1282. /* margin-bottom: 58rpx; */
  1283. }
  1284. .info .sku-name {
  1285. color: #666666;
  1286. font-size: 24rpx;
  1287. margin: 10rpx 0;
  1288. height: 34rpx;
  1289. line-height: 34rpx;
  1290. display: flex;
  1291. justify-content: space-between;
  1292. }
  1293. .product-name {
  1294. line-height: 40rpx;
  1295. font-size: 28rpx;
  1296. /* padding-left: 20rpx;
  1297. text-indent: -16rpx; */
  1298. overflow: hidden;
  1299. text-overflow: ellipsis;
  1300. white-space: nowrap;
  1301. width: 328rpx;
  1302. font-weight: bold;
  1303. color: rgba(0, 0, 0, 0.9);
  1304. }
  1305. .info-main .price {
  1306. color: rgba(0, 0, 0, 0.9);
  1307. font-size: 24rpx;
  1308. font-weight: bold;
  1309. }
  1310. .info .other-info {
  1311. font-size: 24rpx;
  1312. color: rgba(0, 0, 0, 0.9);
  1313. line-height: 34rpx;
  1314. }
  1315. .order .goods .status {
  1316. width: 105rpx;
  1317. color: #b4282d;
  1318. font-size: 25rpx;
  1319. }
  1320. .order .b {
  1321. height: 44rpx;
  1322. line-height: 44rpx;
  1323. /* border-top: 1px solid #f4f4f4; */
  1324. font-size: 26rpx;
  1325. color: #666;
  1326. text-align: right;
  1327. }
  1328. .order .b text {
  1329. font-size: 24rpx;
  1330. color: rgba(0, 0, 0, 0.9);
  1331. font-weight: bold;
  1332. }
  1333. .order .b .l {
  1334. /* float: left; */
  1335. }
  1336. .order .b .r {
  1337. float: right;
  1338. }
  1339. .order .b .btn {
  1340. margin-top: 19rpx;
  1341. height: 64.5rpx;
  1342. line-height: 64.5rpx;
  1343. text-align: center;
  1344. padding: 0 20rpx;
  1345. border-radius: 5rpx;
  1346. font-size: 28rpx;
  1347. color: #fff;
  1348. background: #b4282d;
  1349. }
  1350. .order-operate-wrapper {
  1351. /* height: 80rpx; */
  1352. display: flex;
  1353. align-items: center;
  1354. justify-content: flex-end;
  1355. flex: 1;
  1356. flex-wrap: wrap;
  1357. border-top: 2rpx solid #e0e0e0;
  1358. padding: 10rpx 0 12rpx;
  1359. margin: 20rpx 0 0;
  1360. }
  1361. /* .order-operate-wrapper::after {
  1362. content: '';
  1363. flex: auto;
  1364. } */
  1365. .order-operate-wrapper > view {
  1366. text-align: center;
  1367. font-size: 28rpx;
  1368. color: #fff;
  1369. margin-left: 20rpx;
  1370. width: 190rpx;
  1371. height: 72rpx;
  1372. line-height: 72rpx;
  1373. background: linear-gradient(90deg, #ff9c49 0%, #ff8219 100%);
  1374. border-radius: 72rpx;
  1375. margin-top: 10rpx;
  1376. font-weight: bold;
  1377. }
  1378. .order-operate-wrapper > view.del {
  1379. border: 2rpx solid #d8d8d8;
  1380. /* color: #666666; */
  1381. color: rgba(0,0,0,0.85);
  1382. background: #fff;
  1383. }
  1384. .order-operate-wrapper > view.appoint {
  1385. background: linear-gradient(90deg, #00baff 0%, #008dff 100%);
  1386. }
  1387. .myqr {
  1388. position: fixed;
  1389. z-index: 999;
  1390. width: 100%;
  1391. text-align: center;
  1392. height: auto;
  1393. padding-top: 50rpx;
  1394. top: 0;
  1395. left: 0;
  1396. right: 0;
  1397. bottom: 0;
  1398. }
  1399. .myqr .cancel {
  1400. width: 60rpx;
  1401. height: 60rpx;
  1402. margin-top: 30rpx;
  1403. margin-left: 480rpx;
  1404. }
  1405. .myqr .img {
  1406. width: 480rpx;
  1407. }
  1408. .myqr .btn {
  1409. width: 120rpx;
  1410. height: 120rpx;
  1411. line-height: 120rpx;
  1412. margin-top: 20rpx;
  1413. padding: 30rpx;
  1414. background: #ffffff;
  1415. border-radius: 60rpx;
  1416. }
  1417. /* 会员卡蒙层的样式 */
  1418. .poster {
  1419. position: fixed;
  1420. top: 0;
  1421. bottom: 0;
  1422. right: 0;
  1423. left: 0;
  1424. background-color: #333333d1;
  1425. /* padding: 0rpx 80rpx;
  1426. padding-top: 20%;*/
  1427. z-index: 99;
  1428. height: 100%;
  1429. text-align: center;
  1430. justify-content: center;
  1431. align-items: center;
  1432. display: flex;
  1433. }
  1434. .title {
  1435. color: #fff;
  1436. margin: 20rpx 0;
  1437. font-size: 30rpx;
  1438. }
  1439. .ads {
  1440. margin: 10rpx 0rpx;
  1441. color: #fff;
  1442. }
  1443. .tool {
  1444. display: flex;
  1445. text-align: center;
  1446. justify-content: baseline;
  1447. width: 100%;
  1448. margin-top: 20rpx;
  1449. }
  1450. .tool view {
  1451. flex: 1;
  1452. }
  1453. .img {
  1454. width: 99rpx;
  1455. }
  1456. .closeImg {
  1457. width: 57rpx;
  1458. height: 57rpx;
  1459. }
  1460. .share-btn {
  1461. background-color: transparent;
  1462. }
  1463. .share-btn::after {
  1464. border: none;
  1465. }
  1466. .m-card {
  1467. width: 100%;
  1468. height: 230rpx;
  1469. margin: 20rpx 0;
  1470. }
  1471. .m-card image {
  1472. width: 100%;
  1473. height: 230rpx;
  1474. }
  1475. .appoint-tabs-wrapper {
  1476. height: 88rpx;
  1477. display: flex;
  1478. align-items: center;
  1479. line-height: 88rpx;
  1480. justify-content: space-around;
  1481. position: fixed;
  1482. left: 0;
  1483. right: 0;
  1484. top: 0;
  1485. background: #fff;
  1486. z-index: 99;
  1487. }
  1488. .appoint-tab-item {
  1489. font-weight: bold;
  1490. font-size: 30rpx;
  1491. color: #191919;
  1492. /* width:80rpx; */
  1493. }
  1494. .appoint-tab-item.active {
  1495. color: #fe2b54;
  1496. /* border-bottom:4rpx solid #09afff; */
  1497. }
  1498. .detail-btn {
  1499. width: 148rpx;
  1500. text-align: center;
  1501. line-height: 60rpx;
  1502. text-align: center;
  1503. font-size: 26rpx;
  1504. color: #00b9ff;
  1505. margin-top: -20rpx;
  1506. /* margin-left:340rpx; */
  1507. width: 170rpx;
  1508. height: 60rpx;
  1509. background: #ffffff;
  1510. border: 2rpx solid #00b9ff;
  1511. border-radius: 60px;
  1512. float: right;
  1513. }
  1514. .status-tips {
  1515. height: 56rpx;
  1516. background: #ebebeb;
  1517. border-radius: 10rpx;
  1518. display: flex;
  1519. align-items: center;
  1520. padding: 0 0 0 16rpx;
  1521. margin-top: 24rpx;
  1522. }
  1523. .status-tips image {
  1524. width: 36rpx;
  1525. height: 32rpx;
  1526. }
  1527. .status-tips view {
  1528. font-size: 24rpx;
  1529. color: #2e3333;
  1530. }
  1531. .status-tips .tips-title {
  1532. color: #191919;
  1533. font-weight: bold;
  1534. margin: 0 16rpx;
  1535. }
  1536. .customer-msg {
  1537. background: #ebebeb;
  1538. border-radius: 10rpx;
  1539. display: flex;
  1540. padding: 12rpx 16rpx;
  1541. margin-top: 24rpx;
  1542. }
  1543. .customer-msg .msg-title {
  1544. color: #fe2b54;
  1545. font-weight: bold;
  1546. font-size: 24rpx;
  1547. white-space: nowrap;
  1548. }
  1549. .customer-msg .msg-text {
  1550. line-height: 34rpx;
  1551. display: -webkit-box;
  1552. -webkit-box-orient: vertical;
  1553. -webkit-line-clamp: 2;
  1554. text-overflow: ellipsis;
  1555. overflow: hidden;
  1556. font-size: 24rpx;
  1557. color: #000000;
  1558. }
  1559. .over-time {
  1560. position: absolute;
  1561. top: 170rpx;
  1562. right: 0;
  1563. line-height: 40rpx;
  1564. color: #ad0000;
  1565. font-size: 28rpx;
  1566. }
  1567. .eval-btn {
  1568. text-align: center;
  1569. font-size: 24rpx;
  1570. color: #fff;
  1571. margin-left: 20rpx;
  1572. width: 160rpx;
  1573. height: 56rpx;
  1574. line-height: 56rpx;
  1575. background: linear-gradient(90deg, #ff9c49 0%, #ff8219 100%);
  1576. border-radius: 56rpx;
  1577. margin-top: 10rpx;
  1578. border: 2rpx solid #ff8219;
  1579. color: #ff8219;
  1580. background: #fff;
  1581. }
  1582. .order-operate-wrapper view.eval-btn {
  1583. border: 2rpx solid #ff8219;
  1584. color: #ff8219;
  1585. background: #fff;
  1586. }
  1587. .tips-item{
  1588. background: #fff;
  1589. border-radius:12rpx;
  1590. padding:30rpx 0rpx 0;
  1591. margin-bottom: 20rpx;
  1592. }
  1593. .tips-item-title{
  1594. display: flex;
  1595. height:40rpx;
  1596. align-items: center;
  1597. justify-content: space-between;
  1598. margin-bottom:20rpx;
  1599. padding:0 32rpx;
  1600. }
  1601. .item-title-left{
  1602. display: flex;
  1603. align-items: center;
  1604. }
  1605. .item-title-left image{
  1606. width:28rpx;
  1607. height:28rpx;
  1608. margin-right:8rpx;
  1609. }
  1610. .item-title-left text{
  1611. font-size: 28rpx;
  1612. font-weight: bold;
  1613. color:#333;
  1614. }
  1615. .item-title-right{
  1616. height: 34rpx;
  1617. background: #FFFFFF;
  1618. border-radius: 4rpx;
  1619. border: 1rpx solid #5FB306;
  1620. padding:0 8rpx;
  1621. line-height: 34rpx;
  1622. font-size: 22rpx;
  1623. color: #5FB306;
  1624. }
  1625. .tips-item-line{
  1626. display: flex;
  1627. height:44rpx;
  1628. margin-bottom:20rpx;
  1629. align-items: center;
  1630. justify-content: space-between;
  1631. padding:0 32rpx;
  1632. }
  1633. .tips-item-line .line-left{
  1634. font-size: 28rpx;
  1635. color: #999999;
  1636. }
  1637. .tips-item-line .line-right{
  1638. font-size: 28rpx;
  1639. color: #333333;
  1640. font-weight: bold;
  1641. width:500rpx;
  1642. overflow: hidden;
  1643. white-space: nowrap;
  1644. text-overflow: ellipsis;
  1645. text-align: right;
  1646. }
  1647. .line-right text{
  1648. color: #5FB306;
  1649. }
  1650. .tips-item-content{
  1651. background: #FF4447;
  1652. border-radius: 0rpx 0rpx 14rpx 14rpx;
  1653. padding:24rpx 24rpx 24rpx 32rpx;
  1654. line-height: 40rpx;
  1655. font-size: 28rpx;
  1656. color: rgba(255,255,255,0.9);
  1657. }
  1658. .order-devide{
  1659. height:40rpx;
  1660. margin-bottom:20rpx;
  1661. display: flex;
  1662. align-items: center;
  1663. justify-content: space-between;
  1664. padding:0 4rpx;
  1665. }
  1666. .order-devide .line{
  1667. width: 290rpx;
  1668. height: 1rpx;
  1669. background: #979797;
  1670. }
  1671. .order-devide .devide-text{
  1672. font-size: 28rpx;
  1673. color: #999999;
  1674. }
  1675. /* 退款弹框 */
  1676. .refund-order-overlay {
  1677. width: 750rpx;
  1678. height: 100vh;
  1679. background: rgba(0, 0, 0, 0.5);
  1680. display: flex;
  1681. align-items: center;
  1682. justify-content: center;
  1683. position: fixed;
  1684. top: 0;
  1685. bottom: 0;
  1686. z-index:999;
  1687. flex-direction: column;
  1688. }
  1689. .refund-order-dialog {
  1690. width: 606rpx;
  1691. height: 644rpx;
  1692. border-radius: 14rpx;
  1693. background: #ffffff;
  1694. border-radius: 20rpx;
  1695. position: relative;
  1696. padding: 300rpx 30rpx 40rpx;
  1697. background: url('https://jzmall.lifejingzhi.com/file/jzmall-dy/dia-bg-refund.png') no-repeat;
  1698. background-color: #FFFFFF;
  1699. background-size: 606rpx 210rpx;
  1700. }
  1701. .refund-order-dialog.refund-order-dia-success{
  1702. padding: 200rpx 30rpx 40rpx;
  1703. background-image: url('https://jzmall.lifejingzhi.com/file/jzmall-dy/dia-bg-refund-success.png');
  1704. height:auto;
  1705. }
  1706. .refund-order-dia-success .dia-btn-wrapper{
  1707. justify-content: center;
  1708. }
  1709. .refund-order-dia-success .dia-cancel-btn{
  1710. width:484rpx;
  1711. font-weight: bold;
  1712. border: 2rpx solid #0093FF;
  1713. color: #0093FF;
  1714. }
  1715. .refund-dia-title {
  1716. height: 56rpx;
  1717. font-weight: bold;
  1718. font-size: 40rpx;
  1719. color: rgba(0,0,0,0.85);
  1720. line-height: 56rpx;
  1721. text-align: center;
  1722. margin:60rpx 0 34rpx;
  1723. }
  1724. .refund-dia-tips {
  1725. width: 540rpx;
  1726. color: #333333;
  1727. line-height: 46rpx;
  1728. font-size: 32rpx;
  1729. color: rgba(0,0,0,0.85);
  1730. text-align: center;
  1731. white-space: wrap;
  1732. margin-bottom: 120rpx;
  1733. font-weight: bold;
  1734. }
  1735. .dia-btn-wrapper {
  1736. height:94rpx;
  1737. display: flex;
  1738. justify-content: space-between;
  1739. }
  1740. .dia-cancel-btn{
  1741. width: 248rpx;
  1742. height: 94rpx;
  1743. line-height: 94rpx;
  1744. border-radius: 94rpx;
  1745. border: 2rpx solid #0093FF;
  1746. font-size: 32rpx;
  1747. color: #0093FF;
  1748. /* font-weight: bold; */
  1749. text-align: center;
  1750. }
  1751. .dia-conf-btn{
  1752. width: 258rpx;
  1753. height: 94rpx;
  1754. line-height: 94rpx;
  1755. border-radius: 94rpx;
  1756. font-size: 32rpx;
  1757. color: #fff;
  1758. font-weight: bold;
  1759. background: #0093FF;
  1760. text-align: center;
  1761. float:right;
  1762. }
  1763. .modify-list{
  1764. margin:0 0 44rpx;
  1765. max-height: 400rpx;
  1766. overflow-y: scroll;
  1767. }
  1768. .modify-item{
  1769. height: 46rpx;
  1770. margin-bottom:18rpx;
  1771. display: flex;
  1772. align-items: center;
  1773. justify-content: center;
  1774. line-height:46rpx;
  1775. }
  1776. .modify-item image{
  1777. width:30rpx;
  1778. height:30rpx;
  1779. margin-right:16rpx;
  1780. }
  1781. .modify-item view{
  1782. font-size: 32rpx;
  1783. color: rgba(102,102,102,0.85);
  1784. }
  1785. .modify-item view.current-modify{
  1786. color: rgba(0,0,0,0.85);
  1787. font-weight: bold;
  1788. }
  1789. .modify-close{
  1790. width:80rpx;
  1791. height:80rpx;
  1792. margin-top:58rpx;
  1793. }
  1794. .warning-color {
  1795. background: linear-gradient(90deg, #af4318 0%, #c96405 100%) !important;
  1796. }
  1797. /* 选择备注 */
  1798. .appoint-overlay-wrapper.remark-overlay {
  1799. display: flex;
  1800. align-items: flex-end;
  1801. justify-content: center;
  1802. position: fixed;
  1803. top: 0;
  1804. left: 0;
  1805. width: 100%;
  1806. height: 100%;
  1807. background-color: rgba(0, 0, 0, 0.7);
  1808. z-index: 999;
  1809. }
  1810. .remark-select {
  1811. width: 750rpx;
  1812. padding: 0 24rpx 56rpx;
  1813. background: #ffffff;
  1814. border-radius: 24rpx 24rpx 0 0;
  1815. }
  1816. .remark-select .title {
  1817. font-weight: 600;
  1818. color: #191919;
  1819. font-size: 30rpx;
  1820. height: 90rpx;
  1821. line-height: 90rpx;
  1822. text-align: center;
  1823. border-bottom: 2rpx solid #e0e0e0;
  1824. }
  1825. .remark-item .remark-value {
  1826. color: #191919;
  1827. font-size: 26rpx;
  1828. font-weight: bold;
  1829. flex: 1;
  1830. text-align: left;
  1831. }
  1832. .remark-list .remark-item {
  1833. height: 84rpx;
  1834. display: flex;
  1835. border-bottom: 2rpx solid #e0e0e0;
  1836. align-items: center;
  1837. }
  1838. .remark-item .radio-img {
  1839. width: 26rpx;
  1840. height: 26rpx;
  1841. }
  1842. .remark-conf-btn {
  1843. width: 652rpx;
  1844. height: 90rpx;
  1845. line-height: 90rpx;
  1846. border-radius: 90rpx;
  1847. border: 4rpx solid #ff8219;
  1848. text-align: center;
  1849. font-size: 36rpx;
  1850. color: #ff8219;
  1851. margin: 0 auto;
  1852. margin-top: 54rpx;
  1853. }
  1854. .remark-list .remark-item.ser-item{
  1855. border:none;
  1856. background: #B5EDFF;
  1857. border-radius: 12px;
  1858. height:130rpx;
  1859. padding:0 30rpx;
  1860. margin-bottom:24rpx;
  1861. }
  1862. .remark-list .remark-item.ser-item.current-ser{
  1863. background: #FA6400;
  1864. }
  1865. .remark-item.ser-item .remark-value{
  1866. color:#666;
  1867. font-size: 32rpx;
  1868. font-weight:normal;
  1869. flex:1;
  1870. }
  1871. .remark-item.ser-item view{
  1872. color:#666;
  1873. font-size: 32rpx;
  1874. font-weight:normal;
  1875. }
  1876. .remark-item.ser-item.current-ser .remark-value{
  1877. color:#fff;
  1878. font-weight:bold;
  1879. }
  1880. .remark-item.ser-item.current-ser view{
  1881. color:#fff;
  1882. font-weight:bold;
  1883. }
  1884. .remark-item.ser-item .radio-img{
  1885. width:30rpx;
  1886. height:30rpx;
  1887. margin-right:26rpx;
  1888. }
  1889. .ser-right{
  1890. text-align:right;
  1891. }
  1892. .remark-list.ser-list{
  1893. min-height:500rpx;
  1894. max-height: 800rpx;
  1895. overflow-y: scroll;
  1896. }
  1897. .paybt{
  1898. display: inline-block;
  1899. color: #606060;
  1900. border: 2rpx solid #ccc;
  1901. height: 96rpx;
  1902. padding: 0 32rpx;
  1903. border-radius: 56rpx;
  1904. font-size: 40rpx;
  1905. line-height: 96rpx;
  1906. }
  1907. </style>