orderList.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983
  1. <template>
  2. <view>
  3. <zj-page-layout
  4. :hasFooter="false"
  5. :isScroll="true"
  6. :refresherTriggered="refresherTriggered"
  7. @refresherrefresh="refresherrefresh"
  8. @scrolltolower="scrolltolower"
  9. >
  10. <template slot="header">
  11. <view class="top-container">
  12. <scroll-view class="tab-scroll-view" scroll-x scroll-with-animation :scroll-left="scrollLeft">
  13. <view class="left-nav">
  14. <view
  15. class="item"
  16. v-for="(item, index) in mainTabs"
  17. :key="index"
  18. :class="[curMainTab === item.value ? 'active' : '', 'tab-item-' + index]"
  19. @tap="changeMainTab(item.value)"
  20. >
  21. <view class="name">{{ item.name }}</view>
  22. <view class="num">{{ item.num || '' }}</view>
  23. </view>
  24. </view>
  25. </scroll-view>
  26. <view class="right-search">
  27. <u-icon name="search" color="#ffffff" size="28" @tap="toSearchPage()"></u-icon>
  28. </view>
  29. </view>
  30. </template>
  31. <view>
  32. <view class="status-container">
  33. <u-tabs
  34. :list="smallTabs"
  35. @change="changeSmallTab"
  36. :current="curSmallTabIndex"
  37. lineWidth="0"
  38. lineHeight="0"
  39. activeStyle="height: 68rpx; display: flex; align-items: center; justify-content: center; padding: 0 24rpx; border-radius: 24rpx; background: #E7EFFF; color: #3D8FFD; border: 1px solid #3D8FFD; box-sizing: border-box;"
  40. inactiveStyle="height: 68rpx; display: flex; align-items: center; justify-content: center; padding: 0 24rpx; border-radius: 24rpx; border: 1px solid #eaeaea; box-sizing: border-box;"
  41. itemStyle="padding: 0; border-radius: 24rpx; color: #999999; margin-right: 16rpx; font-size: 28rpx;"
  42. >
  43. </u-tabs>
  44. <view class="date" :class="startDate ? 'active' : ''" @tap="isShowDatePicker = true">
  45. <view class="text">按日期</view>
  46. <text class="iconfont icon-jinru"></text>
  47. </view>
  48. </view>
  49. <view class="order-list-container">
  50. <view class="item" v-for="(item, index) in dataList" :key="index" @tap="toDetail(item.id)">
  51. <view class="item-top">
  52. <view class="left">
  53. <view class="title" v-if="item.orderSmallTypeText">
  54. {{ item.orderSmallTypeText.slice(0, 2) }}
  55. </view>
  56. <view class="tags">
  57. <view class="tag red_solid" v-for="(it, idx) in item.orderFlags" :key="idx">{{ it.tagName }}</view>
  58. </view>
  59. </view>
  60. <view class="status">{{ item.orderStatusText }}</view>
  61. </view>
  62. <view class="item-main">
  63. <view class="row">
  64. <view class="label">服务单号</view>
  65. <view class="value">
  66. <view class="val">{{ item.id }}</view>
  67. </view>
  68. </view>
  69. <view class="row" v-if="item.appointmentTime">
  70. <view class="label">预约时间</view>
  71. <view class="value">
  72. <view class="val">{{ item.appointmentTime.slice(0, 10) }}</view>
  73. </view>
  74. </view>
  75. <view class="row">
  76. <view class="label">服务项目</view>
  77. <view class="value">
  78. <view class="val">{{
  79. item.pgOrderProducts.map(o => `${o.mainName || ''}${item.orderSmallTypeText}x${o.num}`).join(',')
  80. }}</view>
  81. </view>
  82. </view>
  83. <view class="row">
  84. <view class="label">客户姓名</view>
  85. <view class="value">
  86. <view class="val">{{ item.userName }} {{ item.userMobile }}</view>
  87. <view class="num" v-if="item.customerTotalNum > 0">
  88. (共<text>{{ item.customerSortNum || 0 }}</text
  89. >/{{ item.customerTotalNum || 0 }}单)</view
  90. >
  91. <view
  92. class="fun"
  93. v-if="orderStatus_v(item.orderStatus) !== 'DQD'"
  94. @tap.stop="$callPhone(item.userMobile)"
  95. >
  96. <text class="iconfont icon-call"></text>
  97. <view class="text">联系Ta</view>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="row address-row">
  102. <!-- // name: item.userName, -->
  103. <view class="label">服务地址</view>
  104. <view class="value">
  105. <view class="val address ellipsis-3">{{ item.address || item.gpsAddress }}</view>
  106. <view
  107. class="fun"
  108. v-if="orderStatus_v(item.orderStatus) !== 'DQD'"
  109. @tap.stop="
  110. $openLocation({
  111. lat: item.lat,
  112. lng: item.lng,
  113. address: item.address || item.gpsAddress
  114. })
  115. "
  116. >
  117. <text class="iconfont icon-daohang"></text>
  118. <view class="text">导航</view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="item-btn" @tap.stop>
  124. <!-- 待接单 -->
  125. <block v-if="orderStatus_v(item.orderStatus) == 'DJD' && !item.isImportExcel">
  126. <u-button
  127. plain
  128. type="primary"
  129. text="配件申请"
  130. v-if="item.orderType != 'INSTALL' && !item.isImportExcel"
  131. @tap="toPartsApply(item.id)"
  132. ></u-button>
  133. <u-button
  134. plain
  135. type="primary"
  136. text="取消加急"
  137. @tap="actionUrgent(item.id, false)"
  138. v-if="item.orderFlags && item.orderFlags.some(o => o.tag == 'JIA_JI') && !item.isImportExcel"
  139. ></u-button>
  140. <u-button
  141. plain
  142. type="primary"
  143. text="加急"
  144. @tap="actionUrgent(item.id, true)"
  145. v-else-if="!item.isImportExcel"
  146. ></u-button>
  147. <u-button v-if="!item.isImportExcel" type="primary" text="接单" @tap="actionReceive(item)"></u-button>
  148. </block>
  149. <!-- 服务中 -->
  150. <block v-if="orderStatus_v(item.orderStatus) == 'FWZ' || orderStatus_v(item.orderStatus) == 'YCD'">
  151. <u-button plain type="primary" text="变更小工" @tap="biangengxiaogong(item)"></u-button>
  152. <u-button
  153. plain
  154. type="primary"
  155. text="配件申请"
  156. v-if="item.orderType != 'INSTALL' && !item.isImportExcel"
  157. @tap="toPartsApply(item.id)"
  158. ></u-button>
  159. <u-button
  160. plain
  161. type="primary"
  162. text="辅材收费"
  163. @tap="toCharge(item.id, 'M')"
  164. v-if="item.orderType == 'INSTALL'"
  165. ></u-button>
  166. <u-button plain type="primary" text="配件收费" @tap="toCharge(item.id, 'P')" v-else></u-button>
  167. <u-button
  168. v-if="!item.isImportExcel"
  169. type="primary"
  170. text="过程反馈"
  171. @tap="toFeedback(item.id)"
  172. ></u-button>
  173. </block>
  174. <!-- 待抢单 -->
  175. <block v-if="orderStatus_v(item.orderStatus) == 'DQD' && !item.isImportExcel">
  176. <u-button type="primary" text="抢单" @tap="qdOrder(item)"></u-button>
  177. </block>
  178. </view>
  179. </view>
  180. </view>
  181. <Loading :loadStatus="loadStatus" :dataList="dataList" />
  182. </view>
  183. </zj-page-layout>
  184. <zj-dialog-dateRangePicker v-model="isShowDatePicker" @confirm="confirmDate"></zj-dialog-dateRangePicker>
  185. <selectionWorkers
  186. v-if="item"
  187. :detail="item"
  188. :type="selectionWorkersType"
  189. :callback="callback"
  190. @close="
  191. () => {
  192. item = null
  193. selectionWorkersType = null
  194. callback = null
  195. }
  196. "
  197. />
  198. </view>
  199. </template>
  200. <script>
  201. import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangePicker.vue'
  202. import selectionWorkers from '@/components/selectionWorkers.vue'
  203. export default {
  204. components: {
  205. selectionWorkers,
  206. zjDialogDateRangePicker
  207. },
  208. data() {
  209. return {
  210. mainTabs: [
  211. { name: '全部', value: '', num: 0 },
  212. { name: '待抢单', value: 'DQD', num: 0 },
  213. { name: '待接单', value: 'DJD', num: 0 },
  214. { name: '服务中', value: 'FWZ', num: 0 },
  215. { name: '已完工', value: 'YWG', num: 0 },
  216. { name: '异常待处理', value: 'YCD', num: 0 }
  217. ],
  218. curMainTab: '',
  219. curSmallTab: 0,
  220. curSmallTabIndex: 0,
  221. smallTabs: [
  222. { id: 0, name: '全部' },
  223. { id: 1, name: '今天' },
  224. { id: 2, name: '明天' },
  225. { id: 3, name: '其他' }
  226. ],
  227. curOrderType: '',
  228. isShowDatePicker: false,
  229. startDate: '',
  230. endDate: '',
  231. dataList: [],
  232. pageNum: 1,
  233. loadStatus: 0,
  234. refresherTriggered: false, // 下拉刷新状态
  235. scrollLeft: 0,
  236. scrollViewWidth: 0,
  237. tabsRect: {
  238. left: 0
  239. },
  240. isYb: false, // 是否延保单
  241. isWb: false, // 是否维保单
  242. selectionWorkersType: '',
  243. item: null,
  244. callback: null
  245. }
  246. },
  247. async onReady({ tab, isYb, isWb }) {
  248. this.crossPage.$on('refreshWorkorderList', data => {
  249. if (data && data.tab) {
  250. this.curMainTab = data.tab
  251. }
  252. this.refreshList()
  253. })
  254. if (isYb) {
  255. this.isYb = true
  256. }
  257. if (isWb) {
  258. this.isWb = true
  259. }
  260. this.getCount()
  261. this.curMainTab = tab || ''
  262. this.refreshList()
  263. this.resize()
  264. },
  265. onUnload() {
  266. this.crossPage.$off('refreshWorkorderList')
  267. },
  268. methods: {
  269. orderStatus_v(orderStatus) {
  270. if (['DYY'].includes(orderStatus)) {
  271. // 待预约
  272. return 'DYY'
  273. } else if (['DQD'].includes(orderStatus)) {
  274. // 待抢单
  275. return 'DQD'
  276. } else if (
  277. [
  278. 'DSHPG',
  279. 'CJ',
  280. 'YPD',
  281. 'DXSPD',
  282. 'DZBPG',
  283. 'DWDSPGP',
  284. 'DXSSPGP',
  285. 'DTJXSSPGP',
  286. 'DZBSPGP',
  287. 'DFZXPD',
  288. 'DFZXSPGP',
  289. 'XSBH',
  290. 'TJXSBH',
  291. 'ZBBH',
  292. 'FZXBH',
  293. 'FL'
  294. ].includes(orderStatus)
  295. ) {
  296. // 待商户派工
  297. return 'DSHPG'
  298. } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
  299. // 待网点派工
  300. return 'DWDPG'
  301. } else if (['DJD', 'DSM', 'YZP'].includes(orderStatus)) {
  302. // 待接单
  303. return 'DJD'
  304. } else if (['FWZ', 'GCSZT', 'BFWG'].includes(orderStatus)) {
  305. // 服务中
  306. return 'FWZ'
  307. } else if (['YCD'].includes(orderStatus)) {
  308. // 异常单
  309. return 'YCD'
  310. } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus)) {
  311. // 已完工待结算
  312. return 'YWG'
  313. } else if (['YJS', 'LRCD'].includes(orderStatus)) {
  314. // 已结算
  315. return 'YJS'
  316. } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(orderStatus)) {
  317. // 已取消
  318. return 'YQX'
  319. }
  320. return ''
  321. },
  322. // 触发下拉刷新
  323. async refresherrefresh(e) {
  324. this.refresherTriggered = true
  325. this.refreshList()
  326. },
  327. // 滚动到底部
  328. scrolltolower(e) {
  329. if (this.loadStatus === 0) {
  330. this.pageNum++
  331. this.getList()
  332. }
  333. },
  334. // 获取统计数量
  335. getCount() {
  336. this.$api
  337. .post('/pg/order/base/status/count', {
  338. isYb: this.isYb,
  339. isWb: this.isWb
  340. })
  341. .then(res => {
  342. if (!res.data) return false
  343. const data = res.data
  344. this.mainTabs[0].num = data.all || 0
  345. this.mainTabs[1].num = data.dqd || 0
  346. this.mainTabs[2].num = data.djd || 0
  347. this.mainTabs[3].num = data.fwz || 0
  348. this.mainTabs[4].num = data.ywg || 0
  349. this.mainTabs[5].num = data.ycd || 0
  350. })
  351. },
  352. // 获取列表
  353. getList() {
  354. this.loadStatus = 1
  355. this.$api
  356. .post('/pg/order/base/list', {
  357. pageNum: this.pageNum,
  358. pageSize: 5,
  359. keyword: '',
  360. orderBaseStatus: this.curMainTab,
  361. byDay: this.curSmallTab || '',
  362. startTime: this.startDate ? this.startDate + ' 00:00:00' : '',
  363. endTime: this.endDate ? this.endDate + ' 23:59:59' : '',
  364. isYb: this.isYb,
  365. isWb: this.isWb
  366. })
  367. .then(res => {
  368. this.loadStatus = 0
  369. let list = res.data.records
  370. if (list.length < 5) {
  371. this.loadStatus = 2
  372. }
  373. this.dataList = this.pageNum === 1 ? list : this.dataList.concat(list)
  374. })
  375. .catch(() => {
  376. this.loadStatus = 2
  377. })
  378. .finally(res => {
  379. this.refresherTriggered = false
  380. })
  381. },
  382. findMainTabIndex(val) {
  383. for (var i = 0; i < this.mainTabs.length; i++) {
  384. if (this.mainTabs[i]['value'] == val) {
  385. return i
  386. }
  387. }
  388. },
  389. setScrollLeft() {
  390. // 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
  391. const tabRect = this.mainTabs[this.findMainTabIndex(this.curMainTab)]
  392. // 累加得到当前item到左边的距离
  393. const offsetLeft = this.mainTabs.slice(0, this.findMainTabIndex(this.curMainTab)).reduce((total, curr) => {
  394. return total + curr.rect.width
  395. }, 0)
  396. // 此处为屏幕宽度
  397. const windowWidth = uni.$u.sys().windowWidth
  398. // 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
  399. let scrollLeft =
  400. offsetLeft -
  401. (this.tabsRect.width - tabRect.rect.width) / 2 -
  402. (windowWidth - this.tabsRect.right) / 2 +
  403. this.tabsRect.left / 2
  404. // 这里做一个限制,限制scrollLeft的最大值为整个scroll-view宽度减去tabs组件的宽度
  405. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth)
  406. this.scrollLeft = Math.max(0, scrollLeft)
  407. },
  408. // 获取所有标签的尺寸
  409. resize() {
  410. if (this.mainTabs.length === 0) {
  411. return
  412. }
  413. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  414. this.tabsRect = tabsRect
  415. this.scrollViewWidth = 0
  416. itemRect.map((item, index) => {
  417. // 计算scroll-view的宽度,这里
  418. this.scrollViewWidth += item.width
  419. // 另外计算每一个item的中心点X轴坐标
  420. this.mainTabs[index].rect = item
  421. })
  422. // 获取了tabs的尺寸之后,设置滑块的位置
  423. this.setScrollLeft()
  424. })
  425. },
  426. // 获取导航菜单的尺寸
  427. getTabsRect() {
  428. return new Promise(resolve => {
  429. this.queryRect('tab-scroll-view').then(size => resolve(size))
  430. })
  431. },
  432. // 获取所有标签的尺寸
  433. getAllItemRect() {
  434. return new Promise(resolve => {
  435. const promiseAllArr = this.mainTabs.map((item, index) => this.queryRect(`tab-item-${index}`, true))
  436. Promise.all(promiseAllArr).then(sizes => resolve(sizes))
  437. })
  438. },
  439. // 获取各个标签的尺寸
  440. queryRect(el, item) {
  441. return new Promise(resolve => {
  442. this.$uGetRect(`.${el}`).then(size => {
  443. resolve(size)
  444. })
  445. })
  446. },
  447. // 切换大状态
  448. changeMainTab(val) {
  449. this.curMainTab = val
  450. // this.curMainTab = val.value;
  451. if (this.startDate == '' || this.endDate == '') {
  452. this.curSmallTab = 0
  453. this.curSmallTabIndex = 0
  454. } else {
  455. this.curSmallTab = ''
  456. this.curSmallTabIndex = ''
  457. }
  458. this.refreshList()
  459. this.resize()
  460. },
  461. // 切换小状态
  462. changeSmallTab(item) {
  463. this.curSmallTab = item.id
  464. this.curSmallTabIndex = item.index
  465. this.startDate = ''
  466. this.endDate = ''
  467. this.refreshList()
  468. },
  469. // 选择日期
  470. confirmDate(item) {
  471. let [start, end] = item
  472. if (start == '' || end == '') {
  473. this.curSmallTab = 0
  474. this.curSmallTabIndex = 0
  475. this.startDate = ''
  476. this.endDate = ''
  477. return
  478. }
  479. this.curSmallTab = ''
  480. this.curSmallTabIndex = ''
  481. this.startDate = start
  482. this.endDate = end
  483. this.refreshList()
  484. },
  485. // 刷新列表
  486. refreshList() {
  487. this.dataList = []
  488. this.pageNum = 1
  489. this.getList()
  490. this.getCount()
  491. },
  492. // 去搜索页面
  493. toSearchPage() {
  494. this.$navToPage({
  495. url: '/packageWorkorder/pages/search'
  496. })
  497. },
  498. // 加急
  499. actionUrgent(id, flag) {
  500. this.$modal({
  501. title: '加急操作',
  502. content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
  503. })
  504. .then(() => {
  505. this.$api
  506. .post('/pg/order/base/flag', {
  507. orderBaseId: id,
  508. orderFlagEnum: 'JIA_JI',
  509. flag: flag
  510. })
  511. .then(res => {
  512. this.$successToast()
  513. this.refreshList()
  514. })
  515. })
  516. .catch(() => {})
  517. },
  518. // 接单
  519. actionReceive(item) {
  520. this.selectionWorkersType = 1
  521. this.item = { ...item }
  522. this.callback = () => {
  523. this.$successToast()
  524. this.refreshList()
  525. this.toDetail(item.id)
  526. this.$nextTick(() => {
  527. this.item = null
  528. this.selectionWorkersType = null
  529. this.callback = null
  530. })
  531. }
  532. },
  533. // 变更小工
  534. biangengxiaogong(item) {
  535. this.selectionWorkersType = 3
  536. this.item = { ...item }
  537. this.callback = () => {
  538. this.$successToast()
  539. this.refreshList()
  540. this.toDetail(item.id)
  541. this.$nextTick(() => {
  542. this.item = null
  543. this.selectionWorkersType = null
  544. this.callback = null
  545. })
  546. }
  547. },
  548. // 抢单
  549. qdOrder(item) {
  550. // this.selectionWorkersType = 2
  551. // this.item = { ...item }
  552. // this.callback = () => {
  553. // this.$successToast()
  554. // this.refreshList()
  555. // this.toDetail(item.id)
  556. // this.item = null
  557. // this.selectionWorkersType = null
  558. // this.callback = null
  559. // }
  560. this.$modal({
  561. title: '抢单确认',
  562. content: '确认抢单?'
  563. })
  564. .then(() => {
  565. this.$api
  566. .post('/pg/order/base/qd', {
  567. orderBaseId: item.id
  568. })
  569. .then(res => {
  570. this.$successToast()
  571. this.refreshList()
  572. this.toDetail(item.id)
  573. })
  574. })
  575. .catch(() => {})
  576. },
  577. // 去收费
  578. toCharge(id, type) {
  579. if (type == 'M') {
  580. this.$navToPage({
  581. url: `/packageMaterial/pages/sale/index?type=${type}&oid=${id}`
  582. })
  583. } else if (type == 'P') {
  584. this.$navToPage({
  585. url: `/packageMaterial/pages/newSale/index?type=${type}&oid=${id}`
  586. })
  587. }
  588. },
  589. // 去配件申请
  590. toPartsApply(id) {
  591. this.$navToPage({
  592. url: `/packageMaterial/pages/partsApply/form?id=${id}`
  593. })
  594. },
  595. // 去过程反馈
  596. toFeedback(id) {
  597. this.$navToPage({
  598. url: `/packageWorkorder/pages/processFeedback?id=${id}`
  599. })
  600. },
  601. toDetail(id) {
  602. this.$navToPage({
  603. url: `/packageWorkorder/pages/orderDetail?id=${id}`
  604. })
  605. }
  606. }
  607. }
  608. </script>
  609. <style lang="scss" scopeds>
  610. .all-container {
  611. width: 100%;
  612. height: 100vh;
  613. display: flex;
  614. flex-direction: column;
  615. .main-container {
  616. flex: 1;
  617. }
  618. }
  619. .top-container {
  620. display: flex;
  621. background: $theme-color;
  622. height: 100rpx;
  623. align-items: center;
  624. justify-content: space-between;
  625. padding: 0 30rpx 10rpx;
  626. position: relative;
  627. .left-nav {
  628. flex: 1;
  629. display: flex;
  630. align-items: flex-end;
  631. // overflow-x: scroll;
  632. // overflow-y: hidden;
  633. padding: 20rpx 0;
  634. .item {
  635. flex-shrink: 0;
  636. display: flex;
  637. margin-right: 32rpx;
  638. position: relative;
  639. // &:last-child {
  640. // margin-right: 0;
  641. // }
  642. .name {
  643. font-size: 30rpx;
  644. color: #ffffff;
  645. }
  646. .num {
  647. color: #ffffff;
  648. margin-top: -8rpx;
  649. margin-left: 2rpx;
  650. }
  651. &.active {
  652. &::after {
  653. content: '';
  654. width: 44rpx;
  655. height: 6rpx;
  656. background: #ffffff;
  657. border-radius: 6rpx;
  658. position: absolute;
  659. bottom: -16rpx;
  660. left: calc((100% - 44rpx) / 2);
  661. }
  662. .name {
  663. font-size: 40rpx;
  664. font-weight: bolder;
  665. position: relative;
  666. }
  667. }
  668. }
  669. }
  670. .right-search {
  671. margin-left: 30rpx;
  672. margin-top: 10rpx;
  673. .iconfont {
  674. font-size: 36rpx;
  675. color: #ffffff;
  676. }
  677. }
  678. }
  679. .status-container {
  680. display: flex;
  681. align-items: center;
  682. justify-content: space-between;
  683. padding: 20rpx;
  684. .date {
  685. height: 68rpx;
  686. display: flex;
  687. align-items: center;
  688. justify-content: center;
  689. padding: 0 24rpx;
  690. border-radius: 24rpx;
  691. border: 1px solid #eaeaea;
  692. box-sizing: border-box;
  693. .text {
  694. font-size: 28rpx;
  695. color: $reg-font;
  696. }
  697. .iconfont {
  698. font-size: 28rpx;
  699. color: $reg-font;
  700. }
  701. &.active {
  702. background: #e7efff;
  703. border: 1px solid #3d8ffd;
  704. .text {
  705. color: #3d8ffd;
  706. }
  707. .iconfont {
  708. color: #3d8ffd;
  709. }
  710. }
  711. }
  712. }
  713. .order-list-container {
  714. padding: 0 30rpx;
  715. .item {
  716. @include zj-card;
  717. background: #ffffff;
  718. border-radius: 20rpx;
  719. margin-bottom: 30rpx;
  720. padding: 0 30rpx;
  721. &:last-child {
  722. margin-bottom: 0;
  723. }
  724. .item-top {
  725. display: flex;
  726. justify-content: space-between;
  727. align-items: flex-start;
  728. border-bottom: 1px solid #d6e0f2;
  729. padding: 30rpx 0 20rpx;
  730. .left {
  731. flex: 1;
  732. width: 0;
  733. display: flex;
  734. align-items: center;
  735. flex-wrap: wrap;
  736. .title {
  737. font-size: 40rpx;
  738. font-weight: 600;
  739. color: $theme-color;
  740. margin-right: 12rpx;
  741. }
  742. .text {
  743. line-height: 48rpx;
  744. padding: 0 16rpx;
  745. background: #f4f5f9;
  746. border-radius: 8rpx;
  747. margin-right: 12rpx;
  748. text {
  749. color: $assist-color;
  750. }
  751. }
  752. .tags {
  753. display: flex;
  754. align-items: center;
  755. margin-bottom: 10rpx;
  756. .tag {
  757. margin-top: 10rpx;
  758. flex-shrink: 0;
  759. height: 36rpx;
  760. line-height: 36rpx;
  761. border-radius: 8rpx;
  762. border: 1px solid $theme-color;
  763. color: $theme-color;
  764. font-size: 24rpx;
  765. padding: 0 10rpx;
  766. box-sizing: border-box;
  767. font-weight: 500;
  768. margin-right: 10rpx;
  769. &:last-child {
  770. margin-right: 0;
  771. }
  772. &.red {
  773. border: 1px solid $minor-color;
  774. color: $minor-color;
  775. }
  776. &.red_solid {
  777. border: 1px solid $minor-color;
  778. color: #ffffff;
  779. background: $minor-color;
  780. }
  781. &.orange {
  782. border: 1px solid $assist-color;
  783. color: $assist-color;
  784. }
  785. &.green {
  786. border: 1px solid $success-color;
  787. color: $success-color;
  788. }
  789. }
  790. }
  791. }
  792. .right {
  793. float: right;
  794. flex-shrink: 0;
  795. height: 56rpx;
  796. display: flex;
  797. align-items: center;
  798. .iconfont {
  799. color: $minor-color;
  800. }
  801. .time {
  802. color: $minor-color;
  803. margin-left: 4rpx;
  804. }
  805. }
  806. .status {
  807. color: $minor-color;
  808. line-height: 56rpx;
  809. }
  810. }
  811. .item-main {
  812. .row {
  813. display: flex;
  814. align-items: center;
  815. margin-top: 20rpx;
  816. &.address-row {
  817. align-items: flex-start;
  818. .value {
  819. align-items: flex-start;
  820. }
  821. }
  822. .label {
  823. color: $sec-font;
  824. flex-shrink: 0;
  825. margin-right: 20rpx;
  826. line-height: 36rpx;
  827. font-size: 28rpx;
  828. }
  829. .value {
  830. flex: 1;
  831. display: flex;
  832. align-items: center;
  833. .val {
  834. line-height: 32rpx;
  835. font-size: 28rpx;
  836. }
  837. .num {
  838. margin-left: 4rpx;
  839. text {
  840. color: $theme-color;
  841. }
  842. }
  843. .tag {
  844. height: 36rpx;
  845. padding: 0 10rpx;
  846. border-radius: 4rpx;
  847. background: #ecf5ff;
  848. color: $theme-color;
  849. font-size: 20rpx;
  850. font-weight: 500;
  851. margin-left: 10rpx;
  852. line-height: 36rpx;
  853. box-sizing: border-box;
  854. }
  855. .fun {
  856. flex-shrink: 0;
  857. display: flex;
  858. align-items: center;
  859. padding: 0 20rpx;
  860. .iconfont {
  861. color: $theme-color;
  862. margin-right: 6rpx;
  863. }
  864. .text {
  865. font-size: 28rpx;
  866. color: $theme-color;
  867. }
  868. }
  869. }
  870. }
  871. }
  872. .item-btn {
  873. display: flex;
  874. align-items: center;
  875. justify-content: flex-end;
  876. padding: 30rpx 0;
  877. ::v-deep .u-button {
  878. width: 160rpx;
  879. margin: 0;
  880. margin-left: 20rpx;
  881. }
  882. }
  883. }
  884. }
  885. </style>