charge_against_revenue.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355
  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 == '已收款' && this.vesselId == '点击切换任务状态')
  563. || (this.auditInfo.status == '待付款' && this.vesselId == '点击切换任务状态')){
  564. this.$api.doRequest('post', '/expenseInfo/editCollectionStatus',
  565. that.detialData).then(res1 => {
  566. if (res1.data.code == 200) {
  567. that.$api.msg('任务状态切换成功!')
  568. setTimeout(function() {
  569. uni.navigateBack();
  570. }, 2000);
  571. }else{
  572. return
  573. }
  574. })
  575. }
  576. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  577. businessCode: 'FEIYONGGUANLI-APPROVE',
  578. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  579. }).then(res1 => {
  580. this.$api.doRequest('get', '/commonUser/getHis', {
  581. workflowId: res1.data.data[0].id,
  582. businessKey: this.id,
  583. branch:that.auditInfo.jointVentureParties?that.auditInfo.jointVentureParties:'zt'
  584. }).then(response => {
  585. uni.hideLoading()
  586. for (let i = 0; i < response.data.data.length; i++) {
  587. this.$set(response.data.data[i], 'status', 'question')
  588. console.log(response.data.data[i].workflowHistoricTasks, i)
  589. if (response.data.data[i].commonStaffs) {
  590. response.data.data[i].showflow = false
  591. response.data.data[i].operatorTitle = response.data.data[i]
  592. .desc.substring(0, 2)
  593. response.data.data[i].operatorName = response.data.data[i]
  594. .desc
  595. response.data.data[i].staffscontent = '共' + response.data
  596. .data[i].commonStaffs.length + '人,当前审核' + response.data
  597. .data[i].workflowHistoricTasks.length + '人'
  598. if (response.data.data[i].workflowHistoricTasks && response
  599. .data.data[i].workflowHistoricTasks.length > 0) {
  600. if (response.data.data[i].workflowHistoricTasks
  601. .length != response.data.data[i].commonStaffs
  602. .length) {
  603. // response.data.data[i].status='question'
  604. this.$set(response.data.data[i], 'status',
  605. 'question')
  606. } else {
  607. this.$set(response.data.data[i], 'status',
  608. 'success')
  609. // response.data.data[i].status='success'
  610. }
  611. response.data.data[i].workflowlen = response.data.data[
  612. i].workflowHistoricTasks.length
  613. var workflowdata = response.data.data[i]
  614. .workflowHistoricTasks
  615. var staffsdata = response.data.data[i].commonStaffs
  616. for (let q = 0; q < staffsdata.length; q++) {
  617. staffsdata[q].status = false
  618. staffsdata[q].staffTitle = staffsdata[q].staffName
  619. for (let k = 0; k < workflowdata.length; k++) {
  620. if (staffsdata[q].staffId == workflowdata[k]
  621. .operatorId) {
  622. staffsdata[q].status = true
  623. }
  624. }
  625. }
  626. }
  627. response.data.data[i].commonStaffs1 = response.data.data[i]
  628. .commonStaffs
  629. } else {
  630. if (response.data.data[i].workflowHistoricTasks && response
  631. .data.data[i].workflowHistoricTasks.length > 0) {
  632. var len = response.data.data[i].workflowHistoricTasks
  633. .length - 1
  634. if (response.data.data[i].workflowHistoricTasks[len]
  635. .approved) {
  636. this.$set(response.data.data[i], 'status',
  637. 'success')
  638. } else {
  639. this.$set(response.data.data[i], 'status', 'error')
  640. }
  641. response.data.data[i].operatorTitle = response.data
  642. .data[i].workflowHistoricTasks[len].operatorName
  643. .substring(response.data.data[i]
  644. .workflowHistoricTasks[0].operatorName.length -
  645. 2)
  646. response.data.data[i].operatorName = response.data
  647. .data[i].workflowHistoricTasks[len].operatorName
  648. var time = new Date(response.data.data[i]
  649. .workflowHistoricTasks[len].claimTime)
  650. .getTime()
  651. response.data.data[i].updateDate = this.$u.timeFormat(
  652. time, 'mm.dd hh:MM')
  653. // response.data.data[i].auditMind = response.data.data[i]
  654. // .workflowHistoricTasks[len].auditMind
  655. // 显示附件和审核意见
  656. if (response.data.data[i].workflowHistoricTasks[len].auditMind && response.data.data[i].workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
  657. response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[0]
  658. response.data.data[i].fileUrl = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
  659. }else{
  660. response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind
  661. }
  662. } else {
  663. this.$set(response.data.data[i], 'status', 'question')
  664. // response.data.data[i].status='question'
  665. if (response.data.data[i].desc == '总经理助理审核') {
  666. response.data.data[i].operatorTitle = '总助'
  667. } else if (response.data.data[i].desc == '杜大光审核') {
  668. response.data.data[i].operatorTitle = '大光'
  669. } else {
  670. response.data.data[i].operatorTitle = response.data
  671. .data[i].desc.substring(0, 2)
  672. }
  673. response.data.data[i].operatorName = response.data
  674. .data[i].desc
  675. var time1 = new Date(response.data.data[i].updateDate)
  676. .getTime()
  677. response.data.data[i].updateDate = this.$u.timeFormat(
  678. time1, 'mm.dd hh:MM')
  679. response.data.data[i].auditMind = ''
  680. }
  681. }
  682. }
  683. console.log(response.data.data)
  684. this.auditList = response.data.data
  685. var time2 = new Date(this.auditList[0].createDate).getTime()
  686. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  687. this.auditList.unshift({
  688. operatorTitle: this.auditInfo.creater.substring(0, 2),
  689. operatorName: this.auditInfo.creater,
  690. updateDate: time3,
  691. auditMind: '',
  692. desc: '发起申请',
  693. showflow: false,
  694. commonStaffs1: null,
  695. commonStaffs: null,
  696. workflowHistoricTasks: [],
  697. status: 'success'
  698. })
  699. })
  700. })
  701. }
  702. })
  703. // this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  704. // businessCode: 'FEIYONGGUANLI-APPROVE',
  705. // tmpCompId: uni.getStorageSync('pcUserInfo').compId
  706. // }).then(res1 => {
  707. // this.updateDate = res1.data.data[0].updateDate
  708. // this.$api.doRequest('get', '/commonUser/getHis', {
  709. // workflowId: res1.data.data[0].id,
  710. // businessKey: this.id
  711. // }).then(response => {
  712. // // uni.hideLoading()
  713. // this.auditList = response.data.data
  714. // })
  715. // })
  716. },
  717. close() {
  718. this.show = false
  719. this.fileUrl = []
  720. },
  721. pass() {
  722. this.show = true
  723. this.title = '审核意见(通过)'
  724. },
  725. reject() {
  726. this.show = true
  727. this.title = '驳回原因(驳回)'
  728. },
  729. //驳回
  730. // rejectSubmit() {
  731. // if (!this.auditMind) {
  732. // this.$api.msg('驳回原因不能为空!')
  733. // } else {
  734. // var that = this
  735. // that.show = false
  736. // if (this.List.length > 0) {
  737. // uni.showModal({
  738. // content: "确定驳回付款申请?",
  739. // showCancel: true,
  740. // confirmText: '确定',
  741. // success: function(res) {
  742. // if (res.confirm) {
  743. // that.audit(that.List[0], 0, false, '', '')
  744. // }
  745. // }
  746. // })
  747. // }
  748. // }
  749. // },
  750. //审核确定
  751. passSubmit() {
  752. var that = this
  753. that.show = false
  754. if (this.title == '驳回原因(驳回)') {
  755. // this.rejectSubmit()
  756. if (!that.auditMind) {
  757. this.$api.msg('驳回原因不能为空!')
  758. } else {
  759. uni.showModal({
  760. content: "确定驳回费用支出申请?",
  761. showCancel: true,
  762. confirmText: '确定',
  763. success: function(res) {
  764. if (res.confirm) {
  765. uni.showLoading({
  766. title: "驳回中...",
  767. mask: true
  768. })
  769. var count = 0
  770. // for (let num = 0; num < that.List.length; num++) {
  771. var info = that.auditMind
  772. if (that.fileUrl.length > 0) {
  773. info = that.auditMind + "##" + that.fileUrl.toString()
  774. }
  775. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  776. taskId: that.auditInfo.taskId,
  777. approved: false,
  778. auditMind: info ? info : "",
  779. needReapply: true
  780. }).then(res => {
  781. // count++
  782. // if (count == that.List.length) {
  783. uni.hideLoading()
  784. that.$api.msg('驳回成功!')
  785. console.log('驳回成功!')
  786. setTimeout(function() {
  787. uni.navigateBack();
  788. }, 2000);
  789. // }
  790. })
  791. // }
  792. }
  793. }
  794. })
  795. }
  796. } else {
  797. var that = this
  798. this.show = false
  799. uni.showModal({
  800. content: "确定通过费用支出申请?",
  801. showCancel: true,
  802. confirmText: '确定',
  803. success: function(res) {
  804. if (res.confirm) {
  805. uni.showLoading({
  806. title: "审核中...",
  807. mask: true
  808. })
  809. // for (let num = 0; num < that.List.length; num++) {
  810. // var tmp = 0
  811. var info = that.auditMind
  812. if (that.fileUrl.length > 0) {
  813. info = that.auditMind + "##" + that.fileUrl.toString()
  814. }
  815. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  816. taskId: that.auditInfo.taskId,
  817. approved: true,
  818. auditMind: info ? info : "",
  819. needReapply: false
  820. }).then(res => {
  821. // tmp++
  822. // if (tmp == that.List.length) {
  823. uni.hideLoading()
  824. that.$api.msg('审核成功!')
  825. console.log('审核通过!')
  826. setTimeout(function() {
  827. uni.navigateBack();
  828. }, 2000);
  829. // }
  830. })
  831. // }
  832. }
  833. }
  834. })
  835. }
  836. },
  837. // audit(list, index, status, status2, reason) {
  838. // uni.showLoading({
  839. // title: "审核中"
  840. // })
  841. // if (this.List.length > 0) {
  842. // if (status == true && list.status == "已驳回") {
  843. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  844. // compId: "2710b21efc1e4393930c5dc800010dc4",
  845. // id: list.id
  846. // }).then(res => {
  847. // if (res.data.code == 200) {
  848. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  849. // }
  850. // })
  851. // } else {
  852. // for (var i = 0; i < this.List.length; i++) {
  853. // this.$api.doRequest('post', '/newWorkflow/api/handle', {
  854. // taskId: this.List[i].taskId,
  855. // approved: status,
  856. // auditMind: this.auditMind ? this.auditMind : "",
  857. // needReapply: status2 ? true : false
  858. // }).then(res => {
  859. // if (res.data.code == 200) {
  860. // uni.hideLoading()
  861. // // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  862. // this.$api.msg('通过成功')
  863. // }else{
  864. // uni.hideLoading()
  865. // this.$api.msg('审核失败')
  866. // }
  867. // })
  868. // }
  869. // }
  870. // } else {
  871. // if (status == true) {
  872. // this.$api.msg('通过成功')
  873. // } else if (status == false) {
  874. // this.$api.msg('驳回成功')
  875. // }
  876. // let that = this
  877. // setTimeout(function() {
  878. // if (that.everyCheck) {
  879. // helper.setAudit(that.list)
  880. // } else {
  881. // uni.navigateBack()
  882. // }
  883. // uni.hideLoading()
  884. // }, 1000);
  885. // }
  886. // },
  887. }
  888. }
  889. </script>
  890. <style scoped lang="scss">
  891. .warp {
  892. margin: 10rpx;
  893. padding: 20rpx 20rpx 240rpx 20rpx;
  894. }
  895. .content1 {
  896. font-size: 28rpx;
  897. color: #333333;
  898. margin-top: 30rpx;
  899. padding: 20rpx;
  900. // .content-item {
  901. border-radius: 20rpx;
  902. background: white;
  903. // padding: 40rpx 20rpx;
  904. // margin-bottom: 30rpx;
  905. // }
  906. // .title {
  907. // font-size: 32rpx;
  908. // font-weight: 600;
  909. // color: #333333;
  910. // margin: 30rpx 0;
  911. // }
  912. // .goodsInfoCss {
  913. // font-size: 28rpx;
  914. // font-weight: 600;
  915. // color: #878C9C;
  916. // margin: 26rpx 10rpx;
  917. // }
  918. // .priceCss {
  919. // font-size: 40rpx;
  920. // margin: 26rpx 10rpx;
  921. // color: #22C572;
  922. // font-weight: 600;
  923. // }
  924. .row {
  925. display: flex;
  926. justify-content: space-between;
  927. border-bottom: 1px solid #EEEEEE;
  928. padding: 20rpx 0;
  929. .right,
  930. input {
  931. font-size: 28rpx;
  932. // color: #333333;
  933. }
  934. }
  935. .img_css {
  936. width: 50rpx;
  937. height: 50rpx;
  938. }
  939. .file {
  940. // display: flex;
  941. align-items: center;
  942. margin: 30rpx 0 0 20rpx;
  943. .text_css {
  944. font-size: 30rpx;
  945. margin-left: 20rpx;
  946. }
  947. }
  948. }
  949. .title {
  950. font-size: 34rpx;
  951. font-weight: 700;
  952. // margin-bottom: 20rpx;
  953. height: 70rpx;
  954. border-bottom: 2rpx solid #EEEEEE;
  955. }
  956. .titlerow {
  957. font-size: 34rpx;
  958. font-weight: 700;
  959. // margin-bottom: 20rpx;
  960. // height: 70rpx;
  961. // border-bottom: 2rpx solid #EEEEEE;
  962. }
  963. .content2 {
  964. background: white;
  965. margin: 20rpx 0;
  966. border-radius: 20rpx;
  967. padding: 20rpx;
  968. .row {
  969. display: flex;
  970. .left {
  971. display: flex;
  972. align-items: center;
  973. .item1 {
  974. position: relative;
  975. .item-content {
  976. background: #617AE0;
  977. width: 44px;
  978. height: 44px;
  979. border-radius: 22px;
  980. line-height: 44px;
  981. text-align: center;
  982. font-size: 15px;
  983. color: #fff;
  984. }
  985. .status {
  986. position: absolute;
  987. border-radius: 50%;
  988. padding: 0px 2px;
  989. right: -3px;
  990. bottom: -3px;
  991. background: #fff;
  992. }
  993. .status.success {
  994. border: 1px solid rgb(60, 156, 255);
  995. }
  996. .status.error {
  997. border: 1px solid rgb(245, 108, 108);
  998. }
  999. .status.question {
  1000. border: 1px solid #f9ae3d;
  1001. }
  1002. }
  1003. }
  1004. .right {
  1005. width: 80%;
  1006. // color: #B0B1B5;
  1007. margin-top: 10px;
  1008. .right-content {
  1009. background: #F2F3F7;
  1010. margin-left: 10px;
  1011. margin-top: 10px;
  1012. padding: 10px;
  1013. border-radius: 5px;
  1014. color: #B0B1B5;
  1015. }
  1016. .right-item {
  1017. display: flex;
  1018. justify-content: space-between;
  1019. .time {
  1020. color: #999;
  1021. }
  1022. .item2 {
  1023. margin-left: 20rpx;
  1024. margin-top: -7px;
  1025. .name {
  1026. font-size: 28rpx;
  1027. font-weight: 800;
  1028. margin-bottom: 4px;
  1029. }
  1030. .status.success {
  1031. color: #6CC48C;
  1032. }
  1033. .status.error {
  1034. color: rgb(245, 108, 108);
  1035. }
  1036. .status.question {
  1037. color: #f9ae3d;
  1038. }
  1039. }
  1040. }
  1041. .audit_img {
  1042. flex-wrap: wrap;
  1043. // margin: 0 10rpx;
  1044. margin-left: 20rpx;
  1045. .url_css {
  1046. border: 1px solid #999999;
  1047. border-radius: 10px;
  1048. margin-top: 10px;
  1049. margin-right: 4px;
  1050. overflow: hidden;
  1051. width: 73px;
  1052. height: 73px;
  1053. .url_img {
  1054. width: 73px;
  1055. height: 73px;
  1056. // border-radius: 10px;
  1057. }
  1058. }
  1059. }
  1060. }
  1061. }
  1062. .row2 {
  1063. display: flex;
  1064. .item-content {
  1065. background: #22C572;
  1066. width: 30px;
  1067. height: 30px;
  1068. border-radius: 50%;
  1069. line-height: 30px;
  1070. text-align: center;
  1071. font-size: 12px;
  1072. color: #fff;
  1073. padding: 0 2px;
  1074. margin: 0 auto;
  1075. }
  1076. .status {
  1077. position: absolute;
  1078. top: 0;
  1079. right: 0;
  1080. }
  1081. }
  1082. .row-line {
  1083. width: 1px;
  1084. height: 30px;
  1085. background: #F2F2F2;
  1086. margin: 10rpx 50rpx;
  1087. }
  1088. .audit {
  1089. margin-top: 20rpx;
  1090. }
  1091. }
  1092. .bottom-btn {
  1093. width: 100%;
  1094. position: fixed;
  1095. bottom: 0;
  1096. display: flex;
  1097. z-index: 2;
  1098. left: 0;
  1099. background-color: #f8f8f8;
  1100. flex-direction: column;
  1101. .btn1,
  1102. .btn2 {
  1103. width: 100%;
  1104. margin-bottom: 26rpx;
  1105. border-radius: 90rpx;
  1106. }
  1107. .btn1 {
  1108. background: white;
  1109. color: #00C265;
  1110. }
  1111. }
  1112. .row1 {
  1113. border-bottom: 0 !important;
  1114. }
  1115. .topInfo {
  1116. height: 210rpx;
  1117. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  1118. padding: 30rpx;
  1119. .topInfo-item {
  1120. height: 150rpx;
  1121. background-color: #FFFFFF;
  1122. border-radius: 20rpx;
  1123. padding: 40rpx;
  1124. .logo {
  1125. width: 40rpx;
  1126. height: 40rpx;
  1127. margin-top: 8rpx;
  1128. }
  1129. .infoText {
  1130. font-size: 36rpx;
  1131. font-weight: 600;
  1132. margin-left: 20rpx;
  1133. }
  1134. .infoData {
  1135. color: #878C9C;
  1136. font-size: 26rpx;
  1137. margin-top: 10rpx;
  1138. }
  1139. }
  1140. }
  1141. .shade {
  1142. position: fixed;
  1143. top: 0;
  1144. left: 0;
  1145. height: 100%;
  1146. width: 100%;
  1147. background: rgba(0, 0, 0, 0.4);
  1148. z-index: 3;
  1149. overflow-y: scroll;
  1150. .wrap {
  1151. position: absolute;
  1152. left: 0;
  1153. top: 0;
  1154. right: 0;
  1155. bottom: 0;
  1156. margin: auto;
  1157. background: #fff;
  1158. width: calc(100% - 198rpx);
  1159. height: 780rpx;
  1160. overflow-y: scroll;
  1161. // overflow: hidden;
  1162. border-radius: 20rpx;
  1163. .alert-top {
  1164. padding: 33rpx;
  1165. display: flex;
  1166. justify-content: center;
  1167. align-items: center;
  1168. position: relative;
  1169. }
  1170. .title {
  1171. font-size: 32rpx;
  1172. font-weight: 600;
  1173. color: #333333;
  1174. }
  1175. .close {
  1176. position: absolute;
  1177. right: 33rpx;
  1178. }
  1179. .upload_css {
  1180. margin-left: 20rpx;
  1181. .upload {
  1182. // width: 80px;
  1183. // height: 80px;
  1184. }
  1185. }
  1186. }
  1187. }
  1188. .audit_btn {
  1189. display: flex;
  1190. top: 0px;
  1191. }
  1192. .cancel,
  1193. .confirm {
  1194. // position: absolute;
  1195. // display: inline-block;
  1196. width: 50%;
  1197. text-align: center;
  1198. // bottom: 0;
  1199. padding: 10px;
  1200. border-top: 1px solid #eee;
  1201. font-size: 34rpx;
  1202. margin: auto;
  1203. }
  1204. .cancel {
  1205. left: 0;
  1206. border-right: 1px solid #eee;
  1207. color: #AFB3BF;
  1208. }
  1209. .u-textarea-style {
  1210. margin: 20rpx;
  1211. background: #F9F9FA;
  1212. border-radius: 10px;
  1213. border: 1px solid #EEEEEE;
  1214. padding: 10rpx 20rpx;
  1215. position: relative;
  1216. .right-bottom {
  1217. position: absolute;
  1218. right: 20rpx;
  1219. bottom: 20rpx;
  1220. color: #AFB3BF;
  1221. }
  1222. }
  1223. /deep/.u-input__textarea {
  1224. height: 300rpx !important;
  1225. }
  1226. .fujianImg {
  1227. width: 30%;
  1228. height: 80px;
  1229. border-radius: 3px;
  1230. border: 1px solid #ccc;
  1231. margin: 5px;
  1232. }
  1233. // .char_css {
  1234. // // text-align: center;
  1235. // // width: 90px;
  1236. // font-size: 30rpx;
  1237. // font-weight: 600;
  1238. // display: -webkit-box;
  1239. // overflow: hidden;
  1240. // /*! autoprefixer: off; */
  1241. // -webkit-box-orient: vertical;
  1242. // -webkit-line-clamp: 1;
  1243. // -webkit-box-orient: vertical;
  1244. // text-overflow: ellipsis;
  1245. // word-break: break-all;
  1246. // }
  1247. .img_item {
  1248. display: flex;
  1249. width: 100%;
  1250. margin: 10px 0;
  1251. padding: 0 10rpx;
  1252. .imgsign{
  1253. width: 25px;
  1254. height: 25px;
  1255. margin-top: 6px;
  1256. }
  1257. .char_css {
  1258. font-size: 28rpx;
  1259. font-weight: 600;
  1260. display: -webkit-box;
  1261. overflow: hidden;
  1262. /*! autoprefixer: off; */
  1263. -webkit-box-orient: vertical;
  1264. -webkit-line-clamp: 1;
  1265. -webkit-box-orient: vertical;
  1266. text-overflow: ellipsis;
  1267. word-break: break-all;
  1268. }
  1269. .img_size{
  1270. color: #B0B3BF;
  1271. font-size: 12px;
  1272. margin-top: 5px;
  1273. }
  1274. .img_dowload {
  1275. width: 14%;
  1276. color: #22C572;
  1277. text-align: right;
  1278. }
  1279. }
  1280. </style>