search-order.vue 28 KB

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