warehouse_warrant.vue 28 KB

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