warehouse_warrant.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  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. }
  360. var arr=[]
  361. for (var i = 0; i < datalist.length; i++) {
  362. if(arr.length==0){
  363. arr.push(datalist[i])
  364. }else{
  365. var arr1=arr.filter((item)=>{return item.goodsName==datalist[i].goodsName})
  366. if(arr1.length>0){
  367. for (var q = 0; q < arr.length; q++) {
  368. if(arr[q].goodsName==datalist[i].goodsName){console.log(22222)
  369. console.log(arr[q].inWarehouseWeight,datalist[i].inWarehouseWeight)
  370. arr[q].inWarehouseWeight+=datalist[i].inWarehouseWeight
  371. arr[q].requestFunds+=datalist[i].requestFunds
  372. }
  373. }
  374. }else{
  375. arr.push(datalist[i])
  376. }
  377. }
  378. }
  379. for (var q = 0; q < arr.length; q++) {
  380. arr[q].inWarehouseWeight=arr[q].inWarehouseWeight.toFixed(2)
  381. arr[q].requestFunds=arr[q].requestFunds.toFixed(2)
  382. }
  383. console.log(arr,1111111)
  384. this.auditInfo.goodNameList=arr
  385. if(this.auditInfo.inWarehouseWeightTotal){
  386. this.auditInfo.inWarehouseWeightTotal = this.auditInfo.inWarehouseWeightTotal.toFixed(2)
  387. }
  388. if(this.auditInfo.requestFundsTotal){
  389. this.auditInfo.requestFundsTotal = this.auditInfo.requestFundsTotal.toFixed(2)
  390. }
  391. this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
  392. .amountIngPayableTotal)
  393. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  394. businessCode: 'WAREHOUSING-ORDER-APPROVE',
  395. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  396. }).then(res1 => {
  397. this.$api.doRequest('get', '/commonUser/getHis', {
  398. workflowId: res1.data.data[0].id,
  399. businessKey: this.id,
  400. branch:that.auditInfo.jointVentureParties?that.auditInfo.jointVentureParties:'zt'
  401. }).then(response => {
  402. uni.hideLoading()
  403. for (let i = 0; i < response.data.data.length; i++) {
  404. this.$set(response.data.data[i],'status','question')
  405. console.log(response.data.data[i].workflowHistoricTasks,i)
  406. if(response.data.data[i].commonStaffs){
  407. response.data.data[i].showflow=false
  408. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  409. response.data.data[i].operatorName=response.data.data[i].desc
  410. response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
  411. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  412. if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
  413. // response.data.data[i].status='question'
  414. this.$set(response.data.data[i],'status','question')
  415. }else{
  416. this.$set(response.data.data[i],'status','success')
  417. // response.data.data[i].status='success'
  418. }
  419. response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
  420. var workflowdata=response.data.data[i].workflowHistoricTasks
  421. var staffsdata=response.data.data[i].commonStaffs
  422. for (let q = 0; q < staffsdata.length; q++) {
  423. staffsdata[q].status=false
  424. staffsdata[q].staffTitle=staffsdata[q].staffName
  425. for (let k = 0; k < workflowdata.length; k++) {
  426. if(staffsdata[q].staffId==workflowdata[k].operatorId){
  427. staffsdata[q].status=true
  428. }
  429. }
  430. }
  431. }
  432. response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
  433. }else{
  434. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  435. var len =response.data.data[i].workflowHistoricTasks.length-1
  436. if(response.data.data[i].workflowHistoricTasks[len].approved){
  437. this.$set(response.data.data[i],'status','success')
  438. }else{
  439. this.$set(response.data.data[i],'status','error')
  440. }
  441. response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
  442. response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
  443. var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
  444. response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
  445. response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
  446. }else{
  447. this.$set(response.data.data[i],'status','question')
  448. // response.data.data[i].status='question'
  449. if(response.data.data[i].desc=='总经理助理审核'){
  450. response.data.data[i].operatorTitle='总助'
  451. }else if(response.data.data[i].desc=='杜大光审核'){
  452. response.data.data[i].operatorTitle='大光'
  453. }else{
  454. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  455. }
  456. response.data.data[i].operatorName=response.data.data[i].desc
  457. var time1=new Date(response.data.data[i].updateDate).getTime()
  458. response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
  459. response.data.data[i].auditMind=''
  460. }
  461. }
  462. }
  463. console.log(response.data.data)
  464. this.auditList = response.data.data
  465. var time2=new Date(this.auditInfo.createDate).getTime()
  466. var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
  467. this.auditList.unshift({
  468. operatorTitle:this.auditInfo.creater.substring(0,2),
  469. operatorName:this.auditInfo.creater,
  470. updateDate:time3,
  471. auditMind:'',
  472. desc:'发起申请',
  473. showflow:false,
  474. commonStaffs1:null,
  475. commonStaffs:null,
  476. workflowHistoricTasks:[],
  477. status:'success'
  478. })
  479. })
  480. })
  481. }
  482. })
  483. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  484. businessCode: 'WAREHOUSING-ORDER-APPROVE',
  485. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  486. }).then(res1 => {
  487. this.updateDate = res1.data.data[0].updateDate
  488. this.$api.doRequest('get', '/commonUser/getHis', {
  489. workflowId: res1.data.data[0].id,
  490. businessKey: this.id
  491. }).then(response => {
  492. // uni.hideLoading()
  493. this.auditList = response.data.data
  494. })
  495. })
  496. },
  497. close() {
  498. this.show = false
  499. },
  500. pass() {
  501. this.show = true
  502. this.title = '审核意见(通过)'
  503. },
  504. reject() {
  505. this.show = true
  506. this.title = '驳回原因(驳回)'
  507. },
  508. //驳回
  509. // rejectSubmit() {
  510. // if (!this.auditMind) {
  511. // this.$api.msg('驳回原因不能为空!')
  512. // } else {
  513. // var that = this
  514. // that.show = false
  515. // if (this.List.length > 0) {
  516. // uni.showModal({
  517. // content: "确定驳回付款申请?",
  518. // showCancel: true,
  519. // confirmText: '确定',
  520. // success: function(res) {
  521. // if (res.confirm) {
  522. // that.audit(that.List[0], 0, false, '', '')
  523. // }
  524. // }
  525. // })
  526. // }
  527. // }
  528. // },
  529. //审核确定
  530. passSubmit() {
  531. var that = this
  532. that.show = false
  533. if (this.title == '驳回原因(驳回)') {
  534. // this.rejectSubmit()
  535. if (!that.auditMind) {
  536. this.$api.msg('驳回原因不能为空!')
  537. } else {
  538. uni.showModal({
  539. content: "确定驳回入库单申请?",
  540. showCancel: true,
  541. confirmText: '确定',
  542. success: function(res) {
  543. if (res.confirm) {
  544. uni.showLoading({
  545. title: "审核中...",
  546. mask: true
  547. })
  548. var count = 0
  549. // for (let num = 0; num < that.List.length; num++) {
  550. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  551. taskId: that.auditInfo.taskId,
  552. approved: false,
  553. auditMind: that.auditMind ? that.auditMind : "",
  554. needReapply: true
  555. }).then(res => {
  556. // count++
  557. // if (count == that.List.length) {
  558. uni.hideLoading()
  559. that.$api.msg('审核成功!')
  560. setTimeout(function() {
  561. uni.navigateBack();
  562. }, 2000);
  563. // }
  564. })
  565. // }
  566. }
  567. }
  568. })
  569. }
  570. } else {
  571. var that = this
  572. this.show = false
  573. uni.showModal({
  574. content: "确定通过入库单申请?",
  575. showCancel: true,
  576. confirmText: '确定',
  577. success: function(res) {
  578. if (res.confirm) {
  579. uni.showLoading({
  580. title: "审核中...",
  581. mask: true
  582. })
  583. // for (let num = 0; num < that.List.length; num++) {
  584. // var tmp = 0
  585. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  586. taskId: that.auditInfo.taskId,
  587. approved: true,
  588. auditMind: that.auditMind ? that.auditMind : "",
  589. needReapply: false
  590. }).then(res => {
  591. // tmp++
  592. // if (tmp == that.List.length) {
  593. uni.hideLoading()
  594. that.$api.msg('审核成功!')
  595. setTimeout(function() {
  596. uni.navigateBack();
  597. }, 2000);
  598. // }
  599. })
  600. // }
  601. }
  602. }
  603. })
  604. }
  605. },
  606. // audit(list, index, status, status2, reason) {
  607. // uni.showLoading({
  608. // title: "审核中"
  609. // })
  610. // if (this.List.length > 0) {
  611. // if (status == true && list.status == "已驳回") {
  612. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  613. // compId: "2710b21efc1e4393930c5dc800010dc4",
  614. // id: list.id
  615. // }).then(res => {
  616. // if (res.data.code == 200) {
  617. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  618. // }
  619. // })
  620. // } else {
  621. // for (var i = 0; i < this.List.length; i++) {
  622. // this.$api.doRequest('post', '/newWorkflow/api/handle', {
  623. // taskId: this.List[i].taskId,
  624. // approved: status,
  625. // auditMind: this.auditMind ? this.auditMind : "",
  626. // needReapply: status2 ? true : false
  627. // }).then(res => {
  628. // if (res.data.code == 200) {
  629. // uni.hideLoading()
  630. // // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  631. // this.$api.msg('通过成功')
  632. // }else{
  633. // uni.hideLoading()
  634. // this.$api.msg('审核失败')
  635. // }
  636. // })
  637. // }
  638. // }
  639. // } else {
  640. // if (status == true) {
  641. // this.$api.msg('通过成功')
  642. // } else if (status == false) {
  643. // this.$api.msg('驳回成功')
  644. // }
  645. // let that = this
  646. // setTimeout(function() {
  647. // if (that.everyCheck) {
  648. // helper.setAudit(that.list)
  649. // } else {
  650. // uni.navigateBack()
  651. // }
  652. // uni.hideLoading()
  653. // }, 1000);
  654. // }
  655. // },
  656. }
  657. }
  658. </script>
  659. <style scoped lang="scss">
  660. .warp {
  661. margin: 10rpx;
  662. padding: 20rpx 20rpx 240rpx 20rpx;
  663. }
  664. .content1 {
  665. font-size: 28rpx;
  666. color: #333333;
  667. margin-top: 30rpx;
  668. padding: 20rpx;
  669. // .content-item {
  670. border-radius: 20rpx;
  671. background: white;
  672. // padding: 40rpx 20rpx;
  673. // margin-bottom: 30rpx;
  674. // }
  675. // .title {
  676. // font-size: 32rpx;
  677. // font-weight: 600;
  678. // color: #333333;
  679. // margin: 30rpx 0;
  680. // }
  681. // .goodsInfoCss {
  682. // font-size: 28rpx;
  683. // font-weight: 600;
  684. // color: #878C9C;
  685. // margin: 26rpx 10rpx;
  686. // }
  687. // .priceCss {
  688. // font-size: 40rpx;
  689. // margin: 26rpx 10rpx;
  690. // color: #22C572;
  691. // font-weight: 600;
  692. // }
  693. .row {
  694. display: flex;
  695. justify-content: space-between;
  696. border-bottom: 1px solid #EEEEEE;
  697. padding: 20rpx 0;
  698. .right,
  699. input {
  700. font-size: 28rpx;
  701. // color: #333333;
  702. }
  703. }
  704. .img_css {
  705. width: 50rpx;
  706. height: 50rpx;
  707. }
  708. .file {
  709. display: flex;
  710. align-items: center;
  711. margin: 30rpx 0 0 20rpx;
  712. .text_css {
  713. font-size: 30rpx;
  714. margin-left: 20rpx;
  715. }
  716. }
  717. }
  718. .title {
  719. font-size: 34rpx;
  720. font-weight: 700;
  721. // margin-bottom: 20rpx;
  722. height: 70rpx;
  723. border-bottom: 2rpx solid #EEEEEE;
  724. }
  725. .titlerow {
  726. font-size: 34rpx;
  727. font-weight: 700;
  728. // margin-bottom: 20rpx;
  729. // height: 70rpx;
  730. // border-bottom: 2rpx solid #EEEEEE;
  731. }
  732. .content2 {
  733. background: white;
  734. margin: 20rpx 0;
  735. border-radius: 20rpx;
  736. padding: 20rpx;
  737. .row {
  738. display: flex;
  739. .left {
  740. display: flex;
  741. align-items: center;
  742. .item1 {
  743. position: relative;
  744. .item-content {
  745. background: #617AE0;
  746. width: 44px;
  747. height: 44px;
  748. border-radius: 22px;
  749. line-height: 44px;
  750. text-align: center;
  751. font-size: 15px;
  752. color: #fff;
  753. }
  754. .status {
  755. position: absolute;
  756. border-radius: 50%;
  757. padding: 0px 2px;
  758. right: -3px;
  759. bottom: -3px;
  760. background: #fff;
  761. }
  762. .status.success {
  763. border: 1px solid rgb(60, 156, 255);
  764. }
  765. .status.error {
  766. border: 1px solid rgb(245, 108, 108);
  767. }
  768. .status.question {
  769. border: 1px solid #f9ae3d;
  770. }
  771. }
  772. }
  773. .right {
  774. width: 80%;
  775. // color: #B0B1B5;
  776. margin-top: 10px;
  777. .right-content {
  778. background: #F2F3F7;
  779. margin-left: 10px;
  780. margin-top: 10px;
  781. padding: 10px;
  782. border-radius: 5px;
  783. color: #B0B1B5;
  784. }
  785. .right-item {
  786. display: flex;
  787. justify-content: space-between;
  788. .time {
  789. color: #999;
  790. }
  791. .item2 {
  792. margin-left: 20rpx;
  793. margin-top: -7px;
  794. .name {
  795. font-size: 28rpx;
  796. font-weight: 800;
  797. margin-bottom: 4px;
  798. }
  799. .status.success {
  800. color: #6CC48C;
  801. }
  802. .status.error {
  803. color: rgb(245, 108, 108);
  804. }
  805. .status.question {
  806. color: #f9ae3d;
  807. }
  808. }
  809. }
  810. }
  811. }
  812. .row2 {
  813. display: flex;
  814. .item-content {
  815. background: #22C572;
  816. width: 30px;
  817. height: 30px;
  818. border-radius: 50%;
  819. line-height: 30px;
  820. text-align: center;
  821. font-size: 12px;
  822. color: #fff;
  823. padding: 0 2px;
  824. margin: 0 auto;
  825. }
  826. .status {
  827. position: absolute;
  828. top: 0;
  829. right: 0;
  830. }
  831. }
  832. .row-line {
  833. width: 1px;
  834. height: 30px;
  835. background: #F2F2F2;
  836. margin: 10rpx 50rpx;
  837. }
  838. .audit {
  839. margin-top: 20rpx;
  840. }
  841. }
  842. .bottom-btn {
  843. width: 100%;
  844. position: fixed;
  845. bottom: 0;
  846. display: flex;
  847. z-index: 2;
  848. left: 0;
  849. background-color: #f8f8f8;
  850. flex-direction: column;
  851. .btn1,
  852. .btn2 {
  853. width: 100%;
  854. margin-bottom: 26rpx;
  855. border-radius: 90rpx;
  856. }
  857. .btn1 {
  858. background: white;
  859. color: #00C265;
  860. }
  861. }
  862. .row1 {
  863. border-bottom: 0 !important;
  864. }
  865. .topInfo {
  866. height: 210rpx;
  867. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  868. padding: 30rpx;
  869. .topInfo-item {
  870. height: 150rpx;
  871. background-color: #FFFFFF;
  872. border-radius: 20rpx;
  873. padding: 40rpx;
  874. .logo {
  875. width: 40rpx;
  876. height: 40rpx;
  877. margin-top: 8rpx;
  878. }
  879. .infoText {
  880. font-size: 36rpx;
  881. font-weight: 600;
  882. margin-left: 20rpx;
  883. }
  884. .infoData {
  885. color: #878C9C;
  886. font-size: 26rpx;
  887. margin-top: 10rpx;
  888. }
  889. }
  890. }
  891. .shade {
  892. position: fixed;
  893. top: 0;
  894. left: 0;
  895. height: 100%;
  896. width: 100%;
  897. background: rgba(0, 0, 0, 0.4);
  898. z-index: 3;
  899. .wrap {
  900. position: absolute;
  901. left: 0;
  902. top: 0;
  903. right: 0;
  904. bottom: 0;
  905. margin: auto;
  906. background: #fff;
  907. width: calc(100% - 198rpx);
  908. height: 700rpx;
  909. border-radius: 20rpx;
  910. .alert-top {
  911. padding: 33rpx;
  912. display: flex;
  913. justify-content: center;
  914. align-items: center;
  915. position: relative;
  916. }
  917. .title {
  918. font-size: 32rpx;
  919. font-weight: 600;
  920. color: #333333;
  921. }
  922. .close {
  923. position: absolute;
  924. right: 33rpx;
  925. }
  926. }
  927. }
  928. .cancel,
  929. .confirm {
  930. position: absolute;
  931. display: inline-block;
  932. width: 50%;
  933. text-align: center;
  934. bottom: 0;
  935. padding: 10px;
  936. border-top: 1px solid #eee;
  937. font-size: 34rpx;
  938. }
  939. .cancel {
  940. left: 0;
  941. border-right: 1px solid #eee;
  942. color: #AFB3BF;
  943. }
  944. .confirm {
  945. right: 0;
  946. color: #22C572;
  947. }
  948. .u-textarea-style {
  949. margin: 20rpx;
  950. background: #F9F9FA;
  951. border-radius: 10px;
  952. border: 1px solid #EEEEEE;
  953. padding: 10rpx 20rpx;
  954. position: relative;
  955. .right-bottom {
  956. position: absolute;
  957. right: 20rpx;
  958. bottom: 20rpx;
  959. color: #AFB3BF;
  960. }
  961. }
  962. /deep/.u-input__textarea {
  963. height: 300rpx !important;
  964. }
  965. .mx-content {
  966. background: #F9F9FA;
  967. padding: 30rpx;
  968. box-sizing: border-box;
  969. margin-top: 20rpx;
  970. border-radius: 20rpx;
  971. .name {
  972. font-size: 32rpx;
  973. font-weight: 700;
  974. border-bottom: 1px solid #EEEEEE;
  975. padding-bottom: 8rpx;
  976. }
  977. .mx-row1,
  978. .mx-row2 {
  979. display: flex;
  980. justify-content: space-between;
  981. margin-top: 20rpx;
  982. }
  983. .mx-item {
  984. text-align: left;
  985. // width: 33%;
  986. // text-align: center;
  987. }
  988. }
  989. </style>