charge_against_revenue_detail.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  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='aspectFill' 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 10rpx;
  845. margin-left: 20rpx;
  846. .url_css {
  847. border: 1px solid #999999;
  848. border-radius: 10px;
  849. margin-top: 10px;
  850. margin-right: 4px;
  851. overflow: hidden;
  852. width: 73px;
  853. height: 73px;
  854. .url_img {
  855. width: 73px;
  856. height: 73px;
  857. // border-radius: 10px;
  858. }
  859. }
  860. }
  861. }
  862. }
  863. .row2 {
  864. display: flex;
  865. .item-content {
  866. background: #22C572;
  867. width: 30px;
  868. height: 30px;
  869. border-radius: 50%;
  870. line-height: 30px;
  871. text-align: center;
  872. font-size: 12px;
  873. color: #fff;
  874. padding: 0 2px;
  875. margin: 0 auto;
  876. }
  877. .status {
  878. position: absolute;
  879. top: 0;
  880. right: 0;
  881. }
  882. }
  883. .row-line {
  884. width: 1px;
  885. height: 30px;
  886. background: #F2F2F2;
  887. margin: 10rpx 50rpx;
  888. }
  889. .audit {
  890. margin-top: 20rpx;
  891. }
  892. }
  893. .bottom-btn {
  894. width: 100%;
  895. position: fixed;
  896. bottom: 0;
  897. display: flex;
  898. z-index: 2;
  899. left: 0;
  900. background-color: #f8f8f8;
  901. flex-direction: column;
  902. .btn1,
  903. .btn2 {
  904. width: 100%;
  905. margin-bottom: 26rpx;
  906. border-radius: 90rpx;
  907. }
  908. .btn1 {
  909. background: white;
  910. color: #00C265;
  911. }
  912. }
  913. .row1 {
  914. border-bottom: 0 !important;
  915. }
  916. .topInfo {
  917. height: 210rpx;
  918. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  919. padding: 30rpx;
  920. .topInfo-item {
  921. height: 150rpx;
  922. background-color: #FFFFFF;
  923. border-radius: 20rpx;
  924. padding: 40rpx;
  925. .logo {
  926. width: 40rpx;
  927. height: 40rpx;
  928. margin-top: 8rpx;
  929. }
  930. .infoText {
  931. font-size: 36rpx;
  932. font-weight: 600;
  933. margin-left: 20rpx;
  934. }
  935. .infoData {
  936. color: #878C9C;
  937. font-size: 26rpx;
  938. margin-top: 10rpx;
  939. }
  940. }
  941. }
  942. .shade {
  943. position: fixed;
  944. top: 0;
  945. left: 0;
  946. height: 100%;
  947. width: 100%;
  948. background: rgba(0, 0, 0, 0.4);
  949. z-index: 3;
  950. .wrap {
  951. position: absolute;
  952. left: 0;
  953. top: 0;
  954. right: 0;
  955. bottom: 0;
  956. margin: auto;
  957. background: #fff;
  958. width: calc(100% - 198rpx);
  959. height: 700rpx;
  960. border-radius: 20rpx;
  961. .alert-top {
  962. padding: 33rpx;
  963. display: flex;
  964. justify-content: center;
  965. align-items: center;
  966. position: relative;
  967. }
  968. .title {
  969. font-size: 32rpx;
  970. font-weight: 600;
  971. color: #333333;
  972. }
  973. .close {
  974. position: absolute;
  975. right: 33rpx;
  976. }
  977. }
  978. }
  979. .cancel,
  980. .confirm {
  981. position: absolute;
  982. display: inline-block;
  983. width: 50%;
  984. text-align: center;
  985. bottom: 0;
  986. padding: 10px;
  987. border-top: 1px solid #eee;
  988. font-size: 34rpx;
  989. }
  990. .cancel {
  991. left: 0;
  992. border-right: 1px solid #eee;
  993. color: #AFB3BF;
  994. }
  995. .confirm {
  996. right: 0;
  997. color: #22C572;
  998. }
  999. .u-textarea-style {
  1000. margin: 20rpx;
  1001. background: #F9F9FA;
  1002. border-radius: 10px;
  1003. border: 1px solid #EEEEEE;
  1004. padding: 10rpx 20rpx;
  1005. position: relative;
  1006. .right-bottom {
  1007. position: absolute;
  1008. right: 20rpx;
  1009. bottom: 20rpx;
  1010. color: #AFB3BF;
  1011. }
  1012. }
  1013. /deep/.u-input__textarea {
  1014. height: 300rpx !important;
  1015. }
  1016. .fujianImg {
  1017. width: 30%;
  1018. height: 80px;
  1019. border-radius: 3px;
  1020. border: 1px solid #ccc;
  1021. margin: 5px;
  1022. }
  1023. // .char_css {
  1024. // // text-align: center;
  1025. // // width: 90px;
  1026. // font-size: 30rpx;
  1027. // font-weight: 600;
  1028. // display: -webkit-box;
  1029. // overflow: hidden;
  1030. // /*! autoprefixer: off; */
  1031. // -webkit-box-orient: vertical;
  1032. // -webkit-line-clamp: 1;
  1033. // -webkit-box-orient: vertical;
  1034. // text-overflow: ellipsis;
  1035. // word-break: break-all;
  1036. // }
  1037. .img_item {
  1038. display: flex;
  1039. width: 85vw;
  1040. margin: 10px 0;
  1041. padding: 0 10rpx;
  1042. .imgsign{
  1043. width: 25px;
  1044. height: 25px;
  1045. margin-top: 6px;
  1046. }
  1047. .char_css {
  1048. font-size: 28rpx;
  1049. font-weight: 600;
  1050. display: -webkit-box;
  1051. overflow: hidden;
  1052. /*! autoprefixer: off; */
  1053. -webkit-box-orient: vertical;
  1054. -webkit-line-clamp: 1;
  1055. -webkit-box-orient: vertical;
  1056. text-overflow: ellipsis;
  1057. word-break: break-all;
  1058. }
  1059. .img_size{
  1060. color: #B0B3BF;
  1061. font-size: 12px;
  1062. margin-top: 5px;
  1063. }
  1064. .img_dowload {
  1065. width: 14%;
  1066. color: #22C572;
  1067. text-align: right;
  1068. }
  1069. }
  1070. </style>