charge_against_revenue_detail.vue 32 KB

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