refuel.vue 35 KB

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