warehouse_details.vue 14 KB

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