warehouse_warrant.vue 28 KB

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