charge_against_revenue.vue 35 KB

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