warehouse_warrant.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  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:'待付款'}}</view>
  17. </view>
  18. <view class="infoData">{{auditInfo.updateDate}}</view>
  19. </view>
  20. </view>
  21. <view class="content1">
  22. <view class="title ">
  23. 基本信息
  24. </view>
  25. <view class="row">
  26. <view class="left">请款日期</view>
  27. <view class="right">{{auditInfo.requestDate}}</view>
  28. </view>
  29. <view class="row">
  30. <view class="left">请款人</view>
  31. <view class="right">{{auditInfo.requestPerson}}</view>
  32. </view>
  33. <view class="row">
  34. <view class="left" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>货名 </view>
  35. <view class="right" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>重量(吨)</view>
  36. <view class="right" style='width:33.3333%;text-align:center;'>金额(元)</view>
  37. </view>
  38. <view class="row" v-for='item in auditInfo.goodNameList'>
  39. <view class="left" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>{{item.goodsName}}</view>
  40. <view class="right" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>{{item.inWarehouseWeight}}</view>
  41. <view class="right" style='width:33.3333%;text-align:center;'>{{item.requestFunds}}</view>
  42. </view>
  43. <view class="row">
  44. <view class="left">所属仓库 </view>
  45. <view class="right">{{auditInfo.warehouseName}}</view>
  46. </view>
  47. <view @click="detailed('',1)" class="row">
  48. <view class="left">合计重量(吨)</view>
  49. <view class="right">{{auditInfo.inWarehouseWeightTotal}}</view>
  50. </view>
  51. <view @click="detailed('',1)" class="row">
  52. <view class="left">合计金额(元)</view>
  53. <view class="right">{{auditInfo.requestFundsTotal}}</view>
  54. </view>
  55. <view class="row">
  56. <view class="left">收购名头</view>
  57. <view class="right">{{auditInfo.purchaser}}</view>
  58. </view>
  59. <!-- <view class="row">
  60. <view class="left">仓库名称</view>
  61. <view class="right">{{auditInfo.warehouseName}}</view>
  62. </view>
  63. <view class="row">
  64. <view class="left">入库日期</view>
  65. <view class="right">{{auditInfo.issuingTime}}</view>
  66. </view>
  67. <view class="row" style="border-bottom:0">
  68. <view class="left">车数</view>
  69. <view class="right">{{auditInfo.count}}</view>
  70. </view> -->
  71. </view>
  72. <view class="content1">
  73. <view class="title ">
  74. 支付明细
  75. </view>
  76. <view class="mx-content" v-for="item in auditInfo.warehousingOrderList" @click="detailed(item,2)">
  77. <view class='flex align-center justify-between'>
  78. <view class="name">
  79. {{item.customer}}
  80. </view>
  81. <view class="mx-item">
  82. {{item.goodsName}}
  83. </view>
  84. </view>
  85. <view class="mx-bottom">
  86. <view class="mx-row1">
  87. <!-- <view class="mx-item">
  88. 平均容重
  89. </view>
  90. <view class="mx-item">
  91. 平均水分
  92. </view> -->
  93. </view>
  94. <view class="mx-row2">
  95. <view class="mx-item">
  96. {{item.inWarehouseWeight}}吨
  97. </view>
  98. <view class="mx-item">
  99. <!-- 2000元/吨 -->
  100. {{item.avgCost}}元/吨
  101. </view>
  102. <view class="mx-item">
  103. {{item.requestFunds}}元
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="content1" v-if="url && url != 'ng'">
  110. <view class="title ">
  111. 附件
  112. </view>
  113. <view class="file" @click="openXls">
  114. <image src="../../../static/img/excle.png" mode="" class="img_css"></image>
  115. <text class="text_css">付款明细.xls</text>
  116. </view>
  117. <view class="file" @click="openXls2">
  118. <image src="../../../static/img/excle.png" mode="" class="img_css"></image>
  119. <text class="text_css">粮食指标.xls</text>
  120. </view>
  121. </view>
  122. <view class="content2">
  123. <view class="title row">
  124. 流程
  125. </view>
  126. <view v-for="(item,index) in auditList" :key='index' class="audit">
  127. <view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
  128. <view class="left">
  129. <view class="item1">
  130. <view class="item-content">{{item.operatorTitle}}</view>
  131. <view v-if="item.status=='success'" class='status success'>
  132. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  133. </view>
  134. <view v-if="item.status=='error'" class='status error'>
  135. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  136. </view>
  137. <view v-if="item.status=='question'" class='status question'>
  138. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  139. </view>
  140. </view>
  141. </view>
  142. <view class="right">
  143. <view class="right-item">
  144. <view class="item2">
  145. <view class="name">{{item.desc}}
  146. </view>
  147. <!-- <view class='time'>{{item.updateDate}}</view> -->
  148. <view v-if="item.status=='success'" class="status success">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
  149. <view v-if="item.status=='error'" class="status error">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text></view>
  150. <view v-if="item.status=='question'" class="status question">{{item.commonStaffs1?item.staffscontent:''}}<text v-if='!item.commonStaffs1'>未审核</text></view>
  151. <!-- <view class="status success">吕波(已审核)</view> -->
  152. </view>
  153. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0' class='time'>
  154. {{item.updateDate}}
  155. </view>
  156. </view>
  157. <view v-if='item.auditMind' class="right-content">
  158. {{item.auditMind}}
  159. </view>
  160. </view>
  161. <view v-if='item.commonStaffs1' class="right">
  162. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28"></u-icon>
  163. </view>
  164. </view>
  165. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  166. <view class='row2'>
  167. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  168. <view class="item-content">
  169. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  170. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  171. </view>
  172. <view class="name">{{item1.staffName}}</view>
  173. </view>
  174. </view>
  175. </view>
  176. <view class="row-line" v-if="index!= auditList.length - 1&&item.desc!='_PLACEHOLDER_'"></view>
  177. </view>
  178. </view>
  179. <view v-if='show' class="shade">
  180. <view class="wrap">
  181. <view class="alert-top">
  182. <view class="title">
  183. {{title}}
  184. </view>
  185. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  186. </view>
  187. <view class="u-textarea-style">
  188. <view class="right-bottom">
  189. {{auditMind.length}}/1000个字
  190. </view>
  191. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  192. maxlength="1000" />
  193. </view>
  194. <view @click='close()' class="cancel">取消</view>
  195. <view @click='passSubmit()' class="confirm">确定</view>
  196. </view>
  197. </view>
  198. <u-toast ref="uToast" />
  199. <view v-if='auditInfo.taskId' style='padding:10px;' class='flex bottom-btn'>
  200. <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  201. <u-button @click='pass' type="success" class="btn2">通过</u-button>
  202. </view>
  203. </view>
  204. </template>
  205. <script>
  206. import helper from '@/common/helper.js';
  207. import {
  208. mapState
  209. } from 'vuex';
  210. export default {
  211. data() {
  212. return {
  213. src: '../../../static/img/myimg/LiangShang@2x.png',
  214. isSHowBtn: true,
  215. height: 200,
  216. autoHeight: true,
  217. border: false,
  218. title: '',
  219. show: false,
  220. auditMind: '',
  221. id: "",
  222. currentPage: 1,
  223. pageSize: 100,
  224. List: [],
  225. status: "",
  226. updateDate: "",
  227. warehouseName: "",
  228. everyCheck: '',
  229. auditInfo: {},
  230. id: "",
  231. auditList: [],
  232. url: "11",
  233. url2:""
  234. }
  235. },
  236. onBackPress(e) {
  237. if (this.everyCheck) {
  238. uni.navigateTo({
  239. url: "/pages/task/my_task"
  240. })
  241. return true;
  242. }
  243. },
  244. onLoad(options) {
  245. this.id = options.id
  246. this.vesselId = options.vesselId
  247. this.everyCheck = uni.getStorageSync("everyTask")
  248. this.isSHowBtn = options.isShowbtn
  249. },
  250. onShow(options) {
  251. this.getList()
  252. },
  253. computed: {
  254. ...mapState(['hasLogin', 'userInfo']),
  255. },
  256. methods: {
  257. detailed(data,status){
  258. let obj
  259. if(status==1){
  260. obj= JSON.stringify(this.auditInfo.warehousingOrderList)
  261. }else{
  262. obj = JSON.stringify([data])
  263. }
  264. uni.navigateTo({
  265. url: '/pages/task/audit/viewDetail?data='+obj
  266. });
  267. },
  268. showcontent(item){
  269. item.showflow=!item.showflow
  270. },
  271. openXls() {
  272. if (this.url && this.url != "ng") {
  273. uni.downloadFile({
  274. url: this.url,
  275. success: function(res) {
  276. var filePath = res.tempFilePath;
  277. uni.openDocument({
  278. filePath: filePath,
  279. showMenu: true,
  280. success: function(res) {
  281. console.log('打开文档成功');
  282. }
  283. });
  284. }
  285. });
  286. }
  287. },
  288. openXls2() {
  289. if (this.url2 && this.url2 != "ng") {
  290. uni.downloadFile({
  291. url: this.url2,
  292. success: function(res) {
  293. var filePath = res.tempFilePath;
  294. uni.openDocument({
  295. filePath: filePath,
  296. showMenu: true,
  297. success: function(res) {
  298. console.log('打开文档成功');
  299. }
  300. });
  301. }
  302. });
  303. }
  304. },
  305. getList() {
  306. uni.showLoading({
  307. title: "加载中...",
  308. mask: true
  309. })
  310. var that =this
  311. // this.$api.doRequest('get', '/warehousingOrder/selectInfo', {
  312. // currentPage: 1,
  313. // pageSize: 100,
  314. // searchType: '2', //searchType:1待审核
  315. // // warehouseName: this.vesselId,
  316. // managementType: 1
  317. // }).then(res1 => {
  318. // uni.hideLoading()
  319. // if (res1.data.code == 200) {
  320. // this.List = res1.data.data.records
  321. // }
  322. // })
  323. // this.$api.doRequest('get', '/paymentManagement/getInfo', {
  324. // id: this.id
  325. // }).then(res => {
  326. // if (res.data.code == 200) {
  327. // uni.showLoading({
  328. // title: "加载中...",
  329. // mask: true
  330. // })
  331. // }
  332. // })
  333. this.$api.doRequest('post', '/warehousingOrder/exportPhone', {
  334. batchId: this.id,
  335. searchType: 1,
  336. }).then(res1 => {
  337. if (res1.data.code == 200) {
  338. this.url = res1.data.data
  339. }
  340. })
  341. this.$api.doRequest('post', '/paymentManagement/exportPhoneOrder', {
  342. orderId: this.id,
  343. // searchType: 1,
  344. }).then(res1 => {
  345. if (res1.data.code == 200) {
  346. this.url2 = res1.data.data
  347. }
  348. })
  349. this.$api.doRequest('post', '/warehousingOrder/exportPhoneData', {
  350. searchType: 1,
  351. batchId: this.id,
  352. compId: uni.getStorageSync('pcUserInfo').compId,
  353. }).then(res1 => {
  354. if (res1.data.code == 200) {
  355. this.auditInfo = res1.data.data
  356. var arr=[]
  357. if(res1.data.data.warehousingOrderList){
  358. var datalist=JSON.parse(JSON.stringify(res1.data.data.warehousingOrderList))
  359. for (var i = 0; i < datalist.length; i++) {
  360. if(arr.length==0){
  361. arr.push(datalist[i])
  362. }else{
  363. var arr1=arr.filter((item)=>{return item.goodsName==datalist[i].goodsName})
  364. if(arr1.length>0){
  365. for (var q = 0; q < arr.length; q++) {
  366. if(arr[q].goodsName==datalist[i].goodsName){console.log(22222)
  367. console.log(arr[q].inWarehouseWeight,datalist[i].inWarehouseWeight)
  368. arr[q].inWarehouseWeight+=datalist[i].inWarehouseWeight
  369. arr[q].requestFunds+=datalist[i].requestFunds
  370. }
  371. }
  372. }else{
  373. arr.push(datalist[i])
  374. }
  375. }
  376. }
  377. for (var q = 0; q < arr.length; q++) {
  378. arr[q].inWarehouseWeight=arr[q].inWarehouseWeight.toFixed(2)
  379. arr[q].requestFunds=arr[q].requestFunds.toFixed(2)
  380. }
  381. }
  382. console.log(arr,1111111)
  383. this.auditInfo.goodNameList=arr
  384. if(this.auditInfo.inWarehouseWeightTotal){
  385. this.auditInfo.inWarehouseWeightTotal = this.auditInfo.inWarehouseWeightTotal.toFixed(2)
  386. }
  387. if(this.auditInfo.requestFundsTotal){
  388. this.auditInfo.requestFundsTotal = this.auditInfo.requestFundsTotal.toFixed(2)
  389. }
  390. this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
  391. .amountIngPayableTotal)
  392. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  393. businessCode: 'WAREHOUSING-ORDER-APPROVE',
  394. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  395. }).then(res1 => {
  396. this.$api.doRequest('get', '/commonUser/getHis', {
  397. workflowId: res1.data.data[0].id,
  398. businessKey: this.id,
  399. branch:that.auditInfo.jointVentureParties?that.auditInfo.jointVentureParties:'zt'
  400. }).then(response => {
  401. uni.hideLoading()
  402. for (let i = 0; i < response.data.data.length; i++) {
  403. this.$set(response.data.data[i],'status','question')
  404. console.log(response.data.data[i].workflowHistoricTasks,i)
  405. if(response.data.data[i].commonStaffs){
  406. response.data.data[i].showflow=false
  407. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  408. response.data.data[i].operatorName=response.data.data[i].desc
  409. response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
  410. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  411. if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
  412. // response.data.data[i].status='question'
  413. this.$set(response.data.data[i],'status','question')
  414. }else{
  415. this.$set(response.data.data[i],'status','success')
  416. // response.data.data[i].status='success'
  417. }
  418. response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
  419. var workflowdata=response.data.data[i].workflowHistoricTasks
  420. var staffsdata=response.data.data[i].commonStaffs
  421. for (let q = 0; q < staffsdata.length; q++) {
  422. staffsdata[q].status=false
  423. staffsdata[q].staffTitle=staffsdata[q].staffName
  424. for (let k = 0; k < workflowdata.length; k++) {
  425. if(staffsdata[q].staffId==workflowdata[k].operatorId){
  426. staffsdata[q].status=true
  427. }
  428. }
  429. }
  430. }
  431. response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
  432. }else{
  433. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  434. var len =response.data.data[i].workflowHistoricTasks.length-1
  435. if(response.data.data[i].workflowHistoricTasks[len].approved){
  436. this.$set(response.data.data[i],'status','success')
  437. }else{
  438. this.$set(response.data.data[i],'status','error')
  439. }
  440. response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
  441. response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
  442. var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
  443. response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
  444. response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
  445. }else{
  446. this.$set(response.data.data[i],'status','question')
  447. // response.data.data[i].status='question'
  448. if(response.data.data[i].desc=='总经理助理审核'){
  449. response.data.data[i].operatorTitle='总助'
  450. }else if(response.data.data[i].desc=='杜大光审核'){
  451. response.data.data[i].operatorTitle='大光'
  452. }else{
  453. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  454. }
  455. response.data.data[i].operatorName=response.data.data[i].desc
  456. var time1=new Date(response.data.data[i].updateDate).getTime()
  457. response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
  458. response.data.data[i].auditMind=''
  459. }
  460. }
  461. }
  462. console.log(response.data.data)
  463. this.auditList = response.data.data
  464. var time2=new Date(this.auditInfo.createDate).getTime()
  465. var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
  466. this.auditList.unshift({
  467. operatorTitle:this.auditInfo.creater.substring(0,2),
  468. operatorName:this.auditInfo.creater,
  469. updateDate:time3,
  470. auditMind:'',
  471. desc:'发起申请',
  472. showflow:false,
  473. commonStaffs1:null,
  474. commonStaffs:null,
  475. workflowHistoricTasks:[],
  476. status:'success'
  477. })
  478. })
  479. })
  480. }
  481. })
  482. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  483. businessCode: 'WAREHOUSING-ORDER-APPROVE',
  484. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  485. }).then(res1 => {
  486. this.updateDate = res1.data.data[0].updateDate
  487. this.$api.doRequest('get', '/commonUser/getHis', {
  488. workflowId: res1.data.data[0].id,
  489. businessKey: this.id
  490. }).then(response => {
  491. // uni.hideLoading()
  492. this.auditList = response.data.data
  493. })
  494. })
  495. },
  496. close() {
  497. this.show = false
  498. },
  499. pass() {
  500. this.show = true
  501. this.title = '审核意见(通过)'
  502. },
  503. reject() {
  504. this.show = true
  505. this.title = '驳回原因(驳回)'
  506. },
  507. //驳回
  508. // rejectSubmit() {
  509. // if (!this.auditMind) {
  510. // this.$api.msg('驳回原因不能为空!')
  511. // } else {
  512. // var that = this
  513. // that.show = false
  514. // if (this.List.length > 0) {
  515. // uni.showModal({
  516. // content: "确定驳回付款申请?",
  517. // showCancel: true,
  518. // confirmText: '确定',
  519. // success: function(res) {
  520. // if (res.confirm) {
  521. // that.audit(that.List[0], 0, false, '', '')
  522. // }
  523. // }
  524. // })
  525. // }
  526. // }
  527. // },
  528. //审核确定
  529. passSubmit() {
  530. var that = this
  531. that.show = false
  532. if (this.title == '驳回原因(驳回)') {
  533. // this.rejectSubmit()
  534. if (!that.auditMind) {
  535. this.$api.msg('驳回原因不能为空!')
  536. } else {
  537. uni.showModal({
  538. content: "确定驳回入库单申请?",
  539. showCancel: true,
  540. confirmText: '确定',
  541. success: function(res) {
  542. if (res.confirm) {
  543. uni.showLoading({
  544. title: "审核中...",
  545. mask: true
  546. })
  547. var count = 0
  548. // for (let num = 0; num < that.List.length; num++) {
  549. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  550. taskId: that.auditInfo.taskId,
  551. approved: false,
  552. auditMind: that.auditMind ? that.auditMind : "",
  553. needReapply: true
  554. }).then(res => {
  555. // count++
  556. // if (count == that.List.length) {
  557. uni.hideLoading()
  558. that.$api.msg('审核成功!')
  559. setTimeout(function() {
  560. uni.navigateBack();
  561. }, 2000);
  562. // }
  563. })
  564. // }
  565. }
  566. }
  567. })
  568. }
  569. } else {
  570. var that = this
  571. this.show = false
  572. uni.showModal({
  573. content: "确定通过入库单申请?",
  574. showCancel: true,
  575. confirmText: '确定',
  576. success: function(res) {
  577. if (res.confirm) {
  578. uni.showLoading({
  579. title: "审核中...",
  580. mask: true
  581. })
  582. // for (let num = 0; num < that.List.length; num++) {
  583. // var tmp = 0
  584. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  585. taskId: that.auditInfo.taskId,
  586. approved: true,
  587. auditMind: that.auditMind ? that.auditMind : "",
  588. needReapply: false
  589. }).then(res => {
  590. // tmp++
  591. // if (tmp == that.List.length) {
  592. uni.hideLoading()
  593. that.$api.msg('审核成功!')
  594. setTimeout(function() {
  595. uni.navigateBack();
  596. }, 2000);
  597. // }
  598. })
  599. // }
  600. }
  601. }
  602. })
  603. }
  604. },
  605. // audit(list, index, status, status2, reason) {
  606. // uni.showLoading({
  607. // title: "审核中"
  608. // })
  609. // if (this.List.length > 0) {
  610. // if (status == true && list.status == "已驳回") {
  611. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  612. // compId: "2710b21efc1e4393930c5dc800010dc4",
  613. // id: list.id
  614. // }).then(res => {
  615. // if (res.data.code == 200) {
  616. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  617. // }
  618. // })
  619. // } else {
  620. // for (var i = 0; i < this.List.length; i++) {
  621. // this.$api.doRequest('post', '/newWorkflow/api/handle', {
  622. // taskId: this.List[i].taskId,
  623. // approved: status,
  624. // auditMind: this.auditMind ? this.auditMind : "",
  625. // needReapply: status2 ? true : false
  626. // }).then(res => {
  627. // if (res.data.code == 200) {
  628. // uni.hideLoading()
  629. // // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  630. // this.$api.msg('通过成功')
  631. // }else{
  632. // uni.hideLoading()
  633. // this.$api.msg('审核失败')
  634. // }
  635. // })
  636. // }
  637. // }
  638. // } else {
  639. // if (status == true) {
  640. // this.$api.msg('通过成功')
  641. // } else if (status == false) {
  642. // this.$api.msg('驳回成功')
  643. // }
  644. // let that = this
  645. // setTimeout(function() {
  646. // if (that.everyCheck) {
  647. // helper.setAudit(that.list)
  648. // } else {
  649. // uni.navigateBack()
  650. // }
  651. // uni.hideLoading()
  652. // }, 1000);
  653. // }
  654. // },
  655. }
  656. }
  657. </script>
  658. <style scoped lang="scss">
  659. .warp {
  660. margin: 10rpx;
  661. padding: 20rpx 20rpx 240rpx 20rpx;
  662. }
  663. .content1 {
  664. font-size: 28rpx;
  665. color: #333333;
  666. margin-top: 30rpx;
  667. padding: 20rpx;
  668. // .content-item {
  669. border-radius: 20rpx;
  670. background: white;
  671. // padding: 40rpx 20rpx;
  672. // margin-bottom: 30rpx;
  673. // }
  674. // .title {
  675. // font-size: 32rpx;
  676. // font-weight: 600;
  677. // color: #333333;
  678. // margin: 30rpx 0;
  679. // }
  680. // .goodsInfoCss {
  681. // font-size: 28rpx;
  682. // font-weight: 600;
  683. // color: #878C9C;
  684. // margin: 26rpx 10rpx;
  685. // }
  686. // .priceCss {
  687. // font-size: 40rpx;
  688. // margin: 26rpx 10rpx;
  689. // color: #22C572;
  690. // font-weight: 600;
  691. // }
  692. .row {
  693. display: flex;
  694. justify-content: space-between;
  695. border-bottom: 1px solid #EEEEEE;
  696. padding: 20rpx 0;
  697. .right,
  698. input {
  699. font-size: 28rpx;
  700. // color: #333333;
  701. }
  702. }
  703. .img_css {
  704. width: 50rpx;
  705. height: 50rpx;
  706. }
  707. .file {
  708. display: flex;
  709. align-items: center;
  710. margin: 30rpx 0 0 20rpx;
  711. .text_css {
  712. font-size: 30rpx;
  713. margin-left: 20rpx;
  714. }
  715. }
  716. }
  717. .title {
  718. font-size: 34rpx;
  719. font-weight: 700;
  720. // margin-bottom: 20rpx;
  721. height: 70rpx;
  722. border-bottom: 2rpx solid #EEEEEE;
  723. }
  724. .titlerow {
  725. font-size: 34rpx;
  726. font-weight: 700;
  727. // margin-bottom: 20rpx;
  728. // height: 70rpx;
  729. // border-bottom: 2rpx solid #EEEEEE;
  730. }
  731. .content2 {
  732. background: white;
  733. margin: 20rpx 0;
  734. border-radius: 20rpx;
  735. padding: 20rpx;
  736. .row {
  737. display: flex;
  738. .left {
  739. display: flex;
  740. align-items: center;
  741. .item1 {
  742. position: relative;
  743. .item-content {
  744. background: #617AE0;
  745. width: 44px;
  746. height: 44px;
  747. border-radius: 22px;
  748. line-height: 44px;
  749. text-align: center;
  750. font-size: 15px;
  751. color: #fff;
  752. }
  753. .status {
  754. position: absolute;
  755. border-radius: 50%;
  756. padding: 0px 2px;
  757. right: -3px;
  758. bottom: -3px;
  759. background: #fff;
  760. }
  761. .status.success {
  762. border: 1px solid rgb(60, 156, 255);
  763. }
  764. .status.error {
  765. border: 1px solid rgb(245, 108, 108);
  766. }
  767. .status.question {
  768. border: 1px solid #f9ae3d;
  769. }
  770. }
  771. }
  772. .right {
  773. width: 80%;
  774. // color: #B0B1B5;
  775. margin-top: 10px;
  776. .right-content {
  777. background: #F2F3F7;
  778. margin-left: 10px;
  779. margin-top: 10px;
  780. padding: 10px;
  781. border-radius: 5px;
  782. color: #B0B1B5;
  783. }
  784. .right-item {
  785. display: flex;
  786. justify-content: space-between;
  787. .time {
  788. color: #999;
  789. }
  790. .item2 {
  791. margin-left: 20rpx;
  792. margin-top: -7px;
  793. .name {
  794. font-size: 28rpx;
  795. font-weight: 800;
  796. margin-bottom: 4px;
  797. }
  798. .status.success {
  799. color: #6CC48C;
  800. }
  801. .status.error {
  802. color: rgb(245, 108, 108);
  803. }
  804. .status.question {
  805. color: #f9ae3d;
  806. }
  807. }
  808. }
  809. }
  810. }
  811. .row2 {
  812. display: flex;
  813. .item-content {
  814. background: #22C572;
  815. width: 30px;
  816. height: 30px;
  817. border-radius: 50%;
  818. line-height: 30px;
  819. text-align: center;
  820. font-size: 12px;
  821. color: #fff;
  822. padding: 0 2px;
  823. margin: 0 auto;
  824. }
  825. .status {
  826. position: absolute;
  827. top: 0;
  828. right: 0;
  829. }
  830. }
  831. .row-line {
  832. width: 1px;
  833. height: 30px;
  834. background: #F2F2F2;
  835. margin: 10rpx 50rpx;
  836. }
  837. .audit {
  838. margin-top: 20rpx;
  839. }
  840. }
  841. .bottom-btn {
  842. width: 100%;
  843. position: fixed;
  844. bottom: 0;
  845. display: flex;
  846. z-index: 2;
  847. left: 0;
  848. background-color: #f8f8f8;
  849. flex-direction: column;
  850. .btn1,
  851. .btn2 {
  852. width: 100%;
  853. margin-bottom: 26rpx;
  854. border-radius: 90rpx;
  855. }
  856. .btn1 {
  857. background: white;
  858. color: #00C265;
  859. }
  860. }
  861. .row1 {
  862. border-bottom: 0 !important;
  863. }
  864. .topInfo {
  865. height: 210rpx;
  866. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  867. padding: 30rpx;
  868. .topInfo-item {
  869. height: 150rpx;
  870. background-color: #FFFFFF;
  871. border-radius: 20rpx;
  872. padding: 40rpx;
  873. .logo {
  874. width: 40rpx;
  875. height: 40rpx;
  876. margin-top: 8rpx;
  877. }
  878. .infoText {
  879. font-size: 36rpx;
  880. font-weight: 600;
  881. margin-left: 20rpx;
  882. }
  883. .infoData {
  884. color: #878C9C;
  885. font-size: 26rpx;
  886. margin-top: 10rpx;
  887. }
  888. }
  889. }
  890. .shade {
  891. position: fixed;
  892. top: 0;
  893. left: 0;
  894. height: 100%;
  895. width: 100%;
  896. background: rgba(0, 0, 0, 0.4);
  897. z-index: 3;
  898. .wrap {
  899. position: absolute;
  900. left: 0;
  901. top: 0;
  902. right: 0;
  903. bottom: 0;
  904. margin: auto;
  905. background: #fff;
  906. width: calc(100% - 198rpx);
  907. height: 700rpx;
  908. border-radius: 20rpx;
  909. .alert-top {
  910. padding: 33rpx;
  911. display: flex;
  912. justify-content: center;
  913. align-items: center;
  914. position: relative;
  915. }
  916. .title {
  917. font-size: 32rpx;
  918. font-weight: 600;
  919. color: #333333;
  920. }
  921. .close {
  922. position: absolute;
  923. right: 33rpx;
  924. }
  925. }
  926. }
  927. .cancel,
  928. .confirm {
  929. position: absolute;
  930. display: inline-block;
  931. width: 50%;
  932. text-align: center;
  933. bottom: 0;
  934. padding: 10px;
  935. border-top: 1px solid #eee;
  936. font-size: 34rpx;
  937. }
  938. .cancel {
  939. left: 0;
  940. border-right: 1px solid #eee;
  941. color: #AFB3BF;
  942. }
  943. .confirm {
  944. right: 0;
  945. color: #22C572;
  946. }
  947. .u-textarea-style {
  948. margin: 20rpx;
  949. background: #F9F9FA;
  950. border-radius: 10px;
  951. border: 1px solid #EEEEEE;
  952. padding: 10rpx 20rpx;
  953. position: relative;
  954. .right-bottom {
  955. position: absolute;
  956. right: 20rpx;
  957. bottom: 20rpx;
  958. color: #AFB3BF;
  959. }
  960. }
  961. /deep/.u-input__textarea {
  962. height: 300rpx !important;
  963. }
  964. .mx-content {
  965. background: #F9F9FA;
  966. padding: 30rpx;
  967. box-sizing: border-box;
  968. margin-top: 20rpx;
  969. border-radius: 20rpx;
  970. .name {
  971. font-size: 32rpx;
  972. font-weight: 700;
  973. border-bottom: 1px solid #EEEEEE;
  974. padding-bottom: 8rpx;
  975. }
  976. .mx-row1,
  977. .mx-row2 {
  978. display: flex;
  979. justify-content: space-between;
  980. margin-top: 20rpx;
  981. }
  982. .mx-item {
  983. text-align: left;
  984. // width: 33%;
  985. // text-align: center;
  986. }
  987. }
  988. </style>