progress.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <template>
  2. <view class="progress">
  3. <view class="top">
  4. <view class="top-t">
  5. <view class="top-item">
  6. <image src="../../static/icon/x1.png" mode=""></image>
  7. <view class="item-tit">1.项目创建</view>
  8. </view>
  9. <view class="top-item">
  10. <image src="../../static/icon/x2.png" mode=""></image>
  11. <view class="item-tit">2.项目审核</view>
  12. </view>
  13. <view class="top-item">
  14. <image src="../../static/icon/x3.png" mode=""></image>
  15. <view class="item-tit">3.捐赠响应</view>
  16. </view>
  17. <view class="top-item">
  18. <image src="../../static/icon/x4.png" mode=""></image>
  19. <view class="item-tit">4.捐赠审核</view>
  20. </view>
  21. </view>
  22. <view class="top-t">
  23. <view class="top-item">
  24. <image src="../../static/icon/x5.png" mode=""></image>
  25. <view class="item-tit">5.捐赠品入库</view>
  26. </view>
  27. <view class="top-item">
  28. <image src="../../static/icon/x6.png" mode=""></image>
  29. <view class="item-tit">6.捐赠品出库</view>
  30. </view>
  31. <view class="top-item">
  32. <image src="../../static/icon/x7.png" mode=""></image>
  33. <view class="item-tit">7.发往受捐者</view>
  34. </view>
  35. <view class="top-item">
  36. <image src="../../static/icon/x8.png" mode=""></image>
  37. <view class="item-tit">8.受捐者反馈</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="main">
  42. <view class="line"></view>
  43. <view class="item">
  44. <image src="../../static/icon/xq2.png" mode=""></image>
  45. <view class="item-info">
  46. <view class="item-tit">新建项目</view>
  47. <view class="item-time">{{proInfo.createtime | time}} {{proInfo.title}}</view>
  48. </view>
  49. <view class="line1"></view>
  50. </view>
  51. <view class="item">
  52. <image src="../../static/icon/xq2.png" mode="" ref="firstitem"></image>
  53. <view class="item-info">
  54. <view class="item-tit">
  55. 审核时间
  56. <text>已通过</text>
  57. </view>
  58. <view class="item-time">{{proInfo.createtime | time}} {{proInfo.title}}</view>
  59. </view>
  60. </view>
  61. <view class="item">
  62. <image src="../../static/icon/xq3.png" mode=""></image>
  63. <view class="item-info">
  64. <view class="item-tit">捐赠审核</view>
  65. <scroll-view scroll-y="true" class="item-num" @scrolltolower="loadDate" :class="[list.length <= 2 ? 'less': 'better']" v-if="list.length>0">
  66. <view class="item-wrapper">
  67. <!-- <empty v-if="list.length === 0"></empty> -->
  68. <template v-for="(item, index) in list">
  69. <view :key="index" class="jzr-item" :class="[index % 4 === 0 ? 'bg1' : index % 4 === 1 ? 'bg2' : index % 4 === 2 ? 'bg3' : 'bg4']" @click="navTo('/pages/donate/progresst?item='+JSON.stringify(item))">
  70. <view class="item-title clamp">{{ item.name }}</view>
  71. <view class="item-status">捐赠响应{{item.status_txt === '拒绝'?'未通过':item.status_txt==='待审核'?'待审核':'已通过'}}</view>
  72. </view>
  73. </template>
  74. <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
  75. </view>
  76. </scroll-view>
  77. </view>
  78. </view>
  79. <view class="item">
  80. <image src="../../static/icon/xq10.png" mode=""></image>
  81. <view class="item-info">
  82. <view class="item-tit">统计信息</view>
  83. <view class="all-info flex">
  84. <view class="" style="width: 45%;">
  85. 捐赠进度
  86. <text class="jd"> {{+proInfo.project_progress*100 }}%</text>
  87. </view>
  88. <view class="" style="width: 55%;">
  89. 捐赠笔数
  90. <text>{{count}}次</text>
  91. </view>
  92. <view class="" style="width: 45%;">
  93. 总计估值
  94. <text>{{+proInfo.assessment == 0?'': '¥'}}{{+proInfo.assessment||'暂无数据'}}</text>
  95. </view>
  96. <!-- <view class="">
  97. 物流累计
  98. <text>20次</text>
  99. </view> -->
  100. <view class="" style="width: 55%;">
  101. 上线时间
  102. <text>{{proInfo.start_time |time}}</text>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="line2"></view>
  107. <view class="line6"></view>
  108. </view>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  114. import { getProjectInfo, createProject, getDonationInfo, getAllOrder} from '../../api/money.js';
  115. import empty from '@/components/empty';
  116. export default {
  117. components: {
  118. empty,
  119. uniLoadMore
  120. },
  121. data() {
  122. return {
  123. peopleList: [],
  124. isShow: false,
  125. list: [],
  126. proId: 0,//项目Id
  127. proInfo: {},//项目基础信息
  128. page: 1,
  129. limit: 10,
  130. loadingType: 'more',
  131. loaded: false,
  132. count: 0
  133. };
  134. },
  135. filters: {
  136. time(val) {
  137. let date = new Date(val * 1000);
  138. let Y = date.getFullYear();
  139. let M = date.getMonth()>9?(date.getMonth()+1):'0'+(date.getMonth()+1);
  140. let D = date.getDate()>9?date.getDate():'0'+date.getDate();
  141. return Y + '年' + M + '月' + D + '日';
  142. },
  143. type(val,typeList) {
  144. let str = ''
  145. let arr = typeList
  146. let len = arr.length
  147. for(let i = 0;i< len ; i++){
  148. if(arr[i].id === val) {
  149. return str = arr[i].name
  150. }
  151. }
  152. },
  153. name(val,typeList) {
  154. let str = ''
  155. if(val) {
  156. str = val.substr(0,1)
  157. }
  158. return str + '**'
  159. },
  160. item(val,typeList) {
  161. let str = ''
  162. let arr = val.map(item => {
  163. for(let i = 0; i< typeList.length ;i++){
  164. if(item.project_donation_id == typeList[i].id){
  165. str = str + typeList[i].name + ' '+item.project_donation_num +' '+' '
  166. }
  167. }
  168. })
  169. return str
  170. }
  171. },
  172. onLoad(opt) {
  173. this.proId = opt.id
  174. this.getBaseInfo()
  175. this.loadDate()
  176. },
  177. methods: {
  178. getBaseInfo() {
  179. getProjectInfo({
  180. id: this.proId
  181. }).then(res => {
  182. this.proInfo = res.data;
  183. console.log(this.proInfo)
  184. })
  185. },
  186. loadDate() {
  187. if(this.loadingType == 'more'){
  188. getAllOrder({
  189. page: this.page,
  190. limit: this.limit,
  191. project_id: this.proId*1
  192. }).then(({data}) => {
  193. console.log(data,'999999999999999999999999')
  194. // let list = data.list
  195. this.list = this.list.concat(data.list)
  196. this.count = data.count
  197. this.page++
  198. if(data.list.length ==this.limit ){
  199. this.loadingType = 'more';
  200. return
  201. }else {
  202. this.loadingType = 'noMore';
  203. }
  204. this.$set(this, 'loaded', true);
  205. console.log(this.list,'777777777777777777')
  206. // this.newItem = data.list[0]
  207. // console.log(this.newItem,'88888888888888888')
  208. })
  209. }
  210. },
  211. navTo(url) {
  212. uni.navigateTo({
  213. url: url
  214. })
  215. }
  216. }
  217. };
  218. </script>
  219. <style lang="scss" scoped>
  220. .top {
  221. padding: 40rpx 0;
  222. background-color: #fff;
  223. margin: 20rpx 0;
  224. .top-t {
  225. display: flex;
  226. justify-content: space-between;
  227. padding: 0 55rpx;
  228. .top-item {
  229. width: 160rpx;
  230. display: flex;
  231. flex-direction: column;
  232. justify-content: center;
  233. align-items: center;
  234. margin-bottom: 30rpx;
  235. image {
  236. width: 160rpx;
  237. height: 160rpx;
  238. background: #ffffff;
  239. border-radius: 14px;
  240. margin-bottom: 15rpx;
  241. }
  242. .item-tit {
  243. font-size: 24rpx;
  244. font-family: PingFang SC;
  245. font-weight: 500;
  246. color: #333333;
  247. line-height: 1;
  248. }
  249. }
  250. }
  251. }
  252. .main {
  253. background-color: #fff;
  254. padding-right: 30rpx;
  255. height: 100%;
  256. position: relative;
  257. .line {
  258. width: 2rpx;
  259. // height: 60rpx;
  260. height: 100%;
  261. background-color: #fa7e67;
  262. position: absolute;
  263. left: 60rpx;
  264. }
  265. .item {
  266. position: relative;
  267. image {
  268. width: 45rpx;
  269. height: 45rpx;
  270. background: #fa7e67;
  271. border-radius: 50%;
  272. position: absolute;
  273. top: 49rpx;
  274. left: 40rpx;
  275. z-index: 3;
  276. }
  277. .item-info {
  278. width: 600rpx;
  279. position: relative;
  280. left: 112rpx;
  281. padding-bottom: 34rpx;
  282. border-bottom: 1px solid #ededed;
  283. .item-tit {
  284. padding-top: 39rpx;
  285. font-size: 32rpx;
  286. font-family: PingFang SC;
  287. font-weight: 500;
  288. color: #333333;
  289. line-height: 1;
  290. text {
  291. display: inline-block;
  292. width: 87rpx;
  293. height: 33rpx;
  294. border: 1px solid #0ec400;
  295. border-radius: 5rpx;
  296. font-size: 24rpx;
  297. font-family: PingFang SC;
  298. font-weight: 500;
  299. color: #0ec400;
  300. text-align: center;
  301. line-height: 30rpx;
  302. margin-left: 10rpx;
  303. }
  304. }
  305. .item-time {
  306. padding-top: 17rpx;
  307. font-size: 24rpx;
  308. font-family: PingFang SC;
  309. font-weight: 500;
  310. color: #bfbfbf;
  311. line-height: 1;
  312. }
  313. .item-num {
  314. margin-top: 21rpx;
  315. // height: 392rpx;
  316. width: 592rpx;
  317. // background-color: red;
  318. .item-wrapper {
  319. display: flex;
  320. flex-wrap: wrap;
  321. width: 592rpx;
  322. .jzr-item {
  323. height: 196rpx;
  324. width: 296rpx;
  325. background-color: #fff;
  326. background-size: 100% 100%;
  327. padding-top: 33rpx;
  328. padding-left: 28rpx;
  329. .item-title {
  330. font-size: 27rpx;
  331. font-family: PingFang SC;
  332. font-weight: bold;
  333. color: #333333;
  334. line-height: 1;
  335. }
  336. .item-status {
  337. padding-top: 20rpx;
  338. font-size: 24rpx;
  339. font-family: PingFang SC;
  340. font-weight: 500;
  341. color: #333333;
  342. line-height: 1;
  343. }
  344. }
  345. }
  346. .bg1 {
  347. background-image: url(../../static/img/bg1.png);
  348. }
  349. .bg2 {
  350. background-image: url(../../static/img/bg2.png);
  351. }
  352. .bg3 {
  353. background-image: url(../../static/img/bg3.png);
  354. }
  355. .bg4 {
  356. background-image: url(../../static/img/bg4.png);
  357. }
  358. }
  359. .all-info {
  360. margin-top: 20rpx;
  361. width: 601rpx;
  362. height: 130rpx;
  363. border: 1px solid #cccccc;
  364. border-radius: 10rpx;
  365. font-size: 24rpx;
  366. font-family: PingFang SC;
  367. font-weight: 500;
  368. color: #999999;
  369. align-items: center;
  370. flex-wrap: wrap;
  371. view {
  372. flex-shrink: 0;
  373. width: 50%;
  374. padding-left: 20rpx;
  375. text {
  376. display: inline-block;
  377. margin-left: 5rpx;
  378. color: #000000;
  379. }
  380. .jd {
  381. color: #e80000;
  382. }
  383. }
  384. }
  385. }
  386. .line1 {
  387. position: absolute;
  388. width: 2rpx;
  389. height: 61rpx;
  390. background-color: #fff;
  391. top: 0;
  392. left: 60rpx;
  393. z-index: 2;
  394. }
  395. .line2 {
  396. position: absolute;
  397. width: 2rpx;
  398. height: 250rpx;
  399. background-color: #fff;
  400. bottom: 0;
  401. left: 60rpx;
  402. }
  403. .line5 {
  404. position: absolute;
  405. width: 2rpx;
  406. height: 100%;
  407. background-color: #fa7e67;
  408. top: 0;
  409. left: 60rpx;
  410. z-index: 1;
  411. }
  412. .line6 {
  413. position: absolute;
  414. width: 2rpx;
  415. height: 61rpx;
  416. background-color: #fa7e67;
  417. top: 0;
  418. left: 60rpx;
  419. }
  420. }
  421. }
  422. .less {
  423. height: 196rpx;
  424. }
  425. .better {
  426. height: 392rpx;
  427. }
  428. </style>