refuel.vue 31 KB

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