detail.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <template>
  2. <view :class="[AppTheme]" class="subrecord">
  3. <view>
  4. <view class="notes-con">
  5. <view class="total-share">
  6. <view class="ts-left">
  7. <view class="ts-h">
  8. <view class="detail">
  9. <view class="ts-bg bg-primary">
  10. <text class="all-p text-primary">农场认养</text>
  11. </view>
  12. <view class="detail_ani">
  13. <view class="num">{{ detailInfo.lefttime || 0 }}</view>
  14. <view class="sam zi">期限(天)</view>
  15. </view>
  16. <view class="detail_ani">
  17. <view>
  18. {{ detailInfo.goods.bonusway || '' }}
  19. </view>
  20. <view class="sam zi">认养收获</view>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="ts-f">
  25. <view>
  26. <view class="num">
  27. {{ detailInfo.goods.copies_price || 0 }}
  28. </view>
  29. <view class="sam zi">
  30. 元/{{detailInfo.goods.unit}}
  31. </view>
  32. </view>
  33. <view>
  34. <view class="num">{{ detailInfo.totalnum || 0 }}</view>
  35. <view class="sam zi">数量</view>
  36. </view>
  37. <view>
  38. <view class="num">
  39. {{ detailInfo.payprice || 0 }}
  40. </view>
  41. <view class="sam zi">
  42. 金额(元)</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="ts-right">
  47. <view></view>
  48. <view class="abso border-primary">
  49. <image :src="settingFile.root_img+'/static/app/imgs/mine/17.png'" mode="" />
  50. <view class="now text-explain" v-if="detailInfo.status == 0">已取消</view>
  51. <view class="now text-neutral" v-if="detailInfo.status == 1" @click="goPay(detailInfo.id)">
  52. 去付款</view>
  53. <view class="now text-primary" v-if="detailInfo.status ==2 ">认养中</view>
  54. <view class="now text-explain" v-if="detailInfo.status ==3 ">已完成</view>
  55. <view class="now" v-if="detailInfo.status ==4 ">已发货</view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="detail-c">
  62. <view class="mb20" style="display: flex;">
  63. <text class="mr10">认养产品 :</text>
  64. <text v-if="detailInfo.goods&&detailInfo.goods.name"
  65. style="flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
  66. {{ detailInfo.goods.name }}
  67. </text>
  68. </view>
  69. <view class="mb20">
  70. <text class="mr10">订单号 :</text>
  71. <text>{{ detailInfo.oid }}</text>
  72. </view>
  73. <view class="mb20">
  74. <text class="mr10">开始时间 :</text>
  75. <text>{{ detailInfo.paytime || 0 }}</text>
  76. </view>
  77. <view class="mb20">
  78. <text class="mr10">现在时间 :</text>
  79. <text>{{ detailInfo.now || 0 }}</text>
  80. </view>
  81. <view class="mb20">
  82. <text class="mr10">认养周期 :</text>
  83. <text>{{ detailInfo.lefttime }}天</text>
  84. <text class="ml10">已过天数 :</text>
  85. <text>{{ detailInfo.past }}天</text>
  86. <text class="ml10">剩余天数 :</text>
  87. <text>{{ detailInfo.lefttime - detailInfo.past }}天</text>
  88. </view>
  89. <view class="peisong">
  90. <view class="mb20 flex">
  91. <text>预期配送:{{ detailInfo.qinum||0}}次</text>
  92. </view>
  93. <view class="mb20 flex">
  94. <text>
  95. 已配送:
  96. <text style="color: #f26214;">{{ detailInfo.ypsnum||0 }}</text>
  97. </text>
  98. </view>
  99. <view class="mb20" v-for="(item,index) in log" :key="index"><text class="mr10">订单进度:
  100. {{ $u.timeFormat(item.ctime,fmt = 'yyyy/mm/dd hh:MM:ss') || 0 }} {{ item.msg }}</text></view>
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. import mineApi from '@/api/mine/index.js';
  107. export default {
  108. data() {
  109. return {
  110. primary: this.$theme.primary,
  111. settingFile: getApp().globalData.siteinfo,
  112. p: 1,
  113. detailInfo: {},
  114. name: '上拉加载更多',
  115. nowTime: 0,
  116. id: 0,
  117. log: [],
  118. };
  119. },
  120. onLoad(options) {
  121. this.id = options.id;
  122. },
  123. methods: {
  124. goPay(index) {
  125. uni.navigateTo({
  126. url: `/pagesC/pages/index/farmorder/farmorder?id=${index}`
  127. });
  128. },
  129. goContract(no) {
  130. this.$u.route('/pagesA/pages/contracts/contract_info', {
  131. no
  132. });
  133. },
  134. getJiLu() {
  135. mineApi
  136. .orderDetail({
  137. orderid: this.id
  138. })
  139. .then(res => {
  140. this.detailInfo = res.data.cache;
  141. console.log(this.detailInfo, "this.detailInfo")
  142. this.log = res.data.log;
  143. });
  144. }
  145. },
  146. mounted() {
  147. this.getJiLu();
  148. }
  149. };
  150. </script>
  151. <style lang="scss">
  152. page {
  153. width: 100%;
  154. height: 100%;
  155. }
  156. .subrecord {
  157. width: 100%;
  158. min-height: 100%;
  159. padding-top: 0.1rpx;
  160. background: #f1f1f1;
  161. position: relative;
  162. .notes-con {
  163. height: 240rpx;
  164. width: calc(100% - 40rpx);
  165. margin: 0 auto;
  166. border-radius: 20rpx;
  167. background-color: #ffffff;
  168. .total-share {
  169. height: 240rpx;
  170. width: 100%;
  171. display: flex;
  172. justify-content: flex-start;
  173. margin: 20rpx auto;
  174. }
  175. .ts-left {
  176. margin-top: 16rpx;
  177. margin-left: 20rpx;
  178. /*float: left;*/
  179. }
  180. .total-share .ts-h,
  181. .ts-f {
  182. width: 472rpx;
  183. }
  184. .ts-f {
  185. margin-top: -14rpx;
  186. }
  187. .total-share .ts-h {
  188. height: 70rpx;
  189. display: flex;
  190. justify-content: flex-start;
  191. align-items: center;
  192. margin-bottom: 50rpx;
  193. margin-top: 10rpx;
  194. align-items: center;
  195. }
  196. .total-share .ts-h .ts-bg {
  197. width: 74rpx;
  198. height: 70rpx;
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. font-size: 16rpx;
  203. background-size: 100%;
  204. margin-right: 16rpx;
  205. text-align: center;
  206. }
  207. .total-share .ts-h .all-p {
  208. font-size: 20rpx;
  209. font-family: PingFang SC;
  210. font-weight: 800;
  211. color: rgba(255, 255, 255, 1);
  212. letter-spacing: 6rpx;
  213. margin-left: 5rpx;
  214. margin-top: -8rpx;
  215. margin-left: 5rpx;
  216. }
  217. .total-share .ts-h .expect {
  218. display: inline-block;
  219. width: 360rpx;
  220. overflow: hidden;
  221. text-overflow: ellipsis;
  222. -o-text-overflow: ellipsis;
  223. white-space: nowrap;
  224. font-size: 31rpx;
  225. font-family: PingFang SC;
  226. font-weight: bold;
  227. color: rgba(0, 0, 0, 1);
  228. }
  229. .detail {
  230. display: flex;
  231. flex: 1;
  232. justify-content: space-between;
  233. .detail_ani {
  234. text-align: center;
  235. .sam {
  236. text-align: center;
  237. font-size: 22rpx;
  238. color: #bababa;
  239. }
  240. .zi {
  241. margin-top: 15rpx;
  242. }
  243. }
  244. .detail_ani.overflowl {
  245. width: 65%;
  246. overflow: hidden;
  247. text-overflow: ellipsis;
  248. .ellipsis {
  249. white-space: nowrap;
  250. /*强制在一行显示*/
  251. text-overflow: ellipsis;
  252. /*设置超出内容显示...*/
  253. overflow: hidden;
  254. }
  255. }
  256. }
  257. .ts-f {
  258. display: flex;
  259. justify-content: space-between;
  260. align-items: center;
  261. }
  262. .ts-f .red-pre {
  263. text-align: center;
  264. top: 14rpx;
  265. font-weight: 800;
  266. font-size: 30rpx;
  267. }
  268. .ts-f .num {
  269. position: relative;
  270. top: 14rpx;
  271. font-size: 30rpx;
  272. font-weight: 800;
  273. text-align: center;
  274. }
  275. .ts-f .sam {
  276. text-align: center;
  277. font-size: 22rpx;
  278. color: #bababa;
  279. }
  280. .ts-f .sam.zi {
  281. margin-top: 24rpx;
  282. }
  283. .ts-right {
  284. margin-left: 10rpx;
  285. position: relative;
  286. margin-top: 40rpx;
  287. }
  288. .ts-right .abso {
  289. width: 140rpx;
  290. height: 140rpx;
  291. position: absolute;
  292. font-size: 24rpx;
  293. left: 46rpx;
  294. border-width: 4rpx;
  295. border-style: solid;
  296. border-radius: 50%;
  297. text-align: center;
  298. padding-top: 26rpx;
  299. box-sizing: border-box;
  300. image {
  301. width: 45rpx;
  302. height: 51rpx;
  303. }
  304. }
  305. .abso .yet {
  306. margin-left: 16rpx;
  307. width: 46rpx;
  308. height: 52rpx;
  309. }
  310. .abso .now {
  311. font-size: 26rpx;
  312. font-family: PingFang SC;
  313. font-weight: 800;
  314. }
  315. }
  316. .peisong {
  317. border-top: 1px solid #eeeeee;
  318. }
  319. .detail-c {
  320. width: calc(100% - 40rpx);
  321. margin: 20rpx auto;
  322. background-color: #ffffff;
  323. border-radius: 20rpx;
  324. font-size: 28rpx;
  325. color: #999;
  326. .mb20 {
  327. padding: 27rpx;
  328. // margin-bottom: 50rpx;
  329. // border-bottom: 1px solid #E4E7ED;
  330. .ml10 {
  331. margin-left: 20rpx;
  332. }
  333. }
  334. .flex {
  335. display: flex;
  336. justify-content: space-between;
  337. }
  338. }
  339. }
  340. </style>