refuel.vue 29 KB

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