details.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <!--
  2. * @Author: liuzhenlin 461480418@qq.ocm
  3. * @Date: 2023-01-12 11:57:48
  4. * @LastEditors: liuzhenlin
  5. * @LastEditTime: 2023-02-28 10:21:59
  6. * @Description: file content
  7. * @FilePath: \oms\pages\distributor\details.vue
  8. -->
  9. <template>
  10. <view class="home">
  11. <view class="nav">
  12. <view :style="{ paddingTop }">
  13. <view class="title" :style="[{ height }, { lineHeight: height }]">
  14. <view class="back" @click="goBack()">
  15. <u-icon name="arrow-left" color="#ffffff" size="22"></u-icon>
  16. </view>
  17. <text>招标信息详情</text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="main">
  22. <view class="main-top">
  23. <view class="customer-box">
  24. <view class="header flex1">
  25. <view class="name flex_l">
  26. <image class="img" src="../../static/images/menu1.png" mode="scaleToFill" />
  27. <text>{{ bidInfo.title }}</text>
  28. </view>
  29. <view class="date">{{ parseTime(bidInfo.biddingTime, '{y}-{m}-{d}') }}</view>
  30. </view>
  31. <view class="info">
  32. <view class="info-item">
  33. <u-row>
  34. <u-col span="6">
  35. <view class="flex_l">
  36. <view class="info-label">招标产品名称:</view>
  37. <text class="info-txt">{{ bidInfo.productName }}</text>
  38. </view>
  39. </u-col>
  40. <u-col span="6">
  41. <view class="flex_l">
  42. <view class="info-label">项目预算:</view>
  43. <text class="info-txt">{{ bidInfo.budget }}</text>
  44. </view>
  45. </u-col>
  46. </u-row>
  47. </view>
  48. <view class="info-item">
  49. <u-row justify="space-between">
  50. <u-col span="6">
  51. <view class="flex_l">
  52. <view class="info-label">发布招标日期:</view>
  53. <text class="info-txt">{{ parseTime(bidInfo.publishedTime, '{y}-{m}-{d}') }}</text>
  54. </view>
  55. </u-col>
  56. <u-col span="6">
  57. <view class="flex_l">
  58. <view class="info-label">客户名称:</view>
  59. <text class="info-txt">{{ bidInfo.cuctName }}</text>
  60. </view>
  61. </u-col>
  62. </u-row>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="tabs">
  67. <u-tabs
  68. v-if="curTabIndex >= 0"
  69. @change="changeTabs"
  70. :current="curTabIndex"
  71. :scrollable="false"
  72. :list="list"
  73. :activeStyle="{
  74. color: '#3E7EF8',
  75. fontWeight: 'bold',
  76. }"
  77. :inactiveStyle="{
  78. color: '#969696',
  79. }"></u-tabs>
  80. </view>
  81. </view>
  82. <view class="data-list">
  83. <!-- 跟进记录 -->
  84. <follow-records v-if="curTabIndex == 0" ref="follow" :targetId="bidId" :targetType="distrType"></follow-records>
  85. <!-- 详情 -->
  86. <bid-detail v-if="curTabIndex == 1" :detail="bidInfo"></bid-detail>
  87. </view>
  88. <!-- 新增按钮 -->
  89. <view class="fixed-btn-group" :style="{ width: openBtnWidth ? '180rpx' : '90rpx' }">
  90. <view class="flex1" v-if="openBtnWidth">
  91. <view class="btn center" @click="openFollow()">跟</view>
  92. </view>
  93. <view class="btn center" @click="openBtnWidth = !openBtnWidth">
  94. <u-icon name="plus" color="#fff" size="20"></u-icon>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </template>
  100. <script>
  101. import bidApi from '../../api/bid'
  102. import to from 'await-to-js'
  103. import bidDetail from './components/detail'
  104. import followRecords from './components/followRecords'
  105. export default {
  106. name: 'omsIndex',
  107. components: { bidDetail, followRecords },
  108. data() {
  109. return {
  110. openBtnWidth: false,
  111. curTabIndex: -1,
  112. fllowList: [], //跟进数据
  113. list: [
  114. {
  115. name: '跟进记录',
  116. index: 0,
  117. },
  118. {
  119. name: '详细信息',
  120. index: 1,
  121. },
  122. ],
  123. height: '',
  124. paddingTop: '',
  125. bidInfo: {},
  126. bidId: 0, //招标id
  127. }
  128. },
  129. onLoad(option) {
  130. this.bidId = parseInt(option.id)
  131. },
  132. created() {
  133. const navData = uni.getMenuButtonBoundingClientRect()
  134. this.height = navData.height + 'px'
  135. this.paddingTop = navData.top + 'px'
  136. },
  137. onShow() {
  138. this.curTabIndex = 0
  139. this.openBtnWidth = false
  140. this.getBidDeatil()
  141. },
  142. onHide() {
  143. this.curTabIndex = -1
  144. },
  145. methods: {
  146. async getBidDeatil() {
  147. const [err, res] = await to(bidApi.get({ id: this.bidId }))
  148. if (err) return
  149. if (res && res.code == 200) {
  150. this.bidInfo = res.data
  151. }
  152. },
  153. // 改变tab
  154. changeTabs(data) {
  155. this.curTabIndex = data.index
  156. },
  157. // 打开转移
  158. openFollow() {
  159. // this.$store.commit('setDetails', this.projectData)
  160. uni.navigateTo({
  161. //保留当前页面,跳转到应用内的某个页面
  162. url: '/pages/publicPages/follow?targetType=60&id=' + this.bidInfo.id,
  163. })
  164. },
  165. goBack() {
  166. uni.navigateBack({
  167. //关闭当前页面,返回上一页面或多级页面。
  168. delta: 1,
  169. })
  170. },
  171. },
  172. }
  173. </script>
  174. <style>
  175. page {
  176. background: #f2f3f5;
  177. }
  178. </style>
  179. <style lang="scss" scoped>
  180. .home {
  181. padding-top: 200rpx;
  182. .nav {
  183. position: absolute;
  184. left: 0;
  185. top: 0;
  186. width: 100%;
  187. height: 356rpx;
  188. background: #3e7ef8;
  189. border-radius: 0 0 31rpx 31rpx;
  190. .title {
  191. position: relative;
  192. text-align: center;
  193. font-size: 32rpx;
  194. font-weight: bold;
  195. color: #ffffff;
  196. .back {
  197. position: absolute;
  198. top: 0;
  199. bottom: 0;
  200. margin: auto;
  201. left: 70rpx;
  202. display: flex;
  203. }
  204. }
  205. }
  206. .main {
  207. position: absolute;
  208. width: 100%;
  209. height: calc(100vh - 200rpx);
  210. overflow: hidden;
  211. padding-bottom: 64rpx;
  212. .main-top {
  213. padding: 0 32rpx;
  214. }
  215. .customer-box {
  216. width: 100%;
  217. background: #ffffff;
  218. box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
  219. border-radius: 32rpx;
  220. padding: 22rpx 38rpx 68rpx 40rpx;
  221. .header {
  222. .name {
  223. .img {
  224. width: 46rpx;
  225. height: 46rpx;
  226. border-radius: 50%;
  227. margin-right: 8rpx;
  228. }
  229. text {
  230. font-size: 28rpx;
  231. font-weight: bold;
  232. color: #323232;
  233. }
  234. }
  235. .date {
  236. font-size: 24rpx;
  237. color: #3e7ef8;
  238. }
  239. }
  240. .info {
  241. .info-item {
  242. margin-top: 18rpx;
  243. .info-label {
  244. width: 162rpx;
  245. text-align: left;
  246. font-size: 24rpx;
  247. color: #646464;
  248. }
  249. .info-txt {
  250. flex: 1;
  251. font-size: 24rpx;
  252. color: #323232;
  253. }
  254. }
  255. }
  256. }
  257. .data-list {
  258. margin-top: 16rpx;
  259. width: 100%;
  260. height: calc(100vh - 532rpx);
  261. background: #ffffff;
  262. padding: 32rpx;
  263. overflow: auto;
  264. padding-bottom: 145rpx;
  265. .status1 {
  266. color: #4096fb;
  267. background: rgba(64, 150, 251, 0.2);
  268. }
  269. .status2 {
  270. background: rgba(255, 184, 60, 0.2);
  271. color: #ffb83c;
  272. }
  273. .status3 {
  274. color: #fe6936;
  275. background: rgba(254, 105, 54, 0.2);
  276. }
  277. }
  278. }
  279. .fixed-btn-group {
  280. position: fixed;
  281. display: flex;
  282. justify-content: space-around;
  283. align-items: center;
  284. width: 90rpx;
  285. height: 90rpx;
  286. bottom: 50rpx;
  287. right: 50rpx;
  288. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  289. border-radius: 20px;
  290. transition: all 0.2s;
  291. background: #fff;
  292. .btn {
  293. width: 60rpx;
  294. height: 60rpx;
  295. background: #3e7ef8;
  296. border-radius: 50%;
  297. margin: 10rpx;
  298. font-size: 26rpx;
  299. font-weight: bold;
  300. color: #ffffff;
  301. }
  302. }
  303. }
  304. </style>