charge_against_revenue_detail.vue 31 KB

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