warehouse_warrant.vue 31 KB

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