charge_against_revenue.vue 31 KB

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