search-order.vue 28 KB

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