refuel.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258
  1. <template>
  2. <view class="container">
  3. <u-form ref="uForm">
  4. <view class="form_top">基本信息</view>
  5. <u-form-item label-width='260' :borderBottom="false" class="label_css" label="车牌号">
  6. <u-input v-model="list.carNo" input-align="right" placeholder="--" disabled />
  7. </u-form-item>
  8. <!-- <u-form-item label-width='150' :borderBottom="false" label="起点">
  9. <view class="place">
  10. {{list.originProvince}}{{list.originCity}}{{list.originArea}}{{list.originAddress}}
  11. </view>
  12. </u-form-item>
  13. <u-form-item label-width='150' :borderBottom="false" label="终点">
  14. <view class="place">
  15. {{list.destinationProvince}}{{list.destinationCity}}{{list.destinationArea}}{{list.destinationAddress}}
  16. </view>
  17. </u-form-item> -->
  18. <u-form-item label-width='260' :borderBottom="false" label="油耗(升)">
  19. <u-input v-model="list.fillingDetailInfo.oilConsumption" input-align="right" placeholder="--"
  20. disabled />
  21. </u-form-item>
  22. <u-form-item label-width='260' :borderBottom="false" label="油耗单价(元)">
  23. <u-input input-align="right" placeholder="--" disabled
  24. v-model="list.fillingDetailInfo.currentOilPrice" />
  25. </u-form-item>
  26. <u-form-item label-width='260' :borderBottom="false" label="金额(元)">
  27. <u-input input-align="right" placeholder="--" disabled
  28. v-model="list.fillingDetailInfo.currentConsumption" />
  29. </u-form-item>
  30. <u-form-item label-width='260' :borderBottom="false" label="申请时间">
  31. <u-input input-align="right" placeholder="--" disabled v-model="list.fillingDetailInfo.createDate" />
  32. </u-form-item>
  33. <u-form-item label-width='150' :borderBottom="false" label="备注">
  34. <view class="place">
  35. {{list.remark}}
  36. </view>
  37. </u-form-item>
  38. </u-form>
  39. <view>
  40. <view class="" @click.stop="playPlace">
  41. 查看轨迹
  42. </view>
  43. <view class="">
  44. <map style="width: 100%; height: 300px;" :markers="covers" :polyline="polyline" :latitude="latitude"
  45. :longitude="longitude" id="myMap">
  46. </map>
  47. </view>
  48. <!-- <button v-if="startMove" @click="handleStopMove()">暂停移动</button>
  49. <button v-else @click="handleStartMove()">开始移动</button> -->
  50. <!-- <xbd-maptrack :polyline="polyline" :covers="covers" :isauto="false" @getStopTrack="getStopTrack">
  51. </xbd-maptrack> -->
  52. <!-- <view style="position: fixed;bottom: 11%;">
  53. <view>播放停止或进度条拖动后的返回值: </view>
  54. {{trackObj}}
  55. </view> -->
  56. </view>
  57. <u-form ref="uForm">
  58. <view class="form_top">流程</view>
  59. <view class="content2">
  60. <view v-for="(item,index) in auditList" :key='index' class="audit">
  61. <view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
  62. <view class="left">
  63. <view class="item1">
  64. <view class="item-content">{{item.operatorTitle}}</view>
  65. <view v-if="item.status=='success'" class='status success'>
  66. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  67. </view>
  68. <view v-if="item.status=='error'" class='status error'>
  69. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  70. </view>
  71. <view v-if="item.status=='question'" class='status question'>
  72. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="right">
  77. <view class="right-item">
  78. <view class="item2">
  79. <view class="name">{{item.desc}}
  80. </view>
  81. <!-- <view class='time'>{{item.updateDate}}</view> -->
  82. <view v-if="item.status=='success'" class="status success">
  83. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  84. v-if='!item.commonStaffs1&&index!=0'>已审核</text>
  85. </view>
  86. <view v-if="item.status=='error'" class="status error">
  87. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  88. v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
  89. </view>
  90. <view v-if="item.status=='question'" class="status question">
  91. {{item.commonStaffs1?item.staffscontent:''}}<text
  92. v-if='!item.commonStaffs1'>未审核</text>
  93. </view>
  94. <!-- <view class="status success">吕波(已审核)</view> -->
  95. </view>
  96. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
  97. class='time'>
  98. {{item.updateDate}}
  99. </view>
  100. </view>
  101. <view v-if='item.auditMind' class="right-content">
  102. {{item.auditMind}}
  103. </view>
  104. <view class="flex audit_img">
  105. <view v-for="(items,indexs) in item.fileUrl" class="url_css">
  106. <image :src="items" imageMode='aspectFill' class="url_img"
  107. @click="auditFile(items)"></image>
  108. </view>
  109. </view>
  110. </view>
  111. <view v-if='item.commonStaffs1' class="right">
  112. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
  113. </u-icon>
  114. </view>
  115. </view>
  116. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  117. <view class='row2'>
  118. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  119. <view class="item-content">
  120. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  121. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  122. </view>
  123. <view class="name">{{item1.staffName}}</view>
  124. </view>
  125. </view>
  126. </view>
  127. <view class="row-line" v-if="index!= auditList.length - 1&&item.desc!='_PLACEHOLDER_'"></view>
  128. </view>
  129. </view>
  130. </u-form>
  131. <view v-if='list.taskId' style='padding:10px;z-index: 12;' class='flex bottom-btn'>
  132. <u-button v-if='list.approveStatus||isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>
  133. 驳回
  134. </u-button>
  135. <u-button v-if='list.approveStatus||isSHowBtn' @click='pass' type="success" class="btn2">通过
  136. </u-button>
  137. </view>
  138. <view v-if='show' class="shade">
  139. <view class="wrap">
  140. <view class="alert-top">
  141. <view class="title">
  142. {{title}}
  143. </view>
  144. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  145. </view>
  146. <view style='overflow-y: scroll;height: 732rpx;padding-bottom:102rpx;'>
  147. <view class="u-textarea-style">
  148. <view class="right-bottom">
  149. {{auditMind.length}}/1000个字
  150. </view>
  151. <textarea maxlength="1000" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30"
  152. rows="11"></textarea>
  153. </view>
  154. <view style='padding-left:10px;'>
  155. 上传附件
  156. <u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
  157. modelId: '',
  158. vesselId: ''}" :action="action1" :show-tips="false" :max-size="maxSize" :max-count="9"
  159. :size-type="['compressed']" @on-success="getImgUrl($event)" @on-error="onError"
  160. @on-remove="onRemove" @on-uploaded="isAdd = true" :limitType ="['png', 'jpg', 'jpeg', 'webp', 'gif']"
  161. @on-progress="onProgress">
  162. <view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover" hover-stay-time="150">
  163. <image style="width:23px;height:23px;" src="../../../static/img/liangmai/xiangji-2.png" mode=""></image>
  164. <view>选择图片</view>
  165. </view>
  166. </u-upload>
  167. </view>
  168. </view>
  169. <view @click='close()' class="cancel">取消</view>
  170. <view @click='passSubmit()' class="confirm">确定</view>
  171. </view>
  172. </view>
  173. <view @click='imgShow=false' v-if="imgShow" class="shade">
  174. <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
  175. </view>
  176. </view>
  177. </template>
  178. <script>
  179. import * as config from '../../../config'
  180. import upload from '@/components/upload.vue';
  181. import helper from '@/common/helper.js';
  182. // import xbdMaptrack from '@/components/xbdMaptrack/xbdMaptrack';
  183. export default {
  184. components: {
  185. upload
  186. // xbdMaptrack
  187. },
  188. data() {
  189. return {
  190. mapContext: null, //地图对象
  191. startMove: false, //是否开始回放
  192. nextPointIndex: 1, //下一个坐标点的索引
  193. durationTime: 1000, //相邻两点动画持续时长默认1秒
  194. latitude: 39.909,
  195. longitude: 116.39742,
  196. covers: [{
  197. id: 2,
  198. latitude: 0,
  199. longitude: 0
  200. }],
  201. polyline: [{
  202. points: [], // 点集合
  203. color: '#3591fc', // 线的颜色
  204. arrowLine: true, //带箭头的线
  205. width: 6 // 线的宽度
  206. }],
  207. everyCheck: '',
  208. id: "",
  209. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  210. action1: config.def().baseUrlNew + 'appendix/api/uploadFiles',
  211. maxSize: 50 * 1024 * 1024,
  212. currentPage: 1,
  213. pageSize: 10,
  214. fileUrl: [],
  215. list: {
  216. fillingDetailInfo: {
  217. oilConsumption: ''
  218. },
  219. status: "",
  220. contractGoodsInfo: {},
  221. contractProcessInfo: {}
  222. },
  223. imglist: [],
  224. title: '',
  225. auditMind: '',
  226. auditList: [],
  227. show: false,
  228. contractNo: "",
  229. action: this.$uploadUrl,
  230. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  231. isAdd: true,
  232. url: "",
  233. imgShow: false,
  234. height: 200,
  235. autoHeight: true,
  236. border: false,
  237. rejectInfo: "",
  238. rejectInfo1: "",
  239. isSHowBtn: true,
  240. auditCheck: "question", //判断审核是否通过
  241. }
  242. },
  243. onBackPress(e) {
  244. if (this.everyCheck) {
  245. uni.navigateTo({
  246. url: "/pages/task/my_task"
  247. })
  248. return true;
  249. }
  250. },
  251. onLoad(options) {
  252. this.id = options.id
  253. this.everyCheck = uni.getStorageSync("everyTask")
  254. this.isSHowBtn = options.isShowbtn
  255. this.getList()
  256. },
  257. methods: {
  258. //播放轨迹
  259. playPlace() {
  260. console.log("tiaozhuan")
  261. uni.navigateTo({
  262. url: "/pages/task/playMap?startDate=" + this.datalist.amountDeadline + "&endDate=" + this
  263. .datalist.amountDeadline.createDate
  264. })
  265. // startDate: "2023-02-20 01:00:00",
  266. // endDate: "2023-02-20 24:00:00",
  267. // uni.navigateTo({
  268. // url: "/pages/task/playMap?startDate=2023-02-20 01:00:00&endDate=2023-02-20 24:00:00"
  269. // })
  270. //设置地图
  271. },
  272. auditFile(src) {
  273. uni.downloadFile({
  274. url: src,
  275. success: function(res) {
  276. var filePath = res.tempFilePath;
  277. uni.openDocument({
  278. filePath: filePath,
  279. showMenu: true,
  280. success: function(res) {
  281. console.log('打开文档成功');
  282. }
  283. });
  284. }
  285. });
  286. },
  287. getImgUrl(res) {
  288. this.fileUrl.push(res.data.appendixPath)
  289. },
  290. onError(error) {
  291. alert(error)
  292. console.log('------------error-----------')
  293. console.log(error)
  294. },
  295. onProgress(e) {
  296. console.log(e)
  297. },
  298. onRemove(index) {
  299. console.log(index)
  300. this.fileUrl.splice(index, 1)
  301. },
  302. openDocument(src) {
  303. uni.downloadFile({
  304. url: src.appendixPath,
  305. success: function(res) {
  306. var filePath = res.tempFilePath;
  307. uni.openDocument({
  308. filePath: filePath,
  309. showMenu: true,
  310. success: function(res) {
  311. console.log('打开文档成功');
  312. }
  313. });
  314. }
  315. });
  316. },
  317. shadeshow(url) {
  318. this.imgShow = true
  319. this.url = url
  320. },
  321. showcontent(item) {
  322. item.showflow = !item.showflow
  323. },
  324. async getList(id) {
  325. var that = this
  326. uni.showLoading({
  327. title: '加载中',
  328. mask: true
  329. })
  330. await that.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
  331. id: that.id
  332. }).then(res => {
  333. if (res.data.code == 200) {
  334. that.list = res.data.data
  335. let urlList = []
  336. console.log(this.list)
  337. if (that.list.fillingDetailInfo.addressUrl) {
  338. let datalist = that.list.fillingDetailInfo.addressUrl.split(",")
  339. for (let j = 0; j < datalist.length; j++) {
  340. urlList.push({
  341. url: datalist[j]
  342. })
  343. }
  344. that.list.fillingDetailInfo.urlList = urlList
  345. }
  346. // 审核流程
  347. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  348. businessCode: 'JIAYOU-SHENHE-APPROVE',
  349. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  350. }).then(res1 => {
  351. this.$api.doRequest('get', '/commonUser/getHis', {
  352. workflowId: res1.data.data[0].id,
  353. businessKey: this.id,
  354. // branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
  355. }).then(response => {
  356. uni.hideLoading()
  357. for (let i = 0; i < response.data.data.length; i++) {
  358. this.$set(response.data.data[i], 'status', 'question')
  359. // console.log(response.data.data[i].workflowHistoricTasks,i)
  360. if (response.data.data[i].commonStaffs) {
  361. response.data.data[i].showflow = false
  362. response.data.data[i].operatorTitle = response.data
  363. .data[i]
  364. .desc.substring(0, 2)
  365. response.data.data[i].operatorName = response.data
  366. .data[i]
  367. .desc
  368. response.data.data[i].staffscontent = '共' + response
  369. .data
  370. .data[i].commonStaffs.length + '人,当前审核' + response
  371. .data
  372. .data[i].workflowHistoricTasks.length + '人'
  373. if (response.data.data[i].workflowHistoricTasks &&
  374. response
  375. .data.data[i].workflowHistoricTasks.length > 0) {
  376. if (response.data.data[i].workflowHistoricTasks
  377. .length != response.data.data[i].commonStaffs
  378. .length) {
  379. // response.data.data[i].status='question'
  380. this.$set(response.data.data[i], 'status',
  381. 'question')
  382. } else {
  383. this.$set(response.data.data[i], 'status',
  384. 'success')
  385. // response.data.data[i].status='success'
  386. }
  387. response.data.data[i].workflowlen = response.data
  388. .data[
  389. i].workflowHistoricTasks.length
  390. var workflowdata = response.data.data[i]
  391. .workflowHistoricTasks
  392. var staffsdata = response.data.data[i].commonStaffs
  393. for (let q = 0; q < staffsdata.length; q++) {
  394. staffsdata[q].status = false
  395. staffsdata[q].staffTitle = staffsdata[q]
  396. .staffName
  397. for (let k = 0; k < workflowdata.length; k++) {
  398. if (staffsdata[q].staffId == workflowdata[
  399. k]
  400. .operatorId) {
  401. staffsdata[q].status = true
  402. }
  403. }
  404. }
  405. }
  406. response.data.data[i].commonStaffs1 = response.data
  407. .data[i]
  408. .commonStaffs
  409. } else {
  410. if (response.data.data[i].workflowHistoricTasks &&
  411. response
  412. .data.data[i].workflowHistoricTasks.length > 0) {
  413. var len = response.data.data[i]
  414. .workflowHistoricTasks
  415. .length - 1
  416. if (response.data.data[i].workflowHistoricTasks[
  417. len]
  418. .approved) {
  419. this.$set(response.data.data[i], 'status',
  420. 'success')
  421. } else {
  422. this.$set(response.data.data[i], 'status',
  423. 'error')
  424. }
  425. response.data.data[i].operatorTitle = response.data
  426. .data[i].workflowHistoricTasks[len]
  427. .operatorName
  428. .substring(response.data.data[i]
  429. .workflowHistoricTasks[0].operatorName
  430. .length -
  431. 2)
  432. response.data.data[i].operatorName = response.data
  433. .data[i].workflowHistoricTasks[len]
  434. .operatorName
  435. var time = new Date(response.data.data[i]
  436. .workflowHistoricTasks[len].claimTime)
  437. .getTime()
  438. response.data.data[i].updateDate = this.$u
  439. .timeFormat(
  440. time, 'mm.dd hh:MM')
  441. // response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
  442. if (response.data.data[i].workflowHistoricTasks[
  443. len]
  444. .auditMind && response.data.data[i]
  445. .workflowHistoricTasks[len].auditMind.indexOf(
  446. "##") != -1) {
  447. response.data.data[i].auditMind = response.data
  448. .data[i].workflowHistoricTasks[len]
  449. .auditMind
  450. .split("##")[0]
  451. response.data.data[i].fileUrl = response.data
  452. .data[
  453. i].workflowHistoricTasks[len].auditMind
  454. .split("##")[1].split(",")
  455. } else {
  456. response.data.data[i].auditMind = response.data
  457. .data[i].workflowHistoricTasks[len]
  458. .auditMind
  459. }
  460. } else {
  461. this.$set(response.data.data[i], 'status',
  462. 'question')
  463. // response.data.data[i].status='question'
  464. if (response.data.data[i].desc == '总经理助理审核') {
  465. response.data.data[i].operatorTitle = '总助'
  466. } else if (response.data.data[i].desc == '杜大光审核') {
  467. response.data.data[i].operatorTitle = '大光'
  468. } else {
  469. response.data.data[i].operatorTitle = response
  470. .data
  471. .data[i].desc.substring(0, 2)
  472. }
  473. response.data.data[i].operatorName = response.data
  474. .data[i].desc
  475. var time1 = new Date(response.data.data[i]
  476. .updateDate)
  477. .getTime()
  478. response.data.data[i].updateDate = this.$u
  479. .timeFormat(
  480. time1, 'mm.dd hh:MM')
  481. response.data.data[i].auditMind = ''
  482. }
  483. }
  484. }
  485. console.log(response.data.data)
  486. for (let i = 0; i < response.data.data.length; i++) {
  487. if (response.data.data[i].status == "error") {
  488. this.auditCheck = "error"
  489. break;
  490. } else if (response.data.data[i].status == "question") {
  491. this.auditCheck = "question"
  492. break;
  493. } else {
  494. this.auditCheck = "success"
  495. }
  496. }
  497. this.auditList = response.data.data
  498. var time2 = new Date(this.list.createDate).getTime()
  499. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  500. this.auditList.unshift({
  501. operatorTitle: this.list.creater.substring(0, 2),
  502. operatorName: this.list.creater,
  503. updateDate: time3,
  504. auditMind: '',
  505. desc: '发起申请',
  506. showflow: false,
  507. commonStaffs1: null,
  508. commonStaffs: null,
  509. workflowHistoricTasks: [],
  510. status: 'success'
  511. })
  512. })
  513. })
  514. }
  515. })
  516. await this.$api.doRequest('post', '/CarPostionController/api/gettrack', {
  517. // startDate:this.datalist.amountDeadline ,
  518. // endDate: this.datalist.amountDeadline.createDate,
  519. startDate: "2023-02-20 01:00:00",
  520. endDate: "2023-02-20 24:00:00",
  521. }).then(res => {
  522. console.log(res)
  523. if (res.data.code == 200) {
  524. // uni.hideLoading()
  525. let _list = JSON.parse(res.data.data)
  526. this.latitude = _list[0].lat
  527. this.longitude = _list[0].lng
  528. this.covers[0].latitude = this.latitude;
  529. this.covers[0].longitude = this.longitude;
  530. console.log("_list", _list)
  531. this.polyline[0].points = []
  532. for (let i = 0; i < _list.length; i++) {
  533. this.polyline[0].points.push({
  534. latitude: _list[i].lat,
  535. longitude: _list[i].lng
  536. })
  537. }
  538. console.log(this.polyline)
  539. // var that = this
  540. // setTimeout(() => {
  541. // that.durationTime = Math.ceil(30000 / that.polyline[0].points
  542. // .length) //默认播放全程使用30秒,计算相连两点动画时长
  543. // that.initMapData()
  544. // }, 1000)
  545. }
  546. })
  547. .catch(res => {
  548. uni.$u.toast(res.message);
  549. });
  550. },
  551. filterFileType(index, lists) {
  552. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  553. lists.splice(index, 1);
  554. // 当前文件不支持
  555. uni.showModal({
  556. title: '暂不支持当前图片类型',
  557. showCancel: false
  558. });
  559. } else {
  560. this.isAdd = false;
  561. }
  562. },
  563. close() {
  564. this.show = false
  565. },
  566. pass() {
  567. this.show = true
  568. this.title = '审核意见(通过)'
  569. },
  570. reject() {
  571. this.show = true
  572. this.title = '驳回原因(驳回)'
  573. },
  574. //驳回
  575. rejectSubmit() {
  576. var that = this
  577. uni.showLoading({
  578. title: '加载中',
  579. mask: true
  580. });
  581. var info = that.auditMind
  582. if (that.fileUrl.length > 0) {
  583. info = that.auditMind + "##" + that.fileUrl.toString()
  584. }
  585. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  586. taskId: that.list.taskId,
  587. approved: false,
  588. auditMind: info ? info : "",
  589. needReapply: true,
  590. }).then(res => {
  591. that.$api.msg('驳回成功')
  592. that.show = false
  593. setTimeout(function() {
  594. if (that.everyCheck) {
  595. helper.setAudit(that.list)
  596. } else {
  597. uni.navigateBack()
  598. }
  599. uni.hideLoading()
  600. }, 1000);
  601. })
  602. },
  603. //通过
  604. passSubmit() {
  605. var that = this
  606. if (this.title == '驳回原因(驳回)') {
  607. this.rejectSubmit()
  608. } else {
  609. uni.showLoading({
  610. title: '加载中',
  611. mask: true
  612. });
  613. var info = that.auditMind
  614. if (that.fileUrl.length > 0) {
  615. info = that.auditMind + "##" + that.fileUrl.toString()
  616. }
  617. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  618. taskId: that.list.taskId,
  619. approved: true,
  620. auditMind: info ? info : "",
  621. needReapply: true,
  622. }).then(res => {
  623. that.$api.msg('通过成功')
  624. that.show = false
  625. setTimeout(function() {
  626. if (that.everyCheck) {
  627. helper.setAudit(that.list)
  628. } else {
  629. uni.navigateBack()
  630. }
  631. uni.hideLoading()
  632. }, 1000);
  633. })
  634. }
  635. },
  636. //审核方法
  637. audit(item, index, status, status2, reason) {
  638. if (index < this.list.length) {
  639. this.$api.doRequest('post', '/newWorkflow/api/handle', {
  640. taskId: item.taskId,
  641. approved: status,
  642. auditMind: reason != undefined ? '已驳回' : '34',
  643. needReapply: status2 != undefined ? true : false,
  644. }).then(res => {
  645. this.audit(this.list[index + 1], index + 1, status)
  646. })
  647. } else {
  648. if (status == true) {
  649. that.$api.msg('通过成功')
  650. this.getList()
  651. } else if (status == false) {
  652. that.$api.msg('驳回成功')
  653. this.getList()
  654. }
  655. }
  656. },
  657. }
  658. }
  659. </script>
  660. <style scoped lang="scss">
  661. .container {
  662. padding: 20rpx 20rpx 250rpx 20rpx;
  663. }
  664. .u-form {
  665. margin-bottom: 20rpx;
  666. background: #fff;
  667. border-radius: 10px;
  668. padding: 30rpx 10px;
  669. .u-form-item {
  670. line-height: 30px;
  671. padding: 0px 0;
  672. font-size: 26rpx;
  673. color: #878C9C;
  674. }
  675. }
  676. .content {
  677. margin-top: 30rpx;
  678. .top {
  679. display: flex;
  680. justify-content: space-between;
  681. }
  682. .content-item {
  683. border-radius: 20rpx;
  684. background: white;
  685. padding: 40rpx 20rpx;
  686. margin-bottom: 30rpx;
  687. }
  688. .title {
  689. font-size: 32rpx;
  690. font-weight: 600;
  691. color: #333333;
  692. text-align: left;
  693. margin: 20rpx 0;
  694. }
  695. .car-container {
  696. border-bottom: 2rpx solid #EEEEEE;
  697. }
  698. .car-type-item {
  699. font-size: 28rpx;
  700. margin: 20rpx 0;
  701. color: #878C9C;
  702. }
  703. .weightInfoCss {
  704. font-size: 28rpx;
  705. color: #333333;
  706. font-weight: 500;
  707. }
  708. .row {
  709. display: flex;
  710. justify-content: space-between;
  711. // .right,
  712. // input {
  713. // font-size: 28rpx;
  714. // // color: #333333;
  715. // }
  716. }
  717. .money {
  718. font-size: 32rpx;
  719. font-weight: 500;
  720. margin-bottom: 30rpx;
  721. }
  722. .moneyInfo {
  723. color: #22C572;
  724. font-size: 32rpx;
  725. }
  726. }
  727. .bottom-btn {
  728. width: 100%;
  729. position: fixed;
  730. bottom: 0;
  731. display: flex;
  732. z-index: 2;
  733. left: 0;
  734. background-color: #f8f8f8;
  735. flex-direction: column;
  736. .btn1,
  737. .btn2 {
  738. width: 100%;
  739. margin-bottom: 26rpx;
  740. border-radius: 90rpx;
  741. }
  742. .btn1 {
  743. background: white;
  744. color: #00C265;
  745. }
  746. }
  747. .topInfo {
  748. height: 210rpx;
  749. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  750. padding: 30rpx;
  751. .topInfo-item {
  752. height: 150rpx;
  753. background-color: #FFFFFF;
  754. border-radius: 20rpx;
  755. padding: 40rpx;
  756. .logo {
  757. width: 40rpx;
  758. height: 40rpx;
  759. margin-top: 8rpx;
  760. }
  761. .infoText {
  762. font-size: 36rpx;
  763. font-weight: 600;
  764. margin-left: 20rpx;
  765. }
  766. .infoData {
  767. color: #878C9C;
  768. font-size: 26rpx;
  769. margin-top: 10rpx;
  770. }
  771. }
  772. }
  773. .shade {
  774. position: fixed;
  775. top: 0;
  776. left: 0;
  777. height: 100%;
  778. width: 100%;
  779. background: rgba(0, 0, 0, 0.4);
  780. z-index: 13;
  781. .wrap {
  782. position: absolute;
  783. left: 0;
  784. top: 0;
  785. right: 0;
  786. bottom: 0;
  787. margin: auto;
  788. background: #fff;
  789. width: calc(100% - 198rpx);
  790. height: 836rpx;
  791. border-radius: 20rpx;
  792. // overflow-y: scroll;
  793. .alert-top {
  794. padding: 33rpx;
  795. display: flex;
  796. justify-content: center;
  797. align-items: center;
  798. position: relative;
  799. }
  800. .title {
  801. font-size: 32rpx;
  802. font-weight: 600;
  803. color: #333333;
  804. }
  805. .close {
  806. position: absolute;
  807. right: 33rpx;
  808. }
  809. }
  810. }
  811. .cancel,
  812. .confirm {
  813. position: absolute;
  814. display: inline-block;
  815. width: 50%;
  816. text-align: center;
  817. bottom: 0;
  818. padding: 10px;
  819. border-top: 1px solid #eee;
  820. font-size: 34rpx;
  821. z-index: 10;
  822. background: #fff;
  823. }
  824. .cancel {
  825. left: 0;
  826. border-right: 1px solid #eee;
  827. color: #AFB3BF;
  828. }
  829. .confirm {
  830. right: 0;
  831. color: #22C572;
  832. }
  833. .textarea {
  834. margin: 18rpx auto;
  835. width: 100%;
  836. background: #F9F9FA;
  837. border-radius: 10px;
  838. border: 1px solid #EEEEEE;
  839. font-size: 28rpx;
  840. padding: 10px;
  841. }
  842. .textCss {
  843. display: flex;
  844. justify-content: flex-end;
  845. width: 100%;
  846. text-align: right;
  847. color: #333333;
  848. }
  849. .u-textarea-style {
  850. margin: 20rpx;
  851. background: #F9F9FA;
  852. border-radius: 10px;
  853. border: 1px solid #EEEEEE;
  854. padding: 10rpx 20rpx;
  855. position: relative;
  856. height: 240px;
  857. /deep/.uni-textarea-textarea {
  858. width: 80%;
  859. }
  860. .right-bottom {
  861. position: absolute;
  862. right: 20rpx;
  863. bottom: 20rpx;
  864. color: #AFB3BF;
  865. }
  866. }
  867. /deep/.u-input__textarea {
  868. height: 300rpx !important;
  869. }
  870. .content2 {
  871. background: white;
  872. margin: 20rpx 0;
  873. border-radius: 20rpx;
  874. padding: 20rpx;
  875. .row {
  876. display: flex;
  877. .left {
  878. display: flex;
  879. align-items: center;
  880. .item1 {
  881. position: relative;
  882. .item-content {
  883. background: #617AE0;
  884. width: 44px;
  885. height: 44px;
  886. border-radius: 22px;
  887. line-height: 44px;
  888. text-align: center;
  889. font-size: 15px;
  890. color: #fff;
  891. }
  892. .status {
  893. position: absolute;
  894. border-radius: 50%;
  895. padding: 0px 8rpx;
  896. width: 40rpx;
  897. height: 40rpx;
  898. right: -3px;
  899. bottom: -3px;
  900. background: #fff;
  901. }
  902. .status.success {
  903. border: 1px solid rgb(60, 156, 255);
  904. }
  905. .status.error {
  906. border: 1px solid rgb(245, 108, 108);
  907. }
  908. .status.question {
  909. border: 1px solid #f9ae3d;
  910. }
  911. }
  912. }
  913. .right {
  914. width: 80%;
  915. // color: #B0B1B5;
  916. margin-top: 10px;
  917. .right-content {
  918. background: #F2F3F7;
  919. margin-left: 10px;
  920. margin-top: 10px;
  921. padding: 10px;
  922. border-radius: 5px;
  923. color: #B0B1B5;
  924. }
  925. .right-item {
  926. display: flex;
  927. justify-content: space-between;
  928. .time {
  929. color: #999;
  930. }
  931. .item2 {
  932. margin-left: 20rpx;
  933. margin-top: -7px;
  934. .name {
  935. font-size: 28rpx;
  936. font-weight: 800;
  937. margin-bottom: 4px;
  938. }
  939. .status.success {
  940. color: #6CC48C;
  941. }
  942. .status.error {
  943. color: rgb(245, 108, 108);
  944. }
  945. .status.question {
  946. color: #f9ae3d;
  947. }
  948. }
  949. }
  950. .audit_img {
  951. flex-wrap: wrap;
  952. // margin: 0 10rpx;
  953. margin-left: 20rpx;
  954. .url_css {
  955. border: 1px solid #999999;
  956. border-radius: 10px;
  957. margin-top: 10px;
  958. margin-right: 4px;
  959. overflow: hidden;
  960. width: 73px;
  961. height: 73px;
  962. .url_img {
  963. width: 73px;
  964. height: 73px;
  965. // border-radius: 10px;
  966. }
  967. }
  968. }
  969. }
  970. }
  971. .row2 {
  972. display: flex;
  973. .item-content {
  974. background: #22C572;
  975. width: 30px;
  976. height: 30px;
  977. border-radius: 50%;
  978. line-height: 30px;
  979. text-align: center;
  980. font-size: 12px;
  981. color: #fff;
  982. padding: 0 2px;
  983. margin: 0 auto;
  984. }
  985. .status {
  986. position: absolute;
  987. top: 0;
  988. right: 0;
  989. }
  990. }
  991. .row-line {
  992. width: 1px;
  993. height: 30px;
  994. background: #F2F2F2;
  995. margin: 10rpx 50rpx;
  996. }
  997. .audit {
  998. margin-top: 20rpx;
  999. }
  1000. }
  1001. .form_top {
  1002. border-bottom: 1px solid #F5F6FA;
  1003. padding-bottom: 10px;
  1004. margin-bottom: 18rpx;
  1005. font-size: 30rpx;
  1006. font-weight: 600;
  1007. }
  1008. .place {
  1009. margin: auto;
  1010. margin-right: 0px;
  1011. text-align: right;
  1012. }
  1013. .form_view {
  1014. margin: 20rpx 0;
  1015. border-radius: 20rpx;
  1016. background: #F9F9FA;
  1017. padding: 30rpx 20rpx;
  1018. margin-top: 30rpx;
  1019. }
  1020. .label_css {
  1021. font-size: 26rpx;
  1022. color: #878C9C;
  1023. }
  1024. .input_css {
  1025. font-size: 20rpx;
  1026. }
  1027. /deep/.uni-textarea-wrapper {
  1028. height: 200px;
  1029. }
  1030. // .fujian_title{
  1031. // font-size: 34rpx;
  1032. // margin-top: 20px;
  1033. // font-weight: 600;
  1034. // // margin-left: 10px;
  1035. // }
  1036. .headInfo {
  1037. height: 100px;
  1038. background-color: #FFFFFF;
  1039. margin-bottom: 20rpx;
  1040. border-radius: 10px;
  1041. padding: 30rpx 10px;
  1042. display: flex;
  1043. .headInfo_left {
  1044. width: 10%;
  1045. line-height: 60px;
  1046. text-align: center;
  1047. }
  1048. .headInfo_middle {
  1049. width: 60%;
  1050. padding-left: 10px;
  1051. margin-top: 10px;
  1052. }
  1053. .headInfo_right {
  1054. width: 30%;
  1055. line-height: 60px;
  1056. .char_a {
  1057. color: #22C572;
  1058. }
  1059. .char_b {
  1060. color: #FE6430;
  1061. }
  1062. .char_c {
  1063. color: #FB2323;
  1064. }
  1065. .char_a,
  1066. .char_b,
  1067. .char_c {
  1068. font-size: 16px;
  1069. }
  1070. }
  1071. .adopt {
  1072. position: absolute;
  1073. right: 30px;
  1074. top: 60px;
  1075. .adopt_img {
  1076. width: 90px;
  1077. height: 90px;
  1078. }
  1079. }
  1080. .headInfo_title {
  1081. font-size: 19px;
  1082. color: #333333;
  1083. font-weight: 600;
  1084. }
  1085. .headInfo_No {
  1086. color: #878C9C;
  1087. font-size: 13px;
  1088. margin-top: 6px;
  1089. }
  1090. }
  1091. .img_item {
  1092. display: flex;
  1093. width: 100%;
  1094. margin: 10px 0;
  1095. padding: 0 10rpx;
  1096. .imgsign {
  1097. width: 25px;
  1098. height: 25px;
  1099. margin-top: 6px;
  1100. }
  1101. .char_css {
  1102. font-size: 28rpx;
  1103. font-weight: 600;
  1104. display: -webkit-box;
  1105. overflow: hidden;
  1106. /*! autoprefixer: off; */
  1107. -webkit-box-orient: vertical;
  1108. -webkit-line-clamp: 1;
  1109. -webkit-box-orient: vertical;
  1110. text-overflow: ellipsis;
  1111. word-break: break-all;
  1112. }
  1113. .img_size {
  1114. color: #B0B3BF;
  1115. font-size: 12px;
  1116. margin-top: 5px;
  1117. }
  1118. .img_dowload {
  1119. width: 14%;
  1120. color: #22C572;
  1121. text-align: right;
  1122. }
  1123. }
  1124. //凭证
  1125. .voucher {
  1126. .voucher_tips {
  1127. margin-top: 20rpx;
  1128. color: #878C9C;
  1129. }
  1130. }
  1131. .upload {
  1132. margin: auto;
  1133. margin-right: 0px;
  1134. }
  1135. /deep/.u-upload .u-list-item{
  1136. background:#fff;
  1137. border:1px dashed #ccc;
  1138. border-radius:10rpx;
  1139. height:190rpx;
  1140. width:190rpx;
  1141. margin:10rpx;
  1142. text-align:center;
  1143. display: flex;
  1144. align-items: center;
  1145. justify-content: center;
  1146. flex-direction: column;
  1147. }
  1148. /deep/.place {
  1149. color: #000;
  1150. }
  1151. </style>