charge_against_revenue.vue 36 KB

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