search-order.vue 28 KB

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