serviceOrder.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <template>
  2. <view class="container">
  3. <navbar :config="config" backColor="#666"></navbar>
  4. <view class="topview" :style="{top:tabTop+'px'}">
  5. <!--订单类型选择-->
  6. <scroll-view scroll-x="true" class="scrollbox ">
  7. <view class="order-type u-flex-center">
  8. <view class="type-name u-font26 u-181818" :class="{'active': isChange == index}"
  9. v-for="(item,index) in orderType" :key="index" @click="clickBtn(index)">
  10. {{item}}
  11. </view>
  12. </view>
  13. </scroll-view>
  14. </view>
  15. <view class="plrbottom">
  16. <!--订单列表-->
  17. <view class="order-list" v-if="isChange==0||isChange==1">
  18. <view class="order-item u-font24 u-1A1A1A" v-for="(item,index) in orderList" :key="item.id">
  19. <view class="listtwo" v-if="item.payment_status==5">
  20. <view class="childBox" v-for="ordersList in item.orders" :key="ordersList.id">
  21. <view class="u-plr30 pt15-pb24">
  22. <view class="u-flex-center-sb">
  23. <view class="u-text1 viewWidthTitle">
  24. <text class="iconfont2 u-font34 u-bold " style="color: #057D53;">&#xe611;</text>
  25. <text class="u-1A1A1A u-font30 u-ml15">{{ordersList.shop_name}}</text>
  26. <text class="u-CCC right-icon iconfont">&#xe6c7;</text>
  27. </view>
  28. <view v-if="ordersList.end==true">
  29. <text class="u-FF0000 u-font28">交易完成</text>
  30. </view>
  31. <view v-if="ordersList.end==false">
  32. <text class="u-FF0000 u-font28" v-if="ordersList.comment_status==2">交易完成</text>
  33. <text class="u-FF0000 u-font28"
  34. v-if="(ordersList.comment_status==0||ordersList.comment_status==1)&&ordersList.rights_type==0">{{ordersList.transaction_status | payStatus}}</text>
  35. <text class="u-FF0000 u-font28" v-if="ordersList.rights_type >0">维权中</text>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="u-border-one-one"></view>
  40. <view v-for="childItem in ordersList.child_order_list" :key="childItem.id"
  41. @click="goProductDetails(childItem.goods_id,childItem.source_shop_id)">
  42. <ldgoods :value="childItem" :position="list"></ldgoods>
  43. </view>
  44. <view class="u-mt20 u-text-right u-plr30">
  45. <view class="u-flex-center" style="justify-content: flex-end;">
  46. <text>共{{ordersList.goods_number}}件商品,总金额</text>
  47. <view class="u-FF0000 u-font32">
  48. <rich-text :nodes="$mUtil.priceBigSmall(ordersList.total_amount)"></rich-text>
  49. </view>
  50. </view>
  51. <view class="u-mt10" v-if="ordersList.should_freight*1 > 0">含运费¥{{ordersList.should_freight}}</view>
  52. <view class="u-flex-column-end u-mt30">
  53. <view class="btn-type u-flex">
  54. <!--待付款-->
  55. <view v-if="ordersList.transaction_status==0&&item.close_mode==0">
  56. <view class="pay-time"> <text class="iconfont time-icon">&#xe681;</text> 支付剩余
  57. ({{item | dateFilter}})</view>
  58. <view class="btn-item u-text-center u-FF0000 br-FF0000">去付款</view>
  59. </view>
  60. <!--等待使用-->
  61. <view class="u-flex-center" style="justify-content: flex-end;"
  62. v-if="ordersList.transaction_status==1&&ordersList.rights_type==0">
  63. <view class="btn-item u-text-center u-999 br-999" v-if="!ordersList.end"
  64. @click="goRefundType(1,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,ordersList.id)">
  65. 申请售后</view>
  66. <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
  67. @click="changeAddress(ordersList.id)">修改地址</view>
  68. </view>
  69. <!--等待使用-->
  70. <view class="u-flex-center" style="justify-content: flex-end;"
  71. v-if="ordersList.transaction_status==3">
  72. <view class="btn-item u-text-center u-999 br-999" v-if="ordersList.shipment_mode==0"
  73. @click="lookLoginsList(ordersList.id,ordersList.goods_number,ordersList.child_order_list[0].goods_img,1)">
  74. 查看物流</view>
  75. <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
  76. @click="sureGetOrder(ordersList.id,1)">确认收货</view>
  77. </view>
  78. <!--待评价-->
  79. <view v-if="ordersList.transaction_status==5&&ordersList.comment_status==0&&!ordersList.end"
  80. @click="goRefundType(2,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,item.id,ordersList.id)"
  81. class="btn-item u-text-center u-999 br-999">申请售后</view>
  82. <view class="u-flex-center" style="justify-content: flex-end;"
  83. v-if="ordersList.transaction_status==5&&!ordersList.end">
  84. </view>
  85. <view class="btn-item u-text-center u-999 br-999" @click="goOrderDetails(ordersList.id)">查看详情</view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="listone childBox" v-else>
  92. <view class="u-plr30 u-border-one h90">
  93. <view class="u-flex-center-sb">
  94. <view>
  95. <text class="iconfont2 u-font34 u-bold " style="color: #057D53;">&#xe611;</text>
  96. <text class="u-1A1A1A u-font30 u-ml15">松河生活平台</text>
  97. <text class="u-CCC right-icon iconfont">&#xe6c7;</text>
  98. </view>
  99. <text class="u-FF0000 u-font28" v-if="item.close_mode==0">待付款</text>
  100. <text class="u-FF0000 u-font28" v-if="item.close_mode==1">已关闭</text>
  101. <text class="u-FF0000 u-font28" v-if="item.close_mode==2">商家关闭</text>
  102. <text class="u-FF0000 u-font28" v-if="item.close_mode==3">支付过期</text>
  103. </view>
  104. </view>
  105. <view class="u-border-one-one"></view>
  106. <view class="listImg u-border-one" @click="goOrderDetailsPay(item.id)">
  107. <image class="listimgGroup" :src="url" mode="" v-for="(url,index) in item.goods_images" :key="index">
  108. </image>
  109. </view>
  110. <view class="u-mt20 u-text-right u-plr30">
  111. <view class="u-flex-center" style="justify-content: flex-end;"> <text>总金额</text>
  112. <view class="u-FF0000 u-font32">
  113. <rich-text :nodes="$mUtil.priceBigSmall(item.total_amount)"></rich-text>
  114. </view>
  115. </view>
  116. <!-- <view class="u-mt10">含运费¥10.00</view> -->
  117. <view class="u-flex-column-end u-mt30">
  118. <view class="btn-type u-flex">
  119. <!--待付款-->
  120. <view class="u-flex-center" style="justify-content: flex-end;" v-if="item.close_mode==0">
  121. <!-- <view class="pay-time"> <text class="iconfont">&#xe681;</text> 支付剩余11({{$mUtil.patTime(item.expired_pay_time)}})</view> -->
  122. <view class="pay-time"> <text class="iconfont time-icon">&#xe681;</text> 支付剩余
  123. ({{item | dateFilter}})</view>
  124. <view class="btn-item u-text-center u-FF0000 br-FF0000"
  125. @click="waitpayOrder(item.id,item.total_amount,item.expired_pay_time)">去付款</view>
  126. </view>
  127. <view v-if="item.close_mode==1" class="btn-item u-text-center u-999 br-999"
  128. @click="goOrderDetailsPay(item.id)">查看详情</view>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <nodata v-if="noData" :config="{top:20,content:'暂无数据~'}"></nodata>
  135. <loadMore v-if="orderList.length>0" :status="status"></loadMore>
  136. </view>
  137. <!-- 待使用,待使用,待评价 -->
  138. <view class="order-list" v-if="isChange==2||isChange==3">
  139. <view class="order-item u-font24 u-1A1A1A" v-for="(ordersList,index) in orderListOther" :key="ordersList.id">
  140. <view class="listtwo">
  141. <view class="childBox">
  142. <view class="u-plr30 pt15-pb24">
  143. <view class="u-flex-center-sb">
  144. <view class="u-text1 viewWidthTitle">
  145. <text class="iconfont2 u-font34 u-bold " style="color: #057D53;">&#xe611;</text>
  146. <text class="u-1A1A1A u-font30 u-ml15">{{ordersList.shop_name}}</text>
  147. </view>
  148. <view v-if="ordersList.end==true">
  149. <text class="u-FF0000 u-font28">交易完成</text>
  150. </view>
  151. <view v-if="ordersList.end==false">
  152. <text class="u-FF0000 u-font28" v-if="ordersList.comment_status==2">交易完成</text>
  153. <text class="u-FF0000 u-font28"
  154. v-if="(ordersList.comment_status==0||ordersList.comment_status==1)&&ordersList.rights_type==0">{{ordersList.transaction_status | payStatus}}</text>
  155. <text class="u-FF0000 u-font28" v-if="ordersList.rights_type >0">维权中</text>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="u-border-one-one"></view>
  160. <view v-for="childItem in ordersList.child_order_list" :key="childItem.id"
  161. @click="goProductDetails(childItem.goods_id,childItem.source_shop_id)">
  162. <ldgoods :value="childItem" :position="list"></ldgoods>
  163. </view>
  164. <view class="u-mt20 u-text-right u-plr30">
  165. <view class="u-flex-center" style="justify-content: flex-end;">
  166. <text>共{{ordersList.goods_number}}件商品,总金额</text>
  167. <view class="u-FF0000 u-font32">
  168. <rich-text :nodes="$mUtil.priceBigSmall(ordersList.total_amount)"></rich-text>
  169. </view>
  170. </view>
  171. <view class="u-mt10" v-if="ordersList.should_freight*1 > 0">含运费¥{{ordersList.should_freight}}</view>
  172. <view class="u-flex-column-end u-mt30">
  173. <view class="btn-type u-flex">
  174. <!--等待使用-->
  175. <view class="u-flex-center" style="justify-content: flex-end;"
  176. v-if="ordersList.transaction_status==1&&ordersList.rights_type==0">
  177. <view class="btn-item u-text-center u-999 br-999" v-if="!ordersList.end"
  178. @click="goRefundType(1,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,ordersList.id)">
  179. 申请售后</view>
  180. <!-- <view class="btn-item u-text-center u-999 br-999" @click="goPhone(ordersList.mobile)">联系客服</view> -->
  181. <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
  182. @click="changeAddress(ordersList.id)">修改地址</view>
  183. </view>
  184. <!--等待使用-->
  185. <view class="u-flex-center" style="justify-content: flex-end;"
  186. v-if="ordersList.transaction_status==3&&ordersList.shipment_mode==0">
  187. <!-- <view class="btn-item u-text-center u-999 br-999">申请退货</view> -->
  188. <view class="btn-item u-text-center u-999 br-999"
  189. @click="lookLoginsList(ordersList.id,ordersList.goods_number,ordersList.child_order_list[0].goods_img,1)">
  190. 查看物流</view>
  191. <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
  192. @click="sureGetOrder(ordersList.id,2)">确认收货</view>
  193. </view>
  194. <!--待评价-->
  195. <view v-if="ordersList.transaction_status==5&&!ordersList.end"
  196. class="btn-item u-text-center u-999 br-999"
  197. @click="goRefundType(2,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,orderListOther.id,ordersList.id)">
  198. 申请售后</view>
  199. <!--待提货-->
  200. <!-- <view v-if="ordersList.transaction_status==3 &&ordersList.shipment_mode==1" class="btn-item u-text-center u-999 br-999">确认提货</view> -->
  201. <!--申请退款中-->
  202. <view class="btn-item u-text-center u-999 br-999" @click="goOrderDetails(ordersList.id)">查看详情</view>
  203. <view class="btn-item u-text-center u-999 br-999"
  204. v-if="ordersList.use_status==0&&ordersList.rights_type == 0 && ordersList.rights_status == 0"
  205. @click="goRefundType(1,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,ordersList.id)">
  206. 申请售后</view>
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. </view>
  212. </view>
  213. <nodata v-if="noData" :config="{top:20,content:'暂无数据~'}"></nodata>
  214. <loadMore v-if="orderListOther.length>0" :status="status"></loadMore>
  215. </view>
  216. <!-- 退款退货 -->
  217. <view class="order-list" v-if="isChange==4">
  218. <view class="order-item u-font24 u-1A1A1A" v-for="(ordersList) in orderListblack" :key="ordersList.id">
  219. <view class="listtwo">
  220. <view class="childBox">
  221. <view class="u-plr30 pt15-pb24 u-border-one">
  222. <view class="u-flex-center-sb">
  223. <view class="u-text1 viewWidthTitle">
  224. <text class="iconfont2 u-font34 u-bold " style="color: #057D53;">&#xe611;</text>
  225. <text class="u-1A1A1A u-font30 u-ml15">{{ordersList.shop_name}}</text>
  226. </view>
  227. <text class="u-FF0000 u-font28"
  228. v-if="ordersList.rights_type==1">{{ordersList.rights_operate_status | payStatusRight}}</text>
  229. <text class="u-FF0000 u-font28"
  230. v-if="ordersList.rights_type==2">{{ordersList.rights_operate_status | payStatusRights}}</text>
  231. </view>
  232. </view>
  233. <view class="u-border-one-one"></view>
  234. <view v-for="childItem in ordersList.rights_child_orders" :key="childItem.id"
  235. @click="goProductDetails(childItem.goods_id,childItem.shop_id)">
  236. <ldgoodsbalck :value="childItem" :position="list"></ldgoodsbalck>
  237. </view>
  238. <view class="u-mt20 u-text-right u-plr30">
  239. <view class="u-flex-center" style="justify-content: flex-end;">
  240. <text>共{{ordersList.refund_num}}件商品,退款金额</text>
  241. <view class="u-FF0000 u-font32">
  242. <rich-text :nodes="$mUtil.priceBigSmall(ordersList.refund_money)"></rich-text>
  243. </view>
  244. </view>
  245. <view class="u-flex-column-end u-mt30">
  246. <view class="btn-type u-flex">
  247. <view class="u-flex-center" style="justify-content: flex-end;">
  248. <view class="btn-item u-text-center u-999 br-999"
  249. @click="gotoBalckDetail(ordersList.id,ordersList.shop_id,ordersList.rights_type,ordersList.rights_operate_status)">
  250. 查看详情</view>
  251. <view class="btn-item u-text-center u-999 br-999"
  252. @click="lookLoginsList(ordersList.id,ordersList.refund_num,ordersList.rights_child_orders[0].goods_img,2)"
  253. v-if="ordersList.rights_type==2&&ordersList.rights_operate_status==2">查看物流</view>
  254. <view class="btn-item u-text-center u-FF0000 br-FF0000"
  255. @click="gotoBalckDetail(ordersList.id,ordersList.shop_id,ordersList.rights_type,ordersList.rights_operate_status)"
  256. v-if="ordersList.rights_type==2&&ordersList.rights_operate_status==1">去发货</view>
  257. </view>
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. </view>
  263. </view>
  264. <nodata v-if="noData" :config="{top:20,content:'暂无数据~'}"></nodata>
  265. <loadMore v-if="orderListblack.length>0" :status="status"></loadMore>
  266. </view>
  267. </view>
  268. <!--页面加载动画-->
  269. <ldLoading isFullScreen :active="loading"></ldLoading>
  270. </view>
  271. </template>
  272. <script>
  273. import ldgoodsbalck from "../../../components/ld-goods/ld-goods-black.vue"
  274. import ldgoods from "../../../components/ld-goods/ld-goods.vue"
  275. var app = getApp()
  276. let vObj
  277. export default {
  278. components: {
  279. ldgoodsbalck,
  280. ldgoods
  281. },
  282. beforeCreate() {
  283. vObj = this
  284. },
  285. data() {
  286. return {
  287. timer: null,
  288. timeCount: 0,
  289. list: 1,
  290. config: {
  291. back: true, //false是tolbar页面 是则不写
  292. title: '全部订单',
  293. color: '#1A1A1A',
  294. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  295. backgroundColor: [1, "#FFFFFF"],
  296. statusBarFontColor: '#1A1A1A',
  297. backPage: '/pages/index/personal'
  298. // backTabPage: '/pages/index/personal'
  299. },
  300. isChange: 0,
  301. orderType: ["全部订单", "待付款", "待使用", "待评价", "退款"],
  302. shopStatus: true, //发货状态
  303. loading: true,
  304. orderList: [], //全部订单,待支付
  305. orderListOther: [], //待使用,待使用,待评价
  306. orderListblack: [],
  307. status: 'more', //more|loading|noMore
  308. noData: false,
  309. parmas: {
  310. page: 1,
  311. limit: 10,
  312. order_type: 2
  313. },
  314. parmasother: {
  315. page: 1,
  316. limit: 10,
  317. order_type: 2
  318. },
  319. parmasblack: {
  320. page: 1,
  321. limit: 10,
  322. order_type: 2
  323. },
  324. orderid: null,
  325. currentKey: null,
  326. tabTop: 0
  327. }
  328. },
  329. beforeDestroy() {
  330. clearInterval(this.timer)
  331. },
  332. onBackPress() {
  333. uni.redirectTo({
  334. url: "../../index/personal"
  335. })
  336. return true
  337. },
  338. onReachBottom(e) {
  339. this.status = 'loading'
  340. if (this.isChange == 0) {
  341. this.parmas.page++
  342. this.getOrderList()
  343. } else if (this.isChange == 1) {
  344. this.parmas.page++
  345. this.waitPay()
  346. } else if (this.isChange == 4) {
  347. this.parmasblack.page++
  348. this.blackPay()
  349. } else {
  350. this.parmasother.page++
  351. let key = 1
  352. if (this.isChange == 2) {
  353. key = 3
  354. } else if (this.isChange == 3) {
  355. key = 5
  356. }
  357. this.otherPay(key)
  358. }
  359. },
  360. onPullDownRefresh() {
  361. this.rest()
  362. if (this.isChange == 0) {
  363. this.getOrderList()
  364. } else if (this.isChange == 1) {
  365. this.waitPay()
  366. } else if (this.isChange == 4) {
  367. this.blackPay()
  368. } else {
  369. let key = 1
  370. if (this.isChange == 2) {
  371. key = 3
  372. } else if (this.isChange == 3) {
  373. key = 5
  374. }
  375. this.otherPay(key)
  376. }
  377. },
  378. onLoad(options) {
  379. let that = this
  380. this.timer = setInterval(() => {
  381. that.timeCount++
  382. }, 1000)
  383. this.tabTop = app.globalData.barHeight + 44;
  384. if (options.keys) {
  385. if (options.keys == -1) {
  386. this.isChange = 0
  387. this.getOrderList()
  388. } else if (options.keys == 0) {
  389. this.isChange = 1
  390. this.waitPay()
  391. } else if (options.keys == 6) {
  392. this.isChange = 4
  393. this.blackPay()
  394. } else {
  395. if (options.keys == 3) {
  396. this.isChange = 2
  397. } else if (options.keys == 5) {
  398. this.isChange = 3
  399. }
  400. this.currentKey = options.keys
  401. this.otherPay(options.keys)
  402. }
  403. } else {
  404. this.getOrderList()
  405. }
  406. },
  407. filters: {
  408. dateFilter(item) {
  409. // console.log(item,'item')
  410. // item.expired_pay_time
  411. // endTime - nowTime
  412. let time = item.expired_pay_time - item.now_millis - vObj.timeCount * 1000;
  413. console.log(time)
  414. let str = vObj.$mUtil.countDownClock(time)
  415. return str
  416. },
  417. payStatus(val) {
  418. switch (val) {
  419. case 0:
  420. return "待支付"
  421. break;
  422. case 1:
  423. return "待使用"
  424. break;
  425. case 2:
  426. return "部分发货"
  427. break;
  428. case 3:
  429. return "待使用"
  430. break;
  431. case 4:
  432. return "部分已使用"
  433. break;
  434. case 5:
  435. return "待评价"
  436. break;
  437. case 6:
  438. return "关闭"
  439. break;
  440. default:
  441. break;
  442. }
  443. },
  444. payStatusRight(val) { //退款
  445. //维权订单操作状态(0申请,1同意,2买家已发货,3商家已收到退货商品,4商家发起退款支付,5已支付退款,6拒绝,7自动关闭,8主动撤消
  446. switch (val) {
  447. case 0:
  448. return "申请退款中"
  449. break;
  450. case 1:
  451. return "商家同意"
  452. break;
  453. case 4:
  454. return "商家发起退款支付"
  455. break;
  456. case 5:
  457. return "退款成功"
  458. break;
  459. case 6:
  460. return "商家拒绝"
  461. break;
  462. default:
  463. break;
  464. }
  465. },
  466. payStatusRights(val) { //退款退货
  467. //维权订单操作状态(0申请,1同意,2买家已发货,3商家已收到退货商品,4商家发起退款支付,5已支付退款,6拒绝,7自动关闭,8主动撤消
  468. switch (val) {
  469. case 0:
  470. return "申请退款/退货中"
  471. break;
  472. case 1:
  473. return "等待买家发货"
  474. break;
  475. case 2:
  476. return "待商家收货"
  477. break;
  478. case 3:
  479. return "商家已收货"
  480. break;
  481. case 4:
  482. return "商家待打款"
  483. break;
  484. case 5:
  485. return "退款/退货成功"
  486. break;
  487. case 6:
  488. return "商家拒绝"
  489. break;
  490. case 7:
  491. return "自动关闭"
  492. break;
  493. case 8:
  494. return "撤销"
  495. break;
  496. default:
  497. break;
  498. }
  499. }
  500. },
  501. methods: {
  502. goProductDetails(id, shopid) {
  503. uni.navigateTo({
  504. url: "/pages/product/goods/serviceGood?id=" + id + "&shopid=" + shopid
  505. })
  506. },
  507. goPhone(phone) {
  508. if (phone) {
  509. uni.makePhoneCall({
  510. phoneNumber: phone //仅为示例
  511. });
  512. }
  513. },
  514. // 物流//type:1普通订单,2维权订单
  515. lookLoginsList(orderid, num, img, type) {
  516. uni.navigateTo({
  517. url: "../logistics?id=" + orderid + "&num=" + num + "&img=" + img + "&type=" + type,
  518. })
  519. },
  520. //申请售后
  521. goRefundType(i, code, time, list, orderid, childid) {
  522. //i:1未发货,退款,2收到货退款/退货
  523. uni.setStorageSync('blackgoodsList', list)
  524. if (i == 1) {
  525. uni.navigateTo({
  526. url: "applicationDrawback?keystatus=" + i + "&title=申请退款" + "&orderid=" + orderid + "&type=service"
  527. })
  528. } else {
  529. uni.navigateTo({
  530. url: "refundType?order_code=" + code + '&format_order_time=' + time + '&keystatus=' + i + "&orderid=" +
  531. orderid + "&childid=" + childid
  532. })
  533. }
  534. },
  535. //确认收货
  536. sureGetOrder(id, k) {
  537. uni.showModal({
  538. title: '提示',
  539. content: '确定已经收到了该商品?',
  540. success: (res) => {
  541. if (res.confirm) {
  542. this.$http.post('/order/receipt', {
  543. order_id: id
  544. })
  545. .then(res => {
  546. if (res && res.code == 200) {
  547. this.$mUtil.toast('收货成功')
  548. this.rest()
  549. if (k == 1) {
  550. this.getOrderList()
  551. } else if (k == 2) {
  552. this.otherPay(this.currentKey)
  553. }
  554. }
  555. })
  556. } else if (res.cancel) {
  557. }
  558. }
  559. });
  560. },
  561. //选完地址回选
  562. otherFun(object) {
  563. if (!!object) {
  564. console.log(object.addressid)
  565. this.$http.put('/order/update-receipt/' + this.orderid + '/' + object.addressid)
  566. .then(res => {
  567. if (res && res.code == 200) {
  568. this.$mUtil.toast('修改成功')
  569. }
  570. })
  571. }
  572. },
  573. //修改地址
  574. changeAddress(id) {
  575. this.orderid = id
  576. uni.navigateTo({
  577. url: '/pages/user/address/addressList'
  578. })
  579. },
  580. rest() {
  581. this.parmas.page = 1
  582. this.parmasother.page = 1
  583. this.parmasblack.page = 1
  584. this.orderList = []
  585. this.orderListOther = []
  586. this.orderListblack = []
  587. },
  588. getOrderList() {
  589. this.$http.get('/pay/order/all/page', this.parmas)
  590. .then(res => {
  591. this.loading = false;
  592. if (res && res.code == 200) {
  593. uni.stopPullDownRefresh()
  594. this.orderList = this.orderList.concat(res.page.list)
  595. if (this.orderList.length == 0) {
  596. this.noData = true
  597. } else {
  598. this.noData = false
  599. }
  600. if (res.page.totalPage <= res.page.currPage) {
  601. this.status = 'noMore'
  602. } else {
  603. this.status = 'more'
  604. }
  605. }
  606. })
  607. },
  608. waitPay() {
  609. this.$http.get('/pay/order/wait/page', this.parmas)
  610. .then(res => {
  611. this.loading = false;
  612. if (res && res.code == 200) {
  613. uni.stopPullDownRefresh()
  614. this.orderList = this.orderList.concat(res.page.list)
  615. if (this.orderList.length == 0) {
  616. this.noData = true
  617. } else {
  618. this.noData = false
  619. }
  620. if (res.page.totalPage <= res.page.currPage) {
  621. this.status = 'noMore'
  622. } else {
  623. this.status = 'more'
  624. }
  625. }
  626. })
  627. },
  628. otherPay(k) {
  629. this.parmasother.transaction_status = k //0已下单,待支付,1待使用(待备货) 3,"待使用(待自提)",5交易完成
  630. this.$http.get('/order/page', this.parmasother)
  631. .then(res => {
  632. this.loading = false;
  633. if (res && res.code == 200) {
  634. uni.stopPullDownRefresh()
  635. this.orderListOther = this.orderListOther.concat(res.page.list)
  636. if (this.orderListOther.length == 0) {
  637. this.noData = true
  638. } else {
  639. this.noData = false
  640. }
  641. if (res.page.totalPage <= res.page.currPage) {
  642. this.status = 'noMore'
  643. } else {
  644. this.status = 'more'
  645. }
  646. }
  647. })
  648. },
  649. blackPay() {
  650. this.$http.get('/rights/page', this.parmasblack)
  651. .then(res => {
  652. this.loading = false;
  653. if (res && res.code == 200) {
  654. uni.stopPullDownRefresh()
  655. this.orderListblack = this.orderListblack.concat(res.page.list)
  656. if (this.orderListblack.length == 0) {
  657. this.noData = true
  658. } else {
  659. this.noData = false
  660. }
  661. if (res.page.totalPage <= res.page.currPage) {
  662. this.status = 'noMore'
  663. } else {
  664. this.status = 'more'
  665. }
  666. }
  667. })
  668. },
  669. clickBtn(index) {
  670. this.rest()
  671. this.isChange = index
  672. if (index == 0) {
  673. this.getOrderList()
  674. } else if (index == 1) {
  675. this.waitPay()
  676. } else if (index == 2 || index == 3) {
  677. let key = 1
  678. if (index == 2) {
  679. key = 3
  680. } else if (index == 3) {
  681. key = 5
  682. }
  683. this.currentKey = key
  684. this.otherPay(key)
  685. } else { //退货/退款
  686. this.blackPay()
  687. }
  688. },
  689. //支付
  690. waitpayOrder(id, total_amount, expired_pay_time) {
  691. uni.navigateTo({
  692. url: '../../order/pay?id=' + id + '&total_amount=' + total_amount + '&expired_pay_time=' +
  693. expired_pay_time + '&type=service'
  694. })
  695. },
  696. //详情页
  697. goOrderDetails(id) {
  698. uni.navigateTo({
  699. url: "serviceOrderDetail?id=" + id + '&status=pay'
  700. })
  701. },
  702. gotoBalckDetail(id, shopid, type, status) {
  703. uni.navigateTo({
  704. url: "orderblackDetails?id=" + id + "&shopid=" + shopid + "&type=" + type + "&status=" + status
  705. })
  706. },
  707. //支付订单
  708. goOrderDetailsPay(id) {
  709. uni.navigateTo({
  710. url: "serviceOrderDetail?id=" + id + '&status=waitpay'
  711. })
  712. },
  713. }
  714. }
  715. </script>
  716. <style lang="scss">
  717. page {
  718. background-color: #F5F5F5;
  719. }
  720. .right-icon {
  721. font-size: 25rpx
  722. }
  723. .plrbottom {
  724. padding: 110rpx 30rpx 0;
  725. }
  726. .h90 {
  727. height: 90rpx;
  728. line-height: 90rpx;
  729. }
  730. .topview {
  731. background-color: #F5F5F5;
  732. height: 110rpx;
  733. width: 100%;
  734. position: fixed;
  735. left: 0;
  736. box-sizing: border-box;
  737. padding: 0 30rpx;
  738. z-index: 66;
  739. }
  740. .scrollbox {
  741. white-space: nowrap;
  742. }
  743. .pt-pb {
  744. padding: 30rpx;
  745. }
  746. .pt15-pb24 {
  747. padding-top: 24rpx;
  748. padding-bottom: 24rpx;
  749. }
  750. .br-FF0000 {
  751. border: 1px solid #FF0000;
  752. }
  753. .br-999 {
  754. border: 1px solid #999999;
  755. }
  756. .order-type {
  757. margin-top: 30rpx;
  758. margin-bottom: 26rpx;
  759. display: inline-block;
  760. .active {
  761. background: #0B844A;
  762. color: #FFFFFF;
  763. }
  764. .type-name {
  765. border-radius: 30px;
  766. padding: 12rpx 18rpx;
  767. display: inline-block;
  768. }
  769. }
  770. .listImg {
  771. padding: 20rpx 0 0 16rpx;
  772. }
  773. .listimgGroup {
  774. width: 200rpx;
  775. height: 200rpx;
  776. margin: 0 25rpx 25rpx 0;
  777. border-radius: 15rpx;
  778. }
  779. .order-item {
  780. .btn-type {
  781. padding-bottom: 25rpx;
  782. .pay-time {
  783. line-height: 70rpx;
  784. margin-left: auto;
  785. .time-icon {
  786. color: #999999;
  787. }
  788. }
  789. .btn-item {
  790. width: 200rpx;
  791. height: 70rpx;
  792. line-height: 68rpx;
  793. border-radius: 35px;
  794. margin-left: 22rpx;
  795. }
  796. }
  797. }
  798. .childBox {
  799. background-color: #FFFFFF;
  800. border-radius: 20rpx;
  801. margin-bottom: 30rpx;
  802. }
  803. </style>