123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465 |
- <template>
- <view class="app">
- <view id="app-top">
- <view class="app-body">
- <!--关键词搜索-->
- <view class="sreach fx-r fx-bc fx-ac">
- <image class="icon" src="/static/img/tb-seach.png"></image>
- <input type="text" v-model="keyword" placeholder="请输入用户昵称/用户ID" placeholder-style="color: #B3B3B3;" />
- <view class="fx-g1"></view>
- <view class="search-btn" @tap="tapSerach">搜索</view>
- </view>
- </view>
- <view class="app-inner">
- <view class="pannel">
- <view class="status fx-r">
- <view class="people fx-r fx-bc fx-ac" @tap="isShowTime = true" >
- <image src="/static/img/gz_yy.png"></image>
- <view class="label">检索日期:</view>
- <view class="value">
- <uni-datetime-picker
- :border="false"
- type="daterange"
- start="2023-01-01"
- :end="endTime"
- rangeSeparator="至"
- @change="tapDateTime"
- v-model="datetime"
- >
- {{ utils.date('m月d日',utils.strtotime(datetime[0])) }}/
- {{ utils.date('m月d日',utils.strtotime(datetime[1])) }}
- </uni-datetime-picker>
- </view>
- </view>
-
- <view class="fx-g1"></view>
- <view class="search-tm fx-r fx-bc fx-ac" @tap="tapCg">
- <view class="text">{{ gzItem.id == 0 ? '全部场馆' : gzItem.nickname }}</view>
- <u-icon name="arrow-down" class="icon"></u-icon>
- </view>
- </view>
-
- <view class="panel-info fx-r">
- <view class="item">
- <view class="count">{{ total.count || 0 }}</view>
- <view class="label">拆分单数</view>
- </view>
- <view class="line"></view>
- <view class="item">
- <view class="count">{{ total.price || 0 }}</view>
- <view class="label">拆分金额</view>
- </view>
- </view>
-
- </view>
- </view>
- </view>
-
- <scroll-view scroll-y class="scroll" :style="'height: calc(100vh - ' + hFoot + 'px - ' + barheight + 'px);'" @scrolltolower="loadMoreData">
- <view class="sc-body">
- <view class="item" v-for="item in listAr">
- <view class="info fx-r">
- <view class="nickname">{{ item.nickname }}({{ item.auction_name }})</view>
- <view class="fx-r fx-bc" @tap="tapCall(item.mobile)">
- <view class="mobile">{{ item.mobile }}</view>
- <image src="/static/img/call-tel.png" style="width: 15px;height: 15px;margin-left: 5px;"></image>
- </view>
- </view>
-
- <view class="info fx-r">
- <view class="id">ID号:{{ item.uid }}</view>
- <view class="fx-g1"></view>
- <view class="changci">订单编号:{{ item.order_id }}</view>
- </view>
-
- <view class="info fx-r">
- <view class="id">拆分时间:{{ item.time }}</view>
- </view>
-
- <view class="info-list" v-for="item2 in item.orderIds">
- <view class="fx-r">
- <view class="iivi">子订单:{{ item2 }}</view>
- <view class="fx-g1"></view>
- <view class="iivi">价格:<text style="color: red;font-weight: bold;">¥{{ item.price / 2 }}</text></view>
- </view>
- </view>
-
- <view class="infos fx-r">
- <view class="time">订单价格:<text style="color: red;">{{ item.price }}</text></view>
- </view>
-
- </view>
-
- <view v-if="listAr.length > 0">
- <view class="loading fx-r fx-ac fx-bc" v-if="page.isFrite && !page.isFoot">
- <image src="/static/img/xloading.png"></image>
- <text>正在载入更多...</text>
- </view>
- <view class="loading complete" :hidden="!page.isFoot">已加载全部</view>
- </view>
-
- <view v-if="listAr.length == 0 && isFirst">
- <u-empty
- mode="data"
- icon="/static/img/no-empty.png"
- ></u-empty>
- </view>
-
- </view>
- </scroll-view>
-
- <u-popup :show="isPop" @close="isPop = false">
- <scroll-view style="height: 40vh;background: #fff;">
- <view class="pop-info">
- <view class="item ihover" @tap="tapGzItem(item)" v-for="item in gzData">{{ item.nickname }}</view>
- </view>
- </scroll-view>
-
-
- </u-popup>
-
- </view>
- </template>
- <script>
- import dayjs from 'dayjs';
- import {mapState,mapMutations } from 'vuex';
- export default {
- computed: mapState(['user']),
- data() {
- return {
- isFirst:false,
- listAr:[],
- keyword : "",
- id : 0,
- hFoot : 0,
- barheight : 0,
- datetime:["",""],
- total : {},
- isShowTime : false,
- endTime : "",
-
- page:{
- isFirst:false,
- isLoad:false,
- isFoot:false,
- page:1
- },
- isPop : false,
-
- gzData : [],
- gzItem : {
- name :"",
- id : 0
- },
- }
- },
- onLoad(options) {
- this.id = options.id || 0;
- //基本配置
- this.endTime = dayjs().format("YYYY-MM-DD");
- this
- .request
- .get("gzAuction")
- .then(res => {
- if(res.code == 200){
- this.gzData = res.data;
- }
- });
- //基本配置
- this.datetime = [
- dayjs().format("YYYY-MM-01"),
- dayjs().format("YYYY-MM-DD")
- ];
- this.initView();
-
- // #ifdef H5
- this.hFoot = 60;
- // #endif
- },
-
- methods: {
- ...mapMutations(['checkUserLogin']),
- /**
- * 加载基础配置
- */
- initView:function(){
-
- this.$nextTick(() => {
- uni.createSelectorQuery().select("#app-top").boundingClientRect(res=>{
- this.barheight = res.height + 20;
- }).exec();
- });
- this.initData();
- this.getData(true);
-
- },
- initData:function(){
- this.request.post("auctionDisassembleInit",{
- str_time : this.datetime[0],
- end_time : this.datetime[1],
- auActionId : this.gzItem.id
- }).then(res => {
- if(res.code == 200) {
- this.total = res.data;
- }
- });
- },
- /**
- * 获取数据
- */
- getData:function(isPull = false){
- if(this.page.isLoad) return;
- this.page.isLoad = true;
- if(isPull) {
- this.page.page = 1;
- this.page.isLoad = false;
- this.page.isFoot = false;
- }
- uni.showLoading({ title: '获取数据中..' });
- var post = {};
- post.page = this.page.page;
-
- this
- .request
- .post("auctionDisassembleLog",{
- keyword : this.keyword,
- page : this.page.page,
- str_time : this.datetime[0],
- end_time : this.datetime[1],
- auActionId : this.gzItem.id
- })
- .then(res => {
- uni.hideLoading();
- this.page.isFirst = true;
- this.page.isLoad = false;
- this.isFirst = true;
- if(isPull) {
- this.listAr = res.data.list;
- } else {
- this.listAr = this.listAr.concat(res.data.list);
- }
- //是否到底
- if(res.data.list.length != res.data.pageSize) {
- this.page.isFoot = true;
- }
- })
- .catch((res)=>{
- console.log(res);
- uni.hideLoading();
- uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
- });
- },
- //选择场馆
- tapCg:function(){
- this.isPop = true;
- },
-
-
- tapGzItem:function(item){
- this.isPop = false;
- this.gzItem = item;
- this.initData();
- this.getData(true);
- },
- tapSerach:function(){
- this.getData(true);
- this.initData();
- },
- tapDateTime:function(ev){
- this.initData();
- this.getData(true);
- },
- loadMoreData:function() {
- if(this.page.isFoot || this.page.isLoad) {
- return;
- }
- this.page.page ++;
- this.getData();
- },
-
- tapCall:function(tel){
- if(tel == null) {
- this.utils.showAlert({
- title:"系统提示",
- content:"暂无联系方式"
- });
- return;
- }
- const info = uni.getSystemInfoSync();
- if(info.platform == 'android'){
- uni.showModal({
- content: "确认拨打" + tel,
- confirmText: "确定",
- cancelText: "取消",
- success:function(res){
- if(res.confirm){
-
- this.$store.dispatch('permission/requestPermissions', 'CALL_PHONE').then(res => {
- if(res !== 1) return;
- uni.makePhoneCall({
- phoneNumber: tel,
- });
- });
- }
- }
- });
- } else {
- uni.makePhoneCall({
- phoneNumber: tel
- });
- }
- }
- },
- }
- </script>
- <style lang="scss">
- .app-body{
- padding: 0px 20rpx;
- }
- .sreach{
- background: #fff;
- margin:20rpx 0;
- border-radius: 32rpx;
- padding: 16rpx 32rpx;
- .icon{
- width: 46rpx;
- height: 46rpx;
- }
- input{
- width: calc(100% - 46rpx - 16rpx - 50px);
- font-size: 16px;
- }
- .search-btn{
- font-size: 14px;
- color: #FF4C4C;
- }
- }
-
- .sc-body{
- padding: 20rpx;
- .item{
- background: #FFFFFF;
- border-radius: 16rpx;
- padding: 26rpx 44rpx;
- margin-bottom: 10px;
- .info{
- margin-bottom: 10rpx;
- .nickname{
- font-weight: bold;
- font-size: 32rpx;
- color: #303133;
- }
- .mobile{
- font-weight: 500;
- font-size: 30rpx;
- color: #999999;
- margin-left: 10px;
- }
- .id{
- font-weight: 500;
- font-size: 26rpx;
- color: #666666;
- }
- .changci{
- font-weight: 500;
- font-size: 26rpx;
- color: #666666;
- text{
- color: #333333;
- }
- }
-
- }
- .infos{
- margin-top: 10px;
- border-top: 1px solid #f1f1f1;
- padding-top: 6px;
- .time{
- font-size: 14px;
- color: #666;
- }
- }
- }
- }
-
- .info-list{
- padding: 10px 0;
- font-size: 12px;
- border-top: 1px solid #f1f1f1;
- }
- .app-inner{
- padding: 0px 10px;
- }
- .pannel{
- background: #FFFFFF;
- border-radius: 20px;
- padding: 15px;
- margin-top: 10px;
- .panel-info{
- .line{
- width: 1px;
- height: 50px;
- background: #999999;
- opacity: 0.38;
- margin-top: 10px;
- }
- .item{
- width: calc(50% - 1px);
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- padding-top: 20px;
- .label{
- font-weight: 500;
- font-size: 12px;
- color: #787878;
- margin-top: 5px;
- }
- .count{
- font-weight: bold;
- font-size: 19px;
- color: #333333;
- }
- }
-
- }
- .status{
- padding: 10px 0;
- border-bottom: 1px solid #f1f1f1;
- .people{
- image{width: 24rpx;height: 22rpx;margin-right: 10rpx;}
- .label{color: #666666;font-size: 13px;}
- .value{font-size: 13px;color: #000;margin-left: 4px;}
- }
-
- }
-
- }
-
-
- .search-tm{
- height: 40px;
- color: #787878;
- font-size: 14px;
- .icon{
- width: 10px;
- height: 10px;
- margin-left: 5px;
- }
- }
-
- .pop-info{
- .item{
- padding: 20rpx 0;
- text-align: center;
- border-bottom: 1px solid #f1f1f1;
- }
- }
-
-
- </style>
|