charge_against_revenue.vue 37 KB

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