warehouse_warrant.vue 29 KB

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