progresst.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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="item">
  43. <image src="../../static/icon/xq1.png" mode=""></image>
  44. <view class="item-info">
  45. <view class="item-tit">响应捐赠</view>
  46. <view class="item-time">{{info.add_time | time }} {{info.name}}响应捐赠{{info.item | item(typeList)}},提交工作人员审核</view>
  47. </view>
  48. <view class="line1"></view>
  49. <view class="line5"></view>
  50. </view>
  51. <view class="item">
  52. <image src="../../static/icon/xq5.png" mode=""></image>
  53. <view class="item-info">
  54. <view class="item-tit">用户寄件方式</view>
  55. <view class="item-time">{{info.logistics | log(logisticsList)}}</view>
  56. </view>
  57. <view class="line5"></view>
  58. </view>
  59. <view class="item">
  60. <image src="../../static/icon/xq3.png" mode=""></image>
  61. <view class="item-info">
  62. <view class="item-tit">捐赠审核</view>
  63. <view class="item-time" v-if="info.verify_time">{{info.verify_time | time }} {{info.name}}捐赠响应{{info.status_txt==='拒绝'? '未通过': '已通过'}}</view>
  64. </view>
  65. <view class="line5"></view>
  66. </view>
  67. <view class="item">
  68. <image src="../../static/icon/xq6.png" mode=""></image>
  69. <view class="item-info">
  70. <view class="item-tit">入库单信息</view>
  71. <view class="item-time" v-if="info.receiving_time">{{info.receiving_time | time }} {{info.name}}捐赠的{{info.item | item(typeList)}}已入库</view>
  72. </view>
  73. <view class="line5"></view>
  74. </view>
  75. <view class="item">
  76. <image src="../../static/icon/xq7.png" mode=""></image>
  77. <view class="item-info">
  78. <view class="item-tit">出库单信息</view>
  79. <view class="item-time" v-if="info.out_delivery_time">{{info.out_delivery_time | time }} {{info.name}}捐赠的{{info.item | item(typeList)}}已出库</view>
  80. </view>
  81. <view class="line5"></view>
  82. </view>
  83. <!-- <view class="item">
  84. <image src="../../static/icon/xq8.png" mode=""></image>
  85. <view class="item-info">
  86. <view class="item-tit">出库物流信息</view>
  87. <view class="item-time"></view>
  88. </view>
  89. <view class="line5"></view>
  90. </view> -->
  91. <view class="item">
  92. <image src="../../static/icon/xq9.png" mode=""></image>
  93. <view class="item-info">
  94. <view class="item-tit">受捐反馈信息</view>
  95. <view class="item-time" v-if="info.feedback_time">{{info.feedback_time | time }} {{info.feedback}}</view>
  96. </view>
  97. <view class="line6"></view>
  98. </view>
  99. </view>
  100. </view>
  101. </template>
  102. <script>
  103. import { getOrderInfo, getDonationInfo, getLogistics } from '../../api/money.js'
  104. export default {
  105. data() {
  106. return {
  107. peopleList: [],
  108. isShow: false,
  109. info: {},
  110. typeList: [],
  111. logisticsList: [],
  112. };
  113. },
  114. filters: {
  115. time(val){
  116. let str = '';
  117. // console.log(val)
  118. if (val) {
  119. let date = new Date(val * 1000);
  120. let Y = date.getFullYear();
  121. let M = date.getMonth() + 1 > 9 ? (date.getMonth()+1) : '0' + (date.getMonth()+1);
  122. let D = date.getDate() > 9 ? date.getDate() : '0' + date.getDate();
  123. let h = date.getHours() > 9 ? date.getHours() : '0' + date.getHours()
  124. let m = date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes()
  125. let s = date.getSeconds() > 9 ? date.getSeconds() : '0' +date.getSeconds()
  126. str = Y + '/' + M + '/' + D + ' ' + h + ':' + m + ':' + s;
  127. }
  128. return str;
  129. },
  130. item(val, typeList) {
  131. let str = '(';
  132. if (val&&typeList) {
  133. let arr = val.map(item => {
  134. for (let i = 0; i < typeList.length; i++) {
  135. if (item.project_donation_id == typeList[i].id) {
  136. str = str + typeList[i].name + item.project_donation_num + '个、';
  137. }
  138. }
  139. });
  140. }
  141. return str.substr(0, str.length - 1) +')';
  142. },
  143. log(val,logisticsList) {
  144. let str = ''
  145. if(val&&logisticsList) {
  146. for(let i = 0 ,len = logisticsList.length ; i < len ; i++) {
  147. if(logisticsList[i].id == val) {
  148. console.log(logisticsList[i].name)
  149. return str = logisticsList[i].name
  150. }
  151. }
  152. }
  153. return str
  154. }
  155. },
  156. onLoad(opt) {
  157. this.info = JSON.parse(opt.item)
  158. console.log(this.info)
  159. this.getDonationInfo()
  160. this.getLogistics()
  161. },
  162. methods: {
  163. getDonationInfo() {
  164. getDonationInfo().then(({ data }) => {
  165. this.typeList = data;
  166. console.log(this.typeList, '获取所有物资');
  167. });
  168. },
  169. getLogistics() {
  170. getLogistics().then( ({data}) => {
  171. console.log('88888888888888888888',data)
  172. this.logisticsList = data
  173. })
  174. }
  175. }
  176. };
  177. </script>
  178. <style lang="scss" scoped>
  179. .top {
  180. padding: 40rpx 0;
  181. background-color: #fff;
  182. margin: 20rpx 0;
  183. .top-t {
  184. display: flex;
  185. justify-content: space-between;
  186. padding: 0 55rpx;
  187. .top-item {
  188. width: 160rpx;
  189. display: flex;
  190. flex-direction: column;
  191. justify-content: center;
  192. align-items: center;
  193. margin-bottom: 30rpx;
  194. image {
  195. width: 160rpx;
  196. height: 160rpx;
  197. background: #ffffff;
  198. border-radius: 14px;
  199. margin-bottom: 15rpx;
  200. }
  201. .item-tit {
  202. font-size: 24rpx;
  203. font-family: PingFang SC;
  204. font-weight: 500;
  205. color: #333333;
  206. line-height: 1;
  207. }
  208. }
  209. }
  210. }
  211. .main {
  212. background-color: #fff;
  213. padding-right: 30rpx;
  214. height: 100%;
  215. position: relative;
  216. .line {
  217. width: 2rpx;
  218. // height: 60rpx;
  219. height: 100%;
  220. background-color: #fa7e67;
  221. position: absolute;
  222. left: 60rpx;
  223. }
  224. .item {
  225. position: relative;
  226. image {
  227. width: 45rpx;
  228. height: 45rpx;
  229. background: #fa7e67;
  230. border-radius: 50%;
  231. position: absolute;
  232. top: 49rpx;
  233. left: 40rpx;
  234. z-index: 3;
  235. }
  236. .item-info {
  237. width: 600rpx;
  238. position: relative;
  239. left: 112rpx;
  240. padding-bottom: 34rpx;
  241. border-bottom: 1px solid #ededed;
  242. .item-tit {
  243. padding-top: 52rpx;
  244. font-size: 32rpx;
  245. font-family: PingFang SC;
  246. font-weight: 500;
  247. color: #333333;
  248. line-height: 1;
  249. text {
  250. display: inline-block;
  251. width: 87rpx;
  252. height: 33rpx;
  253. border: 1px solid #0ec400;
  254. border-radius: 5rpx;
  255. font-size: 24rpx;
  256. font-family: PingFang SC;
  257. font-weight: 500;
  258. color: #0ec400;
  259. text-align: center;
  260. line-height: 30rpx;
  261. margin-left: 10rpx;
  262. }
  263. }
  264. .item-time {
  265. padding-top: 17rpx;
  266. font-size: 24rpx;
  267. font-family: PingFang SC;
  268. font-weight: 500;
  269. color: #bfbfbf;
  270. line-height: 1;
  271. }
  272. .item-num {
  273. margin-top: 21rpx;
  274. height: 392rpx;
  275. width: 592rpx;
  276. background-color: red;
  277. }
  278. .all-info {
  279. margin-top: 20rpx;
  280. width: 601rpx;
  281. height: 174rpx;
  282. border: 1px solid #cccccc;
  283. border-radius: 10rpx;
  284. font-size: 24rpx;
  285. font-family: PingFang SC;
  286. font-weight: 500;
  287. color: #999999;
  288. align-items: center;
  289. flex-wrap: wrap;
  290. view {
  291. flex-shrink: 0;
  292. width: 50%;
  293. padding-left: 20rpx;
  294. text {
  295. display: inline-block;
  296. margin-left: 5rpx;
  297. color: #000000;
  298. }
  299. .jd {
  300. color: #e80000;
  301. }
  302. }
  303. }
  304. }
  305. .line1 {
  306. position: absolute;
  307. width: 2rpx;
  308. height: 61rpx;
  309. background-color: #fff;
  310. top: 0;
  311. left: 60rpx;
  312. z-index: 2;
  313. }
  314. .line2 {
  315. position: absolute;
  316. width: 2rpx;
  317. height: 250rpx;
  318. background-color: #fff;
  319. bottom: 0;
  320. left: 60rpx;
  321. }
  322. .line5 {
  323. position: absolute;
  324. width: 2rpx;
  325. height: 100%;
  326. background-color: #fa7e67;
  327. top: 0;
  328. left: 60rpx;
  329. z-index: 1;
  330. }
  331. .line6 {
  332. position: absolute;
  333. width: 2rpx;
  334. height: 61rpx;
  335. background-color: #fa7e67;
  336. top: 0;
  337. left: 60rpx;
  338. }
  339. }
  340. }
  341. </style>