refuel.vue 35 KB

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