refuel.vue 35 KB

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