charge_against_revenue.vue 33 KB

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