detail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <view :class="{ popupShow: popupShow }">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="维修工单详情" @clickLeft="back"></uni-nav-bar>
  4. <view class="tab-title">
  5. <view v-for="(item, index) in tabList" :key="index" class="tab-item" v-text="item.label" :class="index === pickTabIndex ? 'active' : ''" @click="changeChartsTab(index)"></view>
  6. </view>
  7. <view class="main">
  8. <!-- 工单信息 -->
  9. <view class="kd-baseInfo" v-if="pickTabIndex == 0">
  10. <view class="kd-cell">
  11. <text class="kd-label">工单编号</text>
  12. {{ worksheetInfo.code }}
  13. </view>
  14. <view class="kd-cell">
  15. <text class="kd-label">执行部门</text>
  16. {{ worksheetInfo.executeGroupName }}
  17. </view>
  18. <view class="kd-cell">
  19. <text class="kd-label">执行人</text>
  20. {{ worksheetInfo.executeUserName }}
  21. </view>
  22. <view class="kd-cell">
  23. <text class="kd-label">计划单号</text>
  24. {{ worksheetInfo.planCode }}
  25. </view>
  26. <view class="kd-cell">
  27. <text class="kd-label">计划名称</text>
  28. {{ worksheetInfo.planName }}
  29. </view>
  30. <view class="kd-cell" v-if="workOrderType.code != 10">
  31. <text class="kd-label">计划完成时间</text>
  32. {{ worksheetInfo.planFinishTime }}
  33. </view>
  34. <view class="kd-cell" v-if="workOrderType.code == 10">
  35. <text class="kd-label">计划开始时间</text>
  36. {{ worksheetInfo.planStartTime }}
  37. </view>
  38. <view class="kd-cell" v-if="workOrderType.code == 10">
  39. <text class="kd-label">计划完成时间</text>
  40. {{ worksheetInfo.planEndTime }}
  41. </view>
  42. <view class="kd-cell">
  43. <text class="kd-label">开工时间:</text>
  44. {{ worksheetInfo.acceptTime }}
  45. </view>
  46. <view class="kd-cell">
  47. <text class="kd-label">完工时间:</text>
  48. {{ worksheetInfo.finishTime }}
  49. </view>
  50. <view class="kd-cell">
  51. <text class="kd-label">实际工时:</text>
  52. {{ timeInterval(worksheetInfo.acceptTime, worksheetInfo.finishTime) }}
  53. </view>
  54. <view class="zxpg-wrap" v-if="orderType == 1 && repairInfo.repairUserId == userId">
  55. <template v-if="repairInfo.orderStatus == 0">
  56. <!-- <view class="zx-btn btns" @click="handleExecute">开始执行</view> -->
  57. <view class="zp-btn btns" @click="handlbpbj">申请备品备件</view>
  58. <view class="zx-btn btns" @click="handleNotice">开始执行</view>
  59. <view class="zp-btn btns" @click="handlZp">转派</view>
  60. </template>
  61. <template v-else-if="repairInfo.orderStatus == 2">
  62. <view class="zp-btn btns" @click="handlbpbj">申请备品备件</view>
  63. <view class="zx-btn btns" @click="handlbg">报工</view>
  64. <!-- <view class="zp-btn btns" @click="handlbpbj" v-if="!worksheetInfo.applyOrder">
  65. 申请备品备件
  66. </view>
  67. <view class="zp-btn btns" v-if="worksheetInfo.applyOrder" @click="handCkbpbj">
  68. 查看备品备件
  69. </view> -->
  70. </template>
  71. <template v-if="repairInfo.orderStatus == 3 && repairInfo.repairUserId == userId">
  72. <view class="zx-btn btns disabled">待验收</view>
  73. </template>
  74. <template v-if="repairInfo.orderStatus == 3 && repairInfo.requestUserId == userId">
  75. <view class="zx-btn btns" @click="searchShow = true">验收</view>
  76. </template>
  77. <!-- <div class="apply-box">
  78. <view class="zp-btn btns" @click="handlbpbj" v-if="worksheetInfo.status.code != 5 && worksheetInfo.status.code != 3 && worksheetInfo.status.code != 7">申请备品备件</view>
  79. <view class="zp-btn btns" @click="handlZp" v-if="worksheetInfo.status.code === 8">转派</view>
  80. </div> -->
  81. </view>
  82. <view class="zxpg-wrap" v-if="orderType == 1 && repairInfo.orderStatus == 3 && repairInfo.requestUserId == userId">
  83. <view class="zx-btn btns" @click="searchShow = true">验收</view>
  84. </view>
  85. <Assign ref="Assign" @success="handleAssign"></Assign>
  86. <SearchPopup mode="center" v-if="searchShow">
  87. <template v-slot:list>
  88. <maintain_course :repairInfoLogList="repairInfoLogs" :workOrderCode="workOrderCode"></maintain_course>
  89. </template>
  90. <template v-slot:operate>
  91. <view class="operate_box">
  92. <u--textarea v-model="remark" confirm-type="send" count placeholder="请输入内容"></u--textarea>
  93. </view>
  94. <!-- <u-input v-model="remark" type="textarea" border="true" placeholder="请输入内容" /> -->
  95. <!-- <u--textarea v-model="remark" placeholder="请输入内容"></u--textarea> -->
  96. <view class="operate_box">
  97. <u-button :loading="btnLoading" type="success" size="small" class="u-reset-button" @click="surereject(4)">验收</u-button>
  98. <u-button :loading="btnLoading" size="small" class="u-reset-button" @click="surereject(5)">驳回</u-button>
  99. <u-button size="small" class="u-reset-button" @click="searchShow = false">取消</u-button>
  100. </view>
  101. </template>
  102. </SearchPopup>
  103. </view>
  104. <!-- 报修信息 -->
  105. <view class="bg" v-if="pickTabIndex == 1">
  106. <view class="kd-baseInfo" v-if="workOrderType.code != 10">
  107. <view class="kd-cell">
  108. <text class="kd-label">报修记录编号</text>
  109. {{ repairInfo.code }}
  110. </view>
  111. <view class="kd-cell">
  112. <text class="kd-label">报修时间</text>
  113. {{ repairInfo.createTime }}
  114. </view>
  115. <view class="kd-cell">
  116. <text class="kd-label">来源编码</text>
  117. {{ repairInfo.sourceType }}
  118. </view>
  119. <view class="kd-cell">
  120. <text class="kd-label">固资编码</text>
  121. {{ repairInfo.fixCode }}
  122. </view>
  123. <view class="kd-cell">
  124. <text class="kd-label">报修部门</text>
  125. {{ repairInfo.requestDeptName }}
  126. </view>
  127. <view class="kd-cell">
  128. <text class="kd-label">报修人</text>
  129. {{ repairInfo.repairUserName }}
  130. </view>
  131. <view class="kd-cell">
  132. <text class="kd-label">报修人电话</text>
  133. {{ repairInfo.requestUserPhone }}
  134. </view>
  135. <view class="kd-cell">
  136. <text class="kd-label">期望完成时间</text>
  137. {{ repairInfo.expectedTime }}
  138. </view>
  139. <!-- <view class="kd-cell">
  140. <text class="kd-label2">委托单位交底负责人</text>
  141. {{ repairInfo.code }}
  142. </view>
  143. <view class="kd-cell">
  144. <text class="kd-label2">交底时间</text>
  145. {{ repairInfo.code }}
  146. </view>
  147. <view class="kd-cell">
  148. <text class="kd-label2">接受交底负责人</text>
  149. {{ repairInfo.code }}
  150. </view> -->
  151. <view class="kd-cell">
  152. <text class="kd-label">故障描述</text>
  153. {{ repairInfo.remark }}
  154. </view>
  155. <!-- <view class="img-wrap" v-if="workOrderType.code != 10 && worksheetInfo.repairInfo.repairsImg">
  156. <image
  157. class="img"
  158. @click="clickImg(worksheetInfo.repairInfo.repairsImg.split(','), item_s)"
  159. :src="apiUrl + item_s"
  160. v-for="(item_s, index_s) in worksheetInfo.repairInfo.repairsImg.split(',')"
  161. :key="index_s"></image>
  162. </view> -->
  163. </view>
  164. <view class="kd-baseInfo" v-if="workOrderType.code == 10">
  165. <view class="kd-cell">
  166. <text class="kd-label">报修时间</text>
  167. {{ planRepair.createTime }}
  168. </view>
  169. <view class="kd-cell">
  170. <text class="kd-label">维修部门</text>
  171. {{ planRepair.executorDeptName }}
  172. </view>
  173. <view class="kd-cell">
  174. <text class="kd-label">维修人员</text>
  175. {{ planRepair.executorName }}
  176. </view>
  177. </view>
  178. </view>
  179. <!-- 设备信息 -->
  180. <view class="kd-baseInfo" v-if="pickTabIndex == 2">
  181. <view class="kd-cell">
  182. <text class="kd-label">设备编码</text>
  183. {{ equipmentInfo.code }}
  184. </view>
  185. <view class="kd-cell">
  186. <text class="kd-label">设备名称</text>
  187. {{ equipmentInfo.name }}
  188. </view>
  189. <view class="kd-cell">
  190. <text class="kd-label">设备分类</text>
  191. {{ equipmentInfo.category ? equipmentInfo.category.category.categoryLevelPath : '' }}
  192. </view>
  193. <view class="kd-cell">
  194. <text class="kd-label">固资编码</text>
  195. {{ equipmentInfo.fixCode }}
  196. </view>
  197. <view class="kd-cell">
  198. <text class="kd-label">规格型号</text>
  199. {{ equipmentInfo.category && equipmentInfo.category.category.specification }}|{{ equipmentInfo.category && equipmentInfo.category.category.modelType }}
  200. </view>
  201. <view class="kd-cell" v-if="workOrderType.code != 10">
  202. <text class="kd-label">权属部门</text>
  203. {{ equipmentInfo.ownershipGroupName }}
  204. </view>
  205. <view class="kd-cell" v-if="workOrderType.code != 10">
  206. <text class="kd-label">权属人</text>
  207. {{ equipmentInfo.ownershipUserName }}
  208. </view>
  209. <view class="kd-cell" v-if="workOrderType.code != 10">
  210. <text class="kd-label">权属部门电话</text>
  211. {{ equipmentInfo.ownershipUserMobile }}
  212. </view>
  213. <view class="kd-cell" v-if="workOrderType.code != 10">
  214. <text class="kd-label">设备位置</text>
  215. {{ equipmentInfo.deviceLocationName + '-' + equipmentInfo.deviceDetailAddress }}
  216. </view>
  217. </view>
  218. <!-- 维修历程 -->
  219. <view class="" v-if="pickTabIndex == 3">
  220. <!-- 步骤条 -->
  221. <maintain_course :repairInfoLogList="repairInfoLogs" :workOrderCode="workOrderCode"></maintain_course>
  222. </view>
  223. <!-- 维修记录 -->
  224. <view class="wx-main" v-if="pickTabIndex == 4">
  225. <view class="wx-wrap">
  226. <view class="item" v-for="(item, index) in repairHistoryList" :key="index">
  227. <view class="bh-wrap">
  228. <view class="s1">
  229. <view class="title-md">工单编号:</view>
  230. <view class="b1">
  231. {{ item.workOrderCode }}
  232. </view>
  233. </view>
  234. <view class="s2">{{ item.createTime }}</view>
  235. </view>
  236. <fold :hide="false">
  237. <view class="title-wrap">
  238. <view class="s1 title-md">执行人</view>
  239. <view class="s2">
  240. {{ item.executeUserName }}
  241. </view>
  242. </view>
  243. <view class="bg-wrap-item">
  244. <view class="label title-md">故障描述</view>
  245. <view class="value-wrap">
  246. <view class="text">
  247. {{ item.remark }}
  248. </view>
  249. <view class="img-wrap" v-if="item.repairsImg">
  250. <image class="img" @click="clickImg(item.repairsImg.split(','), item_s)" :src="apiUrl + item_s" v-for="(item_s, index_s) in item.repairsImg.split(',')" :key="index_s"></image>
  251. </view>
  252. </view>
  253. </view>
  254. <view class="bg-wrap-item">
  255. <view class="label title-md">处理说明</view>
  256. <view class="value-wrap">
  257. <view class="text">
  258. {{ item.repairReportExplain }}
  259. </view>
  260. <view class="img-wrap" v-if="item.workOrderImg">
  261. <image class="img" @click="clickImg(item.workOrderImg.split(','), item_s)" :src="apiUrl + item_s" v-for="(item_s, index_s) in item.workOrderImg.split(',')" :key="index_s"></image>
  262. </view>
  263. </view>
  264. </view>
  265. <!-- <view class="bjsymx" @click="handlbjsymx(item.repairLogVOS, true)">备件使用明细</view> -->
  266. <view class="bjsymx" @click="handDetail(item.repairLogVOS)">详情流程</view>
  267. </fold>
  268. </view>
  269. </view>
  270. </view>
  271. </view>
  272. <PopSparePart ref="PopSparePart" :workOrderCode="sparePartWorkOrderCode" :noRequest="true"></PopSparePart>
  273. <!-- <Approval v-if="isApproval && worksheetInfo.status && worksheetInfo.status.code == 5" :devOpsType="1" :planType="3" :myHandleId="myHandleId" :id="worksheetInfo.workOrderId" /> -->
  274. <HistoryRepairDetail ref="HistoryRepairDetail" @close="close"></HistoryRepairDetail>
  275. <Notice v-if="noticeShow" :id="worksheetInfo.id" :repairInfo="repairInfo" @agree="agree"></Notice>
  276. </view>
  277. </template>
  278. <script>
  279. import { startExecuting } from '@/api/myTicket/index.js'
  280. import Step from '@/components/Step/Step.vue'
  281. import StepItem from '@/components/Step/StepItem.vue'
  282. import Assign from '@/components/Assign.vue'
  283. import fold from '../components/fold.vue'
  284. import HistoryRepairDetail from '../components/historyRepairDetail.vue'
  285. import PopSparePart from '../components/PopSparePart.vue'
  286. // import Approval from '@/components/Approval.vue' // 审批组件
  287. import maintain_course from '../components/maintain_course.vue'
  288. import Notice from '../components/notice.vue'
  289. import { get, postJ, post } from '@/utils/api.js'
  290. import { getWorkOrderDetail, getAssetInfo, historyRepairList, acceptance } from '@/api/repair'
  291. import SearchPopup from '@/pages/pda/components/searchPopup.vue'
  292. export default {
  293. components: {
  294. Step,
  295. StepItem,
  296. Assign,
  297. fold,
  298. PopSparePart,
  299. // Approval,
  300. maintain_course,
  301. Notice,
  302. HistoryRepairDetail,
  303. SearchPopup
  304. },
  305. computed: {
  306. // 是否为自己的工单
  307. // isMygd() {
  308. // let userInfo = uni.getStorageSync('userInfo')
  309. // // 当前登录人id
  310. // let userId = userInfo.id
  311. // // 执行人id
  312. // let executeUserId = this.worksheetInfo.executeUserId
  313. // if (executeUserId == userId) {
  314. // return true
  315. // } else {
  316. // return false
  317. // }
  318. // }
  319. },
  320. data() {
  321. return {
  322. btnLoading: false,
  323. orderType: 1,
  324. remark: '',
  325. userId: '',
  326. searchShow: false,
  327. popupShow: false,
  328. repairHistoryList: [],
  329. repairInfoLogs: [],
  330. id: '',
  331. type: 1,
  332. sparePartWorkOrderCode: '',
  333. tabList: [
  334. {
  335. label: '工单信息',
  336. value: '0'
  337. },
  338. {
  339. label: '报修信息',
  340. value: '1'
  341. },
  342. {
  343. label: '设备信息',
  344. value: '2'
  345. },
  346. {
  347. label: '维修历程',
  348. value: '3'
  349. },
  350. {
  351. label: '维修记录',
  352. value: '4'
  353. }
  354. ],
  355. pickTabIndex: 0,
  356. workOrderCode: '',
  357. worksheetInfo: {},
  358. equipmentInfo: {},
  359. repairInfo: {},
  360. dict: {
  361. // 报修来源 1:手动创建;2:工单反工;3:告警通知;4:保养工单;5:巡点检工单)
  362. source: {
  363. 1: '手动创建',
  364. 2: '工单反工',
  365. 3: '告警通知',
  366. 4: '保养工单',
  367. 5: '巡点检工单'
  368. }
  369. },
  370. // 设备信息
  371. device: {},
  372. isApproval: false,
  373. myHandleId: '',
  374. equiCode: '',
  375. noticeShow: false,
  376. workOrderType: {},
  377. planRepair: {}
  378. }
  379. },
  380. onLoad(options) {
  381. console.log('options---------')
  382. console.log(options)
  383. this.id = options.id
  384. this.workOrderCode = options.code
  385. this.planId = options.planId
  386. this.orderType = options.orderType
  387. let userInfo = uni.getStorageSync('userInfo')
  388. // 当前登录人id
  389. this.userId = userInfo.userId
  390. console.log(this.userId)
  391. // this.isApproval = options.type === 'approval'
  392. // this.myHandleId = options.myHandleId
  393. },
  394. onShow() {
  395. if (this.workOrderCode) {
  396. this.getInfo()
  397. }
  398. },
  399. methods: {
  400. surereject(orderStatus) {
  401. this.btnLoading = true
  402. let params = {
  403. orderStatus,
  404. remark: this.remark,
  405. workOrderId: this.id
  406. }
  407. acceptance(params).then(res => {
  408. uni.showToast({
  409. icon: 'success',
  410. title: orderStatus == 4 ? '审核通过!' : '驳回成功!',
  411. duration: 2000
  412. })
  413. this.searchShow = false
  414. this.btnLoading = false
  415. this.getInfo()
  416. })
  417. },
  418. close() {
  419. this.popupShow = false
  420. },
  421. handleAssign() {
  422. this.back()
  423. },
  424. // 获取历史维修记录
  425. getHistoryRepairList(deviceId) {
  426. console.log('historyRepairList----------------')
  427. historyRepairList({ id: deviceId, pageNum: 1, size: 999 }).then(data => {
  428. this.repairHistoryList = data.list
  429. })
  430. },
  431. // 获取设备信息
  432. getDeviceInfo(deviceId) {
  433. getAssetInfo(deviceId).then(res => {
  434. if (res) {
  435. this.equipmentInfo = res
  436. this.$set(this.equipmentInfo, 'position', res.positionList?.length > 0 && res.positionList[0].pathName ? res.positionList[0].pathName : '')
  437. }
  438. })
  439. },
  440. getInfo() {
  441. getWorkOrderDetail(this.workOrderCode).then(data => {
  442. this.worksheetInfo = data.ticketsInfoResponse
  443. this.repairInfo = data.repairRequestResponse
  444. this.getDeviceInfo(this.worksheetInfo.deviceId)
  445. this.getHistoryRepairList(this.worksheetInfo.deviceId)
  446. let repairInfoLogs =
  447. data.ticketsInfoResponse.repairLogVOS?.length > 0
  448. ? data.ticketsInfoResponse.repairLogVOS.map(item => {
  449. return {
  450. ...item,
  451. requestUserName: data.repairRequestResponse.requestUserName,
  452. remark: data.repairRequestResponse.remark
  453. }
  454. })
  455. : []
  456. this.repairInfoLogs = repairInfoLogs.reverse()
  457. console.log('repairInfoLogs----------------------')
  458. console.log(repairInfoLogs)
  459. })
  460. // get(this.apiUrl + '/repair/info/getWorkOrderDetail/' + this.workOrderCode).then(res => {
  461. // if (res.success) {
  462. // res.data.repairInfoLogList = res.data.repairInfoLogList.reverse()
  463. // res.data.repairInfoLogList = res.data.repairInfoLogList.map(n => {
  464. // if (n.content) {
  465. // n.content = JSON.parse(n.content)
  466. // }
  467. // return n
  468. // })
  469. // this.worksheetInfo = res.data
  470. // this.workOrderType = res.data?.workOrderType
  471. // this.equiCode = res.data?.repairInfo?.equiCode
  472. // if (this.workOrderType.code == 10) {
  473. // this.planRepair = res.data?.planRepair
  474. // this.device = res.data.planRepairEqui
  475. // let districtManName = res.data?.planRepair.districtManName.split(',')
  476. // this.worksheetInfo.repairInfo = {
  477. // repairsPerson: districtManName[0]
  478. // }
  479. // } else {
  480. // this.getDevice()
  481. // }
  482. // }
  483. // })
  484. },
  485. changeChartsTab(index) {
  486. this.pickTabIndex = index
  487. },
  488. // 跳转备品备件
  489. handlbpbj() {
  490. uni.navigateTo({
  491. url: `/pages/maintenanceWorkorder/sparepart/sparepartList?id=${this.id}`
  492. })
  493. },
  494. // 查看备品备件 详情
  495. handCkbpbj() {
  496. uni.navigateTo({
  497. url: `/pages/maintain_service/sparepart/sparepartDetail?applyOrder=${this.worksheetInfo.applyOrder}`
  498. })
  499. },
  500. // 跳转报工
  501. handlbg() {
  502. uni.navigateTo({
  503. url: `/pages/maintenanceWorkorder/submitted_ministry/submitted_ministry?workOrderCode=${this.repairInfo.code}&code=${this.workOrderCode}&id=${this.id}&deviceName=${this.repairInfo.deviceName}`
  504. })
  505. },
  506. // 保修须知
  507. handleNotice() {
  508. this.noticeShow = true
  509. },
  510. agree() {
  511. this.noticeShow = false
  512. this.handleExecute()
  513. },
  514. // 执行工单
  515. handleExecute() {
  516. startExecuting({ id: this.id }).then(() => {
  517. uni.showToast({
  518. icon: 'success',
  519. title: '操作成功!',
  520. duration: 2000
  521. })
  522. this.getInfo()
  523. })
  524. },
  525. // 转派
  526. handlZp() {
  527. let id = this.worksheetInfo.id
  528. this.$refs.Assign.open(id)
  529. },
  530. // 详情
  531. handDetail(data) {
  532. this.popupShow = true
  533. this.$refs.HistoryRepairDetail.open('历史维修详情', data)
  534. },
  535. // 备件使用明细
  536. handlbjsymx(data) {
  537. this.$refs.PopSparePart.open('备件使用明细', data)
  538. },
  539. // 获取设备信息
  540. getDevice() {
  541. try {
  542. let par = {
  543. code: this.worksheetInfo.repairInfo.equiCode
  544. }
  545. get(this.apiUrl + '/asset/detail', par).then(res => {
  546. if (res.success) {
  547. this.device = res.data
  548. }
  549. })
  550. } catch (e) {
  551. //TODO handle the exception
  552. }
  553. },
  554. // 查看图片
  555. clickImg(urls, indexUrl) {
  556. urls = urls.map(n => {
  557. return this.apiUrl + n
  558. })
  559. wx.previewImage({
  560. urls: urls, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  561. current: this.apiUrl + indexUrl, // 当前显示图片的http链接,默认是第一个
  562. success: function (res) {},
  563. fail: function (res) {},
  564. complete: function (res) {}
  565. })
  566. },
  567. // 计算实际工时
  568. timeInterval(dt1, dt2) {
  569. if (!dt1 || !dt2) {
  570. return ''
  571. }
  572. if (typeof dt1 == 'string') {
  573. dt1 = new Date(dt1.replace(/-/, '/'))
  574. dt2 = new Date(dt2.replace(/-/, '/'))
  575. }
  576. var res = dt2 - dt1
  577. if (isNaN(res)) throw Error('invalid dates arguments')
  578. let re = res / (1000 * 60 * 60)
  579. var h = parseInt(re)
  580. var m = parseInt((re - h) * 60)
  581. let result = ''
  582. if (h) {
  583. result += `${h} 小时`
  584. }
  585. if (m) {
  586. result += `${m} 分钟`
  587. }
  588. return result
  589. }
  590. }
  591. }
  592. </script>
  593. <style lang="scss" scoped>
  594. .operate_box {
  595. margin: 20rpx;
  596. display: flex;
  597. .u-reset-button {
  598. flex: 1;
  599. margin-right: 10rpx;
  600. }
  601. .u-textarea {
  602. border: 1px solid #ddd;
  603. }
  604. }
  605. .popupShow {
  606. overflow: hidden;
  607. position: fixed;
  608. width: 100%;
  609. }
  610. .img-wrap {
  611. flex: 1;
  612. display: flex;
  613. flex-wrap: wrap;
  614. .img {
  615. width: 80px;
  616. height: 60px;
  617. margin: 5px;
  618. }
  619. }
  620. .tab-title {
  621. position: fixed;
  622. width: 100%;
  623. display: flex;
  624. justify-content: space-between;
  625. height: 82rpx;
  626. line-height: 82rpx;
  627. background-color: #ffffff;
  628. border-bottom: 1px solid #f2f2f2;
  629. z-index: 99;
  630. box-sizing: border-box;
  631. .tab-item {
  632. width: 50%;
  633. text-align: center;
  634. font-size: 32rpx;
  635. color: $uni-text-color-grey;
  636. }
  637. .tab-item.active {
  638. color: $j-primary-border-green;
  639. border-bottom: 1px solid $j-primary-border-green;
  640. }
  641. }
  642. .fixed {
  643. position: fixed;
  644. width: 100%;
  645. left: 0;
  646. }
  647. .add {
  648. bottom: 0;
  649. }
  650. .main {
  651. border-top: 10px solid #f0f0f0;
  652. margin-top: 42px;
  653. }
  654. .img-bar {
  655. padding: 10px 0;
  656. display: flex;
  657. .label {
  658. color: #999;
  659. text-align: right;
  660. max-width: 104px;
  661. font-size: 32rpx;
  662. padding: 0 15px;
  663. flex: 1;
  664. }
  665. .img-wrap {
  666. flex: 1;
  667. display: flex;
  668. flex-wrap: wrap;
  669. .img {
  670. width: 80px;
  671. height: 60px;
  672. margin: 5px;
  673. }
  674. }
  675. }
  676. .kd-baseInfo {
  677. padding: 0 32rpx;
  678. font-size: 28rpx;
  679. .kd-cell {
  680. line-height: 90rpx;
  681. border-bottom: 1px dashed #dadada;
  682. word-break: break-all;
  683. .kd-label {
  684. display: inline-block;
  685. width: 8em;
  686. font-weight: bold;
  687. }
  688. .kd-label2 {
  689. display: inline-block;
  690. width: 11em;
  691. font-weight: bold;
  692. }
  693. }
  694. }
  695. .wx-wrap {
  696. .item {
  697. padding: 20rpx;
  698. font-size: 28rpx;
  699. .bh-wrap {
  700. display: flex;
  701. margin-bottom: 10rpx;
  702. justify-content: space-between;
  703. .s1 {
  704. display: flex;
  705. align-items: center;
  706. .b1 {
  707. font-size: 28rpx;
  708. }
  709. }
  710. .s2 {
  711. font-size: 28rpx;
  712. }
  713. }
  714. .title-wrap {
  715. display: flex;
  716. justify-content: space-between;
  717. border-bottom: 1px dashed #dadada;
  718. padding-bottom: 10rpx;
  719. }
  720. .bg-wrap-item {
  721. margin-top: 20rpx;
  722. .value-wrap {
  723. .text {
  724. color: #7f7f7f;
  725. }
  726. .img-wrap {
  727. margin-top: 20rpx;
  728. display: flex;
  729. .img {
  730. width: 140rpx;
  731. height: 140rpx;
  732. & + .img {
  733. margin-left: 10rpx;
  734. }
  735. }
  736. }
  737. }
  738. }
  739. }
  740. }
  741. .title-md {
  742. font-weight: bold;
  743. }
  744. .zxpg-wrap {
  745. display: flex;
  746. flex-direction: column;
  747. align-items: center;
  748. margin-top: 100rpx;
  749. .btns {
  750. font-size: 32rpx;
  751. width: 420rpx;
  752. height: 80rpx;
  753. line-height: 80rpx;
  754. text-align: center;
  755. }
  756. .zx-btn {
  757. background-color: rgba(21, 122, 44, 1);
  758. color: #ffffff;
  759. }
  760. .zp-btn {
  761. color: #169bd5;
  762. }
  763. .disabled {
  764. background-color: rgba(127, 127, 127, 1);
  765. }
  766. }
  767. .bjsymx {
  768. color: #4f7f00;
  769. padding: 20rpx 0;
  770. }
  771. .apply-box {
  772. width: 70%;
  773. margin: 10rpx auto;
  774. display: flex;
  775. align-items: center;
  776. justify-content: space-around;
  777. }
  778. </style>