search-order.vue 27 KB

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