search-order.vue 27 KB

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