warehouse_warrant.vue 31 KB

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