orderList.vue 27 KB

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