charge_against_revenue.vue 36 KB

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