charge_against_revenue.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006
  1. <template>
  2. <view class="warp">
  3. <view class="topInfo">
  4. <view class="topInfo-item">
  5. <view class="flex info">
  6. <view class="logo">
  7. <image src="../../../static/img/reject.png" mode="" v-if="status == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="status == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <!-- v-if="status == '审核中' || status == '待决策人审核'" -->
  12. <image src="../../../static/img/daishenhe.png" mode="" style="height: 40rpx;"></image>
  13. <!-- 待审核 -->
  14. </view>
  15. <!-- {{auditList.length > 0 ?auditList[auditList.length - 1].operatorMajorRoleName:""}} -->
  16. <view class="infoText">{{auditInfo.approveStatus?auditInfo.approveStatus:auditInfo.status}}</view>
  17. </view>
  18. <view class="infoData">{{auditInfo.updateDate}}</view>
  19. </view>
  20. </view>
  21. <!-- <view class='content1'>
  22. <view class='row content-item'>
  23. <view class="left" style="color: #878C9C ;">仓库</view>
  24. <view class="right">{{warehouseName}}</view>
  25. </view>
  26. <view class="content-item">
  27. <view v-for="(item,index) in List">
  28. <view class='row row1'>
  29. <view class="left title">{{item.paymentNo}}</view>
  30. <view class="right title">{{item.carNo}}</view>
  31. </view>
  32. <view class='row'>
  33. <view class="left goodsInfoCss">{{item.goodsName}}({{item.netWeight}}kg -
  34. ¥{{item.tidalGrainPrice}})</view>
  35. <view class="right priceCss">¥{{item.amountIngPayable}}</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view> -->
  40. <view class="content1">
  41. <!-- <view class="title">
  42. 销售外勤 张三
  43. </view> -->
  44. <view class="row">
  45. <view class="left">用途</view>
  46. <view class="right" v-if='auditInfo.expensesPurpose==1'>合同费用</view>
  47. <view class="right" v-if='auditInfo.expensesPurpose==3'>库点费用</view>
  48. <view class="right" v-if='auditInfo.expensesPurpose==5'>经营性费用</view>
  49. </view>
  50. <view v-if='auditInfo.expensesPurpose==1' class="row">
  51. <view class="left">类型</view>
  52. <view class="right" v-if='auditInfo.costType==1'>粮款</view>
  53. <view class="right" v-if='auditInfo.costType==3'>非粮款</view>
  54. <view class="right" v-if='auditInfo.costType==5'>保证金</view>
  55. </view>
  56. <view v-if='auditInfo.expensesPurpose==1' class="row">
  57. <view class="left">合同编号</view>
  58. <view class="right">{{auditInfo.contractNo}}</view>
  59. </view>
  60. <view v-if='auditInfo.expensesPurpose==3' class="row">
  61. <view class="left">仓库名称</view>
  62. <view class="right">{{auditInfo.warehouseName}}</view>
  63. </view>
  64. <view class="row">
  65. <view class="left">费用名称</view>
  66. <view class="right">{{auditInfo.expenseName}}</view>
  67. </view>
  68. <view class="row">
  69. <view class="left">金额(元)</view>
  70. <view class="right">{{auditInfo.amountMoney}}</view>
  71. </view>
  72. <view style='border-bottom: 0;' class="row">
  73. <view class="left">备注</view>
  74. <view class="right">{{auditInfo.remark}}</view>
  75. </view>
  76. <!-- <view class="row">
  77. <view class="left">附件</view>
  78. <view class="right">{{auditInfo.amountMoney}}</view>
  79. </view> -->
  80. <!-- <view class="row row-bottom">
  81. <view class="left">水分(%)</view>
  82. <input type="digit" v-model='detailData.warehouseInOutDetail.waterContent' class="right-bottom"
  83. placeholder="输入水分占比"></input>
  84. </view>
  85. <view class="row row-bottom">
  86. <view class="left">容重(克/升)</view>
  87. <input type="digit" v-model='detailData.warehouseInOutDetail.bulkDensity' class="right-bottom"
  88. placeholder="输入容重"></input>
  89. </view>
  90. <view class="row row-bottom">
  91. <view class="left">热损伤(%)</view>
  92. <input type="digit" v-model='detailData.warehouseInOutDetail.jiaorenli' class="right-bottom"
  93. placeholder="输入热损伤占比"></input>
  94. </view>
  95. <view class="row row-bottom">
  96. <view class="left">杂质(%)</view>
  97. <input type="digit" v-model='detailData.warehouseInOutDetail.impurity' class="right-bottom"
  98. placeholder="输入杂质占比"></input>
  99. </view>
  100. <view class="row row-bottom">
  101. <view class="left">霉变粒(%)</view>
  102. <input type="digit" v-model='detailData.warehouseInOutDetail.mildewGrain' class="right-bottom"
  103. placeholder="输入霉变粒占比"></input>
  104. </view>
  105. <view class="row row-bottom">
  106. <view class="left">不完善粒(%)</view>
  107. <input type="digit" v-model='detailData.warehouseInOutDetail.imperfectGrain' class="right-bottom"
  108. placeholder="输入不完善粒占比"></input>
  109. </view> -->
  110. </view>
  111. <view class="content1" v-if="url && url != 'ng'">
  112. <view class="title ">
  113. 附件
  114. </view>
  115. <view v-if='auditInfo.srcList.length>0' class="">
  116. <view style='flex-wrap: wrap;' class="file">
  117. <image v-for='(item,index) in auditInfo.srcList' @click="previewImageFn(index)" class='fujianImg'
  118. :src="item" mode=""></image>
  119. </view>
  120. </view>
  121. <view v-else class="">
  122. 暂无附件
  123. </view>
  124. </view>
  125. <view class="content1" v-if="url && url != 'ng'&&auditInfo.expenseAllocationInfoList">
  126. <view class="title ">
  127. 费用分配附件
  128. </view>
  129. <view class="file" @click="openXls">
  130. <image src="../../../static/img/excle.png" mode="" class="img_css"></image>
  131. <text class="text_css">明细.xls</text>
  132. </view>
  133. </view>
  134. <view class="content2">
  135. <view class="title row">
  136. 流程
  137. </view>
  138. <view v-for="(item,index) in auditList" :key='index' class="audit">
  139. <view class="row">
  140. <view class="left">
  141. <view class="item1">
  142. <view class="item-content">{{item.operatorTitle}}</view>
  143. <view v-if="item.status=='success'" class='status success'>
  144. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  145. </view>
  146. <view v-if="item.status=='error'" class='status error'>
  147. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  148. </view>
  149. <view v-if="item.status=='question'" class='status question'>
  150. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  151. </view>
  152. </view>
  153. </view>
  154. <view class="right">
  155. <view class="right-item">
  156. <view class="item2">
  157. <view class="name">{{item.desc}}
  158. </view>
  159. <!-- <view class='time'>{{item.updateDate}}</view> -->
  160. <view v-if="item.status=='success'" class="status success">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
  161. <view v-if="item.status=='error'" class="status error">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text></view>
  162. <view v-if="item.status=='question'" class="status question">{{item.commonStaffs1?item.staffscontent:''}}<text v-if='!item.commonStaffs1'>未审核</text></view>
  163. <!-- <view class="status success">吕波(已审核)</view> -->
  164. </view>
  165. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0' class='time'>
  166. {{item.updateDate}}
  167. </view>
  168. </view>
  169. <view v-if='item.auditMind' class="right-content">
  170. {{item.auditMind}}
  171. </view>
  172. </view>
  173. <view v-if='item.commonStaffs1' class="right">
  174. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28"></u-icon>
  175. </view>
  176. </view>
  177. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  178. <view class='row2'>
  179. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  180. <view class="item-content">
  181. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  182. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  183. </view>
  184. <view class="name">{{item1.staffName}}</view>
  185. </view>
  186. </view>
  187. </view>
  188. <view class="row-line" v-if="index!= auditList.length - 1"></view>
  189. </view>
  190. </view>
  191. <view v-if='show' class="shade">
  192. <view class="wrap">
  193. <view class="alert-top">
  194. <view class="title">
  195. {{title}}
  196. </view>
  197. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  198. </view>
  199. <view class="u-textarea-style">
  200. <view class="right-bottom">
  201. {{auditMind.length}}/100个字
  202. </view>
  203. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  204. maxlength="100" />
  205. </view>
  206. <view @click='close()' class="cancel">取消</view>
  207. <view @click='passSubmit()' class="confirm">确定</view>
  208. </view>
  209. </view>
  210. <u-toast ref="uToast" />
  211. <view style='padding:10px;' class='flex bottom-btn'>
  212. <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  213. <u-button @click='pass' type="success" class="btn2">通过</u-button>
  214. </view>
  215. </view>
  216. </template>
  217. <script>
  218. import helper from '@/common/helper.js';
  219. import {
  220. mapState
  221. } from 'vuex';
  222. export default {
  223. data() {
  224. return {
  225. src: '../../../static/img/myimg/LiangShang@2x.png',
  226. isSHowBtn: true,
  227. height: 200,
  228. autoHeight: true,
  229. border: false,
  230. title: '',
  231. show: false,
  232. auditMind: '',
  233. id: "",
  234. currentPage: 1,
  235. pageSize: 100,
  236. List: [],
  237. status: "",
  238. updateDate: "",
  239. warehouseName: "",
  240. everyCheck: '',
  241. auditInfo: {
  242. srcList: []
  243. },
  244. id: "",
  245. auditList: [],
  246. url: "11",
  247. }
  248. },
  249. onBackPress(e) {
  250. if (this.everyCheck) {
  251. uni.navigateTo({
  252. url: "/pages/task/my_task"
  253. })
  254. return true;
  255. }
  256. },
  257. onLoad(options) {
  258. this.id = options.id
  259. this.vesselId = options.vesselId
  260. this.everyCheck = uni.getStorageSync("everyTask")
  261. this.isSHowBtn = options.isShowbtn
  262. },
  263. onShow(options) {
  264. this.getList()
  265. },
  266. computed: {
  267. ...mapState(['hasLogin', 'userInfo']),
  268. },
  269. methods: {
  270. previewImageFn(index) {
  271. /* 预览图片 */
  272. uni.previewImage({
  273. current: index,
  274. /* 需要是数组 */
  275. urls: this.auditInfo.srcList,
  276. /* 默认底部圆点 number顶部数字1234 */
  277. // indicator:'default',
  278. indicator: 'number',
  279. loop: false,
  280. /* 长按图片底部显示选项 */
  281. longPressActions: {
  282. itemList: ['保存图片'],
  283. itemColor: '#d60000',
  284. success: data => {
  285. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  286. /* 保存图片到系统相册 */
  287. plus.nativeUI.closePreviewImage();
  288. if (data.tapIndex == 0) {
  289. uni.saveImageToPhotosAlbum({
  290. filePath: this.auditInfo.srcList[data.index],
  291. success: res => {
  292. // console.log(this.userImgList[data.index])
  293. // console.log(res.path,"res")
  294. // plus.nativeUI.closePreviewImage();
  295. plus.nativeUI.closePreviewImage();
  296. // uni.closePreviewImage()
  297. plus.nativeUI.toast("保存成功", {
  298. background: "#c3002f"
  299. });
  300. // this.$http.showTK({title:"保存成功",duration:500,position:"bottom"})
  301. },
  302. fail: err => {
  303. console.log(err, "err")
  304. }
  305. })
  306. } else if (data.tapIndex == 1) {
  307. this.uniShare()
  308. }
  309. },
  310. fail: err => {
  311. console.log(err.errMsg);
  312. }
  313. }
  314. });
  315. },
  316. openXls() {
  317. if (this.url && this.url != "ng") {
  318. uni.downloadFile({
  319. url: this.url,
  320. success: function(res) {
  321. var filePath = res.tempFilePath;
  322. uni.openDocument({
  323. filePath: filePath,
  324. showMenu: true,
  325. success: function(res) {
  326. console.log('打开文档成功');
  327. }
  328. });
  329. }
  330. });
  331. }
  332. },
  333. getList() {
  334. uni.showLoading({
  335. title: "加载中...",
  336. mask: true
  337. })
  338. this.$api.doRequest('get', '/paymentManagement/selectPaymentManagement', {
  339. currentPage: 1,
  340. pageSize: 100,
  341. searchType: '1', //searchType:1待审核
  342. warehouseName: this.vesselId,
  343. managementType: 1
  344. }).then(res1 => {
  345. uni.hideLoading()
  346. if (res1.data.code == 200) {
  347. this.List = res1.data.data.records
  348. }
  349. })
  350. // this.$api.doRequest('get', '/paymentManagement/getInfo', {
  351. // id: this.id
  352. // }).then(res => {
  353. // if (res.data.code == 200) {
  354. // uni.showLoading({
  355. // title: "加载中...",
  356. // mask: true
  357. // })
  358. // }
  359. // })
  360. this.$api.doRequest('post', '/expenseInfo/exportPhone', {
  361. id: this.id
  362. }).then(res1 => {
  363. if (res1.data.code == 200) {
  364. this.url = res1.data.data
  365. }
  366. })
  367. this.$api.doRequest('get', '/expenseInfo/ExpenseInfo', {
  368. id: this.id
  369. }).then(res1 => {
  370. if (res1.data.code == 200) {
  371. this.auditInfo = res1.data.data
  372. if (this.auditInfo.addressUrl && this.auditInfo.addressUrl != '') {
  373. this.auditInfo.srcList = this.auditInfo.addressUrl.split(',')
  374. } else {
  375. this.auditInfo.srcList = []
  376. }
  377. this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
  378. .amountIngPayableTotal)
  379. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  380. businessCode: 'FEIYONGGUANLI-APPROVE',
  381. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  382. }).then(res1 => {
  383. this.$api.doRequest('get', '/commonUser/getHis', {
  384. workflowId: res1.data.data[0].id,
  385. businessKey: this.id
  386. }).then(response => {
  387. uni.hideLoading()
  388. for (let i = 0; i < response.data.data.length; i++) {
  389. this.$set(response.data.data[i],'status','question')
  390. console.log(response.data.data[i].workflowHistoricTasks,i)
  391. if(response.data.data[i].commonStaffs){
  392. response.data.data[i].showflow=false
  393. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  394. response.data.data[i].operatorName=response.data.data[i].desc
  395. response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
  396. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  397. if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
  398. // response.data.data[i].status='question'
  399. this.$set(response.data.data[i],'status','question')
  400. }else{
  401. this.$set(response.data.data[i],'status','success')
  402. // response.data.data[i].status='success'
  403. }
  404. response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
  405. var workflowdata=response.data.data[i].workflowHistoricTasks
  406. var staffsdata=response.data.data[i].commonStaffs
  407. for (let q = 0; q < staffsdata.length; q++) {
  408. staffsdata[q].status=false
  409. staffsdata[q].staffTitle=staffsdata[q].staffName
  410. for (let k = 0; k < workflowdata.length; k++) {
  411. if(staffsdata[q].staffId==workflowdata[k].operatorId){
  412. staffsdata[q].status=true
  413. }
  414. }
  415. }
  416. }
  417. response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
  418. }else{
  419. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  420. var len =response.data.data[i].workflowHistoricTasks.length-1
  421. if(response.data.data[i].workflowHistoricTasks[len].approved){
  422. this.$set(response.data.data[i],'status','success')
  423. }else{
  424. this.$set(response.data.data[i],'status','error')
  425. }
  426. response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
  427. response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
  428. var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
  429. response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
  430. response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
  431. }else{
  432. this.$set(response.data.data[i],'status','question')
  433. // response.data.data[i].status='question'
  434. if(response.data.data[i].desc=='总经理助理审核'){
  435. response.data.data[i].operatorTitle='总助'
  436. }else if(response.data.data[i].desc=='杜大光审核'){
  437. response.data.data[i].operatorTitle='大光'
  438. }else{
  439. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  440. }
  441. response.data.data[i].operatorName=response.data.data[i].desc
  442. var time1=new Date(response.data.data[i].updateDate).getTime()
  443. response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
  444. response.data.data[i].auditMind=''
  445. }
  446. }
  447. }
  448. console.log(response.data.data)
  449. this.auditList = response.data.data
  450. var time2=new Date(this.auditList[0].createDate).getTime()
  451. var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
  452. this.auditList.unshift({
  453. operatorTitle:this.auditInfo.creater.substring(0,2),
  454. operatorName:this.auditInfo.creater,
  455. updateDate:time3,
  456. auditMind:'',
  457. desc:'发起申请',
  458. showflow:false,
  459. commonStaffs1:null,
  460. commonStaffs:null,
  461. workflowHistoricTasks:[],
  462. status:'success'
  463. })
  464. })
  465. })
  466. }
  467. })
  468. // this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  469. // businessCode: 'FEIYONGGUANLI-APPROVE',
  470. // tmpCompId: uni.getStorageSync('pcUserInfo').compId
  471. // }).then(res1 => {
  472. // this.updateDate = res1.data.data[0].updateDate
  473. // this.$api.doRequest('get', '/commonUser/getHis', {
  474. // workflowId: res1.data.data[0].id,
  475. // businessKey: this.id
  476. // }).then(response => {
  477. // // uni.hideLoading()
  478. // this.auditList = response.data.data
  479. // })
  480. // })
  481. },
  482. close() {
  483. this.show = false
  484. },
  485. pass() {
  486. this.show = true
  487. this.title = '审核意见(通过)'
  488. },
  489. reject() {
  490. this.show = true
  491. this.title = '驳回原因(驳回)'
  492. },
  493. //驳回
  494. // rejectSubmit() {
  495. // if (!this.auditMind) {
  496. // this.$api.msg('驳回原因不能为空!')
  497. // } else {
  498. // var that = this
  499. // that.show = false
  500. // if (this.List.length > 0) {
  501. // uni.showModal({
  502. // content: "确定驳回付款申请?",
  503. // showCancel: true,
  504. // confirmText: '确定',
  505. // success: function(res) {
  506. // if (res.confirm) {
  507. // that.audit(that.List[0], 0, false, '', '')
  508. // }
  509. // }
  510. // })
  511. // }
  512. // }
  513. // },
  514. //审核确定
  515. passSubmit() {
  516. var that = this
  517. that.show = false
  518. if (this.title == '驳回原因(驳回)') {
  519. // this.rejectSubmit()
  520. if (!that.auditMind) {
  521. this.$api.msg('驳回原因不能为空!')
  522. } else {
  523. uni.showModal({
  524. content: "确定驳回费用支出申请?",
  525. showCancel: true,
  526. confirmText: '确定',
  527. success: function(res) {
  528. if (res.confirm) {
  529. uni.showLoading({
  530. title: "审核中...",
  531. mask: true
  532. })
  533. var count = 0
  534. // for (let num = 0; num < that.List.length; num++) {
  535. that.$api.doRequest('post', '/workflow/api/handle', {
  536. taskId: that.auditInfo.taskId,
  537. approved: false,
  538. auditMind: that.auditMind ? that.auditMind : "",
  539. needReapply: true
  540. }).then(res => {
  541. count++
  542. if (count == that.List.length) {
  543. uni.hideLoading()
  544. that.$api.msg('审核成功!')
  545. console.log('驳回成功!')
  546. setTimeout(function() {
  547. uni.navigateBack();
  548. }, 2000);
  549. }
  550. })
  551. // }
  552. }
  553. }
  554. })
  555. }
  556. } else {
  557. var that = this
  558. this.show = false
  559. uni.showModal({
  560. content: "确定通过费用支出申请?",
  561. showCancel: true,
  562. confirmText: '确定',
  563. success: function(res) {
  564. if (res.confirm) {
  565. uni.showLoading({
  566. title: "审核中...",
  567. mask: true
  568. })
  569. // for (let num = 0; num < that.List.length; num++) {
  570. var tmp = 0
  571. that.$api.doRequest('post', '/workflow/api/handle', {
  572. taskId: that.auditInfo.taskId,
  573. approved: true,
  574. auditMind: that.auditMind ? that.auditMind : "",
  575. needReapply: false
  576. }).then(res => {
  577. tmp++
  578. // if (tmp == that.List.length) {
  579. uni.hideLoading()
  580. that.$api.msg('审核成功!')
  581. console.log('审核通过!')
  582. setTimeout(function() {
  583. uni.navigateBack();
  584. }, 2000);
  585. // }
  586. })
  587. // }
  588. }
  589. }
  590. })
  591. }
  592. },
  593. // audit(list, index, status, status2, reason) {
  594. // uni.showLoading({
  595. // title: "审核中"
  596. // })
  597. // if (this.List.length > 0) {
  598. // if (status == true && list.status == "已驳回") {
  599. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  600. // compId: "2710b21efc1e4393930c5dc800010dc4",
  601. // id: list.id
  602. // }).then(res => {
  603. // if (res.data.code == 200) {
  604. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  605. // }
  606. // })
  607. // } else {
  608. // for (var i = 0; i < this.List.length; i++) {
  609. // this.$api.doRequest('post', '/workflow/api/handle', {
  610. // taskId: this.List[i].taskId,
  611. // approved: status,
  612. // auditMind: this.auditMind ? this.auditMind : "",
  613. // needReapply: status2 ? true : false
  614. // }).then(res => {
  615. // if (res.data.code == 200) {
  616. // uni.hideLoading()
  617. // // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  618. // this.$api.msg('通过成功')
  619. // }else{
  620. // uni.hideLoading()
  621. // this.$api.msg('审核失败')
  622. // }
  623. // })
  624. // }
  625. // }
  626. // } else {
  627. // if (status == true) {
  628. // this.$api.msg('通过成功')
  629. // } else if (status == false) {
  630. // this.$api.msg('驳回成功')
  631. // }
  632. // let that = this
  633. // setTimeout(function() {
  634. // if (that.everyCheck) {
  635. // helper.setAudit(that.list)
  636. // } else {
  637. // uni.navigateBack()
  638. // }
  639. // uni.hideLoading()
  640. // }, 1000);
  641. // }
  642. // },
  643. }
  644. }
  645. </script>
  646. <style scoped lang="scss">
  647. .warp {
  648. margin: 10rpx;
  649. padding: 20rpx 20rpx 240rpx 20rpx;
  650. }
  651. .content1 {
  652. font-size: 28rpx;
  653. color: #333333;
  654. margin-top: 30rpx;
  655. padding: 20rpx;
  656. // .content-item {
  657. border-radius: 20rpx;
  658. background: white;
  659. // padding: 40rpx 20rpx;
  660. // margin-bottom: 30rpx;
  661. // }
  662. // .title {
  663. // font-size: 32rpx;
  664. // font-weight: 600;
  665. // color: #333333;
  666. // margin: 30rpx 0;
  667. // }
  668. // .goodsInfoCss {
  669. // font-size: 28rpx;
  670. // font-weight: 600;
  671. // color: #878C9C;
  672. // margin: 26rpx 10rpx;
  673. // }
  674. // .priceCss {
  675. // font-size: 40rpx;
  676. // margin: 26rpx 10rpx;
  677. // color: #22C572;
  678. // font-weight: 600;
  679. // }
  680. .row {
  681. display: flex;
  682. justify-content: space-between;
  683. border-bottom: 1px solid #EEEEEE;
  684. padding: 20rpx 0;
  685. .right,
  686. input {
  687. font-size: 28rpx;
  688. // color: #333333;
  689. }
  690. }
  691. .img_css {
  692. width: 50rpx;
  693. height: 50rpx;
  694. }
  695. .file {
  696. display: flex;
  697. align-items: center;
  698. margin: 30rpx 0 0 20rpx;
  699. .text_css {
  700. font-size: 30rpx;
  701. margin-left: 20rpx;
  702. }
  703. }
  704. }
  705. .title {
  706. font-size: 34rpx;
  707. font-weight: 700;
  708. // margin-bottom: 20rpx;
  709. height: 70rpx;
  710. border-bottom: 2rpx solid #EEEEEE;
  711. }
  712. .titlerow {
  713. font-size: 34rpx;
  714. font-weight: 700;
  715. // margin-bottom: 20rpx;
  716. // height: 70rpx;
  717. // border-bottom: 2rpx solid #EEEEEE;
  718. }
  719. .content2 {
  720. background: white;
  721. margin: 20rpx 0;
  722. border-radius: 20rpx;
  723. padding: 20rpx;
  724. .row {
  725. display: flex;
  726. .left {
  727. display: flex;
  728. align-items: center;
  729. .item1{
  730. position:relative;
  731. .item-content{
  732. background:#22C572;
  733. width: 50px;
  734. height: 50px;
  735. border-radius: 10px;
  736. line-height: 50px;
  737. text-align: center;
  738. font-size: 18px;
  739. color: #fff;
  740. }
  741. .status{
  742. position:absolute;
  743. border-radius: 50%;
  744. padding: 0px 2px;
  745. right: -3px;
  746. bottom: -3px;
  747. background:#fff;
  748. }
  749. .status.success{
  750. border:1px solid rgb(60, 156, 255);
  751. }
  752. .status.error{
  753. border:1px solid rgb(245, 108, 108);
  754. }
  755. .status.question{
  756. border:1px solid #f9ae3d;
  757. }
  758. }
  759. }
  760. .right {
  761. width:80%;
  762. // color: #B0B1B5;
  763. margin-top: 10px;
  764. .right-content{
  765. background:#F2F3F7;
  766. margin-left:10px;
  767. margin-top:10px;
  768. padding:10px;
  769. border-radius:5px;
  770. color: #B0B1B5;
  771. }
  772. .right-item{
  773. display: flex;
  774. justify-content: space-between;
  775. .time{
  776. color:#999;
  777. }
  778. .item2 {
  779. margin-left: 20rpx;
  780. .name {
  781. font-size: 28rpx;
  782. font-weight: 800;
  783. }
  784. .status.success {
  785. color: #6CC48C;
  786. }
  787. .status.error {
  788. color: rgb(245, 108, 108);
  789. }
  790. .status.question {
  791. color: #f9ae3d;
  792. }
  793. }
  794. }
  795. }
  796. }
  797. .row2{
  798. display:flex;
  799. .item-content{
  800. background:#22C572;
  801. width: 30px;
  802. height: 30px;
  803. border-radius: 50%;
  804. line-height: 30px;
  805. text-align: center;
  806. font-size: 12px;
  807. color: #fff;
  808. padding:0 2px;
  809. margin:0 auto;
  810. }
  811. .status{
  812. position:absolute;
  813. top:0;right:0;
  814. }
  815. }
  816. .row-line {
  817. width: 1px;
  818. height: 30px;
  819. background: #F2F2F2;
  820. margin: 10rpx 50rpx;
  821. }
  822. .audit {
  823. margin-top: 20rpx;
  824. }
  825. }
  826. .bottom-btn {
  827. width: 100%;
  828. position: fixed;
  829. bottom: 0;
  830. display: flex;
  831. z-index: 2;
  832. left: 0;
  833. background-color: #f8f8f8;
  834. flex-direction: column;
  835. .btn1,
  836. .btn2 {
  837. width: 100%;
  838. margin-bottom: 26rpx;
  839. border-radius: 90rpx;
  840. }
  841. .btn1 {
  842. background: white;
  843. color: #00C265;
  844. }
  845. }
  846. .row1 {
  847. border-bottom: 0 !important;
  848. }
  849. .topInfo {
  850. height: 210rpx;
  851. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  852. padding: 30rpx;
  853. .topInfo-item {
  854. height: 150rpx;
  855. background-color: #FFFFFF;
  856. border-radius: 20rpx;
  857. padding: 40rpx;
  858. .logo {
  859. width: 40rpx;
  860. height: 40rpx;
  861. margin-top: 8rpx;
  862. }
  863. .infoText {
  864. font-size: 36rpx;
  865. font-weight: 600;
  866. margin-left: 20rpx;
  867. }
  868. .infoData {
  869. color: #878C9C;
  870. font-size: 26rpx;
  871. margin-top: 10rpx;
  872. }
  873. }
  874. }
  875. .shade {
  876. position: fixed;
  877. top: 0;
  878. left: 0;
  879. height: 100%;
  880. width: 100%;
  881. background: rgba(0, 0, 0, 0.4);
  882. z-index: 3;
  883. .wrap {
  884. position: absolute;
  885. left: 0;
  886. top: 0;
  887. right: 0;
  888. bottom: 0;
  889. margin: auto;
  890. background: #fff;
  891. width: calc(100% - 198rpx);
  892. height: 700rpx;
  893. border-radius: 20rpx;
  894. .alert-top {
  895. padding: 33rpx;
  896. display: flex;
  897. justify-content: center;
  898. align-items: center;
  899. position: relative;
  900. }
  901. .title {
  902. font-size: 32rpx;
  903. font-weight: 600;
  904. color: #333333;
  905. }
  906. .close {
  907. position: absolute;
  908. right: 33rpx;
  909. }
  910. }
  911. }
  912. .cancel,
  913. .confirm {
  914. position: absolute;
  915. display: inline-block;
  916. width: 50%;
  917. text-align: center;
  918. bottom: 0;
  919. padding: 10px;
  920. border-top: 1px solid #eee;
  921. font-size: 34rpx;
  922. }
  923. .cancel {
  924. left: 0;
  925. border-right: 1px solid #eee;
  926. color: #AFB3BF;
  927. }
  928. .confirm {
  929. right: 0;
  930. color: #22C572;
  931. }
  932. .u-textarea-style {
  933. margin: 20rpx;
  934. background: #F9F9FA;
  935. border-radius: 10px;
  936. border: 1px solid #EEEEEE;
  937. padding: 10rpx 20rpx;
  938. position: relative;
  939. .right-bottom {
  940. position: absolute;
  941. right: 20rpx;
  942. bottom: 20rpx;
  943. color: #AFB3BF;
  944. }
  945. }
  946. /deep/.u-input__textarea {
  947. height: 300rpx !important;
  948. }
  949. .fujianImg {
  950. width: 30%;
  951. height: 80px;
  952. border-radius: 3px;
  953. border: 1px solid #ccc;
  954. margin: 5px;
  955. }
  956. </style>