charge_against_revenue.vue 36 KB

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