refuel.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265
  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" mode="" 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 2px;
  932. right: -3px;
  933. bottom: -3px;
  934. background: #fff;
  935. }
  936. .status.success {
  937. border: 1px solid rgb(60, 156, 255);
  938. }
  939. .status.error {
  940. border: 1px solid rgb(245, 108, 108);
  941. }
  942. .status.question {
  943. border: 1px solid #f9ae3d;
  944. }
  945. }
  946. }
  947. .right {
  948. width: 80%;
  949. // color: #B0B1B5;
  950. margin-top: 10px;
  951. .right-content {
  952. background: #F2F3F7;
  953. margin-left: 10px;
  954. margin-top: 10px;
  955. padding: 10px;
  956. border-radius: 5px;
  957. color: #B0B1B5;
  958. }
  959. .right-item {
  960. display: flex;
  961. justify-content: space-between;
  962. .time {
  963. color: #999;
  964. }
  965. .item2 {
  966. margin-left: 20rpx;
  967. margin-top: -7px;
  968. .name {
  969. font-size: 28rpx;
  970. font-weight: 800;
  971. margin-bottom: 4px;
  972. }
  973. .status.success {
  974. color: #6CC48C;
  975. }
  976. .status.error {
  977. color: rgb(245, 108, 108);
  978. }
  979. .status.question {
  980. color: #f9ae3d;
  981. }
  982. }
  983. }
  984. .audit_img {
  985. flex-wrap: wrap;
  986. // margin: 0 10rpx;
  987. margin-left: 20rpx;
  988. .url_css {
  989. border: 1px solid #999999;
  990. border-radius: 10px;
  991. margin-top: 10px;
  992. margin-right: 4px;
  993. overflow: hidden;
  994. width: 73px;
  995. height: 73px;
  996. .url_img {
  997. width: 73px;
  998. height: 73px;
  999. // border-radius: 10px;
  1000. }
  1001. }
  1002. }
  1003. }
  1004. }
  1005. .row2 {
  1006. display: flex;
  1007. .item-content {
  1008. background: #22C572;
  1009. width: 30px;
  1010. height: 30px;
  1011. border-radius: 50%;
  1012. line-height: 30px;
  1013. text-align: center;
  1014. font-size: 12px;
  1015. color: #fff;
  1016. padding: 0 2px;
  1017. margin: 0 auto;
  1018. }
  1019. .status {
  1020. position: absolute;
  1021. top: 0;
  1022. right: 0;
  1023. }
  1024. }
  1025. .row-line {
  1026. width: 1px;
  1027. height: 30px;
  1028. background: #F2F2F2;
  1029. margin: 10rpx 50rpx;
  1030. }
  1031. .audit {
  1032. margin-top: 20rpx;
  1033. }
  1034. }
  1035. .form_top {
  1036. border-bottom: 1px solid #F5F6FA;
  1037. padding-bottom: 10px;
  1038. margin-bottom: 18rpx;
  1039. font-size: 30rpx;
  1040. font-weight: 600;
  1041. }
  1042. .place{
  1043. margin: auto;
  1044. margin-right: 0px;
  1045. text-align: right;
  1046. }
  1047. .form_view {
  1048. margin: 20rpx 0;
  1049. border-radius: 20rpx;
  1050. background: #F9F9FA;
  1051. padding: 30rpx 20rpx;
  1052. margin-top: 30rpx;
  1053. }
  1054. .label_css {
  1055. font-size: 26rpx;
  1056. color: #878C9C;
  1057. }
  1058. .input_css {
  1059. font-size: 20rpx;
  1060. }
  1061. /deep/.uni-textarea-wrapper {
  1062. height: 200px;
  1063. }
  1064. // .fujian_title{
  1065. // font-size: 34rpx;
  1066. // margin-top: 20px;
  1067. // font-weight: 600;
  1068. // // margin-left: 10px;
  1069. // }
  1070. .headInfo {
  1071. height: 100px;
  1072. background-color: #FFFFFF;
  1073. margin-bottom: 20rpx;
  1074. border-radius: 10px;
  1075. padding: 30rpx 10px;
  1076. display: flex;
  1077. .headInfo_left {
  1078. width: 10%;
  1079. line-height: 60px;
  1080. text-align: center;
  1081. }
  1082. .headInfo_middle {
  1083. width: 60%;
  1084. padding-left: 10px;
  1085. margin-top: 10px;
  1086. }
  1087. .headInfo_right {
  1088. width: 30%;
  1089. line-height: 60px;
  1090. .char_a {
  1091. color: #22C572;
  1092. }
  1093. .char_b {
  1094. color: #FE6430;
  1095. }
  1096. .char_c {
  1097. color: #FB2323;
  1098. }
  1099. .char_a,
  1100. .char_b,
  1101. .char_c {
  1102. font-size: 16px;
  1103. }
  1104. }
  1105. .adopt {
  1106. position: absolute;
  1107. right: 30px;
  1108. top: 60px;
  1109. .adopt_img {
  1110. width: 90px;
  1111. height: 90px;
  1112. }
  1113. }
  1114. .headInfo_title {
  1115. font-size: 19px;
  1116. color: #333333;
  1117. font-weight: 600;
  1118. }
  1119. .headInfo_No {
  1120. color: #878C9C;
  1121. font-size: 13px;
  1122. margin-top: 6px;
  1123. }
  1124. }
  1125. .img_item {
  1126. display: flex;
  1127. width: 100%;
  1128. margin: 10px 0;
  1129. padding: 0 10rpx;
  1130. .imgsign {
  1131. width: 25px;
  1132. height: 25px;
  1133. margin-top: 6px;
  1134. }
  1135. .char_css {
  1136. font-size: 28rpx;
  1137. font-weight: 600;
  1138. display: -webkit-box;
  1139. overflow: hidden;
  1140. /*! autoprefixer: off; */
  1141. -webkit-box-orient: vertical;
  1142. -webkit-line-clamp: 1;
  1143. -webkit-box-orient: vertical;
  1144. text-overflow: ellipsis;
  1145. word-break: break-all;
  1146. }
  1147. .img_size {
  1148. color: #B0B3BF;
  1149. font-size: 12px;
  1150. margin-top: 5px;
  1151. }
  1152. .img_dowload {
  1153. width: 14%;
  1154. color: #22C572;
  1155. text-align: right;
  1156. }
  1157. }
  1158. //凭证
  1159. .voucher{
  1160. .voucher_tips{
  1161. margin-top: 20rpx;
  1162. color: #878C9C;
  1163. }
  1164. }
  1165. .upload {
  1166. margin: auto;
  1167. margin-right: 0px;
  1168. }
  1169. /deep/.place{
  1170. color:#000;
  1171. }
  1172. </style>