index.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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 @click="toHref('/pagesHouse/Mine/ordersList/index?type=0')">
  38. <text>{{info.todayObligationOrders||0}}</text>
  39. <text>待付款</text>
  40. </view>
  41. <view @click="toHref('/pagesHouse/Mine/ordersList/index?type=4')">
  42. <text>{{info.todayPendingOrders||0}}</text>
  43. <text>待使用</text>
  44. </view>
  45. <view @click="toHref('/pagesHouse/Mine/ordersList/index?type=3')">
  46. <text>{{info.todayOrders||0}}</text>
  47. <text>已完成</text>
  48. </view>
  49. <view @click="toHref('/pagesHouse/Mine/ordersList/index?type=-1')">
  50. <text>{{info.todayCancelledOrders||0}}</text>
  51. <text>已取消</text>
  52. </view>
  53. <view @click="toHref('/pagesHouse/Mine/ordersList/index?type=-3')">
  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. width:100%;
  156. overflow-x:hidden;
  157. .list {
  158. width: calc(100% - 36rpx);
  159. margin: 20rpx auto;
  160. padding: 0 20rpx 6rpx;
  161. background-color: #fff;
  162. border-radius: 24rpx;
  163. box-sizing: border-box;
  164. .tit {
  165. padding: 40rpx 0;
  166. display: flex;
  167. justify-content: space-between;
  168. align-items: center;
  169. text {
  170. &:first-child {
  171. font-size: 32rpx;
  172. color: #111;
  173. font-weight: bold;
  174. }
  175. &:nth-child(2) {
  176. margin-left: 17rpx;
  177. color: #666666;
  178. width: 100px;
  179. flex: 1;
  180. }
  181. }
  182. }
  183. .li {
  184. display: grid;
  185. grid-template-columns: 60% 20% 20%;
  186. align-items: center;
  187. margin-bottom: 24rpx;
  188. text {
  189. color: #333;
  190. font-size: 26rpx;
  191. }
  192. .avatar {
  193. display: flex;
  194. align-items: center;
  195. image {
  196. width: 90rpx;
  197. min-width: 90rpx;
  198. height: 90rpx;
  199. margin-right: 20rpx;
  200. }
  201. text {
  202. width: 100px;
  203. word-break: break-all;
  204. text-overflow: ellipsis;
  205. display: -webkit-box;
  206. -webkit-box-orient: vertical;
  207. -webkit-line-clamp: 2;
  208. font-size: 24rpx;
  209. line-height: 33rpx;
  210. /* 这里是超出几行省略 */
  211. overflow: hidden;
  212. }
  213. }
  214. &.first {
  215. margin-bottom: 30rpx;
  216. text {
  217. color: #666;
  218. }
  219. }
  220. }
  221. }
  222. .bg {
  223. width: 100%;
  224. height: auto;
  225. padding: 0 18rpx;
  226. background: url(https://i.ringzle.com/file/20240224/343febca7aa149c5aa0ee8c9365b2d3e.png) no-repeat;
  227. background-size: 100% 100%;
  228. box-sizing: border-box;
  229. .menus {
  230. display: flex;
  231. justify-content: space-around;
  232. height: 184rpx;
  233. border-radius: 24rpx;
  234. background-color: #fff;
  235. color: #333;
  236. align-items: center;
  237. &>view {
  238. image {
  239. width: 64rpx;
  240. height: 64rpx;
  241. display: block;
  242. margin: 0 auto 22rpx;
  243. }
  244. text {
  245. font-size: 26rpx;
  246. }
  247. }
  248. }
  249. .numberData {
  250. display: flex;
  251. justify-content: space-around;
  252. height: 150rpx;
  253. border-radius: 24rpx;
  254. background-color: #007A69;
  255. color: #fff;
  256. align-items: center;
  257. margin: 20rpx 0;
  258. &>view {
  259. text {
  260. display: block;
  261. text-align: center;
  262. font-size: 26rpx;
  263. color: #F0F8F6;
  264. &:first-child {
  265. font-size: 36rpx;
  266. color: #fff;
  267. margin-bottom: 20rpx;
  268. }
  269. }
  270. }
  271. }
  272. .dataBox {
  273. padding: ;
  274. display: grid;
  275. /* 宽度平均分成4份 */
  276. grid-template-columns: repeat(3, 1fr);
  277. /* 高度平均分成3份 */
  278. grid-template-rows: repeat(2, 1fr);
  279. gap: 12rpx;
  280. .item {
  281. width: 230rpx;
  282. height: 180rpx;
  283. padding: 24rpx 0 0 18rpx;
  284. border-radius: 16rpx;
  285. background-color: rgba(255, 255, 255, .48);
  286. color: #777;
  287. &>view:nth-child(2) {
  288. color: #111;
  289. text {
  290. font-size: 36rpx;
  291. display: inline-block;
  292. margin: 12rpx 0;
  293. font-weight: bold;
  294. margin-left: -4rpx;
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. /deep/.u-nav-slot {
  302. &>text {
  303. font-size: 36rpx;
  304. font-family: PingFang SC, PingFang SC;
  305. font-weight: bold;
  306. color: #333;
  307. }
  308. }
  309. </style>