index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <view class="page" :style="{'min-height':(h-th)+'px'}">
  3. <u-navbar bgColor="transparent">
  4. <view class="u-nav-slot" slot="left">
  5. <text>{{merchantName}}</text>
  6. </view>
  7. </u-navbar>
  8. <view class="bg" :style="{'padding-top':(mt+10)+'px'}">
  9. <view class="dataBox">
  10. <view class="item">
  11. <view>成交金额</view>
  12. <view>¥<text>{{info.todayOrderAmount||0}}</text></view>
  13. <view>昨日¥{{info.yesterdayOrderAmount||0}}</view>
  14. </view>
  15. <view class="item">
  16. <view>成交订单数</view>
  17. <view>¥<text>{{info.todayOrders||0}}</text></view>
  18. <view>昨日{{info.yesterdayOrders||0}}</view>
  19. </view>
  20. <view class="item">
  21. <view>退款金额</view>
  22. <view>¥<text>{{info.todayRefundAmount||0}}</text></view>
  23. <view>昨日¥{{info.yesterdayRefundAmount||0}}</view>
  24. </view>
  25. <view class="item">
  26. <view>退款订单数</view>
  27. <view>¥<text>{{info.todayRefundOrders||0}}</text></view>
  28. <view>昨日{{info.yesterdayRefundOrders||0}}</view>
  29. </view>
  30. <view class="item">
  31. <view>已购商品数量</view>
  32. <view>¥<text>{{info.todayPurchasedNums||0}}</text></view>
  33. <view>昨日{{info.yesterdayPurchasedNums||0}}</view>
  34. </view>
  35. </view>
  36. <view class="numberData">
  37. <view>
  38. <text>{{info.todayObligationOrders||0}}</text>
  39. <text>待付款</text>
  40. </view>
  41. <view>
  42. <text>{{info.todayPendingOrders||0}}</text>
  43. <text>待使用</text>
  44. </view>
  45. <view>
  46. <text>{{info.todayOrders||0}}</text>
  47. <text>已完成</text>
  48. </view>
  49. <view>
  50. <text>{{info.todayCancelledOrders||0}}</text>
  51. <text>已取消</text>
  52. </view>
  53. <view>
  54. <text>{{info.todayRefundOrders||0}}</text>
  55. <text>退款售后</text>
  56. </view>
  57. </view>
  58. <view class="menus">
  59. <view @click="toHref('/pagesHouse/home/bill')">
  60. <image :src="icons[0]"></image>
  61. <text>交易账单</text>
  62. </view>
  63. <view @click="toHref('/pagesHouse/home/moneyBill')">
  64. <image :src="icons[1]"></image>
  65. <text>资金账单</text>
  66. </view>
  67. <view @click="toHref('/pagesHouse/home/tj')">
  68. <image :src="icons[2]"></image>
  69. <text>数据统计</text>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="list">
  74. <view class="tit">
  75. <text>订单列表</text>
  76. <text>{{new Date().Format('yyyy-MM-dd')}}</text>
  77. <u-icon @click="more()" name="arrow-right" label="查看全部" labelPos="left" labelSize="13px"
  78. labelColor="#808080" color="#AAA"></u-icon>
  79. </view>
  80. <view class="li first">
  81. <text>订单信息</text>
  82. <text>销量</text>
  83. <text>成交金额</text>
  84. </view>
  85. <view class="li" v-for="(item,index) in list" :key="index">
  86. <view class="avatar">
  87. <image :src="item.pic"></image>
  88. <text>{{item.thingName}}</text>
  89. </view>
  90. <text>{{item.num}}</text>
  91. <text>¥{{item.price}}</text>
  92. </view>
  93. </view>
  94. <Tabbares :tabbarid="0"></Tabbares>
  95. </view>
  96. </template>
  97. <script>
  98. export default {
  99. data() {
  100. return {
  101. merchantName:uni.getStorageSync('merchantName'),
  102. emg: 'https://i.ringzle.com/file/20240224/91173dde1cb44b139129e12ad4971f1d.png',
  103. icons: ['https://i.ringzle.com/file/20240224/70ab9f9d1a144c95927dedc6e84bcce7.png',
  104. 'https://i.ringzle.com/file/20240224/3f990c250f444ac9a5d9f334f322c98e.png',
  105. 'https://i.ringzle.com/file/20240224/7ca1bfa6e348438e83edc5af0589f847.png'
  106. ],
  107. info:{},
  108. list:[],
  109. }
  110. },
  111. onLoad(opt){
  112. // if(opt.merchantName ){
  113. // this.merchantName =opt.merchantName ;
  114. // }
  115. this.getData();
  116. this.getList();
  117. },
  118. methods: {
  119. getData() {
  120. this.$api.get('/merchant/merchantFisherman/home/getMerchantFishermanAppHome/'+ uni.getStorageSync('merchantId')).then(res => {
  121. if (res.data.code === 0) {
  122. this.info = res.data.data;
  123. }
  124. })
  125. },
  126. getList(){
  127. this.$api.post('/merchant/merchantFisherman/home/getMerchantFishermanOrderList',{
  128. dateTime:new Date().Format('yyyy-MM-dd'),
  129. dateType:'1',
  130. fishermanId:uni.getStorageSync('merchantId')
  131. }).then(res => {
  132. if (res.data.code === 0) {
  133. this.list = res.data.data;
  134. }
  135. })
  136. },
  137. toHref(url) {
  138. uni.redirectTo({
  139. url: url
  140. })
  141. },
  142. more() {
  143. uni.navigateTo({
  144. url: "/pagesHouse/home/orderList"
  145. })
  146. }
  147. }
  148. }
  149. </script>
  150. <style lang="less" scoped>
  151. .page {
  152. background: #F3F4F4;
  153. padding-bottom: 40rpx;
  154. box-sizing: border-box;
  155. .list {
  156. width: calc(100% - 36rpx);
  157. margin: 20rpx auto;
  158. padding: 0 20rpx 6rpx;
  159. background-color: #fff;
  160. border-radius: 24rpx;
  161. box-sizing: border-box;
  162. .tit {
  163. padding: 40rpx 0;
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. text {
  168. &:first-child {
  169. font-size: 32rpx;
  170. color: #111;
  171. font-weight: bold;
  172. }
  173. &:nth-child(2) {
  174. margin-left: 17rpx;
  175. color: #666666;
  176. width: 100px;
  177. flex: 1;
  178. }
  179. }
  180. }
  181. .li {
  182. display: grid;
  183. grid-template-columns: 60% 20% 20%;
  184. align-items: center;
  185. margin-bottom: 24rpx;
  186. text {
  187. color: #333;
  188. font-size: 26rpx;
  189. }
  190. .avatar {
  191. display: flex;
  192. align-items: center;
  193. image {
  194. width: 90rpx;
  195. min-width: 90rpx;
  196. height: 90rpx;
  197. margin-right: 20rpx;
  198. }
  199. text {
  200. width: 100px;
  201. word-break: break-all;
  202. text-overflow: ellipsis;
  203. display: -webkit-box;
  204. -webkit-box-orient: vertical;
  205. -webkit-line-clamp: 2;
  206. font-size: 24rpx;
  207. line-height: 33rpx;
  208. /* 这里是超出几行省略 */
  209. overflow: hidden;
  210. }
  211. }
  212. &.first {
  213. margin-bottom: 30rpx;
  214. text {
  215. color: #666;
  216. }
  217. }
  218. }
  219. }
  220. .bg {
  221. width: 100%;
  222. height: auto;
  223. padding: 0 18rpx;
  224. background: url(https://i.ringzle.com/file/20240224/343febca7aa149c5aa0ee8c9365b2d3e.png) no-repeat;
  225. background-size: 100% 100%;
  226. box-sizing: border-box;
  227. .menus {
  228. display: flex;
  229. justify-content: space-around;
  230. height: 184rpx;
  231. border-radius: 24rpx;
  232. background-color: #fff;
  233. color: #333;
  234. align-items: center;
  235. &>view {
  236. image {
  237. width: 64rpx;
  238. height: 64rpx;
  239. display: block;
  240. margin: 0 auto 22rpx;
  241. }
  242. text {
  243. font-size: 26rpx;
  244. }
  245. }
  246. }
  247. .numberData {
  248. display: flex;
  249. justify-content: space-around;
  250. height: 150rpx;
  251. border-radius: 24rpx;
  252. background-color: #007A69;
  253. color: #fff;
  254. align-items: center;
  255. margin: 20rpx 0;
  256. &>view {
  257. text {
  258. display: block;
  259. text-align: center;
  260. font-size: 26rpx;
  261. color: #F0F8F6;
  262. &:first-child {
  263. font-size: 36rpx;
  264. color: #fff;
  265. margin-bottom: 20rpx;
  266. }
  267. }
  268. }
  269. }
  270. .dataBox {
  271. padding: ;
  272. display: grid;
  273. /* 宽度平均分成4份 */
  274. grid-template-columns: repeat(3, 1fr);
  275. /* 高度平均分成3份 */
  276. grid-template-rows: repeat(2, 1fr);
  277. gap: 12rpx;
  278. .item {
  279. width: 230rpx;
  280. height: 180rpx;
  281. padding: 24rpx 0 0 18rpx;
  282. border-radius: 16rpx;
  283. background-color: rgba(255, 255, 255, .48);
  284. color: #777;
  285. &>view:nth-child(2) {
  286. color: #111;
  287. text {
  288. font-size: 36rpx;
  289. display: inline-block;
  290. margin: 12rpx 0;
  291. font-weight: bold;
  292. margin-left: -4rpx;
  293. }
  294. }
  295. }
  296. }
  297. }
  298. }
  299. /deep/.u-nav-slot {
  300. &>text {
  301. font-size: 36rpx;
  302. font-family: PingFang SC, PingFang SC;
  303. font-weight: bold;
  304. color: #333;
  305. }
  306. }
  307. </style>