refuel.vue 32 KB

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