myTicket.vue 22 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. <template>
  2. <view class="kd-work-container">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="orderType == 1 ? '工单待办' : '工单已办'"
  4. right-icon="scan" @clickLeft="back">
  5. <view slot="right">
  6. <view @click="HandlScanCode" class="scan_btn"></view>
  7. </view>
  8. </uni-nav-bar>
  9. <view v-if="filteredTabs.length > 0" class="top-wrapper">
  10. <view class="tab_box rx-sc">
  11. <view class="tab_item" :class="{active: activeIndex == item.index}" v-for="(item,index) in filteredTabs"
  12. :key="index">
  13. <view @click="handleTabChange(item)" class="badge-c">
  14. {{item.name}}
  15. <u-badge max="99" :value="item.badge.value" absolute v-show="orderType==1"></u-badge>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="more_search">
  20. <image src="~@/static/moreSearch.svg" mode="" @click="searchShow = true"></image>
  21. </view>
  22. </view>
  23. <view v-if="activeType == 'quality'">
  24. <InspectionWorkList pageName="myList" :way="orderType == 1 ? 'todo' : 'done'" ref="inspectionWorkListRef">
  25. </InspectionWorkList>
  26. </view>
  27. <view v-else class="work-list">
  28. <!-- 站号筛选 && -->
  29. <view v-if="activeType == 'patrol' && clientEnvironmentId == 10" class="group-tab-bar rx-sc">
  30. <view class="group-tab-item" v-for="(tab, idx) in groupTabs" :key="idx"
  31. :class="{ active: groupId === tab.groupId }" @click="switchGroup(tab.groupId)">
  32. {{ tab.label }}
  33. </view>
  34. </view>
  35. <u-list @scrolltolower="scrolltolower" :key="activeType" :preLoadScreen="page * 10">
  36. <u-list-item v-for="(item, index) in dataList" :key="index">
  37. <CardTime :time="item.createTime" />
  38. <KdCard :orderTitle="orderTitle" :title="item.code" @handleDetail="handleDetail" :status="true"
  39. :item="item" :type="activeType" />
  40. </u-list-item>
  41. <u-list-item v-if="dataList.length === 0">
  42. <view class="nodata">暂无数据</view>
  43. </u-list-item>
  44. </u-list>
  45. </view>
  46. <SearchPopup mode="top" v-if="searchShow">
  47. <template v-slot:list>
  48. <view class="search_list">
  49. <u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
  50. <u-form-item v-if="orderType == 1 && statusRange[activeType].length > 0" label="类型:"
  51. class="required-form" borderBottom prop="assetType">
  52. <u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30"
  53. @change="statusChange">
  54. <u-checkbox v-for="(item, index) in statusRange[activeType]"
  55. :customStyle="{ marginRight: '8px' }" :label="item.text" :name="item.value"
  56. labelSize="30" iconSize="30" activeColor="#157A2C"></u-checkbox>
  57. </u-checkbox-group>
  58. </u-form-item>
  59. <u-form-item label="编号:" class="required-form" borderBottom prop="assetType">
  60. <input type="text" placeholder="请输入编号" v-model="searchFrom.code" />
  61. </u-form-item>
  62. </u-form>
  63. </view>
  64. </template>
  65. <template v-slot:operate>
  66. <view class="operate_box rx-bc">
  67. <u-button size="small" class="u-reset-button mg-20" @click="searchShow = false">取消</u-button>
  68. <u-button type="warning" size="small" class="u-reset-button mg-20" @click="reset">重置</u-button>
  69. <u-button type="success" size="small" class="u-reset-button" @click="doSearch">确定</u-button>
  70. </view>
  71. </template>
  72. </SearchPopup>
  73. </view>
  74. </template>
  75. <script>
  76. import {
  77. getByCode
  78. } from '@/api/pda/common.js'
  79. import {
  80. workorderMyPage
  81. } from '@/api/pda/workOrder'
  82. import SearchPopup from '@/pages/pda/components/searchPopup.vue'
  83. import {
  84. getWorkOrderList,
  85. statistics,
  86. deviceListQrCode
  87. } from '@/api/myTicket'
  88. import KdCard from '../components/KdCard/index.vue'
  89. import CardTime from '../components/CardTime.vue'
  90. import {
  91. getByFixCode
  92. } from '@/api/repair'
  93. import {
  94. nextTick
  95. } from 'vue'
  96. import InspectionWorkList from '@/pages/qms/inspectionWork/list.vue'
  97. import {
  98. getPlanOrderList
  99. } from '@/api/warehouseManagement'
  100. // import { postJ } from '@/utils/api'
  101. let [isEnd] = [false]
  102. export default {
  103. components: {
  104. KdCard,
  105. CardTime,
  106. SearchPopup,
  107. InspectionWorkList
  108. },
  109. data() {
  110. return {
  111. clientEnvironmentId: uni.getStorageSync("userInfo") &&uni.getStorageSync("userInfo").clientEnvironmentId,
  112. groupId: null,
  113. formData: {},
  114. orderTitle: '',
  115. tabsCurrent: 0, // tabs初始位置
  116. doneRange: [{
  117. value: 1,
  118. text: '普通'
  119. },
  120. {
  121. value: 2,
  122. text: '紧急'
  123. },
  124. {
  125. value: 3,
  126. text: '重要'
  127. }
  128. ],
  129. tabList: [
  130. // {
  131. // name: '计划维修工单',
  132. // type: 'repair',
  133. // workOrderType: 4,
  134. // url: `/pages/maintain_service/detail/detail?`,
  135. // badge: {
  136. // value: 0
  137. // }
  138. // },
  139. {
  140. name: '保养工单',
  141. type: 'maintenance',
  142. workOrderType: 2,
  143. index: 0,
  144. url: `/pages/maintenance/detail/detail?`,
  145. badge: {
  146. value: 0
  147. },
  148. permittedTabs: 'pda:ticketstab:bygd',
  149. },
  150. {
  151. name: '巡点检工单',
  152. type: 'patrol',
  153. workOrderType: 1,
  154. index: 1,
  155. url: `/pages/tour_tally/detail/detail?`,
  156. badge: {
  157. value: 0
  158. },
  159. permittedTabs: 'pda:ticketstab:xdjgd',
  160. },
  161. {
  162. name: '检修',
  163. type: 'service',
  164. workOrderType: 7,
  165. index: 2,
  166. url: `/pages/maintenance/detail/detail?`,
  167. badge: {
  168. value: 0
  169. },
  170. permittedTabs: 'pda:ticketstab:jx',
  171. },
  172. // {
  173. // name: '量具送检工单',
  174. // type: 'quantity',
  175. // workOrderType: 5,
  176. // index: 2,
  177. // url: `/pages/quantity/detail/detail?`,
  178. // badge: {
  179. // value: 0
  180. // }
  181. // },
  182. {
  183. name: '维修工单',
  184. type: 'repair',
  185. workOrderType: 3,
  186. index: 3,
  187. // url: `/pages/maintain_service/detail/detail?`,
  188. url: `/pages/maintenanceWorkorder/detail/detail?`,
  189. badge: {
  190. value: 0
  191. },
  192. permittedTabs: 'pda:ticketstab:wxgd',
  193. },
  194. {
  195. name: '生产工单',
  196. type: 'production',
  197. workOrderType: 6,
  198. index:4,
  199. // url: `/pages/maintain_service/detail/detail?`,
  200. url: `/pages/pda/workOrder/extrusionMolding/index?`,
  201. badge: {
  202. value: 0
  203. },
  204. permittedTabs: 'pda:ticketstab:scgd',
  205. },
  206. {
  207. name: '质检工单',
  208. type: 'quality',
  209. workOrderType: 7,
  210. index: 5,
  211. // url: `/pages/maintain_service/detail/detail?`,
  212. url: ``,
  213. badge: {
  214. value: 0
  215. },
  216. permittedTabs: 'pda:ticketstab:zjgd',
  217. },
  218. {
  219. name: '盘点工单',
  220. type: 'stocktaking',
  221. workOrderType: 8,
  222. index: 6,
  223. // url: `/pages/maintain_service/detail/detail?`,
  224. url: `/pages/warehouse/workOrder/inventory/inventory?`,
  225. badge: {
  226. value: 0
  227. },
  228. permittedTabs: 'pda:ticketstab:pdgd',
  229. }
  230. ],
  231. activeType: '',
  232. activeIndex: 0,
  233. dataList: [],
  234. searchShow: false,
  235. statusRange: {
  236. repair: [{
  237. value: 0,
  238. text: '待接收'
  239. },
  240. {
  241. value: 2,
  242. text: '执行中'
  243. }
  244. // {
  245. // value: 0,
  246. // text: '待接收'
  247. // },
  248. // {
  249. // value: 2,
  250. // text: '待审核'
  251. // },
  252. // {
  253. // value: 4,
  254. // text: '已撤回'
  255. // },
  256. // {
  257. // value: 6,
  258. // text: '已驳回'
  259. // },
  260. // {
  261. // value: 8,
  262. // text: '已派单'
  263. // },
  264. // {
  265. // value: 1,
  266. // text: '执行中'
  267. // },
  268. // {
  269. // value: 5,
  270. // text: '待验收'
  271. // },
  272. // {
  273. // value: 3,
  274. // text: '已完成'
  275. // },
  276. // {
  277. // value: 7,
  278. // text: '未修复'
  279. // }
  280. ],
  281. maintenance: [{
  282. value: 0,
  283. text: '待接收'
  284. },
  285. {
  286. value: 2,
  287. text: '执行中'
  288. }
  289. // {
  290. // value: 3,
  291. // text: '完成'
  292. // }
  293. ],
  294. service: [{
  295. value: 0,
  296. text: '待接收'
  297. },
  298. {
  299. value: 2,
  300. text: '执行中'
  301. }
  302. // {
  303. // value: 3,
  304. // text: '完成'
  305. // }
  306. ],
  307. patrol: [{
  308. value: 0,
  309. text: '待接收'
  310. },
  311. {
  312. value: 2,
  313. text: '执行中'
  314. }
  315. // {
  316. // value: 3,
  317. // text: '完成'
  318. // }
  319. ],
  320. quantity: [{
  321. value: 0,
  322. text: '待接收'
  323. },
  324. {
  325. value: 2,
  326. text: '执行中'
  327. },
  328. {
  329. value: 3,
  330. text: '完成'
  331. }
  332. ],
  333. check: [{
  334. value: 0,
  335. text: '待接收'
  336. },
  337. {
  338. value: 1,
  339. text: '执行中'
  340. },
  341. {
  342. value: 2,
  343. text: '待审核'
  344. },
  345. {
  346. value: 3,
  347. text: '完成'
  348. },
  349. {
  350. value: 4,
  351. text: '已撤回'
  352. },
  353. {
  354. value: 5,
  355. text: '待验收'
  356. },
  357. {
  358. value: 6,
  359. text: '已驳回'
  360. },
  361. {
  362. value: 7,
  363. text: '未修复'
  364. },
  365. {
  366. value: 8,
  367. text: '已派单'
  368. }
  369. ],
  370. quality: [],
  371. stocktaking: [],
  372. production: [],
  373. service: [],
  374. },
  375. searchFrom: {
  376. code: '',
  377. orderStatus: []
  378. },
  379. page: 1,
  380. isInstall: true, // 是否首次进入页面
  381. orderType: 1,
  382. codeData: [],
  383. groupTabs: [{
  384. label: '全部',
  385. groupId: null
  386. },
  387. {
  388. label: '5号站',
  389. groupId: '2008729845612720129'
  390. },
  391. {
  392. label: '6号站',
  393. groupId: '2008729929536548865'
  394. },
  395. {
  396. label: '7号站',
  397. groupId: '2008730320160468994'
  398. }
  399. ],
  400. }
  401. },
  402. computed: {
  403. filteredTabs() {
  404. return this.tabList.filter(tab => this.$isAuthorities(tab.permittedTabs))
  405. }
  406. },
  407. created() {
  408. console.log('filteredTabs~~~', this.filteredTabs)
  409. if (this.filteredTabs.length > 0) {
  410. this.activeType = this.filteredTabs[0].type
  411. }
  412. uni.$off('successInit')
  413. uni.$on('successInit', (data) => {
  414. this.$nextTick(() => {
  415. this.$refs.inspectionWorkListRef.successInit()
  416. })
  417. })
  418. },
  419. async onLoad(e) {
  420. console.log('e~~~', e)
  421. this.$nextTick(() => {
  422. console.log(this)
  423. this.isInstall = false
  424. this.orderType = e.orderType // 1待办 2完成
  425. this.tabsCurrent = Number(e.index) ? Number(e.index) : 0
  426. this.$nextTick(async () => {
  427. if (this.orderType == 1) {
  428. await this.getCount()
  429. }
  430. const targetTab = this.filteredTabs[this.tabsCurrent]
  431. if (targetTab) {
  432. this.handleTabChange(targetTab)
  433. }
  434. })
  435. })
  436. },
  437. onUnload() {
  438. uni.$off('successInit')
  439. },
  440. onShow(e) {
  441. console.log(this.orderType);
  442. if (this.isInstall) return
  443. this.dataList = []
  444. this.getList()
  445. this.getCount()
  446. },
  447. methods: {
  448. switchGroup(groupId) {
  449. // this.$emit('changeGroup', groupId)
  450. this.groupId = groupId;
  451. this.getList()
  452. },
  453. // 相机扫码
  454. HandlScanCode() {
  455. // uni.scanCode({
  456. // success: res => {
  457. // let obj = {}
  458. // if (res.result.includes('&')) {
  459. // this.dataArray = res.result.split('&')
  460. // console.log(this.dataArray, 'this.dataArray')
  461. // obj = {
  462. // fixCode: this.dataArray[0],
  463. // code: ''
  464. // }
  465. // } else {
  466. // obj = {
  467. // fixCode: '',
  468. // code: res.result
  469. // }
  470. // }
  471. // console.log(obj,'obj')
  472. // getByFixCode(obj).then(res => {
  473. // uni.navigateTo({
  474. // url: `/pages/home/myTicket/detail?deviceId=${res.id}&type=${this.tabList[this.activeIndex].workOrderType}&codes=${this.dataArray[1]}`
  475. // })
  476. // })
  477. // }
  478. // })
  479. uni.scanCode({
  480. success: res => {
  481. console.log(res.result)
  482. let obj = {}
  483. if (res.result.includes('&')) {
  484. this.codeData = res.result.split('&')
  485. obj = {
  486. fixCode: '',
  487. code: this.codeData[0]
  488. }
  489. } else if (res.result.includes('/')) {
  490. let dataArray = res.result.split('/')
  491. obj = {
  492. fixCode: dataArray[0],
  493. code: ''
  494. }
  495. } else {
  496. obj = {
  497. fixCode: '',
  498. code: res.result
  499. }
  500. }
  501. getByFixCode(obj).then(res => {
  502. let params = {
  503. type: this.tabList[this.activeIndex].workOrderType,
  504. deviceId: res.id
  505. }
  506. deviceListQrCode(params).then(data => {
  507. if (data.length > 1) {
  508. uni.navigateTo({
  509. url: `/pages/home/myTicket/detail?deviceId=${res.id}&type=${this.tabList[this.activeIndex].workOrderType}`
  510. })
  511. } else {
  512. uni.navigateTo({
  513. url: `/pages/tour_tally/check/index?id=${data[0].id}&codes=${this.codeData[1]}`
  514. })
  515. }
  516. })
  517. })
  518. }
  519. })
  520. },
  521. // 紧急度选择
  522. doneChange(id) {},
  523. doSearch() {
  524. this.dataList = []
  525. this.page = 1
  526. this.getList()
  527. this.searchShow = false
  528. },
  529. reset() {
  530. this.searchFrom = {
  531. code: '',
  532. orderStatus: []
  533. }
  534. if (this.orderType == 1) {
  535. // 待办 执行中
  536. this.searchFrom.orderStatus = [0, 2]
  537. } else {
  538. // 已完成
  539. this.searchFrom.orderStatus = [4]
  540. }
  541. this.doSearch()
  542. },
  543. statusChange(value) {
  544. console.log(value)
  545. this.searchFrom.orderStatus = value
  546. },
  547. handleDetail(item) {
  548. let url = this.tabList[this.activeIndex]?.url
  549. if (!url) return
  550. if (this.activeType == 'stocktaking') {
  551. url += `id=${item.id}&status=${item.status}`
  552. } else if (this.activeType == 'production') {
  553. url += `id=${item.id}&title=${item.taskName}&singleReport=${item.singleReport}`
  554. } else {
  555. // url += `id=${item.id}&workOrderCode=${item.workOrderCode}&BizType=${item.bizType}`
  556. url += `id=${item.id}&planId=${item.planId}&code=${item.code}&&orderType=${this.orderType}`
  557. }
  558. console.log(url)
  559. uni.navigateTo({
  560. url
  561. })
  562. },
  563. scrolltolower() {
  564. if (isEnd) return
  565. this.page++
  566. this.getList()
  567. },
  568. handleTabChange(item) {
  569. console.log(item, 'mmmmm')
  570. console.log(item)
  571. this.activeType = item.type
  572. this.activeIndex = item.index
  573. this.dataList = []
  574. this.page = 1
  575. this.reset()
  576. this.searchShow = false
  577. if (this.activeType == 'quality') {
  578. this.$nextTick(() => {
  579. this.$refs.inspectionWorkListRef.getList()
  580. })
  581. }
  582. },
  583. getCount() {
  584. statistics().then(data => {
  585. console.log('onsole.log(data)-----------')
  586. console.log(data)
  587. // console.log('this.tabList~~~', this.tabList)
  588. this.tabList = this.tabList.map(item => {
  589. // console.log('item~~~', item)
  590. let badgeValue = 0
  591. switch (item.type) {
  592. case 'maintenance':
  593. badgeValue = data.maintenanceNum
  594. break
  595. case 'patrol':
  596. badgeValue = data.patrolInspection
  597. break
  598. case 'quantity':
  599. badgeValue = data.quantityNum
  600. break
  601. case 'repair':
  602. badgeValue = data.repairsNum
  603. break
  604. case 'production':
  605. badgeValue = data.productionNum
  606. break
  607. case 'check':
  608. badgeValue = data.checkNum
  609. break
  610. case 'service':
  611. badgeValue = data.serviceNum
  612. break
  613. }
  614. return {
  615. ...item,
  616. badge: {
  617. value: badgeValue
  618. }
  619. }
  620. })
  621. })
  622. // Promise.all(
  623. // this.tabList.map(item =>
  624. // getWorkOrderList(
  625. // {
  626. // type: item.workOrderType
  627. // },
  628. // false
  629. // )
  630. // )
  631. // ).then(res => {
  632. // res.forEach((item, index) => {
  633. // console.log(item)
  634. // // if (item?.success) {
  635. // // this.tabList[index].badge.value = item.data.count
  636. // // }
  637. // })
  638. // })
  639. },
  640. getList() {
  641. if (this.activeType == 'quality') {
  642. return
  643. }
  644. uni.showLoading({
  645. title: '加载中'
  646. })
  647. console.log('this.searchFrom-----------------')
  648. console.log(this.searchFrom)
  649. isEnd = false
  650. const userInfo = uni.getStorageSync('userInfo')
  651. if (this.activeType == 'production') {
  652. let statusList = []
  653. if (this.orderType == 1) {
  654. statusList = [4, 5, 7]
  655. } else {
  656. statusList = [6, 10]
  657. }
  658. workorderMyPage({
  659. pageNum: this.page,
  660. size: 10,
  661. ...this.searchFrom,
  662. statusList: statusList,
  663. workCenterIds: userInfo.workCenterIds
  664. })
  665. .then(res => {
  666. console.log('workorderMyPage~~~', res)
  667. if (res.list?.length > 0) {
  668. this.dataList = this.dataList.concat(res.list)
  669. isEnd = this.dataList.length >= res.count
  670. } else {
  671. this.dataList = []
  672. }
  673. console.log(this.dataList)
  674. uni.hideLoading()
  675. })
  676. } else if (this.activeType == 'stocktaking') {
  677. getPlanOrderList({
  678. pageNum: this.page,
  679. size: 10,
  680. status: this.orderType == 1 ? 0 : 2,
  681. ...this.searchFrom,
  682. executorId: userInfo.userId
  683. }).then(res => {
  684. if (res.list?.length > 0) {
  685. // if (params.page === 1) {
  686. // this.dataList = []
  687. // }
  688. // this.dataList.push(...res.data.list.records)
  689. this.dataList = this.dataList.concat(res.list)
  690. isEnd = this.dataList.length >= res.count
  691. } else {
  692. this.dataList = []
  693. }
  694. console.log(this.dataList)
  695. uni.hideLoading()
  696. })
  697. } else {
  698. const params = {
  699. type: this.tabList[this.activeIndex].workOrderType,
  700. pageNum: this.page,
  701. size: 10,
  702. ...this.searchFrom,
  703. }
  704. // 维修
  705. if (this.tabList[this.activeIndex].workOrderType == 3) {
  706. // let userInfo = uni.getStorageSync('userInfo')
  707. // params.executeUserId = userInfo.userId
  708. if (this.orderType == 1) {
  709. if (!params.orderStatus.includes(3)) {
  710. // params.orderStatus.push(3)
  711. }
  712. }
  713. } else {
  714. if (this.orderType == 1) {
  715. if (params.orderStatus.includes(3)) {
  716. let index = params.orderStatus.indexOf(3)
  717. params.orderStatus.splice(index, 1)
  718. }
  719. } else {
  720. params.orderStatus = [3]
  721. }
  722. }
  723. if ((this.activeType == 'patrol' || this.activeType == 'service') && this.groupId) {
  724. params.teamId = this.groupId
  725. }
  726. console.log('params~~~', params);
  727. getWorkOrderList(params)
  728. .then(res => {
  729. if (res.list?.length > 0 && params.type === this.tabList[this.activeIndex].workOrderType) {
  730. // if (params.page === 1) {
  731. // this.dataList = []
  732. // }
  733. // this.dataList.push(...res.data.list.records)
  734. this.dataList = this.dataList.concat(res.list)
  735. isEnd = this.dataList.length >= res.count
  736. } else {
  737. this.dataList = []
  738. }
  739. console.log(this.dataList)
  740. uni.hideLoading()
  741. })
  742. .catch(() => {
  743. uni.hideLoading()
  744. })
  745. }
  746. }
  747. //(1:巡点检;2:保养;3:维修;4:盘点)
  748. // _getMyWorkOrderList(params, loading = true) {
  749. // let str = ''
  750. // for (let key in params) {
  751. // str += '&' + key + '=' + params[key]
  752. // }
  753. // return postJ(this.apiUrl + `/eam/PdaWorkOrder/list?${str.substr(1)}`, {}, loading)
  754. // }
  755. }
  756. }
  757. </script>
  758. <style lang="scss" scoped>
  759. scroll-view ::v-deep ::-webkit-scrollbar {
  760. width: 0;
  761. height: 0;
  762. color: transparent;
  763. }
  764. .group-tab-bar {
  765. background: #fff;
  766. padding: 16rpx 32rpx;
  767. border-bottom: 2rpx solid #e1e1e1;
  768. gap: 16rpx;
  769. }
  770. .group-tab-item {
  771. padding: 8rpx 24rpx;
  772. font-size: 28rpx;
  773. color: #666;
  774. border-radius: 32rpx;
  775. background: #f5f5f5;
  776. white-space: nowrap;
  777. &.active {
  778. background: $theme-color;
  779. color: #fff;
  780. }
  781. }
  782. .scan_btn {
  783. background: url('../../../static/scan.png');
  784. background-size: 100% 100%;
  785. background-repeat: no-repeat;
  786. width: 50rpx;
  787. height: 50rpx;
  788. }
  789. .kd-work-container {
  790. height: 100vh;
  791. overflow: hidden;
  792. display: flex;
  793. flex-direction: column;
  794. .work-list {
  795. flex: 1;
  796. overflow: hidden;
  797. padding: 0 24rpx 16rpx 24rpx;
  798. background-color: $page-bg;
  799. .u-list {
  800. height: 100% !important;
  801. }
  802. }
  803. .nodata {
  804. font-size: 40rpx;
  805. text-align: center;
  806. padding-top: 30rpx;
  807. }
  808. }
  809. .top-wrapper {
  810. display: flex;
  811. align-items: center;
  812. background-color: #fff;
  813. position: relative;
  814. .tab_box {
  815. flex: 1;
  816. height: 68rpx;
  817. display: flex;
  818. overflow-x: auto;
  819. overflow-y: hidden;
  820. -webkit-overflow-scrolling: touch;
  821. white-space: nowrap;
  822. flex-shrink: 0;
  823. &::-webkit-scrollbar {
  824. display: none;
  825. }
  826. .tab_item {
  827. height: 68rpx;
  828. line-height: 68rpx;
  829. padding: 0 20rpx;
  830. font-size: 32rpx;
  831. flex-shrink: 0;
  832. // color: #979C9E;
  833. }
  834. .active {
  835. box-sizing: border-box;
  836. border-bottom: 6rpx solid $theme-color;
  837. color: $theme-color;
  838. }
  839. }
  840. .slide-search {
  841. position: absolute;
  842. top: 100%;
  843. left: 0;
  844. right: 0;
  845. z-index: 10;
  846. background-color: #fff;
  847. .timerange {
  848. width: 90%;
  849. margin: 0 auto 10rpx;
  850. }
  851. .select-box {
  852. display: flex;
  853. padding: 0 10rpx;
  854. .uni-stat__select+.uni-stat__select {
  855. margin-left: 10rpx;
  856. }
  857. }
  858. .more-search {
  859. padding-bottom: 20rpx;
  860. .cell {
  861. display: flex;
  862. align-items: center;
  863. padding-right: 20rpx;
  864. &+.cell {
  865. margin-top: 10rpx;
  866. }
  867. /deep/uni-input {
  868. flex: 1;
  869. height: 70rpx;
  870. border: 1rpx solid #e5e5e5;
  871. border-radius: 8rpx;
  872. font-size: 28rpx;
  873. padding-left: 20rpx;
  874. box-sizing: border-box;
  875. }
  876. .label {
  877. width: 180rpx;
  878. text-align: right;
  879. padding-right: 20rpx;
  880. }
  881. }
  882. /deep/.uni-date__x-input {
  883. height: 70rpx !important;
  884. }
  885. .btn-search {
  886. text-align: right;
  887. padding: 10rpx 10rpx 0;
  888. button {
  889. display: inline-block;
  890. width: 200rpx;
  891. height: 60rpx;
  892. line-height: 58rpx;
  893. font-size: 28rpx;
  894. margin-left: 20rpx;
  895. &.primary {
  896. background-color: $j-primary-border-green;
  897. color: #fff;
  898. }
  899. }
  900. }
  901. }
  902. }
  903. .top-tabs {
  904. flex: 1;
  905. }
  906. .more_search {
  907. padding: 0 20rpx;
  908. }
  909. /deep/.u-input {
  910. border: 1rpx solid #ccc;
  911. .u-input__content__field-wrapper__field {
  912. height: 40rpx !important;
  913. }
  914. }
  915. image {
  916. width: 52rpx;
  917. height: 52rpx;
  918. margin-left: 10rpx;
  919. }
  920. }
  921. .search_list {
  922. min-height: 100rpx;
  923. /deep/ .baseForm {
  924. padding: 10rpx 20rpx;
  925. }
  926. }
  927. .operate_box {
  928. padding: 10rpx;
  929. box-sizing: border-box;
  930. }
  931. .mg-20 {
  932. margin-right: 20rpx;
  933. }
  934. .badge-c {
  935. position: relative;
  936. }
  937. .badge {
  938. position: absolute;
  939. top: 0;
  940. right: 0;
  941. transform: translate(100%, -20%);
  942. font-size: 24rpx;
  943. // position: absolute;
  944. // top: -8rpx;
  945. // left: 100rpx;
  946. // font-size: 24rpx;
  947. padding: 0rpx 10rpx;
  948. border-radius: 38rpx;
  949. background-color: #ff4949;
  950. color: #fff;
  951. font-style: normal;
  952. }
  953. /deep/.u-badge {
  954. top: 0;
  955. right: 0;
  956. transform: translate(90%, 20%);
  957. }
  958. </style>