瀏覽代碼

扫描记录

lilei 3 年之前
父節點
當前提交
ef4e7f3195

+ 1 - 1
App.vue

@@ -3,7 +3,7 @@
 		globalData: {
 			baseUrl: 'http://192.168.16.156:9110/saas/clz/', // 本地
 			// baseUrl: 'http://md.test.zyucgj.com/saas/clz/', // 预发布
-			// baseUrl: 'https://wx.chelingzhu.com/clzwx/' // 生产
+			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},
 		onLaunch: function() {
 			console.log('App Launch');

+ 25 - 0
api/car.js

@@ -213,3 +213,28 @@ export const findCustomerCarIsOnly = (params) => {
     method: 'get',
   })
 }
+
+// 扫描记录
+export const scanVinLog = (params) => {
+  return request({
+    url: `scanVinLog/create`,
+    data: params,
+    method: 'post'
+  })
+}
+// 滚动扫描记录
+export const scanVinLogQueryRoll = (params) => {
+  return request({
+    url: `scanVinLog/queryRoll/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+// vin查询记录分页
+export const getScanVinLogList = (params) => {
+  return request({
+    url: `scanVinLog/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}

+ 23 - 9
api/data.js

@@ -21,15 +21,6 @@ export const  getDistrictByCity = params => {
     method: 'get'
   })
 }
-// 根据字典code查询选项
-export const getLookUpDatas = (params) => {
-  return request({
-    url: `lookup/findByLookup/${params.type}`,
-    method: 'get',
-	data:{}
-  }).then(res=>res.data)
-}
-
 
 // 查询用户头像和昵称是否已存在
 export const findWxUserInfo = (params) => {
@@ -47,4 +38,27 @@ export const wxUserUpdate = (params) => {
     method: 'post',
 	data:params
   }).then(res=>res.data)
+}
+
+// 根据字典code查询选项
+export const getLookUpDatas = (params) => {
+  return request({
+    url: `lookup/findByLookup/${params.type}`,
+    method: 'get'
+  }).then(res=>res.data)
+}
+// 根据字典code查询所有数据
+export const getAllLookUpDatas = (params) => {
+  return request({
+    url: `lookup/findAllByLookup/${params.type}`,
+    method: 'get'
+  }).then(res=>res.data)
+}
+// 查询所有数据字典
+export const listLookUp = (params) => {
+  let url = `lookup/findAll`
+  return request({
+    url: url,
+    method: 'post'
+  }).then(res=>res.data)
 }

+ 1 - 1
api/request.js

@@ -18,7 +18,7 @@ function request(options) {
 			'USER-TERM-TYPE': 'ipad', // 支付时需要用到 与pad一致
 			'App-Type': 2,
 			'Version': '',
-			'authorization':'Bearer clz|eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiIxNTA5MTMzMDAwMCIsImF1dGhfdXNlciI6eyJ1c2VyU24iOiIxMDc1OSIsInVzZXJpZCI6IjEwNzU5IiwidXNlcm5hbWUiOiIxNTA5MTMzMDAwMCIsInVzZXJUeXBlIjoiMiIsIm1lcmNoYW50SWQiOiIxMDA0MCIsIm1lcmNoYW50U24iOiIxMDA0MCIsIm9yZ0lkIjoiMTAwMDAiLCJvcmdTbiI6IjEwMDAwIiwib3JnTmFtZSI6Iui9pumihuS4u-aAu-mDqOmXqOW6lyIsIm9yZ1N0YXR1cyI6IjEiLCJvcmdFeHBpcmVEYXRlIjo0MDcwODgwMDAwMDAwLCJvcmdUaGVtZVR5cGUiOiJjaGVsaW5nemh1Iiwicm9vdE9yZ0lkIjoiMTAwMDAiLCJyb290T3JnU24iOiIxMDAwMCIsInJvb3RPcmdOYW1lIjoi6L2m6aKG5Li7Iiwicm9vdE9yZ0V4cGlyZURhdGUiOjQwNzA4ODAwMDAwMDAsInJvb3RPcmdUaGVtZVR5cGUiOiJjaGVsaW5nemh1Iiwicm9vdE9yZ1N0YXR1cyI6IjEiLCJvcmdUeXBlIjoibHMiLCJzY29wZVR5cGUiOiJhbGwiLCJyb290TWVudU1vdWxkSWQiOiIyIiwib3JnTWVudU1vdWxkSWQiOiIyIiwic3VwZXJBZG1pbiI6IjAiLCJ1c2VyTmFtZUNOIjoi5byg5LiJ5LqaIiwibW9iaWxlIjoiMTUwOTEzMzAwMDAiLCJlbWFpbCI6bnVsbCwic2V4IjoiMSIsInBh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fcGFzc3dvcmQiLCJzdGF0dXMiOiIyMDAifQ.f05LtCz1-gb5zBCrhW79-MyQpPLoRvBn8Gay99M7Xcw'
 	}
 	_obj.header = header
 	_obj.header['X-HEADER-APPID'] = 'WuyoKG1AcDZzLwxfhOAC+E16SeG3+mDqVYmsa/e5HRE=';

