search-order.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164
  1. <template>
  2. <view class="search-container">
  3. <!-- <or-search :theme="themeClass" @getSearchText="getSearchText"></or-search> -->
  4. <view class="search-main">
  5. <view class="search">
  6. <view class="search-input">
  7. <text class="iconfont icon-iconfonticonfontsousuo1"></text>
  8. <input
  9. maxlength="20"
  10. focus
  11. type="text"
  12. value=""
  13. confirm-type="search"
  14. @focus="onFocus"
  15. @input="onShowClose"
  16. @confirm="subMitSearch()"
  17. placeholder="请输入商品关键词"
  18. v-model.trim="listQuery.searchWord"
  19. />
  20. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
  21. </view>
  22. <view class="search-btn" @click="subMitSearch()">搜索</view>
  23. </view>
  24. </view>
  25. <view class="search-container-history" v-if="!isShowWrapper">
  26. <view :class="'s-' + themeClass" v-if="serachRecordList.length > 0">
  27. <view class="header"> 搜索历史<text class="iconfont icon-shanchu" @click="confirmDetele"></text> </view>
  28. <view class="list">
  29. <view
  30. v-for="(item, index) in serachRecordList"
  31. :key="index"
  32. @click="keywordsClick(item.searchWord)"
  33. >{{ item.searchWord }}</view
  34. >
  35. </view>
  36. </view>
  37. </view>
  38. <view
  39. class=" order-container"
  40. v-if="isShowWrapper"
  41. :style="{ overflow: 'auto', height: showSkeleton ? windowHeight + 'px' : 'auto' }"
  42. >
  43. <scroll-view
  44. class="tui-skeleton"
  45. :style="{ height: scrollHeight + 'px' }"
  46. @scrolltolower="scrolltolower"
  47. scroll-y
  48. >
  49. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
  50. <!-- 空白页 -->
  51. <empty v-if="isShowEmpty" :navbarHeight="navbarHeight"></empty>
  52. <!-- 列表 -->
  53. <view v-else class="tui-order-content">
  54. <view
  55. class="tui-order-item"
  56. v-for="(order, orderIndex) in orderList"
  57. :key="orderIndex"
  58. @click.stop="detail(order)"
  59. >
  60. <view class="order-title">
  61. <view class="order-title-name">{{ order.clubName ? order.clubName : '' }}</view>
  62. <view class="order-title-t">
  63. <text
  64. class="bage-buss tui-skeleton-fillet"
  65. v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
  66. >协销</text
  67. >
  68. <text
  69. class="bage-auto tui-skeleton-fillet"
  70. v-if="
  71. order.orderSubmitType == 0 ||
  72. order.orderSubmitType == 1 ||
  73. order.orderSubmitType == 2
  74. "
  75. >
  76. 自主
  77. </text>
  78. <text class="bage-text tui-skeleton-fillet">
  79. 订单号:{{ order.orderNo }}({{ order.orderId }})
  80. </text>
  81. <image
  82. class="bage-icon"
  83. src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
  84. mode="widthFix"
  85. v-if="order.secondHandOrderFlag == 1"
  86. >
  87. </image>
  88. </view>
  89. <view class="order-title-b">
  90. <view class="order-title-btxt tui-skeleton-fillet"
  91. >下单时间:{{ order.orderTime }}</view
  92. >
  93. <view class="order-title-tip tui-skeleton-fillet">{{
  94. StateExpFormat(order.status)
  95. }}</view>
  96. </view>
  97. </view>
  98. <block v-for="(shop, index) in order.shopOrderList" :key="index">
  99. <view class="goods-title">
  100. <view v-if="shop.shopPromotion" class="floor-item-act">
  101. <view class="floor-tags">{{ shop.shopPromotion.name }}</view>
  102. </view>
  103. <view class="title-text tui-skeleton-fillet">{{ shop.shopName }}</view>
  104. </view>
  105. <view
  106. class="goods-item"
  107. v-for="(pros, prosIndex) in shop.orderProductList"
  108. :key="prosIndex"
  109. >
  110. <view class="goods-pros-t">
  111. <view class="pros-img tui-skeleton-fillet">
  112. <image :src="pros.image" alt="" />
  113. <text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
  114. >赠品</text
  115. >
  116. </view>
  117. <view class="pros-product clearfix">
  118. <view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
  119. <view
  120. class="productspec tui-skeleton-fillet"
  121. v-if="pros.productCategory != 2"
  122. >规格:{{ pros.productUnit }}</view
  123. >
  124. <view class="productprice">
  125. <view class="price tui-skeleton-fillet">
  126. <text>¥{{ pros.price | NumFormat }}</text>
  127. </view>
  128. <view class="count tui-skeleton-fillet">
  129. <text class="small">x</text>{{ pros.num }}
  130. </view>
  131. </view>
  132. <view class="floor-item-act" v-if="pros.productPromotion != null">
  133. <view v-if="PromotionsFormat(pros.productPromotion)" class="floor-tags">
  134. {{ pros.productPromotion.name }}
  135. <text
  136. v-if="
  137. pros.productPromotion != null &&
  138. pros.productPromotion.type != 3
  139. "
  140. >
  141. :¥{{
  142. pros.productPromotion == null
  143. ? '0.00'
  144. : pros.productPromotion.touchPrice | NumFormat
  145. }}
  146. </text>
  147. </view>
  148. <view v-else-if="pros.productPromotion.type != 3" class="floor-tags">{{
  149. pros.productPromotion.name
  150. }}</view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. </block>
  156. <view class="order-footer">
  157. <view class="order-footer-top" v-if="order.discountFee != 0"
  158. >经理折扣:¥{{ order.discountFee | NumFormat }}</view
  159. >
  160. <view class="order-footer-bot">
  161. <view class="count tui-skeleton-fillet">共{{ order.productCount }}件商品</view>
  162. <view
  163. class="money tui-skeleton-fillet"
  164. v-if="order.status == 31 || order.status == 32 || order.status == 33"
  165. >
  166. 已支付:<label style="color:#f94b4b ;"
  167. >¥{{ order.receiptAmount | NumFormat }}</label
  168. >
  169. </view>
  170. <view class="money tui-skeleton-fillet" v-else>
  171. 待付总额:<label style="color:#f94b4b ;"
  172. >¥{{ order.pendingPayments | NumFormat }}</label
  173. >
  174. </view>
  175. </view>
  176. </view>
  177. <!-- 底部button -->
  178. <order-button
  179. ref="orderButton"
  180. :status="order.status"
  181. :rechargeGoods="order.rechargeGoods"
  182. :orderId="order.orderId"
  183. :userId="order.userId"
  184. :secondHandOrderFlag="order.secondHandOrderFlag"
  185. @buttonConfirm="handButtonConfirm"
  186. >
  187. </order-button>
  188. </view>
  189. <!--加载loadding-->
  190. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  191. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"></tui-nomore>
  192. <!--加载loadding-->
  193. </view>
  194. </view>
  195. </scroll-view>
  196. </view>
  197. <!-- 分享弹窗 -->
  198. <share-alert v-if="isShareModal" :orderId="btnoRderID" @shareConfirm="onShareAppMessage"> </share-alert>
  199. <!-- 透明模态层 -->
  200. <modal-layer v-if="isModalLayer"></modal-layer>
  201. <!-- 再来一单弹窗 -->
  202. <view class="aganBj" v-show="showAgan">
  203. <view class="alertAgan">
  204. <text class="title">{{ promptitle }}</text>
  205. <view class="goods">
  206. <view class="list" v-for="(item, index) in failList" :key="index">
  207. <image class="image-left" :src="item.image"></image>
  208. <view class="name-right">{{ item.name }}</view>
  209. </view>
  210. </view>
  211. <view class="BtnAll">
  212. <view class="closebtn btn" @click="closeBtn">取消</view>
  213. <view class="cancel btn" @click="cancelBtn">确定</view>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. </template>
  219. <script>
  220. import orSearch from '@/components/uni-search/or-search.vue'
  221. import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  222. import tuiNomore from '@/components/tui-components/nomore/nomore'
  223. import orderButton from '@/components/cm-module/orderDetails/sellerOrderButton' //按钮
  224. import modalLayer from '@/components/modal-layer'
  225. import empty from '@/components/empty'
  226. import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert' //分享弹窗
  227. import authorize from '@/common/config/authorize.js'
  228. const defaultListQuery = {
  229. pageNum: 1, // 页码
  230. pageSize: 10, // 每页条数
  231. serviceProviderId: 0, // 用户Id
  232. searchWord: '' // 搜索关键词
  233. }
  234. export default {
  235. components: {
  236. orSearch,
  237. tuiLoadmore,
  238. tuiNomore,
  239. orderButton,
  240. empty,
  241. shareAlert
  242. },
  243. data() {
  244. return {
  245. listQuery: Object.assign({}, defaultListQuery),
  246. themeClass: 'block',
  247. isShowClose: false, //是否显示清空输入框图标
  248. isSearchHistory: false, //是都显示搜索历史
  249. serachRecordList: [],
  250. isShowWrapper: false,
  251. isModallayer: false,
  252. isShowEmpty: false,
  253. windowHeight: '',
  254. showSkeleton: true,
  255. userId: 0,
  256. orderList: [],
  257. btnClubUserID: 0,
  258. btnoRderID: 0, //点击按钮传入的的订单ID
  259. scrollTop: 0,
  260. deteleType: '',
  261. skeletonShow: true,
  262. isShareModal: false, //控制分享弹窗
  263. isCenceModal: false, //控制取消订单弹窗
  264. isShowDelModal: false, //控制删除订单弹窗
  265. isModalLayer: false,
  266. loadding: false,
  267. pullUpOn: true,
  268. hasNextPage: false,
  269. pullFlag: true,
  270. navbarHeight: '',
  271. nomoreText: '上拉显示更多',
  272. scrollHeight: '',
  273. showAgan: false,
  274. failList: [], // 再来一单可购买商品
  275. promptitle: '',
  276. aganOrderId: 0
  277. }
  278. },
  279. onLoad() {
  280. this.initGetSerachRecord()
  281. },
  282. filters: {
  283. NumFormat(value) {
  284. //处理金额
  285. return Number(value).toFixed(2)
  286. }
  287. },
  288. methods: {
  289. subMitSearch() {
  290. if (this.listQuery.searchWord == '') {
  291. this.$util.msg('请输入订单编号', 2000)
  292. } else {
  293. this.commodityList = []
  294. this.getOrderDatainit()
  295. }
  296. },
  297. async initGetSerachRecord() {
  298. const userInfo = await this.$api.getStorage()
  299. this.listQuery.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  300. this.userId = userInfo.userId ? userInfo.userId : 0
  301. this.OrderService.SearchOrderHistory({ userId: this.userId })
  302. .then(response => {
  303. this.serachRecordList = response.data
  304. if (this.serachRecordList.length > 0) {
  305. this.isSearchHistory = true
  306. } else {
  307. this.isSearchHistory = false
  308. }
  309. })
  310. .catch(error => {
  311. this.$util.msg(error.msg, 2000)
  312. })
  313. },
  314. onShowClose() {
  315. //输入框失去焦点时触发
  316. this.inputEmpty(this.listQuery.searchWord)
  317. },
  318. onFocus() {
  319. //输入框获取焦点时触发
  320. this.inputEmpty(this.listQuery.searchWord)
  321. this.initGetSerachRecord()
  322. },
  323. delInputText() {
  324. //清除输入框内容
  325. this.listQuery.searchWord = ''
  326. this.isShowClose = false
  327. this.isShowWrapper = false
  328. this.inputEmpty(this.listQuery.searchWord)
  329. this.initGetSerachRecord()
  330. },
  331. keywordsClick(item) {
  332. //关键词搜索与历史搜索
  333. this.listQuery.searchWord = item
  334. this.isShowClose = true
  335. this.subMitSearch()
  336. },
  337. confirmDetele() {
  338. //清空历史记录
  339. this.$util.modal('提示', '确定删除历史记录?', '确定', '取消', true, () => {
  340. this.OrderService.ClearOrderHistory({ userId: this.userId })
  341. .then(response => {
  342. this.$util.msg('删除记录成功', 2000, true, 'success')
  343. this.serachRecordList = []
  344. })
  345. .catch(error => {
  346. this.$util.msg(error.msg, 2000)
  347. })
  348. })
  349. },
  350. inputEmpty(val) {
  351. this.isShowWrapper = false
  352. if (val != '') {
  353. this.isShowClose = true
  354. } else {
  355. this.isShowClose = false
  356. }
  357. },
  358. getOrderDatainit(index, source) {
  359. /**
  360. * @订单初始化加载 仅加载第一页码
  361. * @param:searchWord(关键词)
  362. * @param:serviceProviderId(用户ID)
  363. * @param:pageNum(页码数)
  364. * @param:listQuery.pageSize(每页条数)
  365. * @param:organizeID(全局变量组织ID)
  366. */
  367. this.SellerService.getSellerOrderList(this.listQuery)
  368. .then(response => {
  369. this.isShowWrapper = true
  370. this.showSkeleton = true
  371. let data = response.data
  372. if (data.list && data.list.length > 0) {
  373. let filrerData = data.list.filter(item => {
  374. //添加不同状态下订单的表现形式
  375. item = Object.assign(item, this.StateExpFormat(item.state))
  376. return item
  377. })
  378. this.orderList = []
  379. filrerData.forEach(item => {
  380. this.orderList.push(item)
  381. })
  382. this.hasNextPage = data.hasNextPage
  383. if (this.hasNextPage) {
  384. this.pullUpOn = false
  385. this.nomoreText = '上拉显示更多'
  386. } else {
  387. if (this.orderList.length < 2) {
  388. this.pullUpOn = true
  389. } else {
  390. this.pullUpOn = false
  391. this.nomoreText = '已至底部'
  392. }
  393. }
  394. this.isShowEmpty = false
  395. } else {
  396. this.isShowEmpty = true
  397. }
  398. })
  399. .catch(error => {
  400. this.$util.msg(error.msg, 2000)
  401. })
  402. },
  403. getOnReachBottomData(index) {
  404. //上拉加载
  405. this.listQuery.pageNum += 1
  406. this.SellerService.getSellerOrderList(this.listQuery)
  407. .then(response => {
  408. let data = response.data
  409. this.hasNextPage = data.hasNextPage
  410. this.orderList = this.orderList.concat(data.list)
  411. this.pullFlag = false // 防上拉暴滑
  412. setTimeout(() => {
  413. this.pullFlag = true
  414. }, 500)
  415. if (this.hasNextPage) {
  416. this.pullUpOn = false
  417. this.nomoreText = '上拉显示更多'
  418. } else {
  419. this.loadding = false
  420. this.pullUpOn = false
  421. this.nomoreText = '已至底部'
  422. }
  423. })
  424. .catch(error => {
  425. this.$util.msg(error.msg, 2000)
  426. })
  427. },
  428. scrolltolower() {
  429. if (this.hasNextPage) {
  430. this.loadding = true
  431. this.pullUpOn = true
  432. this.showSkeleton = false
  433. this.getOnReachBottomData()
  434. }
  435. },
  436. detail(order) {
  437. //订单详情跳转
  438. this.isModalLayer = true
  439. this.$api.navigateTo(
  440. `/pages/seller/order/order-details?type=seacrch&orderId=${order.orderId}&userId=${order.userId}`
  441. )
  442. },
  443. handButtonConfirm(data) {
  444. //获取点击
  445. this.handShowAlert(data)
  446. this.btnoRderID = data.orderId
  447. },
  448. handShowAlert(data) {
  449. //执行
  450. switch (data.type) {
  451. case 'query':
  452. this.isModalLayer = true
  453. this.$api.navigateTo('/pages/user/order/order-logistics?orderID=' + data.orderId)
  454. break
  455. case 'delete':
  456. this.handOrderDetele(data.orderId)
  457. break
  458. case 'cancel':
  459. this.handCenceConfirm(data.orderId)
  460. break
  461. case 'confirm':
  462. this.handOrderConfirm(data.orderId)
  463. break
  464. case 'again':
  465. this.handOrderAgain(data.orderId)
  466. }
  467. },
  468. handOrderAgain(orderId) {
  469. // 再来一单
  470. this.aganOrderId = orderId
  471. this.SellerService.SellerCreateOrderAgain({
  472. confirmFlag: 0,
  473. orderId: this.aganOrderId,
  474. serviceProviderId: this.listQuery.serviceProviderId
  475. })
  476. .then(res => {
  477. if (res.code == 0) {
  478. this.$api.setStorage('orderUserInfo', {
  479. clubID: res.data.clubId,
  480. againBuyProductIds: res.data.againBuyProductIds
  481. })
  482. this.$api.navigateTo('/pages/seller/cart/cart')
  483. }
  484. })
  485. .catch(error => {
  486. if (error.code == -3) {
  487. this.showAgan = true
  488. this.promptitle = error.msg
  489. this.failList = error.data
  490. } else if (error.code == -2) {
  491. this.$util.modal('', error.msg, '确定', '', false, () => {})
  492. } else {
  493. this.$util.msg(error.msg, 2000)
  494. }
  495. })
  496. },
  497. closeBtn() {
  498. //
  499. this.showAgan = false
  500. },
  501. cancelBtn() {
  502. // 再来一单弹窗
  503. this.SellerService.SellerCreateOrderAgain({
  504. serviceProviderId: this.listQuery.serviceProviderId,
  505. orderId: this.aganOrderId,
  506. confirmFlag: 1
  507. }).then(res => {
  508. if (res.code == 0) {
  509. this.$api.navigateTo('/pages/seller/cart/cart')
  510. this.showAgan = false
  511. }
  512. })
  513. },
  514. handOrderConfirm(orderId) {
  515. //确认订单
  516. this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
  517. this.OrderService.AffirmOrder({ orderId: orderId })
  518. .then(response => {
  519. this.$util.msg(response.msg, 2000, true, 'success')
  520. setTimeout(() => {
  521. this.getOrderDatainit()
  522. }, 2000)
  523. })
  524. .catch(error => {
  525. this.$util.msg(error.msg, 2000)
  526. })
  527. })
  528. },
  529. handOrderDetele(orderId) {
  530. //删除订单
  531. this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
  532. this.OrderService.DeleteOrder({ orderId: orderId })
  533. .then(response => {
  534. this.$util.msg(response.msg, 2000, true, 'success')
  535. setTimeout(() => {
  536. this.getOrderDatainit()
  537. }, 2000)
  538. })
  539. .catch(error => {
  540. this.$util.msg(error.msg, 2000)
  541. })
  542. })
  543. },
  544. handCenceConfirm(orderId) {
  545. //取消订单
  546. this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
  547. this.OrderService.CancelOrder({ orderId: orderId })
  548. .then(response => {
  549. this.$util.msg(response.msg, 2000, true, 'success')
  550. setTimeout(() => {
  551. this.getOrderDatainit()
  552. }, 2000)
  553. })
  554. .catch(error => {
  555. this.$util.msg(error.msg, 2000)
  556. })
  557. })
  558. },
  559. onShareAppMessage(res) {
  560. //分享转发
  561. this.isShareModal = false
  562. if (res.from === 'button') {
  563. // 来自页面内转发按钮
  564. }
  565. return {
  566. title: '您有新的分享订单,快来查看吧~',
  567. path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
  568. this.btnClubUserID
  569. }&serviceProviderId=${this.serviceProviderId}`,
  570. imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
  571. }
  572. },
  573. PromotionsFormat(promo) {
  574. //促销活动类型数据处理
  575. if (promo != null) {
  576. if (promo.type == 1 && promo.mode == 1) {
  577. return true
  578. } else {
  579. return false
  580. }
  581. }
  582. return false
  583. },
  584. //订单状态文字和颜色
  585. StateExpFormat(state) {
  586. let stateText = '',
  587. stateTextObject = {
  588. 4: '交易完成',
  589. 5: '订单完成',
  590. 6: '已关闭',
  591. 7: '交易全退',
  592. 77: '交易全退',
  593. 11: '待付款待发货',
  594. 12: '待付款部分发货',
  595. 13: '待付款已发货',
  596. 21: '部分付款待发货',
  597. 22: '部分付款部分发货',
  598. 23: '部分付款已发货',
  599. 31: '已付款待发货',
  600. 32: '已付款部分发货',
  601. 33: '已付款已发货',
  602. 111: '待付款待发货'
  603. }
  604. Object.keys(stateTextObject).forEach(key => {
  605. if (key == state) {
  606. stateText = stateTextObject[key]
  607. }
  608. })
  609. return stateText
  610. },
  611. orderPriceToFixed(n) {
  612. let price = ''
  613. price = n.toFixed(2)
  614. return price
  615. },
  616. setScrollHeight() {
  617. const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
  618. this.windowHeight = windowHeight - 1
  619. this.scrollHeight = windowHeight - 1
  620. }
  621. },
  622. onPageScroll(e) {
  623. this.scrollTop = e.scrollTop
  624. },
  625. onShow() {
  626. this.setScrollHeight()
  627. this.$api.getStorage().then(resolve => {
  628. this.serviceProviderId = resolve.serviceProviderId
  629. })
  630. }
  631. }
  632. </script>
  633. <style lang="scss">
  634. @import '@/uni.scss';
  635. page {
  636. background-color: #f7f7f7 !important;
  637. }
  638. .search {
  639. width: 702rpx;
  640. height: 70rpx;
  641. padding: 12rpx 24rpx;
  642. border-bottom: 1px solid #f0f0f0;
  643. position: fixed;
  644. top: 0;
  645. left: 0;
  646. background: #ffffff;
  647. z-index: 1001;
  648. .search-input {
  649. width: 448rpx;
  650. height: 70rpx;
  651. padding: 0 68rpx;
  652. line-height: 70rpx;
  653. border-radius: 40rpx;
  654. position: relative;
  655. background: #f0f0f0;
  656. float: left;
  657. .icon-iconfonticonfontsousuo1 {
  658. font-size: 36rpx;
  659. color: #8a8a8a;
  660. position: absolute;
  661. left: 24rpx;
  662. z-index: 10;
  663. }
  664. .icon-shanchu1 {
  665. font-size: 36rpx;
  666. color: #8a8a8a;
  667. position: absolute;
  668. right: 24rpx;
  669. top: 0;
  670. padding: 0 10rpx;
  671. z-index: 10;
  672. }
  673. input {
  674. width: 448rpx;
  675. height: 70rpx;
  676. background-color: #f0f0f0;
  677. font-size: 26rpx;
  678. }
  679. }
  680. .search-btn {
  681. width: 118rpx;
  682. height: 70rpx;
  683. line-height: 70rpx;
  684. color: $color-system;
  685. font-size: 30rpx;
  686. text-align: center;
  687. float: left;
  688. }
  689. .voice-icon {
  690. width: 36rpx;
  691. height: 36rpx;
  692. padding: 16rpx 20rpx 16rpx 0;
  693. position: absolute;
  694. left: 16rpx;
  695. top: 4rpx;
  696. z-index: 10;
  697. }
  698. }
  699. .search-container {
  700. padding-top: 106rpx;
  701. }
  702. .s-block {
  703. background: #ffffff;
  704. .header {
  705. font-size: 32rpx;
  706. padding: 40rpx 24rpx 22rpx 24rpx;
  707. line-height: 42rpx;
  708. font-size: 30rpx;
  709. font-weight: bold;
  710. position: relative;
  711. .icon-shanchu {
  712. font-size: 36rpx;
  713. color: #333333;
  714. float: right;
  715. padding: 0 10rpx;
  716. z-index: 10;
  717. font-weight: normal;
  718. }
  719. }
  720. .list {
  721. display: flex;
  722. flex-wrap: wrap;
  723. padding-bottom: 40rpx;
  724. view {
  725. color: #8a8a8a;
  726. font-size: 24rpx;
  727. box-sizing: border-box;
  728. text-align: center;
  729. height: 48rpx;
  730. line-height: 48rpx;
  731. border-radius: 24rpx;
  732. margin: 12rpx;
  733. padding: 0 30rpx;
  734. overflow: hidden;
  735. white-space: nowrap;
  736. text-overflow: ellipsis;
  737. background-color: #f3f3f3;
  738. }
  739. }
  740. }
  741. .s-circle {
  742. margin-top: 30rpx;
  743. .header {
  744. font-size: 32rpx;
  745. padding: 30rpx;
  746. border-bottom: 2rpx solid #f9f9f9;
  747. position: relative;
  748. image {
  749. width: 36rpx;
  750. height: 36rpx;
  751. padding: 10rpx;
  752. position: absolute;
  753. right: 40rpx;
  754. top: 24rpx;
  755. }
  756. }
  757. .list {
  758. display: flex;
  759. flex-wrap: wrap;
  760. padding: 0 30rpx 20rpx;
  761. view {
  762. padding: 8rpx 30rpx;
  763. margin: 20rpx 30rpx 0 0;
  764. font-size: 28rpx;
  765. color: #8a8a8a;
  766. background-color: #f7f7f7;
  767. box-sizing: border-box;
  768. text-align: center;
  769. border-radius: 20rpx;
  770. }
  771. }
  772. }
  773. .wanted-block {
  774. margin-top: 30rpx;
  775. .header {
  776. font-size: 32rpx;
  777. padding: 30rpx;
  778. }
  779. .list {
  780. display: flex;
  781. flex-wrap: wrap;
  782. view {
  783. width: 50%;
  784. color: #8a8a8a;
  785. font-size: 28rpx;
  786. box-sizing: border-box;
  787. text-align: center;
  788. padding: 20rpx 0;
  789. border-top: 2rpx solid #fff;
  790. border-left: 2rpx solid #fff;
  791. background-color: #f7f7f7;
  792. overflow: hidden;
  793. white-space: nowrap;
  794. text-overflow: ellipsis;
  795. }
  796. }
  797. }
  798. .wanted-circle {
  799. margin-top: 30rpx;
  800. .header {
  801. font-size: 32rpx;
  802. padding: 30rpx;
  803. }
  804. .list {
  805. display: flex;
  806. flex-wrap: wrap;
  807. padding: 0 30rpx 20rpx;
  808. view {
  809. padding: 8rpx 30rpx;
  810. margin: 20rpx 30rpx 0 0;
  811. font-size: 28rpx;
  812. color: #8a8a8a;
  813. background-color: #f7f7f7;
  814. box-sizing: border-box;
  815. text-align: center;
  816. border-radius: 20rpx;
  817. }
  818. }
  819. }
  820. .order-container {
  821. scroll-view {
  822. height: 100%;
  823. overflow: scroll;
  824. }
  825. }
  826. .container {
  827. padding-bottom: env(safe-area-inset-bottom);
  828. height: auto;
  829. position: relative;
  830. }
  831. .tui-order-content {
  832. width: 100%;
  833. height: auto;
  834. }
  835. .tui-order-list {
  836. width: 100%;
  837. position: relative;
  838. }
  839. .tui-order-item {
  840. display: flex;
  841. flex-direction: column;
  842. width: 702rpx;
  843. padding: 20rpx 24rpx 0 24rpx;
  844. background: #fff;
  845. border-bottom: 20rpx solid #f7f7f7;
  846. }
  847. .order-title {
  848. width: 100%;
  849. height: auto;
  850. .order-title-name {
  851. width: 100%;
  852. height: 72rpx;
  853. border-bottom: 1px solid #f7f7f7;
  854. line-height: 72rpx;
  855. text-align: left;
  856. font-size: $font-size-28;
  857. color: #333333;
  858. }
  859. .order-title-t {
  860. width: 100%;
  861. height: 68rpx;
  862. float: left;
  863. line-height: 68rpx;
  864. position: relative;
  865. .bage-icon {
  866. width: 50rpx;
  867. height: 50rpx;
  868. display: block;
  869. position: absolute;
  870. right: 0;
  871. top: 9rpx;
  872. }
  873. .bage-buss {
  874. display: inline-block;
  875. width: 72rpx;
  876. height: 30rpx;
  877. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  878. border-radius: 4rpx;
  879. line-height: 30rpx;
  880. font-size: $font-size-22;
  881. text-align: center;
  882. color: #ffffff;
  883. }
  884. .bage-auto {
  885. display: inline-block;
  886. width: 72rpx;
  887. height: 30rpx;
  888. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  889. border-radius: 4rpx;
  890. line-height: 30rpx;
  891. font-size: $font-size-22;
  892. text-align: center;
  893. color: #ffffff;
  894. }
  895. .bage-text {
  896. display: inline-block;
  897. font-size: $font-size-28;
  898. line-height: 68rpx;
  899. text-align: left;
  900. color: $color-system;
  901. margin-left: 10rpx;
  902. }
  903. }
  904. .order-title-b {
  905. width: 100%;
  906. height: 40rpx;
  907. float: left;
  908. margin-top: 8rpx;
  909. .order-title-btxt {
  910. float: left;
  911. font-size: $font-size-28;
  912. line-height: 40rpx;
  913. color: #999999;
  914. text-align: lef;
  915. }
  916. .order-title-tip {
  917. float: right;
  918. font-size: $font-size-28;
  919. line-height: 40rpx;
  920. text-align: right;
  921. color: #ff2a2a;
  922. }
  923. }
  924. }
  925. .goods-title {
  926. width: 100%;
  927. height: 56rpx;
  928. float: left;
  929. margin-top: 10rpx;
  930. .floor-item-act {
  931. height: 56rpx;
  932. text-align: center;
  933. box-sizing: border-box;
  934. float: left;
  935. padding: 10rpx 0;
  936. margin-right: 12rpx;
  937. .floor-tags {
  938. height: 28rpx;
  939. border-radius: 6rpx;
  940. background-color: #ffffff;
  941. line-height: 28rpx;
  942. color: $color-system;
  943. text-align: center;
  944. display: inline-block;
  945. padding: 0 16rpx;
  946. font-size: $font-size-20;
  947. border: 1px solid #e15616;
  948. float: left;
  949. }
  950. }
  951. .title-text {
  952. width: 400rpx;
  953. overflow: hidden;
  954. text-overflow: ellipsis;
  955. white-space: nowrap;
  956. float: left;
  957. font-size: $font-size-28;
  958. color: $text-color;
  959. text-align: left;
  960. line-height: 56rpx;
  961. font-weight: bold;
  962. }
  963. }
  964. .goods-item {
  965. width: 100%;
  966. height: auto;
  967. }
  968. .goods-pros-t {
  969. display: flex;
  970. align-items: center;
  971. width: 100%;
  972. height: 217rpx;
  973. padding: 24rpx 0;
  974. .pros-img {
  975. width: 210rpx;
  976. height: 100%;
  977. border-radius: 10rpx;
  978. margin: 0 26rpx 0 0;
  979. border: 1px solid #f3f3f3;
  980. image {
  981. width: 100%;
  982. height: 100%;
  983. border-radius: 10rpx;
  984. }
  985. }
  986. }
  987. .pros-product {
  988. width: 460rpx;
  989. height: 100%;
  990. line-height: 36rpx;
  991. font-size: $font-size-26;
  992. position: relative;
  993. float: left;
  994. .producttitle {
  995. width: 100%;
  996. display: inline-block;
  997. height: auto;
  998. text-overflow: ellipsis;
  999. display: -webkit-box;
  1000. word-break: break-all;
  1001. -webkit-box-orient: vertical;
  1002. -webkit-line-clamp: 2;
  1003. overflow: hidden;
  1004. margin-bottom: 8rpx;
  1005. }
  1006. .productspec {
  1007. height: 36rpx;
  1008. color: #999999;
  1009. }
  1010. .productprice {
  1011. height: 48rpx;
  1012. width: 100%;
  1013. float: left;
  1014. .price {
  1015. line-height: 48rpx;
  1016. font-size: $font-size-28;
  1017. width: 48%;
  1018. color: #ff2a2a;
  1019. float: left;
  1020. font-weight: bold;
  1021. }
  1022. .count {
  1023. height: 100%;
  1024. float: right;
  1025. position: relative;
  1026. .small {
  1027. color: #666666;
  1028. }
  1029. }
  1030. }
  1031. .floor-item-act {
  1032. width: 100%;
  1033. height: 56rpx;
  1034. text-align: center;
  1035. box-sizing: border-box;
  1036. float: left;
  1037. padding: 0 0 10rpx 0;
  1038. .floor-tags {
  1039. height: 28rpx;
  1040. border-radius: 6rpx;
  1041. background-color: #ffffff;
  1042. line-height: 28rpx;
  1043. color: $color-system;
  1044. text-align: center;
  1045. display: inline-block;
  1046. padding: 0 16rpx;
  1047. font-size: $font-size-20;
  1048. border: 1px solid #e15616;
  1049. float: left;
  1050. }
  1051. }
  1052. }
  1053. .order-footer {
  1054. width: 100%;
  1055. height: 78rpx;
  1056. float: left;
  1057. .order-footer-top {
  1058. width: 100%;
  1059. height: 34rpx;
  1060. line-height: 34rpx;
  1061. font-size: $font-size-24;
  1062. color: #999999;
  1063. text-align: right;
  1064. }
  1065. .order-footer-bot {
  1066. width: 100%;
  1067. float: left;
  1068. height: 48rpx;
  1069. line-height: 48rpx;
  1070. font-size: $font-size-28;
  1071. font-weight: bold;
  1072. color: $text-color;
  1073. .count {
  1074. width: 50%;
  1075. float: left;
  1076. text-align: left;
  1077. }
  1078. .money {
  1079. width: 50%;
  1080. float: right;
  1081. text-align: right;
  1082. }
  1083. }
  1084. }
  1085. .aganBj {
  1086. position: fixed;
  1087. left: 0;
  1088. top: 0;
  1089. bottom: 0;
  1090. width: 100%;
  1091. height: 100%;
  1092. background-color: rgba(0, 0, 0, 0.5);
  1093. z-index: 999999;
  1094. .alertAgan {
  1095. position: absolute;
  1096. top: 50%;
  1097. left: 50%;
  1098. transform: translate(-50%, -50%);
  1099. width: 580rpx;
  1100. background-color: #fff;
  1101. border-radius: 16rpx;
  1102. .title {
  1103. font-size: 30rpx;
  1104. color: #333333;
  1105. line-height: 42rpx;
  1106. padding: 30rpx;
  1107. display: block;
  1108. }
  1109. .goods {
  1110. padding: 0 30rpx;
  1111. .list {
  1112. padding: 10px 0;
  1113. border-bottom: 1rpx solid #e1e1e1;
  1114. margin: 10rpx 0;
  1115. .image-left {
  1116. width: 86rpx;
  1117. height: 86rpx;
  1118. border: 2rpx solid #e1e1e1;
  1119. border-radius: 6rpx;
  1120. display: inline-block;
  1121. vertical-align: middle;
  1122. }
  1123. .name-right {
  1124. display: inline-block;
  1125. width: 416rpx;
  1126. margin-left: 15rpx;
  1127. font-size: 26rpx;
  1128. color: #666666;
  1129. vertical-align: middle;
  1130. word-break: break-all;
  1131. overflow: hidden;
  1132. text-overflow: ellipsis;
  1133. display: -webkit-inline-box;
  1134. -webkit-line-clamp: 2;
  1135. -webkit-box-orient: vertical;
  1136. }
  1137. }
  1138. }
  1139. .BtnAll {
  1140. margin-top: 30rpx;
  1141. .btn {
  1142. display: inline-block;
  1143. width: 290rpx;
  1144. height: 90rpx;
  1145. line-height: 90rpx;
  1146. text-align: center;
  1147. &.closebtn {
  1148. border-radius: 0px 0px 0px 10px;
  1149. color: #999999;
  1150. background: #efefef;
  1151. }
  1152. &.cancel {
  1153. border-radius: 0px 0px 8px 0px;
  1154. background: $btn-confirm;
  1155. color: #fff;
  1156. }
  1157. }
  1158. }
  1159. }
  1160. }
  1161. </style>