warehouse_details.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  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="list.status == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list.status == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-if="list.status == '审核中'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{list.approveStatus?list.approveStatus:list.status}}</view>
  15. </view>
  16. <view class="infoData">{{list.updateDate}}</view>
  17. </view>
  18. </view>
  19. <view class='content1'>
  20. <view class="title">基本信息</view>
  21. <view class='row'>
  22. <view class="left">仓库</view>
  23. <view class="right">{{list.warehouseName}}</view>
  24. </view>
  25. <view class='row'>
  26. <view class="left">货名</view>
  27. <view class="right">{{list.goodsName}}</view>
  28. </view>
  29. <!-- <view class='row' v-if="list.bulkDensityStandard !=1">
  30. <view class="left">基准水分(%)</view>
  31. <view class="right">{{list.waterBase}}</view>
  32. </view>
  33. <view class='row' v-if="list.bulkDensityStandard !=1">
  34. <view class="left">干粮水分(%)</view>
  35. <view class="right">{{list.waterMin}}</view>
  36. </view>
  37. <view class='row' v-if="list.bulkDensityStandard !=1">
  38. <view class="left">水分上限(%)</view>
  39. <view class="right">{{list.waterMax}}</view>
  40. </view>
  41. <view v-if="list.paramType == '2' && list.bulkDensityStandard !=1" class='row'>
  42. <view class="left">扣重比</view>
  43. <view class="right">{{list.deductWeight}}</view>
  44. </view> -->
  45. <view class="form_view" style="background: #F9F9FA;" v-if="list.bulkDensityStandard ==1">
  46. <table border="1" width="100%" style="border-collapse: collapse;" cellspacing="0" cellpadding="0" class="table_css">
  47. <tr>
  48. <td>{{list.goodsName!='大豆' ? '容重(g/L)' : '蛋白(g/L)'}}</td>
  49. <td>价格(元/公斤)</td>
  50. </tr>
  51. <tr v-for="(item,index) in list.detailPrints">
  52. <td>{{item.bulkDensityMax }} ~ {{ item.bulkDensityMin}}</td>
  53. <td>{{item.bulkDensityPrice}}</td>
  54. </tr>
  55. </table>
  56. </view>
  57. <!-- <view class='row' v-if="list.bulkDensityStandard !=1">
  58. <view class="left">干粮收购价格(元/公斤)</view>
  59. <view class="right">{{list.dryGrainPrice}}</view>
  60. </view> -->
  61. <view class='row boder'>
  62. <view class="left">销售上限</view>
  63. <view class="right">{{list.saleLimit}}</view>
  64. </view>
  65. </view>
  66. <view class="form_view" v-if="list.bulkDensityStandard !=1">
  67. <table border="1" width="100%" style="border-collapse: collapse;" cellspacing="0" cellpadding="0" class="table_css">
  68. <tr>
  69. <td>水分</td>
  70. <td>一等</td>
  71. <td>二等</td>
  72. <td>三等</td>
  73. <td>等外</td>
  74. </tr>
  75. <tr v-for="(item,index) in list.detailPrints">
  76. <td>{{item.waterMin}}</td>
  77. <td>{{item.price1}}</td>
  78. <td>{{item.price2}}</td>
  79. <td>{{item.price3}}</td>
  80. <td>{{item.priceOther}}</td>
  81. </tr>
  82. </table>
  83. </view>
  84. <!-- <view class="content2" v-if="list.bulkDensityStandard !=1">
  85. <view class="title">粮价设置</view>
  86. <view v-for="(item,index) in list.details" :key="index">
  87. <view class="row">
  88. <view class="left">等级</view>
  89. <view class="right">{{item.level}}</view>
  90. </view>
  91. <view v-if="list.paramType == '2'" class="row">
  92. <view class="left">基准单价(元/公斤)</view>
  93. <view class="right">{{item.basePrice}}</view>
  94. </view>
  95. <view class="row" v-for="(item1,index1) in item.modelList" :key="index1" :class="index1==item.modelList.length-1?'boder':''">
  96. <view v-if="list.paramType == '2'" class="left">{{item1.startWater}}-{{item1.endWater}}降幅(元/0.1%)</view>
  97. <view v-else class="left">{{item1.startWater}}-{{item1.endWater}}扣重比</view>
  98. <view class="right">{{item1.price}}</view>
  99. </view>
  100. </view>
  101. </view> -->
  102. <view class="content3">
  103. <view class="title row">
  104. 流程
  105. </view>
  106. <view v-for="(item,index) in auditList" :key='index' class="audit">
  107. <view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
  108. <view class="left">
  109. <view class="item1">
  110. <view class="item-content">{{item.operatorTitle}}</view>
  111. <view v-if="item.status=='success'" class='status success'>
  112. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  113. </view>
  114. <view v-if="item.status=='error'" class='status error'>
  115. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  116. </view>
  117. <view v-if="item.status=='question'" class='status question'>
  118. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="right">
  123. <view class="right-item">
  124. <view class="item2">
  125. <view class="name">{{item.desc}}
  126. </view>
  127. <!-- <view class='time'>{{item.updateDate}}</view> -->
  128. <view v-if="item.status=='success'" class="status success">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
  129. <view v-if="item.status=='error'" class="status error">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text></view>
  130. <view v-if="item.status=='question'" class="status question">{{item.commonStaffs1?item.staffscontent:''}}<text v-if='!item.commonStaffs1'>未审核</text></view>
  131. <!-- <view class="status success">吕波(已审核)</view> -->
  132. </view>
  133. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0' class='time'>
  134. {{item.updateDate}}
  135. </view>
  136. </view>
  137. <view v-if='item.auditMind' class="right-content">
  138. {{item.auditMind}}
  139. </view>
  140. </view>
  141. <view v-if='item.commonStaffs1' class="right">
  142. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28"></u-icon>
  143. </view>
  144. </view>
  145. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  146. <view class='row2'>
  147. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  148. <view class="item-content">
  149. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  150. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  151. </view>
  152. <view class="name">{{item1.staffName}}</view>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="row-line" v-if="index!= auditList.length - 1&&item.desc!='_PLACEHOLDER_'"></view>
  157. </view>
  158. </view>
  159. <u-toast ref="uToast" />
  160. <view style='padding:10px;' class='flex bottom-btn'>
  161. <u-button @click='fanHui' type="success" class="btn2">返回</u-button>
  162. </view>
  163. </view>
  164. </template>
  165. <script>
  166. import {
  167. mapState
  168. } from 'vuex';
  169. export default {
  170. name: "task",
  171. data() {
  172. return {
  173. show: false,
  174. id: 0,
  175. list: {},
  176. form: {
  177. name: '',
  178. intro: '',
  179. sex: ''
  180. },
  181. radio: '',
  182. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  183. switchVal: false,
  184. contractNoList: [],
  185. auditList:[],
  186. };
  187. },
  188. computed: {
  189. ...mapState(['hasLogin', 'userInfo'])
  190. },
  191. onLoad(options) {
  192. this.id = options.id
  193. },
  194. onShow() {
  195. var that = this
  196. this.$nextTick(function() {
  197. that.getData()
  198. })
  199. },
  200. methods: {
  201. showcontent(item){
  202. item.showflow=!item.showflow
  203. },
  204. getData() {
  205. uni.showLoading({
  206. title:'加载中',
  207. mask:true
  208. })
  209. var data = []
  210. var that = this
  211. this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
  212. id: this.id
  213. }).then(res => {
  214. if (res.data.code == 200) {
  215. this.list = res.data.data
  216. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  217. businessCode: 'PROCUREMENT-PRICE-APPROVE',
  218. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  219. }).then(res1 => {
  220. this.$api.doRequest('get', '/commonUser/getHis', {
  221. workflowId: res1.data.data[0].id,
  222. businessKey: this.id,
  223. // branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
  224. }).then(response => {
  225. uni.hideLoading()
  226. for (let i = 0; i < response.data.data.length; i++) {
  227. this.$set(response.data.data[i],'status','question')
  228. // console.log(response.data.data[i].workflowHistoricTasks,i)
  229. if(response.data.data[i].commonStaffs){
  230. response.data.data[i].showflow=false
  231. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  232. response.data.data[i].operatorName=response.data.data[i].desc
  233. response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
  234. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  235. if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
  236. // response.data.data[i].status='question'
  237. this.$set(response.data.data[i],'status','question')
  238. }else{
  239. this.$set(response.data.data[i],'status','success')
  240. // response.data.data[i].status='success'
  241. }
  242. response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
  243. var workflowdata=response.data.data[i].workflowHistoricTasks
  244. var staffsdata=response.data.data[i].commonStaffs
  245. for (let q = 0; q < staffsdata.length; q++) {
  246. staffsdata[q].status=false
  247. staffsdata[q].staffTitle=staffsdata[q].staffName
  248. for (let k = 0; k < workflowdata.length; k++) {
  249. if(staffsdata[q].staffId==workflowdata[k].operatorId){
  250. staffsdata[q].status=true
  251. }
  252. }
  253. }
  254. }
  255. response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
  256. }else{
  257. if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
  258. var len =response.data.data[i].workflowHistoricTasks.length-1
  259. if(response.data.data[i].workflowHistoricTasks[len].approved){
  260. this.$set(response.data.data[i],'status','success')
  261. }else{
  262. this.$set(response.data.data[i],'status','error')
  263. }
  264. response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
  265. response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
  266. var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
  267. response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
  268. response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
  269. }else{
  270. this.$set(response.data.data[i],'status','question')
  271. // response.data.data[i].status='question'
  272. if(response.data.data[i].desc=='总经理助理审核'){
  273. response.data.data[i].operatorTitle='总助'
  274. }else if(response.data.data[i].desc=='杜大光审核'){
  275. response.data.data[i].operatorTitle='大光'
  276. }else{
  277. response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
  278. }
  279. response.data.data[i].operatorName=response.data.data[i].desc
  280. var time1=new Date(response.data.data[i].updateDate).getTime()
  281. response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
  282. response.data.data[i].auditMind=''
  283. }
  284. }
  285. }
  286. // console.log(response.data.data)
  287. this.auditList = response.data.data
  288. var time2=new Date(this.list.updateDate).getTime()
  289. var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
  290. this.auditList.unshift({
  291. operatorTitle:this.list.creater.substring(0,2),
  292. operatorName:this.list.creater,
  293. updateDate:time3,
  294. auditMind:'',
  295. desc:'发起申请',
  296. showflow:false,
  297. commonStaffs1:null,
  298. commonStaffs:null,
  299. workflowHistoricTasks:[],
  300. status:'success'
  301. })
  302. })
  303. })
  304. }
  305. })
  306. },
  307. confirm(item) {
  308. this.list.contractNo = item[0].value
  309. },
  310. fanHui(){
  311. uni.navigateBack()
  312. }
  313. }
  314. }
  315. </script>
  316. <style scoped lang="scss">
  317. .warp {
  318. margin: 10rpx;
  319. padding: 20rpx 20rpx 330rpx 20rpx;
  320. }
  321. .content1,
  322. .content2 {
  323. border-radius: 20rpx;
  324. background: white;
  325. padding: 20rpx;
  326. .title {
  327. font-size: 28rpx;
  328. font-weight: 600;
  329. color: #333333;
  330. text-align: left;
  331. }
  332. .row {
  333. display: flex;
  334. justify-content: space-between;
  335. border-bottom: 1px solid #EEEEEE;
  336. padding: 21rpx 0;
  337. .right,
  338. input {
  339. font-size: 28rpx;
  340. color: #333333;
  341. }
  342. }
  343. }
  344. .content2 {
  345. margin-top: 20rpx;
  346. }
  347. .bottom-btn {
  348. width: 100%;
  349. position: fixed;
  350. bottom:0;
  351. display: flex;
  352. z-index: 2;
  353. left: 0;
  354. background-color: #f8f8f8;
  355. flex-direction: column;
  356. .btn1,.btn2{
  357. width: 100%;
  358. margin-bottom: 26rpx;
  359. border-radius: 90rpx;
  360. }
  361. .btn1{
  362. background: white;
  363. color: #00C265;
  364. }
  365. }
  366. .submit {
  367. width: 40%;
  368. background: #22C572;
  369. border-radius: 10rpx;
  370. }
  371. .boder{
  372. border:0;
  373. border-bottom: 0!important;
  374. }
  375. .topInfo {
  376. height: 210rpx;
  377. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  378. padding: 30rpx;
  379. .topInfo-item {
  380. height: 150rpx;
  381. background-color: #FFFFFF;
  382. border-radius: 20rpx;
  383. padding: 40rpx;
  384. .logo {
  385. width: 40rpx;
  386. height: 40rpx;
  387. margin-top: 8rpx;
  388. }
  389. .infoText {
  390. font-size: 36rpx;
  391. font-weight: 600;
  392. margin-left: 20rpx;
  393. }
  394. .infoData {
  395. color: #878C9C;
  396. font-size: 26rpx;
  397. margin-top: 10rpx;
  398. }
  399. }
  400. }
  401. .content3 {
  402. background: white;
  403. margin: 20rpx 0;
  404. border-radius: 20rpx;
  405. padding: 20rpx;
  406. .row {
  407. display: flex;
  408. .left {
  409. display: flex;
  410. align-items: center;
  411. .item1 {
  412. position: relative;
  413. .item-content {
  414. background: #617AE0;
  415. width: 44px;
  416. height: 44px;
  417. border-radius: 22px;
  418. line-height: 44px;
  419. text-align: center;
  420. font-size: 15px;
  421. color: #fff;
  422. }
  423. .status {
  424. position: absolute;
  425. border-radius: 50%;
  426. padding: 0px 2px;
  427. right: -3px;
  428. bottom: -3px;
  429. background: #fff;
  430. }
  431. .status.success {
  432. border: 1px solid rgb(60, 156, 255);
  433. }
  434. .status.error {
  435. border: 1px solid rgb(245, 108, 108);
  436. }
  437. .status.question {
  438. border: 1px solid #f9ae3d;
  439. }
  440. }
  441. }
  442. .right {
  443. width: 80%;
  444. // color: #B0B1B5;
  445. margin-top: 10px;
  446. .right-content {
  447. background: #F2F3F7;
  448. margin-left: 10px;
  449. margin-top: 10px;
  450. padding: 10px;
  451. border-radius: 5px;
  452. color: #B0B1B5;
  453. }
  454. .right-item {
  455. display: flex;
  456. justify-content: space-between;
  457. .time {
  458. color: #999;
  459. }
  460. .item2 {
  461. margin-left: 20rpx;
  462. margin-top: -7px;
  463. .name {
  464. font-size: 28rpx;
  465. font-weight: 800;
  466. margin-bottom: 4px;
  467. }
  468. .status.success {
  469. color: #6CC48C;
  470. }
  471. .status.error {
  472. color: rgb(245, 108, 108);
  473. }
  474. .status.question {
  475. color: #f9ae3d;
  476. }
  477. }
  478. }
  479. }
  480. }
  481. .row2 {
  482. display: flex;
  483. .item-content {
  484. background: #22C572;
  485. width: 30px;
  486. height: 30px;
  487. border-radius: 50%;
  488. line-height: 30px;
  489. text-align: center;
  490. font-size: 12px;
  491. color: #fff;
  492. padding: 0 2px;
  493. margin: 0 auto;
  494. }
  495. .status {
  496. position: absolute;
  497. top: 0;
  498. right: 0;
  499. }
  500. }
  501. .row-line {
  502. width: 1px;
  503. height: 30px;
  504. background: #F2F2F2;
  505. margin: 10rpx 50rpx;
  506. }
  507. .audit {
  508. margin-top: 20rpx;
  509. }
  510. }
  511. .form_view{
  512. margin: 20rpx 0;
  513. border-radius: 20rpx;
  514. background: #F9F9FA;
  515. padding: 30rpx 20rpx;
  516. .table_css td{
  517. text-align: center;
  518. border: 1rpx solid #DBD9CE;
  519. padding: 14rpx 0;
  520. }
  521. .table_css{
  522. border: 1rpx solid #DBD9CE;
  523. }
  524. }
  525. </style>