search-order.vue 40 KB

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