|
@@ -0,0 +1,385 @@
|
|
|
+<template>
|
|
|
+ <view class="digitShelf-pagesCons">
|
|
|
+ <view class="tab-body">
|
|
|
+ <view>
|
|
|
+ <u-tabs-swiper ref="uTabs" :list="tabList" :offset="[5,40]" bar-width='100' active-color="#1283d4" name="dispName" :current="current" @change="tabsChange" :is-scroll="false"
|
|
|
+ swiperWidth="750"></u-tabs-swiper>
|
|
|
+ </view>
|
|
|
+ <swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
|
|
|
+ <swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;" v-for="(tabs, indexs) in tabList" :key="indexs">
|
|
|
+ <scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
|
|
|
+ <view
|
|
|
+ class="check-order-list"
|
|
|
+ v-for="(item,index) in list"
|
|
|
+ :key="item.id"
|
|
|
+ @click="viewRow(item)"
|
|
|
+ >
|
|
|
+ <view class="check-row align-center justify_between">
|
|
|
+ <view class="orderNo">{{item.tempNo}}</view>
|
|
|
+ <view class="times">{{item.createDate}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="check-row flex align-center">
|
|
|
+ <view class="carImage flex align-center">
|
|
|
+ <u-image :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view class="carModel flex align-center" v-if="item.vehicleNumber" >
|
|
|
+ <view><carNo color="#0055ff" :val="item.vehicleNumber"></carNo></view>
|
|
|
+ <text style="margin-left: 20rpx;" v-if="item.vehicleModel">{{item.vehicleModel.split(' ')[0]}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="carModel flex" v-if="!item.vehicleNumber" >
|
|
|
+ <text>{{item.vehicleModel}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="carVin flex align-center">
|
|
|
+ VIN码:{{item.vin||'暂无'}}
|
|
|
+ <text v-if="item.vin" @click.stop="copyVin(item.vin)">复制</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="check-row">
|
|
|
+ <view class="nums">
|
|
|
+ {{item.totalQty}}件商品
|
|
|
+ </view>
|
|
|
+ <view style="text-align: right;">
|
|
|
+ {{tabList[current]['dispName']}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="padding: 20upx;">
|
|
|
+ <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
|
|
|
+ <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import carNo from '@/components/carNo.vue'
|
|
|
+ import { getShelfTempBillList, shelfGetTotalWaitQty } from '@/api/shelf.js'
|
|
|
+ import { clzConfirm } from '@/libs/tools.js'
|
|
|
+ import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
|
|
|
+ import moment from 'moment'
|
|
|
+ export default {
|
|
|
+ components: {carNo},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ theme:'',
|
|
|
+ status: 'loading',
|
|
|
+ noDataText: '暂无数据',
|
|
|
+ tabList: [
|
|
|
+ {
|
|
|
+ dispName: '全部',
|
|
|
+ typeId: 1,
|
|
|
+ count: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dispName: '待收货',
|
|
|
+ typeId: 2,
|
|
|
+ count: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dispName: '已完结',
|
|
|
+ typeId: 3,
|
|
|
+ count: 0
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ current: 0,
|
|
|
+ swiperCurrent: 0,
|
|
|
+ // 查询条件
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ let _this = this
|
|
|
+ _this.pageInit()
|
|
|
+ _this.theme = getApp().globalData.theme
|
|
|
+ uni.$on('refreshOrder',function(data){
|
|
|
+ _this.list = []
|
|
|
+ _this.status = "loading"
|
|
|
+ _this.pageInit()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ // 复制
|
|
|
+ copyVin(vin){
|
|
|
+ clipboard.setText(vin);
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: 'vin码已复制成功'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ message(title){
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title: title
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pageInit(){
|
|
|
+ this.total = 0
|
|
|
+ this.pageNo = 1
|
|
|
+ this.getRow()
|
|
|
+ },
|
|
|
+ // tabs通知swiper切换
|
|
|
+ tabsChange(index) {
|
|
|
+ this.swiperCurrent = index;
|
|
|
+ },
|
|
|
+ swiperChange(event){
|
|
|
+ console.log(event.detail)
|
|
|
+ this.list = []
|
|
|
+ this.status = "loading"
|
|
|
+ },
|
|
|
+ // swiper-item左右移动,通知tabs的滑块跟随移动
|
|
|
+ transition(e) {
|
|
|
+ let dx = e.detail.dx;
|
|
|
+ this.$refs.uTabs.setDx(dx);
|
|
|
+ },
|
|
|
+ // 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
|
|
|
+ // swiper滑动结束,分别设置tabs和swiper的状态
|
|
|
+ animationfinish(e) {
|
|
|
+ let current = e.detail.current;
|
|
|
+ if(current != this.current){
|
|
|
+ this.$refs.uTabs.setFinishCurrent(current);
|
|
|
+ this.swiperCurrent = current;
|
|
|
+ this.current = current;
|
|
|
+ this.pageInit()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // scroll-view到底部加载更多
|
|
|
+ onreachBottom() {
|
|
|
+ console.log(this.list.length, this.total)
|
|
|
+ if(this.list.length < this.total){
|
|
|
+ this.pageNo += 1
|
|
|
+ this.getRow()
|
|
|
+ }else{
|
|
|
+ this.status = "nomore"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ checkNums (states, i){
|
|
|
+ if(states){
|
|
|
+ let arr = states.split(',')
|
|
|
+ return arr[i]
|
|
|
+ }
|
|
|
+ return 0
|
|
|
+ },
|
|
|
+ // 查询列表
|
|
|
+ getRow (pageNo) {
|
|
|
+ let _this = this
|
|
|
+ if (pageNo) {
|
|
|
+ this.pageNo = pageNo
|
|
|
+ }
|
|
|
+ // 状态条件
|
|
|
+ const state = ['','WAIT','FINISH']
|
|
|
+ let params = {
|
|
|
+ pageNo: this.pageNo,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ billState: state[this.swiperCurrent]
|
|
|
+ }
|
|
|
+ this.status = "loading"
|
|
|
+ getShelfTempBillList(params).then(res => {
|
|
|
+ console.log(res,'++++++++++')
|
|
|
+ if (res.code == 200 || res.status == 204 || res.status == 200) {
|
|
|
+ if(_this.pageNo>1){
|
|
|
+ _this.list = _this.list.concat(res.data.list || [])
|
|
|
+ }else{
|
|
|
+ _this.list = res.data.list || []
|
|
|
+ }
|
|
|
+ _this.total = res.data.count || 0
|
|
|
+ if(this.current == 0){
|
|
|
+ _this.tabList[0].count = _this.total
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ _this.list = []
|
|
|
+ _this.total = 0
|
|
|
+ _this.noDataText = res.message
|
|
|
+ }
|
|
|
+ _this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 详细页
|
|
|
+ viewRow(item){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/digitalShelf/orderDetail?shelfOrderSn="+item.shelfOrderSn
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+ page{
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .digitShelf-pagesCons{
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .tab-body{
|
|
|
+ .check-list{
|
|
|
+ height: calc(100vh - 44px);
|
|
|
+ }
|
|
|
+ .check-order-list{
|
|
|
+ background: #ffffff;
|
|
|
+ padding: 10upx 20upx;
|
|
|
+ margin: 25upx;
|
|
|
+ border-radius: 30upx;
|
|
|
+ box-shadow: 1px 1px 3px #EEEEEE;
|
|
|
+ .check-row{
|
|
|
+ display: flex;
|
|
|
+ padding: 20upx 10upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ &:first-child{
|
|
|
+ color: #666E75;
|
|
|
+ font-size: 24upx;
|
|
|
+ padding-bottom: 10upx;
|
|
|
+ .orderNo{
|
|
|
+ font-size: 30upx;
|
|
|
+ color: #222222;
|
|
|
+ margin-top: -6upx;
|
|
|
+ flex-grow: 1;
|
|
|
+ }
|
|
|
+ .times{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ border-bottom: 2upx solid #f5f5f5;
|
|
|
+ }
|
|
|
+ &:last-child{
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ .nums{
|
|
|
+ font-size: 32upx;
|
|
|
+ color: #033692;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ > view{
|
|
|
+ .carModel{
|
|
|
+ color: #222222;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: normal;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+ }
|
|
|
+ .carVin{
|
|
|
+ color: #666E75;
|
|
|
+ font-size: 24upx;
|
|
|
+ text{
|
|
|
+ background-color: #EBEBEB;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ padding: 0 20rpx;
|
|
|
+ color: #033692;
|
|
|
+ font-size: 20rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .carImage{
|
|
|
+ padding-right: 20rpx;
|
|
|
+ }
|
|
|
+ .action{
|
|
|
+ padding: 0 30rpx;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ margin-left: 25upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ &:after{
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ &:active{
|
|
|
+ opacity: 0.5;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .finish{
|
|
|
+ background-color: #2d8cf0;
|
|
|
+ }
|
|
|
+ .del{
|
|
|
+ color: #666;
|
|
|
+ border:2rpx solid #EDEDED;
|
|
|
+ background: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .search-popup{
|
|
|
+ .search-title{
|
|
|
+ text-align: center;
|
|
|
+ padding: 20upx;
|
|
|
+ color: #333;
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ }
|
|
|
+ .uni-list{
|
|
|
+ padding:10upx 20upx;
|
|
|
+ margin: 0;
|
|
|
+ border-bottom: 1px solid #EEEEEE;
|
|
|
+ .uni-list-cell{
|
|
|
+ border: 0;
|
|
|
+ .uni-list-cell-db{
|
|
|
+ flex: 1;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .uni-input{
|
|
|
+ height: 2.5em;
|
|
|
+ line-height: 2.5em;
|
|
|
+ font-size: 28upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ > view{
|
|
|
+ &:first-child{
|
|
|
+ flex-grow: 1;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ &:last-child{
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .item-icon{
|
|
|
+ margin-left: 10upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .uni-list-btns{
|
|
|
+ display: flex;
|
|
|
+ padding: 50upx 20upx;
|
|
|
+ uni-button{
|
|
|
+ font-size: 28upx;
|
|
|
+ margin: 0 30upx;
|
|
|
+ flex:1;
|
|
|
+ border-radius: 100upx;
|
|
|
+ &:after{
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .checkbox-items{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ .checkbox{
|
|
|
+ width: 24%;
|
|
|
+ background: #F8F8F8;
|
|
|
+ text-align: center;
|
|
|
+ margin: 20upx 0;
|
|
|
+ padding: 10upx 0;
|
|
|
+ border-radius: 50upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ border:1upx solid #eee;
|
|
|
+ }
|
|
|
+ .checked{
|
|
|
+ background: rgba(4, 133, 246, 0.15);
|
|
|
+ border-color: rgba(4, 133, 246, 0.5);
|
|
|
+ color: rgba(4, 133, 246, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|