+ 2 - 1
main.js

@@ -6,7 +6,8 @@ import uView from "uview-ui"
 Vue.use(uView)
 Vue.config.productionTip = false
 
-Vue.prototype.$store = store
+let vuexStore = require("@/store/$u.mixin.js")
+Vue.mixin(vuexStore)
 
 App.mpType = 'app'
 /*

+ 17 - 1
pages/digitalShelf/orderDetail.vue

@@ -96,6 +96,7 @@
 		<view class="footer flex align_center justify_center" v-if="info">
 			<u-button v-if="info.billState != 'CLOSE'&&info.settleState=='WAIT'" :throttle-time="100" @click="deleteRow" shape="circle" type="info">取消订单</u-button>
 			<u-button v-if="info.billState == 'WAIT'" :throttle-time="100" @click="sanCodeRow" :custom-style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">扫码取货</u-button>
+			<u-button v-if="info.billState == 'WAIT'" :throttle-time="100" @click="onceQh()" :loading="loading" :custom-style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">一键取货</u-button>
 		</view>
 	</view>
 </template>
@@ -104,7 +105,7 @@
 	import carNo from '@/components/carNo.vue'
 	import uniIcons from "@/components/uni-icons/uni-icons.vue"
 	import moment from 'moment'
-	import { findBySnShelfOrder, cancelShelfOrder } from '@/api/shelf.js'
+	import { findBySnShelfOrder, cancelShelfOrder, takeGoods } from '@/api/shelf.js'
 	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
 	export default {
 	   name: 'orderDetail-digitalShel',
@@ -114,6 +115,7 @@
 	   },
 	   data() {
 		   return {
+			   loading: false,
 			   info: null,
 			   statusText: '',
 			   statusIcon: '', // 结算状态icon
@@ -154,6 +156,20 @@
 		 		title: title
 		 	})
 		 }, 
+		 // 一键取货
+		 onceQh(item,index){
+		 	 this.loading = true
+		 	 takeGoods({sn:this.shelfOrderSn}).then(res => {
+		 		 if(res.status == 200){
+		 			  uni.navigateBack()
+		 		 }
+		 		 uni.showToast({
+		 			title: res.message,
+		 			icon:"none"
+		 		 })
+		 		 this.loading = false
+		 	 })
+		 },
 		 // 打开扫描取货
 		 sanCodeRow () {
 			 uni.navigateTo({

+ 22 - 3
pages/digitalShelf/orderList.vue

@@ -43,6 +43,7 @@
 									 <view style="text-align: right;">
 										 <button :hover-stop-propagation="true" @click.stop="deleteRow(item,index)" v-if="item.billState != 'CLOSE'&&item.settleState=='WAIT'" class="action del" size="mini">取消订单</button>
 										 <button :hover-stop-propagation="true" @click.stop="sanCodeRow(item)" v-if="item.billState == 'WAIT'" class="action finish" size="mini">扫码取货</button>
+										 <button :hover-stop-propagation="true" @click.stop="onceQh(item,index)" :loading="loading" v-if="item.billState == 'WAIT'" class="action finish" size="mini">一键取货</button>
 									 </view>
 								 </view>
 							 </view>
@@ -59,13 +60,14 @@
 
 <script>
 	import carNo from '@/components/carNo.vue'
-	import { getShelfOrderList, cancelShelfOrder, shelfGetTotalWaitQty } from '@/api/shelf.js'
+	import { getShelfOrderList, cancelShelfOrder, shelfGetTotalWaitQty, takeGoods } from '@/api/shelf.js'
 	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
 	import moment from 'moment'
 	export default {
 		components: {carNo},
 		data() {
 			return {
+				loading: false,
 				theme:'',
 				status: 'loading',
 				noDataText: '暂无数据',
@@ -241,6 +243,23 @@
 			     	url:"/pages/digitalShelf/scanBarcode/scanBarcode?shelfOrderSn="+item.shelfOrderSn
 			     })
 		    },
+			// 一键取货
+			onceQh(item,index){
+				 this.loading = true
+				 takeGoods({sn:item.shelfOrderSn}).then(res => {
+					 if(res.status == 200){
+						 this.list.splice(index,1)
+						 if(this.current == 0){
+						 	this.tabList[0].count = this.tabList[0].count - 1
+						 }
+					 }
+					 uni.showToast({
+						title: res.message,
+						icon:"none"
+					 })
+					 this.loading = false
+				 })
+			},
 		}
 	}
 </script>
@@ -286,7 +305,7 @@
 						align-items: center;
 						justify-content: space-between;
 						.nums{
-							font-size: 32upx;
+							font-size: 28upx;
 							color: #033692;
 						}
 					}
@@ -321,7 +340,7 @@
 						padding: 0 30rpx;
 						color: #fff;
 						border-radius: 100rpx;
-						margin-left: 25upx;
+						margin-left: 15upx;
 						font-size: 24upx;
 						&:after{
 							border: 0;

+ 2 - 10
pages/digitalShelf/scanBarcode/scanBarcode.vue

@@ -43,11 +43,11 @@
 			</view>
 		</view>
 		<view class="footer flex align_center justify_center" v-if="info">
-			<u-button v-if="!hasScanFinish" :throttle-time="100" @click="scanCode" :custom-style="{ background: '#1283d4', color: '#fff' }" shape="circle" type="info">
+			<u-button v-if="!hasScanFinish" :throttle-time="100" @click="scanCode" :custom-style="{ background: '#1283d4', color: '#fff',width:'400rpx' }" shape="circle" type="info">
 				<u-icon name="scan" color="#fff" size="32"></u-icon>
 				点击扫码
 			</u-button>
-			<u-button v-else :throttle-time="100" @click="outShelfOrder" :custom-style="{ background: '#1283d4', color: '#fff' }" shape="circle" type="info">
+			<u-button v-else :throttle-time="100" @click="outShelfOrder" :custom-style="{ background: '#1283d4', color: '#fff',width:'400rpx' }" shape="circle" type="info">
 				确认取货
 			</u-button>
 		</view>
@@ -312,14 +312,6 @@ page {
 	.footer {
 		padding: 20upx 40upx;
 		background: #ffffff;
-		uni-button {
-			&:after {
-				border: 0;
-			}
-			width: 90%;
-			color: #585858;
-			font-size: 32rpx;
-		}
 	}
 }
 </style>

+ 3 - 8
pages/digitalShelf/settlementManage/settlementSxDetail.vue

@@ -11,7 +11,7 @@
 			<view class="sxjs-head-grid flex align-center justify_between">
 				<view :class="tabIndex==0?'active':''" @click="tabChange(0)">
 					<view>待结算</view>
-					<view class="edu">¥<text>{{info.waitSettleAmount}}</text></view>
+					<view class="edu">¥<text>{{info?info.waitSettleAmount:0}}</text></view>
 					<view class="line"></view>
 				</view>
 				<view :class="tabIndex==1?'active':''" @click="tabChange(1)">
@@ -50,7 +50,7 @@
 				 </view>
 			</scroll-view>
 		</view>
-		<view class="footer" v-if="tabIndex==0&&info.waitSettleAmount>0">
+		<view class="footer" v-if="tabIndex==0&&info&&info.waitSettleAmount>0">
 			<u-button @click="toPay" :throttle-time="100" :custom-style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">
 				立即支付(¥{{info.waitSettleAmount}})
 			</u-button>
@@ -80,10 +80,7 @@
 		onReady() {
 		},
 		onLoad(option) {
-			console.log(decodeURIComponent(option.data.replace(/%/g, '%25')))
-			// this.info =  JSON.parse(decodeURIComponent(option.data.replace(/%/g, '%25')))
 			this.getDetail()
-			this.getwaitSettleForSx()
 		},
 		methods: {
 			// 查询详情
@@ -92,15 +89,13 @@
 					console.log(res)
 					if(res.status == 200){
 						this.info = res.data
+						this.getwaitSettleForSx()
 					}
 				})
 			},
 			// 去支付
 			toPay(){
 				this.info.shelfOrderSnList = this.shelfOrderSnList
-				uni.navigateTo({
-					url:'/pages/pay/settlementPay/settlementPay?data='+encodeURIComponent(JSON.stringify(this.info))
-				})
 			},
 			waitSettleAmount() {
 				let ret = 0

+ 2 - 2
pages/digitalShelf/settlementRecord/settlementDetail.vue

@@ -50,9 +50,9 @@
 					 		</view>
 					 	</view>
 					 </view>
-					 <u-empty :src="`/static/def_imgs.png`" icon-size="240" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
 					 <view style="padding: 20upx;">
-					 	<u-loadmore load-text="正在加载..." v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+						<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>
 			</view>

+ 1 - 0
pages/digitalShelf/settlementRecord/settlementRecord.vue

@@ -40,6 +40,7 @@
 		methods: {
 			filterpayType(val) {
 				let dataList = this.$store.state.vuex_paymentTypeList;
+				console.log(dataList)
 				let _value = '';
 				for (let i = 0; i < dataList.length; i++) {
 					if (val == dataList[i].code) {

+ 2 - 75
pages/digitalShelf/tempOrderList/tempOrderList.vue

@@ -254,7 +254,7 @@
 						align-items: center;
 						justify-content: space-between;
 						.nums{
-							font-size: 32upx;
+							font-size: 28upx;
 							color: #033692;
 						}
 					}
@@ -289,7 +289,7 @@
 						padding: 0 30rpx;
 						color: #fff;
 						border-radius: 100rpx;
-						margin-left: 25upx;
+						margin-left: 15upx;
 						font-size: 24upx;
 						&:after{
 							border: 0;
@@ -311,77 +311,4 @@
 			}
 		}
 	}
-    
-	.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>

+ 52 - 23
pages/index/index.vue

@@ -48,11 +48,15 @@
 		<!-- 扫描记录 -->
 		<view class="list-box">
 			<u-cell-group :border="false">
-				<u-cell-item v-for="item in 10" title="LBVNU79049SB81489" :title-style="{fontSize:'1em'}" value="宝马 54646d">
+				<u-cell-item v-for="item in vinList" :key="item.id" :title="item.vinCode" :title-style="{fontSize:'1em'}" :value="item.brandName +' '+item.modelName">
 					<text slot="icon"></text>
 				</u-cell-item>
+				<view style="padding: 20upx;">
+					<u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="vinList.length==0 && status!='loading'" mode="list"></u-empty>
+					<u-loadmore v-if="status=='loading'" :status="status" />
+				</view>
 			</u-cell-group>
-			<view class="des">仅展示最近10条记录,点击“全部”查看更多</view>
+			<view class="des" v-if="vinList.length">仅展示最近10条记录,点击“全部”查看更多</view>
 		</view>
 	</view>
 </template>
@@ -64,33 +68,19 @@
 	} from 'vuex'
 	import scrollBox from '@/components/scrollBox.vue'
 	import { shelfBondRecordWaitPayRecord, findStoreShelf } from '@/api/shelf.js'
+	import { listLookUp, getLookUpDatas } from '@/api/data.js';
+	import { scanVinLogQueryRoll, getScanVinLogList }from '@/api/car.js'
 	export default {
 		components: {
 			scrollBox
 		},
 		data() {
 			return {
+				status: 'loading',
+				noDataText: '暂无数据',
 				bondRecord: null, // 保证金
-				list:[
-				{
-					userName: '一部'
-				},
-				{
-					userName: '夏利我'
-				},
-				{
-					userName: '离散'
-				},
-				{
-					userName: '网络'
-				},
-				{
-					userName: '撒打发'
-				},
-				{
-					userName: 'ipho23'
-				}
-			]
+				list:[],
+				vinList: []
 			}
 		},
 		computed: {
@@ -101,8 +91,47 @@
 		},
 		onLoad() {
 			this.getStoreShelf()
+			// 获取数据字典
+			this.getListLookUp();
+			// 获取支付,收款方式
+			this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
+		},
+		onShow() {
+			// 获取扫描记录
+			this.getScrollLog()
+			this.getVinLog()
 		},
 		methods: {
+			//  获取数据字典
+			getListLookUp() {
+				const _this = this;
+				listLookUp({ pageNo: 1, pageSize: 1000 }).then(res => {
+					if (res.status == 200) {
+						_this.$store.state.vuex_allLookUp = res.data;
+					}
+				});
+			},
+			// 或某一项字典列表,参数code
+			getLookUpList(code, vuexKey) {
+				getLookUpDatas({ type: code }).then(res => {
+					if (res.status == 200) {
+						this.$store.state[vuexKey] = res.data || [];
+					}
+				});
+			},
+			getScrollLog(){
+				scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
+					this.list = res.data.list || []
+				})
+			},
+			getVinLog(){
+				this.status = "loading"
+				getScanVinLogList({pageNo:1,pageSize:10}).then(res => {
+					this.vinList = res.data.list || []
+					this.vinList = this.vinList.filter(item => item.vinCode)
+					this.status = 'nomore'
+				})
+			},
 			// 查询是否支持数字货架
 			getStoreShelf(){
 				findStoreShelf().then(res => {
@@ -171,7 +200,6 @@
 			 }
 		}
 		.body-box{
-			flex-grow: 1;
 			padding: 0.5em 1em;
 			.notices{
 				padding: 0.5em 0 0;
@@ -224,6 +252,7 @@
 			}
 		}
 		.list-box{
+			flex-grow: 1;
 			padding: 0 1em;
 			overflow: auto;
 			.des{

+ 26 - 6
pages/vinInput/confirmVin.vue

@@ -15,7 +15,7 @@
 			<u-input v-model="verifyCode" :custom-style="{fontSize:'40rpx'}" type="text" height="90" :maxlength='17' input-align="center" placeholder="请输入VIN" :border="true" />
 		</view>
 		<view class="confirm-button">
-			<u-button @click="submitForm" :custom-style="{background:'#1283d4'}" type="primary" shape="circle">确认</u-button>
+			<u-button @click="submitForm" :loading="loading" :custom-style="{background:'#1283d4'}" type="primary" shape="circle">确认</u-button>
 		</view>
 		<view class="share-list flex align_center">
 			<view @click="toScan">
@@ -37,10 +37,11 @@
 </template>
 
 <script>
-	import { getVehicleInfoByVin } from '@/api/car.js'
+	import { getVehicleInfoByVin, scanVinLog } from '@/api/car.js'
 	export default {
 		data() {
 			return {
+				loading: false,
 				verifyCode: '',
 				vinImg: ''
 			}
@@ -84,20 +85,38 @@
 					})
 				}
 			},
-			// confirm(code){
-			// 	this.verifyCode = code
-			// },
+			// 创建扫描记录
+			creatRecord(data){
+				scanVinLog({
+					vinCode: this.verifyCode.toUpperCase(),
+					brandName: data.brand_name,
+					brandId: data.brand_id,
+					modelName: data.model_name,
+					modelId:data.model_id,
+					modelInfo: data.text,
+					seriesId:data.series_id,
+					seriesName:data.series_name,
+					subId:data.sub_id,
+					subName:data.sub_name,
+					icon: data.icon,
+					year: data.year
+				}).then(res => {
+					console.log(res)
+				})
+			},
 			// 提交并匹配车型
 			submitForm(){
 				const _this = this
 				const vinNo = this.verifyCode.toUpperCase()
 				console.log(vinNo, 'vinvinvinvinvin')
 				if(vinNo.length>=17){
+					this.loading = true
 					getVehicleInfoByVin({
 						vin:vinNo
 					}).then(res => {
-						console.log(res, 'vinvinvinvinvin')
 						if (res.status == 200&&res.data) {
+							// 生成vin记录
+							_this.creatRecord(res.data)
 							// 打开选择配件页面
 							uni.redirectTo({
 								url: "/pages/digitalShelf/choosePart?vinNumber="+vinNo+"&carList="+encodeURIComponent(JSON.stringify(res.data))
@@ -110,6 +129,7 @@
 								confirmText: '知道了'
 							})
 						}
+						this.loading = false
 					})
 				}else{
 					uni.showToast({

+ 87 - 16
pages/vinRecord/vinRecord.vue

@@ -1,32 +1,97 @@
 <template>
-	<view class="vinRecord">
+	<view class="vinRecord flex flex_column">
 		<view class="des">仅可查看最近7天的VIN查询记录</view>
-		<view class="list-box">
-			<view class="list-item flex align_center justify_between" v-for="item in 35">
-				<view>
-					<u-image shape="circle" src="@/static/share1.jpg" width='90' height="90"></u-image>
-				</view>
-				<view>
-					<view class="flex align_center justify_between">
-						<text class="vin-text">LFV2A21K0G4053021</text>
-						<text class="time-text">2022-05-21 15:23:33</text>
+		<swiper class="list-box">
+			<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;">
+				<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+					<view class="list-item flex align_center justify_between" v-for="item in list" :key="item.id">
+						<view>
+							<u-image shape="circle" :src="item.icon||'@/static/def_imgs.png'" width='90' height="90"></u-image>
+						</view>
+						<view>
+							<view class="flex align_center justify_between">
+								<text class="vin-text">{{item.vinCode}}</text>
+								<text class="time-text">{{item.createDate}}</text>
+							</view>
+							<view>{{item.modelInfo}}</view>
+						</view>
 					</view>
-					<view>马自达 CX-5(KE 2012-2017) 2.0L | 手自一体 2014款 都市型</view>
-				</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>
 </template>
 
 <script>
+	import { getScanVinLogList }from '@/api/car.js'
+	import moment from 'moment'
 	export default {
 		data() {
 			return {
-				
+				status: 'loading',
+				noDataText: '暂无数据',
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
 			}
 		},
+		onLoad() {
+			this.pageInit()
+		},
 		methods: {
-			
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  // 状态条件
+			  const state = ['WAIT','FINISH','CLOSE']
+			  let params = {
+				beginDate: moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00'),
+				endDate: moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59'),
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				billState: state[this.swiperCurrent]
+			  }
+			  this.status = "loading"
+			  getScanVinLogList(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  const retList = res.data.list.filter(item => item.vinCode)
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(retList || [])
+				  }else{
+					  _this.list = retList || []
+				  }
+				  _this.total = res.data.count || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
 		}
 	}
 </script>
@@ -34,6 +99,7 @@
 <style lang="less">
 .vinRecord{
 	width: 100%;
+	height: 100vh;
 	background: #f8f8f8;
 	.des{
 		text-align: center;
@@ -41,6 +107,10 @@
 		font-size: 12px;
 		padding: 20rpx 15rpx;
 	}
+	.list-box{
+		flex-grow: 1;
+		overflow: auto;
+	}
 	.list-item{
 		margin: 20rpx 30rpx;
 		border:2rpx solid #f8f8f8;
@@ -51,6 +121,7 @@
 		> view{
 			padding: 0 10rpx;
 			&:last-child{
+				flex-grow: 1;
 				>view{
 					padding: 10rpx 0;
 				}

+ 27 - 0
store/$u.mixin.js

@@ -0,0 +1,27 @@
+import { mapState } from 'vuex'
+import store from "@/store"
+
+// 尝试将用户在根目录中的store/index.js的vuex的state变量,全部加载到全局变量中
+let $uStoreKey = [];
+try{
+	$uStoreKey = store.state ? Object.keys(store.state) : [];
+}catch(e){
+	
+}
+
+module.exports = {
+	created() {
+		// 将vuex方法挂在到$u中
+		// 使用方法为:如果要修改vuex的state中的user.name变量为"史诗" => this.$u.vuex('user.name', '史诗')
+		// 如果要修改vuex的state的version变量为1.0.1 => this.$u.vuex('version', '1.0.1')
+		this.$u.vuex = (name, value) => {
+			this.$store.commit('$uStore', {
+				name,value
+			})
+		}
+	},
+	computed: {
+		// 将vuex的state中的所有变量,解构到全局混入的mixin中
+		...mapState($uStoreKey)
+	}
+}

+ 2 - 0
store/index.js

@@ -47,6 +47,8 @@ const store = new Vuex.Store({
 		vuex_settleRecordDetail: null, // 结算记录详情
 		vuex_settleOrderDetail: null, // 结算记录订单详情
 		vuex_shelfChoosePart: [], // 数字货架临配选择配件
+		vuex_allLookUp: [],  //  数据字典
+		vuex_paymentTypeList: [], // 支付方式
     },
 	getters:{
 		getOpeid(state){