drawer.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="采购需求详情"
  4. @clickLeft="back">
  5. </uni-nav-bar>
  6. <myCard :item="form" :columns="columns"></myCard>
  7. <!-- <view class="item">
  8. <view class="card">
  9. <view>
  10. <view class="lable">预算</view>
  11. <view>{{form.budget||''}} 万元</view>
  12. </view>
  13. <view>
  14. <view class="lable">赢单率</view>
  15. <view>{{form.winRate||''}} %</view>
  16. </view>
  17. <view>
  18. <view class="lable">预计结单日期</view>
  19. <view>{{form.expectedClosingDate||''}}</view>
  20. </view>
  21. </view>
  22. </view> -->
  23. <!-- <u-sticky bgColor="#fff" :customNavHeight="88"> -->
  24. <u-tabs :list="list1" @change="change" :current="current"></u-tabs>
  25. <!-- </u-sticky> -->
  26. <info ref="infoRef" :isDrawer="true" v-show="current==0"></info>
  27. <produceList :pricingWay="form.pricingWay" ref="produceListRef" :isDrawer="true" v-show="current==1">
  28. </produceList>
  29. </view>
  30. </template>
  31. <script>
  32. import businessList from "./businessList.vue"
  33. import personnelList from "./personnelList.vue"
  34. import produceList from "../../components/produceList.vue"
  35. import followList from "@/pages/saleManage/contact/components/followList.vue"
  36. import info from "./info.vue"
  37. import {
  38. contactDetail,
  39. } from '@/api/saleManage/contact/index.js'
  40. import {
  41. businessopportunitySave,
  42. // getDetail,
  43. getfollowList,
  44. deletefollowList,
  45. savefollowList
  46. } from '@/api/saleManage/businessOpportunity/index.js'
  47. import {
  48. getDetail,
  49. } from '@/api/purchasingManage/purchaseNeedManage.js'
  50. import myCard from '../../components/myCard.vue'
  51. export default {
  52. components: {
  53. businessList,
  54. personnelList,
  55. produceList,
  56. followList,
  57. info,
  58. myCard
  59. },
  60. data() {
  61. return {
  62. columns: [
  63. [{
  64. label: '名称:',
  65. prop: 'requirementName',
  66. type: 'title',
  67. className: 'perce100',
  68. }],
  69. ],
  70. current: 0,
  71. list1: [{
  72. name: '基本信息',
  73. }, {
  74. name: '需求清单',
  75. }],
  76. form: {},
  77. }
  78. },
  79. onLoad(data) {
  80. getDetail(data.id).then(async res => {
  81. this.form = res
  82. setTimeout(() => {
  83. this.current = 0
  84. this.$nextTick(() => {
  85. this.$refs.infoRef.init(res)
  86. this.$refs.produceListRef.init(res.detailList)
  87. if (data.current) {
  88. this.current = +data.current
  89. }
  90. })
  91. }, 300)
  92. })
  93. },
  94. onUnload() {
  95. },
  96. methods: {
  97. change(data) {
  98. this.current = data.index
  99. },
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .item {
  105. padding: 16rpx 32rpx;
  106. .card {
  107. padding: 16rpx 32rpx;
  108. margin-top: 32rpx;
  109. display: flex;
  110. flex-wrap: wrap;
  111. // height: 80rpx;
  112. border-radius: 12rpx;
  113. border: 1px solid #cbcbcb;
  114. >view {
  115. font-size: 26rpx;
  116. width: 33%;
  117. .lable {
  118. color: #999;
  119. margin-bottom: 10rpx;
  120. }
  121. }
  122. }
  123. }
  124. </style>