refuel.vue 30 KB

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