charge_against_revenue.vue 37 KB

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