search-order.vue 28 KB

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