charge_against_revenue.vue 31 KB

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