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==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. //通过
  638. passSubmit() {
  639. var that = this
  640. if (this.title == '驳回原因(驳回)') {
  641. this.rejectSubmit()
  642. } else {
  643. uni.showLoading({
  644. title: '加载中',
  645. mask: true
  646. });
  647. var info = that.auditMind
  648. if (that.fileUrl.length > 0) {
  649. info = that.auditMind + "##" + that.fileUrl.toString()
  650. }
  651. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  652. taskId: that.list.taskId,
  653. approved: true,
  654. auditMind: info?info:"",
  655. needReapply: true,
  656. }).then(res => {
  657. that.$api.msg('通过成功')
  658. that.show = false
  659. setTimeout(function() {
  660. if (that.everyCheck) {
  661. helper.setAudit(that.list)
  662. } else {
  663. uni.navigateBack()
  664. }
  665. uni.hideLoading()
  666. }, 1000);
  667. })
  668. }
  669. },
  670. //审核方法
  671. audit(item, index, status, status2, reason) {
  672. if (index < this.list.length) {
  673. this.$api.doRequest('post', '/newWorkflow/api/handle', {
  674. taskId: item.taskId,
  675. approved: status,
  676. auditMind: reason != undefined ? '已驳回' : '34',
  677. needReapply: status2 != undefined ? true : false,
  678. }).then(res => {
  679. this.audit(this.list[index + 1], index + 1, status)
  680. })
  681. } else {
  682. if (status == true) {
  683. that.$api.msg('通过成功')
  684. this.getList()
  685. } else if (status == false) {
  686. that.$api.msg('驳回成功')
  687. this.getList()
  688. }
  689. }
  690. },
  691. }
  692. }
  693. </script>
  694. <style scoped lang="scss">
  695. .container {
  696. padding: 20rpx 20rpx 250rpx 20rpx;
  697. }
  698. .u-form {
  699. margin-bottom: 20rpx;
  700. background: #fff;
  701. border-radius: 10px;
  702. padding: 30rpx 10px;
  703. .u-form-item {
  704. line-height: 30px;
  705. padding: 0px 0;
  706. font-size: 26rpx;
  707. color: #878C9C;
  708. }
  709. }
  710. .content {
  711. margin-top: 30rpx;
  712. .top {
  713. display: flex;
  714. justify-content: space-between;
  715. }
  716. .content-item {
  717. border-radius: 20rpx;
  718. background: white;
  719. padding: 40rpx 20rpx;
  720. margin-bottom: 30rpx;
  721. }
  722. .title {
  723. font-size: 32rpx;
  724. font-weight: 600;
  725. color: #333333;
  726. text-align: left;
  727. margin: 20rpx 0;
  728. }
  729. .car-container {
  730. border-bottom: 2rpx solid #EEEEEE;
  731. }
  732. .car-type-item {
  733. font-size: 28rpx;
  734. margin: 20rpx 0;
  735. color: #878C9C;
  736. }
  737. .weightInfoCss {
  738. font-size: 28rpx;
  739. color: #333333;
  740. font-weight: 500;
  741. }
  742. .row {
  743. display: flex;
  744. justify-content: space-between;
  745. // .right,
  746. // input {
  747. // font-size: 28rpx;
  748. // // color: #333333;
  749. // }
  750. }
  751. .money {
  752. font-size: 32rpx;
  753. font-weight: 500;
  754. margin-bottom: 30rpx;
  755. }
  756. .moneyInfo {
  757. color: #22C572;
  758. font-size: 32rpx;
  759. }
  760. }
  761. .bottom-btn {
  762. width: 100%;
  763. position: fixed;
  764. bottom: 0;
  765. display: flex;
  766. z-index: 2;
  767. left: 0;
  768. background-color: #f8f8f8;
  769. flex-direction: column;
  770. .btn1,
  771. .btn2 {
  772. width: 100%;
  773. margin-bottom: 26rpx;
  774. border-radius: 90rpx;
  775. }
  776. .btn1 {
  777. background: white;
  778. color: #00C265;
  779. }
  780. }
  781. .topInfo {
  782. height: 210rpx;
  783. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  784. padding: 30rpx;
  785. .topInfo-item {
  786. height: 150rpx;
  787. background-color: #FFFFFF;
  788. border-radius: 20rpx;
  789. padding: 40rpx;
  790. .logo {
  791. width: 40rpx;
  792. height: 40rpx;
  793. margin-top: 8rpx;
  794. }
  795. .infoText {
  796. font-size: 36rpx;
  797. font-weight: 600;
  798. margin-left: 20rpx;
  799. }
  800. .infoData {
  801. color: #878C9C;
  802. font-size: 26rpx;
  803. margin-top: 10rpx;
  804. }
  805. }
  806. }
  807. .shade {
  808. position: fixed;
  809. top: 0;
  810. left: 0;
  811. height: 100%;
  812. width: 100%;
  813. background: rgba(0, 0, 0, 0.4);
  814. z-index: 13;
  815. .wrap {
  816. position: absolute;
  817. left: 0;
  818. top: 0;
  819. right: 0;
  820. bottom: 0;
  821. margin: auto;
  822. background: #fff;
  823. width: calc(100% - 198rpx);
  824. height: 948rpx;
  825. border-radius: 20rpx;
  826. // overflow-y: scroll;
  827. .alert-top {
  828. padding: 33rpx;
  829. display: flex;
  830. justify-content: center;
  831. align-items: center;
  832. position: relative;
  833. }
  834. .title {
  835. font-size: 32rpx;
  836. font-weight: 600;
  837. color: #333333;
  838. }
  839. .close {
  840. position: absolute;
  841. right: 33rpx;
  842. }
  843. }
  844. }
  845. .cancel,
  846. .confirm {
  847. position: absolute;
  848. display: inline-block;
  849. width: 50%;
  850. text-align: center;
  851. bottom: 0;
  852. padding: 10px;
  853. border-top: 1px solid #eee;
  854. font-size: 34rpx;
  855. z-index:10;
  856. background:#fff;
  857. }
  858. .cancel {
  859. left: 0;
  860. border-right: 1px solid #eee;
  861. color: #AFB3BF;
  862. }
  863. .confirm {
  864. right: 0;
  865. color: #22C572;
  866. }
  867. .textarea {
  868. margin: 18rpx auto;
  869. width: 100%;
  870. background: #F9F9FA;
  871. border-radius: 10px;
  872. border: 1px solid #EEEEEE;
  873. font-size: 28rpx;
  874. padding: 10px;
  875. }
  876. .textCss {
  877. display: flex;
  878. justify-content: flex-end;
  879. width: 100%;
  880. text-align: right;
  881. color: #333333;
  882. }
  883. .u-textarea-style {
  884. margin: 20rpx;
  885. background: #F9F9FA;
  886. border-radius: 10px;
  887. border: 1px solid #EEEEEE;
  888. padding: 10rpx 20rpx;
  889. position: relative;
  890. height: 240px;
  891. /deep/.uni-textarea-textarea {
  892. width: 80%;
  893. }
  894. .right-bottom {
  895. position: absolute;
  896. right: 20rpx;
  897. bottom: 20rpx;
  898. color: #AFB3BF;
  899. }
  900. }
  901. /deep/.u-input__textarea {
  902. height: 300rpx !important;
  903. }
  904. .content2 {
  905. background: white;
  906. margin: 20rpx 0;
  907. border-radius: 20rpx;
  908. padding: 20rpx;
  909. .row {
  910. display: flex;
  911. .left {
  912. display: flex;
  913. align-items: center;
  914. .item1 {
  915. position: relative;
  916. .item-content {
  917. background: #617AE0;
  918. width: 44px;
  919. height: 44px;
  920. border-radius: 22px;
  921. line-height: 44px;
  922. text-align: center;
  923. font-size: 15px;
  924. color: #fff;
  925. }
  926. .status {
  927. position: absolute;
  928. border-radius: 50%;
  929. padding: 0px 8rpx;
  930. width:40rpx;
  931. height:40rpx;
  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>