warehouse_details.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  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. if (val == 200) this.getData()
  153. },
  154. showcontent(item) {
  155. item.showflow = !item.showflow
  156. },
  157. getData() {
  158. uni.showLoading({
  159. title: '加载中',
  160. mask: true
  161. })
  162. var data = []
  163. var that = this
  164. this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
  165. id: this.id
  166. }).then(res => {
  167. if (res.data.code == 200) {
  168. this.list = res.data.data
  169. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  170. businessCode: 'PROCUREMENT-PRICE-APPROVE',
  171. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  172. }).then(res1 => {
  173. this.$api.doRequest('get', '/commonUser/getHis', {
  174. workflowId: res1.data.data[0].id,
  175. businessKey: this.id,
  176. // branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
  177. }).then(response => {
  178. uni.hideLoading()
  179. for (let i = 0; i < response.data.data.length; i++) {
  180. this.$set(response.data.data[i], 'status', 'question')
  181. // console.log(response.data.data[i].workflowHistoricTasks,i)
  182. if (response.data.data[i].commonStaffs) {
  183. response.data.data[i].showflow = false
  184. response.data.data[i].operatorTitle = response.data.data[i]
  185. .desc.substring(0, 2)
  186. response.data.data[i].operatorName = response.data.data[i]
  187. .desc
  188. response.data.data[i].staffscontent = '共' + response.data
  189. .data[i].commonStaffs.length + '人,当前审核' + response.data
  190. .data[i].workflowHistoricTasks.length + '人'
  191. if (response.data.data[i].workflowHistoricTasks && response
  192. .data.data[i].workflowHistoricTasks.length > 0) {
  193. if (response.data.data[i].workflowHistoricTasks
  194. .length != response.data.data[i].commonStaffs
  195. .length) {
  196. // response.data.data[i].status='question'
  197. this.$set(response.data.data[i], 'status',
  198. 'question')
  199. } else {
  200. this.$set(response.data.data[i], 'status',
  201. 'success')
  202. // response.data.data[i].status='success'
  203. }
  204. response.data.data[i].workflowlen = response.data.data[
  205. i].workflowHistoricTasks.length
  206. var workflowdata = response.data.data[i]
  207. .workflowHistoricTasks
  208. var staffsdata = response.data.data[i].commonStaffs
  209. for (let q = 0; q < staffsdata.length; q++) {
  210. staffsdata[q].status = false
  211. staffsdata[q].staffTitle = staffsdata[q].staffName
  212. for (let k = 0; k < workflowdata.length; k++) {
  213. if (staffsdata[q].staffId == workflowdata[k]
  214. .operatorId) {
  215. staffsdata[q].status = true
  216. }
  217. }
  218. }
  219. }
  220. response.data.data[i].commonStaffs1 = response.data.data[i]
  221. .commonStaffs
  222. } else {
  223. if (response.data.data[i].workflowHistoricTasks && response
  224. .data.data[i].workflowHistoricTasks.length > 0) {
  225. var len = response.data.data[i].workflowHistoricTasks
  226. .length - 1
  227. if (response.data.data[i].workflowHistoricTasks[len]
  228. .approved) {
  229. this.$set(response.data.data[i], 'status',
  230. 'success')
  231. } else {
  232. this.$set(response.data.data[i], 'status', 'error')
  233. }
  234. response.data.data[i].operatorTitle = response.data
  235. .data[i].workflowHistoricTasks[len].operatorName
  236. .substring(response.data.data[i]
  237. .workflowHistoricTasks[0].operatorName.length -
  238. 2)
  239. response.data.data[i].operatorName = response.data
  240. .data[i].workflowHistoricTasks[len].operatorName
  241. var time = new Date(response.data.data[i]
  242. .workflowHistoricTasks[len].claimTime)
  243. .getTime()
  244. response.data.data[i].updateDate = this.$u.timeFormat(
  245. time, 'mm.dd hh:MM')
  246. response.data.data[i].auditMind = response.data.data[i]
  247. .workflowHistoricTasks[len].auditMind
  248. } else {
  249. this.$set(response.data.data[i], 'status', 'question')
  250. // response.data.data[i].status='question'
  251. if (response.data.data[i].desc == '总经理助理审核') {
  252. response.data.data[i].operatorTitle = '总助'
  253. } else if (response.data.data[i].desc == '杜大光审核') {
  254. response.data.data[i].operatorTitle = '大光'
  255. } else {
  256. response.data.data[i].operatorTitle = response.data
  257. .data[i].desc.substring(0, 2)
  258. }
  259. response.data.data[i].operatorName = response.data
  260. .data[i].desc
  261. var time1 = new Date(response.data.data[i].updateDate)
  262. .getTime()
  263. response.data.data[i].updateDate = this.$u.timeFormat(
  264. time1, 'mm.dd hh:MM')
  265. response.data.data[i].auditMind = ''
  266. }
  267. }
  268. }
  269. // console.log(response.data.data)
  270. this.auditList = response.data.data
  271. var time2 = new Date(this.list.updateDate).getTime()
  272. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  273. this.auditList.unshift({
  274. operatorTitle: this.list.creater.substring(0, 2),
  275. operatorName: this.list.creater,
  276. updateDate: time3,
  277. auditMind: '',
  278. desc: '发起申请',
  279. showflow: false,
  280. commonStaffs1: null,
  281. commonStaffs: null,
  282. workflowHistoricTasks: [],
  283. status: 'success'
  284. })
  285. })
  286. })
  287. }
  288. })
  289. },
  290. confirm(item) {
  291. this.list.contractNo = item[0].value
  292. },
  293. fanHui() {
  294. uni.navigateBack()
  295. }
  296. }
  297. }
  298. </script>
  299. <style scoped lang="scss">
  300. .warp {
  301. margin: 10rpx;
  302. padding: 20rpx 20rpx 330rpx 20rpx;
  303. }
  304. .content1,
  305. .content2 {
  306. border-radius: 20rpx;
  307. background: white;
  308. padding: 20rpx;
  309. .title {
  310. font-size: 28rpx;
  311. font-weight: 600;
  312. color: #333333;
  313. text-align: left;
  314. }
  315. .row {
  316. display: flex;
  317. justify-content: space-between;
  318. border-bottom: 1px solid #EEEEEE;
  319. padding: 21rpx 0;
  320. .right,
  321. input {
  322. font-size: 28rpx;
  323. color: #333333;
  324. }
  325. }
  326. }
  327. .content2 {
  328. margin-top: 20rpx;
  329. }
  330. .bottom-btn {
  331. width: 100%;
  332. position: fixed;
  333. bottom: 0;
  334. display: flex;
  335. z-index: 2;
  336. left: 0;
  337. background-color: #f8f8f8;
  338. flex-direction: column;
  339. .btn1,
  340. .btn2 {
  341. width: 100%;
  342. margin-bottom: 26rpx;
  343. border-radius: 90rpx;
  344. }
  345. .btn1 {
  346. background: white;
  347. color: #00C265;
  348. }
  349. }
  350. .submit {
  351. width: 40%;
  352. background: #22C572;
  353. border-radius: 10rpx;
  354. }
  355. .boder {
  356. border: 0;
  357. border-bottom: 0 !important;
  358. }
  359. .topInfo {
  360. height: 210rpx;
  361. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  362. padding: 30rpx;
  363. .topInfo-item {
  364. height: 150rpx;
  365. background-color: #FFFFFF;
  366. border-radius: 20rpx;
  367. padding: 40rpx;
  368. .logo {
  369. width: 40rpx;
  370. height: 40rpx;
  371. margin-top: 8rpx;
  372. }
  373. .infoText {
  374. font-size: 36rpx;
  375. font-weight: 600;
  376. margin-left: 20rpx;
  377. }
  378. .infoData {
  379. color: #878C9C;
  380. font-size: 26rpx;
  381. margin-top: 10rpx;
  382. }
  383. }
  384. }
  385. .content3 {
  386. background: white;
  387. margin: 20rpx 0;
  388. border-radius: 20rpx;
  389. padding: 20rpx;
  390. .row {
  391. display: flex;
  392. .left {
  393. display: flex;
  394. align-items: center;
  395. .item1 {
  396. position: relative;
  397. .item-content {
  398. background: #617AE0;
  399. width: 44px;
  400. height: 44px;
  401. border-radius: 22px;
  402. line-height: 44px;
  403. text-align: center;
  404. font-size: 15px;
  405. color: #fff;
  406. }
  407. .status {
  408. position: absolute;
  409. border-radius: 50%;
  410. padding: 0px 2px;
  411. right: -3px;
  412. bottom: -3px;
  413. background: #fff;
  414. }
  415. .status.success {
  416. border: 1px solid rgb(60, 156, 255);
  417. }
  418. .status.error {
  419. border: 1px solid rgb(245, 108, 108);
  420. }
  421. .status.question {
  422. border: 1px solid #f9ae3d;
  423. }
  424. }
  425. }
  426. .right {
  427. width: 80%;
  428. // color: #B0B1B5;
  429. margin-top: 10px;
  430. .right-content {
  431. background: #F2F3F7;
  432. margin-left: 10px;
  433. margin-top: 10px;
  434. padding: 10px;
  435. border-radius: 5px;
  436. color: #B0B1B5;
  437. }
  438. .right-item {
  439. display: flex;
  440. justify-content: space-between;
  441. .time {
  442. color: #999;
  443. }
  444. .item2 {
  445. margin-left: 20rpx;
  446. margin-top: -7px;
  447. .name {
  448. font-size: 28rpx;
  449. font-weight: 800;
  450. margin-bottom: 4px;
  451. }
  452. .status.success {
  453. color: #6CC48C;
  454. }
  455. .status.error {
  456. color: rgb(245, 108, 108);
  457. }
  458. .status.question {
  459. color: #f9ae3d;
  460. }
  461. }
  462. }
  463. }
  464. }
  465. .row2 {
  466. display: flex;
  467. .item-content {
  468. background: #22C572;
  469. width: 30px;
  470. height: 30px;
  471. border-radius: 50%;
  472. line-height: 30px;
  473. text-align: center;
  474. font-size: 12px;
  475. color: #fff;
  476. padding: 0 2px;
  477. margin: 0 auto;
  478. }
  479. .status {
  480. position: absolute;
  481. top: 0;
  482. right: 0;
  483. }
  484. }
  485. .row-line {
  486. width: 1px;
  487. height: 30px;
  488. background: #F2F2F2;
  489. margin: 10rpx 50rpx;
  490. }
  491. .audit {
  492. margin-top: 20rpx;
  493. }
  494. }
  495. .form_view {
  496. margin: 20rpx 0;
  497. border-radius: 20rpx;
  498. background: #F9F9FA;
  499. padding: 30rpx 20rpx;
  500. .table_css td {
  501. text-align: center;
  502. border: 1rpx solid #DBD9CE;
  503. padding: 14rpx 0;
  504. }
  505. .table_css {
  506. border: 1rpx solid #DBD9CE;
  507. }
  508. }
  509. </style>