refuel.vue 36 KB

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