charge_against_revenue.vue 31 KB

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