Explorar el Código

数字货架页面

lilei hace 3 años
padre
commit
150f5e03e9

+ 190 - 0
api/shelf.js

@@ -0,0 +1,190 @@
+import axios from '@/libs/axios.js'
+
+// 查詢門店是否支持数字货架
+export const findStoreShelf = (params) => {
+  return axios.request({
+    url: `shelf/findStoreShelf`,
+    method: 'get'
+  })
+}
+// vin 查询 车型code
+export const queryPartCodeByVin = (params) => {
+  return axios.request({
+    url: `vinPart/queryPartCodeByVin/${params.vinNumber}`,
+    method: 'get'
+  })
+}
+//数字货架适配vin不分页
+export const getShelfQueryList = (params) => {
+  return axios.request({
+    url: `shelfProduct/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+//数字货架产品分页
+export const getShelfProductList = (params) => {
+  return axios.request({
+    url: `shelfProduct/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+//数字货架产品类型查询
+export const getShelfProductType = (params) => {
+  return axios.request({
+    url: `shelfProductType/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+// 数字货架订单分页查询
+export const getShelfOrderList = (params) => {
+  return axios.request({
+    url: `shelfOrder/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 保存数字货架订单
+export const saveShelfOrder = (params) => {
+  return axios.request({
+    url: `shelfOrder/save`,
+    data: params,
+    method: 'post'
+  })
+}
+// 关闭订单
+export const cancelShelfOrder = (params) => {
+  return axios.request({
+    url: `shelfOrder/cancel/${params.sn}`,
+    method: 'get'
+  })
+}
+// 数字货架取货单详情
+export const findBySnShelfOrder = (params) => {
+  return axios.request({
+    url: `shelfOrder/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+// 确认取货
+export const outShelfOrder = (params) => {
+  return axios.request({
+    url: `shelfOrder/out/${params.sn}`,
+    method: 'get'
+  })
+}
+// 扫码确认
+export const scanConfirmShelfOrder = (params) => {
+  return axios.request({
+    url: `shelfOrder/scanConfirm`,
+	data: params,
+    method: 'post'
+  })
+}
+// 待结算列表-按月结算
+export const waitSettleForMonth = (params) => {
+  return axios.request({
+    url: `shelfOrder/waitSettleForMonth`,
+    method: 'get'
+  })
+}
+// 待结算列表-授信结算
+export const waitSettleForSx = (params) => {
+  return axios.request({
+    url: `shelfOrder/waitSettleForSx/${params.shelfOrderState}`,
+    method: 'get'
+  })
+}
+
+// 数字货架结算单分页查询
+export const getShelfSettleBillList = (params) => {
+  return axios.request({
+    url: `shelfSettleBill/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 结算是否支付成功
+export const shelfSettleBillPaySuccess = (params) => {
+  return axios.request({
+    url: `shelfSettleBill/isPay/${params.orderNo}`,
+    method: 'get'
+  })
+}
+// 数字货架结算单去支付
+export const shelfSettleBillToPay = (params) => {
+  return axios.request({
+    url: `shelfSettleBill/toPay`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 保证金是否支付成功
+export const shelfBondRecordPaySuccess = (params) => {
+  return axios.request({
+    url: `shelfBondRecord/isPay/${params.orderNo}`,
+    method: 'get'
+  })
+}
+
+//保证金去支付
+export const shelfBondRecordToPay = (params) => {
+  return axios.request({
+    url: `shelfBondRecord/toPay`,
+	data: params,
+    method: 'post'
+  })
+}
+// 待支付保证金
+export const shelfBondRecordWaitPayRecord = (params) => {
+  return axios.request({
+    url: `shelfBondRecord/waitPayRecord`,
+    data: params,
+    method: 'post'
+  })
+}
+// 查詢門店数字数字货架
+export const findStoreShelfSettleRule = (params) => {
+  return axios.request({
+    url: `shelf/settleRule/findStoreShelfSettleRule`,
+    method: 'get'
+  })
+}
+
+// 补货入库列表
+export const getShelfReplenishBilllList = (params) => {
+  return axios.request({
+    url: `shelfReplenishBill/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 补货入库详情
+export const findShelfReplenishBill = (params) => {
+  return axios.request({
+    url: `shelfReplenishBill/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+
+// 临时补货保存
+export const shelfTemporarySave = (params) => {
+  return axios.request({
+    url: `shelfTemporaryDispatching/save`,
+	data: params,
+    method: 'post'
+  })
+}
+
+// 取货列表数量合计
+export const shelfGetTotalWaitQty = (params) => {
+  return axios.request({
+    url: `shelfOrder/getTotalWaitQty`,
+	data: params,
+    method: 'post'
+  })
+}

+ 49 - 0
js_sdk/dc-clipboard/clipboard.js

@@ -0,0 +1,49 @@
+
+/**
+ * 设置粘贴板数据
+ * @param {String} text 要设置的字符串
+ * 如果未设置参数,则清空数据
+ */
+function setClipboardText(text){
+	try{
+	var os = plus.os.name;
+	text = text||'';
+	if('iOS' == os){
+		// var UIPasteboard  = plus.ios.importClass('UIPasteboard');  
+		// var pasteboard = UIPasteboard.generalPasteboard();  
+		// pasteboard.setValueforPasteboardType(text, 'public.utf8-plain-text');
+		var pasteboard = plus.ios.invoke('UIPasteboard', 'generalPasteboard');
+		plus.ios.invoke(pasteboard, 'setValue:forPasteboardType:', text, 'public.utf8-plain-text');
+	}else{
+		var main = plus.android.runtimeMainActivity();
+		// var Context = plus.android.importClass('android.content.Context');
+		// var clip = main.getSystemService(Context.CLIPBOARD_SERVICE);
+		var clip = main.getSystemService('clipboard');
+		plus.android.invoke(clip, 'setText', text);
+	}
+	}catch(e){
+		console.error('error @setClipboardText!!');
+	}
+}
+
+function getClipboardText(){
+	try{
+	var os = plus.os.name;
+	if('iOS' == os){
+		var pasteboard = plus.ios.invoke('UIPasteboard', 'generalPasteboard');
+		return plus.ios.invoke(pasteboard, 'valueForPasteboardType:', 'public.utf8-plain-text')
+	}else{
+		var main = plus.android.runtimeMainActivity();
+		var clip = main.getSystemService('clipboard');
+		return plus.android.invoke(clip, 'getText');
+	}
+	}catch(e){
+		console.error('error @getClipboardText!!');
+	}
+}
+
+
+module.exports = {
+	setText: setClipboardText,
+	getText: getClipboardText
+}

+ 179 - 1
pages.json

@@ -112,7 +112,185 @@
                 "enablePullDownRefresh": false
             }
             
-        }
+        },
+		{
+		    "path" : "pages/digitalShelf/choosePart",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "选择配件",
+		        "enablePullDownRefresh": false,
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue6b5 联系汽配商" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"width":"130px",
+								"color":"#00aaff"
+							}
+						]
+					}
+				}
+		    }
+		}
+		,{
+		    "path" : "pages/digitalShelf/orderList",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "扫码取货",
+		        "enablePullDownRefresh": false
+		    }
+		}
+		,{
+		    "path" : "pages/digitalShelf/orderDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "取货单详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/choosePartResult",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/stockPut",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "补货记录",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/stockPutDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "补货单详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/settlementManage/settlementManage",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "结算管理",
+		        "enablePullDownRefresh": false,
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue6d0 结算记录" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"width":"100px",
+								"color":"#FFFFFF"
+							}
+						]
+					}
+				}
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/settlementManage/settlementSxDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "已用额度详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/settlementManage/settlementAyDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "待结算详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/settlementRecord/settlementRecord",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "结算记录",
+		        "enablePullDownRefresh": false,
+				"titleView":false,
+				// 将回弹属性关掉
+				"bounce":"none"
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/settlementRecord/settlementDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "结算详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/settlementRecord/orderPartDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "订单详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/scanBarcode/scanBarcode",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "扫码取货",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/temproaryStockIn/temproaryStockIn",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "我要临配",
+		        "enablePullDownRefresh": false,
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue6b5 联系汽配商" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"width":"130px",
+								"color":"#00aaff"
+							}
+						]
+					}
+				}
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/digitalShelf/temproaryStockIn/moreShelfProduct",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "更多配件",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 734 - 0
pages/digitalShelf/choosePart.vue

@@ -0,0 +1,734 @@
+<template>
+	<view class="flex flex_column choosePartByVin">
+		<!-- 头部车辆信息 -->
+		<div class="flex align-center cpb_header" v-if="carInfo">
+			<div>
+				<u-image border-radius="30" :src="carInfo.icon" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+			</div>
+			<div>
+				<div class="flex align-center">
+					<div class="carTits ellipsis-two">{{modelLabel}}</div>
+					<!-- <div class="qhbtns flex align-center" v-if="carList.length>1" @click="openSelCarModel">
+						<u-image width="32" height="32" :src="`/static/${theme}/qiehuan.png`"></u-image> 切换车型
+					</div> -->
+				</div>
+				<div class="flex align-center">
+					<div>VIN码:{{vinNumber}}</div>
+					<div class="copyText" @click="copyVin"><span>复制</span></div>
+				</div>
+			</div>
+		</div>
+		<!-- 配件列表 -->
+		<div class="cpb_middle flex">
+			<div class="slider-bar">
+				<div class="tabs">
+					<view :class="[curLeve2 == 'all' ? 'active' : '']" @click="selLeve2('all')">
+						全部
+					</view>
+					<view :class="[curLeve2 == item.id ? 'active' : '']" v-for="(item, index) in leve2Data" :key="index" @click="selLeve2(item.id)">
+						{{item.label}}
+					</view>
+				</div>
+			</div>
+			<div class="right-list">
+				<scroll-view
+				class="right-list-content" 
+				scroll-y 
+				@scrolltolower="onreachBottom">
+					<!-- vin适配配件 -->
+					<view>
+						<view class="nav-right-title">适配推荐</view>
+						 <view class="nav-right-item flex" v-for="(item, index) in vinPartList" :key="item.productSn">
+						 	<view class="uni-col-2">
+						 		<u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+						 	</view>
+						 	<view class="item-info uni-col-10">
+						 		<view class="item-name">
+						 			<text>{{item.name}}</text>
+						 		</view>
+						 		<view class="item-detail">
+						 			<view class="item-detail-info">
+						 				<view class="flex justify_between">
+						 					<text class="item-detail-text flex_1">{{item.code}}</text>
+						 					<text class="item-detail-text" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
+						 				</view>
+						 				<view class="flex justify_between">
+						 					<view class="item-detail-text flex_1">
+						 						<text class="item-price">¥{{item.price||0}}</text>
+						 					</view>
+						 					<view class="item-detail-text" v-if="item.currentInven">
+						 						<u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx'}" type="primary" size="mini">
+						 							<u-icon name="plus" color="#fff" size="28"></u-icon>
+						 						</u-button>
+						 						<u-number-box v-else @change="updateNums" v-model="item.qty" :index="item.productSn" :min="0" :max="item.currentInven"></u-number-box>
+						 					</view>
+						 					<view class="item-detail-text" v-if="item.affiliation=='SUPER_CATALOGUE'||!item.currentInven">
+						 						<text @click="toRuku(item)" class="phtxt">我要临配</text>
+						 					</view>
+						 				</view>
+						 			</view>
+						 			<view class="nav-right-item-btns flex align_center justify_between">
+						 				<view>
+						 				</view>
+						 			</view>
+						 		</view>
+						 	</view>
+						 </view>
+						 <view v-if="vinPartList&&vinPartList.length==0">
+						 	<u-empty v-if="status!='loading'" :src="`/static/nodata.png`" icon-size="180" text="暂无适配推荐" mode="list" :margin-top="30"></u-empty>
+						 </view>
+					</view>
+					<!-- 其它配件 -->
+					<view class="nav-right-title" style="margin-top: 20rpx;">其它配件</view>
+					<view class="nav-right-item flex" v-for="(item, index) in partList" :key="item.productSn">
+						<view class="uni-col-2">
+							<u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+						</view>
+						<view class="item-info uni-col-10">
+							<view class="item-name">
+								<text>{{item.name}}</text>
+							</view>
+							<view class="item-detail">
+								<view class="item-detail-info">
+									<view class="flex justify_between">
+										<text class="item-detail-text flex_1">{{item.code}}</text>
+										<text class="item-detail-text">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
+									</view>
+									<view class="flex justify_between">
+										<view class="item-detail-text flex_1">
+											<text class="item-price">¥{{item.price||0}}</text>
+										</view>
+										<view class="item-detail-text" v-if="item.currentInven">
+											<u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx',background:'#1283d4'}" type="primary" size="mini">
+												<u-icon name="plus" color="#fff" size="28"></u-icon>
+											</u-button>
+											<u-number-box v-else @change="updateNums" v-model="item.qty" :index="item.productSn" :min="0" :max="item.currentInven"></u-number-box>
+										</view>
+										<view class="item-detail-text" v-else>
+											<text @click="toRuku(item)" class="phtxt">我要临配</text>
+										</view>
+									</view>
+								</view>
+								<view class="nav-right-item-btns flex align_center justify_between">
+									<view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view v-if="partList&&partList.length==0">
+						<u-empty v-if="status!='loading'" :src="`/static/nodata.png`" icon-size="240" :text="noDataText" mode="list" :margin-top="150"></u-empty>
+					</view>
+					<view style="padding: 20upx;">
+						<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+					</view>
+				</scroll-view>
+			</div>
+		</div>
+		<!-- 底部提交按钮 -->
+		<div class="cpb_footer flex align-center" :class="isIphoneXup?'isIPXup':''">
+			<div>
+				<div class="cpb_cart" :style="{background: partListData.length==0?'#eee':''}" @click="openCart">
+					<u-badge type="error" :count="cartNums" :offset="[-4,-4]" bgColor="#FF5200"></u-badge>
+					<u-image width="44" height="44" :src="`/static/${theme}/icon_shopping@3x.png`"></u-image>
+				</div>
+			</div>
+			<div>
+				<u-button type="primary" @click="submitForm" :custom-style="{background:'#1283d4',fontSize:'32rpx'}" shape="circle">立即提交</u-button>
+			</div>
+		</div>
+		<!-- 已选配件 购物车 -->
+		<div class="cpb_cart-mask" v-if="showCart">
+			<div class="cpb_cart-box">
+				<div class="cpb_close flex align-center justify_center" @click="showCart=false"><u-icon name="close"></u-icon></div>
+				<div class="cpb_cart-tit">
+					已选配件
+				</div>
+				<div class="cpb_cart-list">
+					<view class="nav-right-item flex" v-for="(item, index) in partListData" :key="item.productSn">
+						<view class="uni-col-2">
+							<u-image border-radius="30" :src="item.images" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+						</view>
+						<view class="item-info uni-col-10">
+							<view class="item-name">
+								<text>{{item.name}}</text>
+							</view>
+							<view class="item-detail">
+								<view class="item-detail-info">
+									<view class="flex justify_between">
+										<text class="item-detail-text flex_1">{{item.code}}</text>
+										<text class="item-detail-text">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
+									</view>
+									<view class="flex justify_between">
+										<view class="item-detail-text flex_1">
+											<text class="item-price">¥{{item.price||0}}</text>
+										</view>
+										<view class="item-detail-text">
+											<u-number-box @change="updateCartNums" v-model="item.qty" :index="'cart_'+item.productSn" :min="0" :max="item.currentInven"></u-number-box>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</div>
+			</div>
+		</div>
+	</view>
+</template>
+
+<script>
+	import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList, saveShelfOrder } from '@/api/shelf'
+	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
+	export default {
+		data() {
+			return {
+				theme: '',
+				vinNumber: '',
+				leve2Data: [],  //  二级菜单数据
+				curLeve2: '',  //  当前所选二级菜单
+				carInfo: null,
+				status: 'loading',
+				noDataText: '暂无配件',
+				pageNo: 1,
+				pageSize: 10,
+				total: 0, // 列表总数
+				noMore: false ,// 没有更多
+				showCart: false, // 购物车
+				showSelCarModel: false, // 切换车型
+				carList:[], // 车型列表
+				partList: [], // 配件列表
+				partListData: [], // 已选配件
+				vinPartList: [],
+				isIphoneXup: false,
+				dealerPhone: ''
+			}
+		},
+		computed:{
+			modelLabel(){
+				// const data = this.carInfo
+				// const carModelLabel = [data.carBrand, data.vehicleSeriesNameCn, data.capacity, data.vehicleOfYear, data.vehicleNameCn +
+				// 	'(' + data.salesVersion + ')'
+				// ]
+				// return carModelLabel.join(' ')
+				return this.carInfo.text
+			},
+			cartNums(){
+				let ret = 0
+				this.partListData.map(item => {
+					ret = ret + item.qty
+				})
+				return ret
+			}
+		},
+		onLoad(opts) {
+			this.theme = getApp().globalData.theme
+			this.vinNumber = opts.vinNumber
+			this.carInfo = opts.carList?JSON.parse(decodeURIComponent(opts.carList)):null
+			// 获取vin 对应code
+			this.getCarCodeByVin()
+		},
+		onReady() {
+			const shelfInfo = this.$store.state.vuex_storeShelf
+			this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
+			// #ifdef APP-PLUS
+			var webView = this.$mp.page.$getAppWebview();
+			if(this.dealerPhone==''){
+				console.log(11)
+				webView.setTitleNViewButtonStyle(0,{text:"",color:"#FFFFFF"}); 
+			}
+			// #endif
+		},
+		// 点击导航栏按钮
+		onNavigationBarButtonTap() {
+			if(this.dealerPhone!=''){
+				uni.makePhoneCall({
+					phoneNumber: this.dealerPhone
+				})
+			}
+		},
+		onShow() {
+			this.$store.state.vuex_shelfChoosePart = []
+		},
+		methods: {
+			viewImg(item){
+				uni.previewImage({
+					urls: [item.images]
+				})
+			},
+			// 复制
+			copyVin(){
+				clipboard.setText(this.vinNumber);
+				uni.showToast({
+					icon: 'none',
+					title: 'vin码已复制成功'
+				})
+			},
+			// 格式化标签数据和配件分类数据一样
+			labelToPart(data){
+				let arr = []
+				data.map(item => {
+					arr.push({
+						id: item.id || item.productTypeSn,
+						label: item.name
+					})
+				})
+				return arr
+			},
+			getCarCodeByVin(){
+				queryPartCodeByVin({vinNumber:this.vinNumber}).then(res => {
+					console.log(res,'this.vinCode')
+					this.vinCode = res.data
+					this.getShelfProductType()
+				})
+			},
+			// 获取数字货架分类作为二级分类
+			getShelfProductType(){
+				getShelfProductType({
+					codeList: this.vinCode,
+					shelfSn: this.$store.state.vuex_storeShelf.shelfSn
+				}).then(res => {
+					console.log(res,'getShelfProductType')
+					this.leve2Data = this.labelToPart(res.data || [])
+					// 默认该车适用或全部
+					this.selLeve2('all')
+				})
+			},
+			// 单击二级菜单
+			selLeve2 (v) {
+				this.pageNo = 1
+				this.partList = []
+				this.vinPartList = []
+				this.curLeve2 = v
+				if(this.vinNumber){
+					this.getVinShelfPartList()
+				}
+				this.getShelfProductList()
+			},
+			 // 获取数字货架配件列表
+			 getShelfProductList(){
+			 	const _this = this
+			 	let params = {
+			 	    pageNo: this.pageNo,
+			 	    pageSize: this.pageSize,
+			 		excludeCodeList: this.vinCode,
+			 		productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2
+			 	}
+			 	_this.status = 'loading'
+			 	getShelfProductList(params).then(res => {
+					console.log(res,'获取数字货架配件列表')
+			 		uni.hideLoading()
+			 		if(res.status == 200){
+			 			let list = res.data.list
+			 			if (list && list.length){
+			 				// 分页 拼接数据
+			 				if (_this.pageNo != 1) {
+			 					_this.partList = _this.partList ? _this.partList.concat(this.fiterChecked(list)) : this.fiterChecked(list)
+			 				} else {
+			 					_this.partList = this.fiterChecked(list)
+			 				}
+			 				this.total = res.data.count
+			 				if (_this.partList.length == res.data.count) {
+			 					_this.status = 'nomore'
+			 				} else {
+			 					_this.status = 'loadmore'
+			 				}
+			 			} else {
+			 				_this.partList = list || []
+			 				this.total = 0
+			 				_this.status = 'nomore'
+			 			}
+			 			_this.noDataText = '暂无配件'
+			 		}else{
+			 			_this.status = 'loadmore'
+			 			_this.partList = []
+			 			this.total = 0
+			 			_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+			 		}
+			 	})
+			 },
+			// 根据客户vin查询该车可用数字货架中的配件
+			getVinShelfPartList(){
+				let params = {
+				      queryWord: this.queryWord,
+				      productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2,
+					  codeList: this.vinCode
+				  }
+				getShelfQueryList(params).then(res => {
+					this.vinPartList = this.fiterChecked(res.data || []) 
+					console.log(this.vinPartList)
+				})
+			},
+			// 过滤已选择的
+			fiterChecked (list){
+				this.partListData.map(item => {
+					let p = list.find(k => {
+						return k.productSn == item.productSn
+					})
+					if (p){
+						p.checked = true
+						p.qty = item.qty
+					}
+				})
+				return list
+			},
+			// 加载更多
+			onreachBottom () {
+				if(this.partList.length < this.total ){
+					this.pageNo++
+					this.getShelfProductList()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 打开切换车型弹窗
+			openSelCarModel(){
+				this.showSelCarModel = true
+			},
+			selCarModel(item){
+				this.showSelCarModel = false
+				this.carInfo = item
+			},
+			// 补货
+			toRuku(data){
+				this.$store.state.vuex_shelfChoosePart.push(data)
+				uni.navigateTo({
+				    url: '/pages/digitalShelf/temproaryStockIn/temproaryStockIn?vinNumber='+this.vinNumber
+				})
+			},
+			// 添加到购物车
+			addPart(item){
+				item.checked = true
+				item.qty = 1
+				this.partListData.push({
+					id: item.id,
+					productSn: item.productSn,
+					name: item.name,
+					unit: item.unit,
+					price: item.price,
+					currentInven: item.currentInven,
+					code: item.code,
+					qty: item.qty,
+					images: item.images,
+					checked: true
+				})
+			},
+			// 修改列表上数量
+			updateNums(data){
+				const prow = this.partList.find(item => item.productSn == data.index)
+				const index = this.partListData.findIndex(item => item.productSn == data.index)
+				// 删除
+				if(data.value == 0){
+					prow.checked = false
+					console.log(index,'+++')
+					if(index>=0){
+						this.partListData.splice(index,1)
+					}
+					if(this.partListData.length==0){
+						this.showCart = false
+					}
+				}else{
+					this.partListData[index].qty = data.value
+					this.partListData.splice()
+				}
+			},
+			// 点击购物车修改数量
+			updateCartNums(data){
+				if(data.value == 0){
+					const index = this.partListData.findIndex(item => 'cart_'+item.productSn == data.index)
+					if(index>=0){
+						this.partListData.splice(index,1)
+					}
+					if(this.partListData.length==0){
+						this.showCart = false
+					}
+				}
+				// 同步更新配件列表上的
+				const prow = this.partList.find(item => 'cart_'+item.productSn == data.index)
+				prow.qty = data.value
+				prow.checked = !!data.value
+			},
+			// 打开购物车
+			openCart(){
+				if(this.partListData.length){
+					this.showCart=!this.showCart
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请选择配件'
+					})
+				}
+			},
+			// 格式化数据
+			formatData(){
+				const partList = []
+				this.partListData.map(item => {
+					partList.push({
+						"productSn": item.productSn,
+						"totalQty": item.qty
+					})
+				})
+				return partList
+			},
+			// 立即提交
+			submitForm(){
+				if(this.partListData.length==0){
+					uni.showToast({
+						icon: 'none',
+						title: '请选择配件'
+					})
+					return
+				}
+				
+				// 开始提交
+				const params = {
+					shelfOrderDetailList: this.formatData(),
+					vin: this.vinNumber,
+					vehicleModel: this.modelLabel,
+					vehicleLogo: this.carInfo.icon||'',
+				}
+				console.log(params,'立即提交')
+				saveShelfOrder(params).then(res => {
+					console.log(res,'saveShelfOrder')
+					if(res.status == 200){
+						// 提交成功
+						uni.redirectTo({
+							url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
+						})
+					}else{
+						// 或失败
+						uni.redirectTo({
+							url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({remindMessage:res.message}))+"&state=0"
+						})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.choosePartByVin{
+	height: 100vh;
+	.cpb_header{
+		background-color: #FFFFFF;
+		padding: 10rpx;
+		align-items: center;
+		> div{
+			padding: 10rpx;
+			align-items: center;
+			&:first-child{
+				padding-right: 20rpx;
+			}
+			> div{
+				&:first-child{
+					padding-right: 20rpx;
+					flex-grow: 1;
+					color: #818b94;
+					font-size: 24rpx;
+				}
+			}
+		}
+		.copyText{
+			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;
+		}
+		.carTits{
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #222222;
+			line-height: normal;
+			margin-bottom: 10rpx;
+			flex-grow: 1;
+		}
+		.qhbtns{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-size: 20rpx;
+			color: #0485F6;
+			border:2rpx solid #0485F6;
+			border-radius: 50rpx;
+			background: rgba(88, 177, 255, 0.2);
+			width: 200rpx;
+			height: 36rpx;
+			margin-left: 10rpx;
+		}
+	}
+	.cpb_middle{
+		flex-grow: 1;
+		padding-top: 10rpx;
+		height: calc(100vh - 310rpx);
+		.slider-bar{
+			width: 25%;
+			background: #F5F6F7;
+			height: 100%;
+			overflow: auto;
+			.tabs{
+				> view{
+					border-left: 6rpx solid #F5F6F7;
+					padding: 30rpx 10rpx;
+					font-size: 30rpx;
+					color: #666E75;
+				}
+				.active{
+					border-color: #0485F6;
+					color: #0485F6;
+					background: #fff;
+				}
+			}
+		}
+		.right-list{
+			flex-grow: 1;
+			background: #fff;
+			height: 100%;
+			width: 75%;
+			.right-list-content{
+				height: 100%;
+				.nav-right-title{
+					font-weight: bold;
+					padding: 5upx 25upx;
+				}
+				.nav-right-item{
+					padding: 15upx 25upx;
+					border-bottom: 2rpx solid #f5f5f5;
+					.item-info{
+						padding-left: 20upx;
+						.item-name{
+							font-size: 32upx;
+							color: #191919;
+							display: flex;
+							align-items: center;
+							>image{
+								width: 38rpx;
+								height: 38rpx;
+								margin-right: 10rpx;
+							}
+							>text{
+								flex: 1;
+								word-break: break-all;
+							}
+						}
+						.item-detail{
+							.item-detail-info{
+								padding: 10upx 0 4upx;
+								> view{
+									padding-bottom: 10rpx;
+									align-items: center;
+									.item-detail-text{
+										color: #999;
+										.phtxt{
+											color: #0485F6;
+											font-size: 28upx;
+										}
+										.item-price{
+											color: #FB1E1E;
+											font-size: 28upx;
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	.cpb_footer{
+		padding: 20rpx;
+		background-color: #fff;
+		align-items: center;
+		justify-content: space-between;
+		.cpb_cart{
+			width: 84rpx;
+			height: 84rpx;
+			background-color: #0485F6;
+			border-radius: 200rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			position: relative;
+		}
+		> div{
+			&:last-child{
+				width: 40%;
+			}
+		}
+	}
+	.cpb_cart-mask{
+		position: fixed;
+		width: 100%;
+		background: rgba(0,0,0,0.5);
+		z-index: 900;
+		bottom: 120rpx;
+		top: 0;
+	}
+	.cpb_cart-box{
+		background-color: #fff;
+		position: absolute;
+		width: 100%;
+		z-index: 1000;
+		bottom: 0;
+		padding: 20rpx 0;
+		border-radius: 30rpx 30rpx 0 0;
+		max-height: 70vh;
+		display: flex;
+		flex-direction: column;
+		.cpb_close{
+			position: absolute;
+			top: 20rpx;
+			right: 20rpx;
+			width: 70rpx;
+			height: 70rpx;
+			font-size: 32rpx;
+			color: #999;
+		}
+		.cpb_cart-tit{
+			text-align: center;
+			padding: 20rpx;
+			font-size: 36rpx;
+		}
+		.cpb_cart-list{
+			padding: 20rpx 30rpx;
+			overflow: auto;
+			flex-grow: 1;
+			> view{
+				margin-bottom: 30rpx;
+			}
+			.item-name{
+				font-size: 36rpx;
+			}
+			.item-info{
+				border-bottom:2rpx solid #f8f8f8;
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 10upx 0 4upx;
+					> view{
+						padding-bottom: 30rpx;
+						align-items: center;
+						.item-detail-text{
+							color: #999;
+							.phtxt{
+								color: #0485F6;
+								font-size: 28upx;
+							}
+							.item-price{
+								color: #FB1E1E;
+								font-size: 28upx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 269 - 0
pages/digitalShelf/choosePartResult.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="choosePartResult flex flex_column">
+		<view class="contHead" :style="{background:state==1?'#1283d4':'#ff5500',color:'#fff'}">
+			<view class="statusH">
+				<view class="flex flex_column align_center">
+					<view class="status-row">
+						<u-icon :name="statusIcon" size="42" color="#fff"> 
+						</u-icon>
+						<text>{{statusText}}</text>
+					</view>
+					<view class="messageText" v-html="info&&info.remindMessage||''"></view>
+					<view class="button-group">
+						<button :hover-stop-propagation="true" @click="back" class="back" size="mini">返回首页</button>
+						<button :hover-stop-propagation="true" @click="toScan" v-if="state == 1" class="action" size="mini">扫码取货</button>
+						<button :hover-stop-propagation="true" @click="toSettle" v-if="state == 0" class="actionFail" size="mini">去结算</button>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="order-body">
+			<view class="info partList" v-if="state == 1">
+				<view class="infoList">
+					<view class="title">配件列表</view>
+					<view>
+						{{partList.length}}款,共<text class="redText">{{totalNums}}</text>件
+					</view>
+				</view>
+				<view v-for="item in partList" :key="item.id" class="flex align-center item-list">
+					<view>
+						<u-image border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
+					</view>
+					<view>
+						<view class="item-name">
+						  <text>{{item.productName}}</text>
+						</view>
+						<view class="item-nums">
+							X <text>{{item.totalQty}}{{item.unit||''}}</text>
+						</view>
+						<view class="item-head">
+							<text>{{item.productCode}}</text>
+							<text class="item-no">{{item.shelfPlaceCode}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="info" v-if="info && state == 1">
+				<view class="infoList">
+					<view class="title">单据信息</view>
+					<view class="statu"></view>
+				</view>
+				<view class="infoList">
+					<text>订单编号</text>
+					<text>{{info.shelfOrderNo||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单时间</text>
+					<text>{{info.createDate||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单人员</text>
+					<text>{{info.orderPersonName || '--'}}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniIcons from "@/components/uni-icons/uni-icons.vue"
+	import moment from 'moment'
+	import { findBySnShelfOrder } from '@/api/shelf'
+	import { clzConfirm } from '@/libs/tools.js'
+	export default {
+	   name: 'choosePartResult',
+	   components: {
+		uniIcons,
+	   },
+	   data() {
+		   return {
+			   info: null,
+			   statusText: '',
+			   statusIcon: '', // 结算状态icon
+			   partList: [], // 配件列表
+			   state: null
+		   }
+	   },
+	   onLoad(option) { 
+		   console.log(option,'option')
+		  this.info =  JSON.parse(decodeURIComponent(option.data.replace(/%/g, '%25')))
+		  this.state = option.state
+		  if(option.state==1){
+			  this.statusText = '提交成功'
+			  this.statusIcon = 'checkmark-circle'
+			  // 获取配件列表
+			  this.partList = this.info.shelfOrderDetailList
+		  }else{
+			  this.statusText = '提交失败'
+			  this.statusIcon = 'close-circle'
+		  }
+	   },
+	   computed: {
+		   totalNums(){
+			   let ret = 0
+			   this.partList.map(item => {
+				   ret += item.totalQty
+			   })
+			   return ret
+		   }
+	   },
+	   methods: {
+		 back(){
+			uni.navigateBack() 
+		 },
+		 // 扫码取货
+		 toScan(){
+			 uni.redirectTo({
+			 	url:"/pages/digitalShelf/scanBarcode/scanBarcode?shelfOrderSn="+this.info.shelfOrderSn
+			 })
+		 },
+		 // 去结算
+		 toSettle(){
+			 uni.redirectTo({
+			 	url:"/pages/digitalShelf/settlementManage/settlementManage"
+			 })
+		 },
+		 message(title){
+		 	uni.showToast({
+		 		icon:'none',
+		 		title: title
+		 	})
+		 }, 
+	   }
+	}
+</script>
+
+<style lang="less">
+	page{
+		height: 100%;
+	}
+	.choosePartResult{
+		height: 100%;
+		.order-body{
+			flex-grow: 1;
+			overflow: auto;
+		}
+		.contHead {
+			background-color: white;
+			margin-top: -20rpx;
+			.statusH{
+				> view{
+					padding: 10upx 12%;
+					font-size: 34upx;
+				}
+				.status-row{
+					font-size: 42upx;
+					text{
+						margin-left: 10rpx;
+					}
+				}
+				.messageText{
+					font-size: 30upx;
+					text-align: center;
+					text{
+						color: #ffaa00;
+					}
+					padding: 10rpx 0;
+				}
+				.button-group{
+					padding: 20rpx 0;
+					button{
+						background: none;
+						margin: 0 30rpx;
+						border-radius: 100rpx;
+						font-size: 32rpx;
+					}
+					.back{
+						color: #fff;
+						border:2rpx solid #fff;
+					}
+					.action{
+						background: #fff;
+						color: #0485F6;
+					}
+					.actionFail{
+						background: #fff;
+						color: #FF5728;
+					}
+				}
+			}
+		}
+		.info{
+			background-color: #FFFFFF;
+			padding: 10rpx 30upx;
+			font-size: 32rpx;
+			margin-bottom: 20rpx;
+			.infoList{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding:20rpx 0;
+				border-bottom: 2rpx solid #f2f2f2;
+				.title{
+					font-weight: bold;
+				}
+				> text{
+					&:first-child{
+						color: #666E75;
+					}
+					&:last-child{
+						width: 80%;
+						text-align: right;
+					}
+				}
+				.redText{
+					color: red;
+				}
+			}
+			.item-list{
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: none;
+				}
+				> view{
+					padding: 20rpx 0;
+					&:first-child{
+						margin-right: 20rpx;
+						margin-top: 18rpx;
+					}
+					&:last-child{
+						flex-grow: 1;
+					}
+				}
+				.item-name{
+					word-wrap: break-word;
+					font-size: 32rpx;
+					color: #333;
+					font-weight: bold;
+					margin-top: 10rpx;
+				}
+				.item-nums{
+					padding: 10rpx 0;
+					color: #999;
+					font-size: 24rpx;
+					text{
+						font-size: 32rpx;
+						color: #666E75;
+						margin-left: 10rpx;
+					}
+				}
+				.item-head{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					font-size: 32rpx;
+					color: #666;
+					.item-no{
+						background: rgba(3, 54, 146, 0.15);
+						color: #033692;
+						border-radius: 100rpx;
+						padding: 2rpx 30rpx;
+						margin-right: 20rpx;
+						display: block;
+					}
+				}
+			}
+		}
+	}
+	
+</style>

+ 425 - 0
pages/digitalShelf/orderDetail.vue

@@ -0,0 +1,425 @@
+<template>
+	<view class="orderDetail-digitalShel flex flex_column">
+		<view class="contHead">
+			<view class="statusH">
+				<view class="flex flex_column align_center">
+					<view class="status-row">
+						<u-icon :name="statusIcon" size="42" color="#fff"> 
+						</u-icon>
+						<text>{{statusText}}</text>
+					</view>
+					<view class="messageText">{{statusMessage}}</view>
+				</view>
+			</view>
+			<view class="flex align-center orderTj" v-if="info">
+				<view>
+					<view class="redText">{{info.totalQty}}</view>
+					<view>总数量</view>
+				</view>
+				<view>
+					<view>{{info.confirmQty}}</view>
+					<view>已扫码</view>
+				</view>
+			</view>
+		</view>
+		<view class="order-body">
+			<!-- 头部车辆信息 -->
+			<div class="flex align-center cpb_header" v-if="info">
+				<div>
+					<u-image :src="info.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+				</div>
+				<div class="flex flex_column justify_center align_start">
+					<view class="carModel flex align-center" v-if="info.vehicleNumber" >
+						<view><carNo color="#0055ff" :val="info.vehicleNumber"></carNo></view>
+						<text style="margin-left: 20rpx;" v-if="info.vehicleModel">{{info.vehicleModel.split(' ')[0]}}</text>
+					</view>
+					 <view class="carModel flex align-center" v-if="!info.vehicleNumber" >
+						<text>{{info.vehicleModel}}</text>
+					 </view>
+					<div class="flex align-center">
+						<div>VIN码:{{info.vin||'暂无'}}</div>
+						<div v-if="info.vin" class="copyText" @click="copyVin"><span>复制</span></div>
+					</div>
+				</div>
+			</div>
+			<view class="info partList" v-if="partList.length">
+				<view class="infoList">
+					<view class="title">配件列表</view>
+					<view>
+						{{partList.length}}款,共<text class="redText">{{totalNums}}</text>件
+					</view>
+				</view>
+				<view v-for="item in partList" :key="item.productSn" class="flex align-center item-list">
+					<view>
+						<u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
+					</view>
+					<view>
+						<view class="item-name">
+						  <text>{{item.productName}}</text>
+						</view>
+						<view class="item-nums">
+							<text>{{item.productCode}}</text>
+						</view>
+						<view class="item-head">
+							<view>
+								数量:<text class="redText">{{item.totalQty}}</text>
+								已扫:<text>{{item.confirmQty}}</text>
+							</view>
+							<text class="item-no">{{item.shelfPlaceCode}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="info" v-if="info">
+				<view class="infoList">
+					<view class="title">单据信息</view>
+					<view class="statu"></view>
+				</view>
+				<view class="infoList dju">
+					<text>取货单号</text>
+					<text>{{info.shelfOrderNo||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单时间</text>
+					<text>{{info.shelfOrderDate||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单人员</text>
+					<text>{{info.orderPersonName || '--'}}</text>
+				</view>
+				<view class="infoList" v-if="info.orderNo">
+					<text>关联工单编号</text>
+					<text>{{info.orderNo || '--'}}</text>
+				</view>
+			</view>
+		</view>
+		<view class="footer flex align-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" :style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">扫码取货</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	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 { clzConfirm } from '@/libs/tools.js'
+	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
+	export default {
+	   name: 'orderDetail-digitalShel',
+	   components: {
+		uniIcons,
+		carNo
+	   },
+	   data() {
+		   return {
+			   info: null,
+			   statusText: '',
+			   statusIcon: '', // 结算状态icon
+			   statusMessage: '',
+			   partList: [], // 配件列表
+			   shelfOrderSn: null
+		   }
+	   },
+	   onReady() {
+	   },
+	   onLoad(option) { 
+		  this.shelfOrderSn = option.shelfOrderSn
+	   },
+	   onShow() {
+	   	this.getDetail()
+	   },
+	   computed: {
+		   totalNums(){
+			   let ret = 0
+			   this.partList.map(item => {
+				   ret += item.totalQty
+			   })
+			   return ret
+		   }
+	   },
+	   methods: {
+		   // 复制
+		   copyVin(){
+			clipboard.setText(this.info.vin);
+			uni.showToast({
+				icon: 'none',
+				title: 'vin码已复制成功'
+			})
+		   },
+		 message(title){
+		 	uni.showToast({
+		 		icon:'none',
+		 		title: title
+		 	})
+		 }, 
+		 // 打开扫描取货
+		 sanCodeRow () {
+			 uni.navigateTo({
+				url:"/pages/digitalShelf/scanBarcode/scanBarcode?shelfOrderSn="+this.shelfOrderSn
+			 })
+		  },
+		  // 获取详情
+		  getDetail(){
+			  findBySnShelfOrder({sn: this.shelfOrderSn}).then(res => {
+				  console.log(res,'++++++++')
+				  if(res.status == 200){
+					  this.info = res.data
+					  this.partList = res.data.shelfOrderDetailList || []
+					  if(this.info.billState == 'WAIT'){
+						  this.statusText = '待取货'
+						  this.statusIcon = 'hourglass-half-fill'
+						  this.statusMessage = '请及时安排,以免逾期'
+					  }
+					  if(this.info.billState == 'FINISH'){
+						  this.statusText = '已取货'
+						  this.statusIcon = 'checkmark-circle'
+						  this.statusMessage = ''
+					  }
+					  if(this.info.billState == 'CLOSE'){
+						  this.statusText = '已关闭'
+						  this.statusIcon = 'close-circle'
+						  this.statusMessage = ''
+					  }
+				  }
+			  })
+		  },
+		  // 删除
+		  delOrder(){
+		  	cancelShelfOrder({
+		  		sn: this.shelfOrderSn
+		  	}).then(res => {
+		  		console.log(res)
+		  		if(res.status == 200){
+					uni.navigateBack()
+					uni.$emit("refreshOrder")
+		  		}
+		  		this.message(res.message)
+		  	})
+		  },
+		  // 确认关闭取货单
+		  deleteRow () {
+		    let _this = this
+		    clzConfirm({
+		  		title: '提示',
+		  		content: '确认关闭取货单吗?',
+		  		success: (ret) => {
+		  		  if(ret.confirm||ret.index==0){
+		  			  _this.delOrder()
+		  		  }
+		  		}
+		    })
+		  },
+	   }
+	}
+</script>
+
+<style lang="less">
+	page{
+		height: 100%;
+	}
+	.orderDetail-digitalShel{
+		height: 100%;
+		.redText{
+			color: #FB1E1E;
+		}
+		.order-body{
+			flex-grow: 1;
+			overflow: auto;
+			.cpb_header{
+				margin-top: 20rpx;
+				background-color: #FFFFFF;
+				padding: 30rpx 15rpx;
+				> div{
+					padding: 0 10rpx;
+					&:first-child{
+						padding-right: 10rpx;
+						align-items: center;
+					}
+					> div{
+						&:first-child{
+							padding-right: 20rpx;
+							flex-grow: 1;
+							color: #818b94;
+							font-size: 24rpx;
+						}
+					}
+				}
+				.copyText{
+					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;
+				}
+				.carTits{
+					font-size: 32rpx;
+					font-weight: bold;
+					color: #222222;
+					line-height: normal;
+					margin-bottom: 10rpx;
+					flex-grow: 1;
+				}
+				.qhbtns{
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					font-size: 20rpx;
+					color: #0485F6;
+					border:2rpx solid #0485F6;
+					border-radius: 50rpx;
+					background: rgba(88, 177, 255, 0.2);
+					width: 200rpx;
+					height: 36rpx;
+					margin-left: 10rpx;
+				}
+			}
+			.partList{
+				margin-top: 20rpx;
+			}
+		}
+		.contHead {
+			background-color: white;
+			margin-top: -20rpx;
+			.statusH{
+				> view{
+					padding: 10upx 12%;
+					font-size: 34upx;
+				}
+				.status-row{
+					font-size: 42upx;
+					text{
+						margin-left: 10rpx;
+					}
+				}
+				.messageText{
+					font-size: 30upx;
+					text-align: center;
+					text{
+						color: #ffaa00;
+					}
+					padding: 10rpx 0;
+				}
+			}
+			.orderTj{
+				padding: 0 20rpx 20rpx;
+				background-color: #fff;
+				> view{
+					text-align: center;
+					border-right: 2rpx solid #eee;
+					width: 50%;
+					color: #666E75;
+					.redText{
+						color: #FB1E1E;
+					}
+					&:last-child{
+						border: 0;
+					}
+					> view{
+						color: #666E75;
+						&:first-child{
+							font-size: 56rpx;
+						}
+					}
+				}
+				border-radius: 20rpx 20rpx 0 0;
+			}
+		}
+		.info{
+			background-color: #FFFFFF;
+			padding: 10rpx 30upx;
+			font-size: 32rpx;
+			margin-bottom: 20rpx;
+			.infoList{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 20rpx 0;
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: none;
+				}
+				.title{
+					font-weight: bold;
+				}
+				> text{
+					&:first-child{
+						color: #666E75;
+					}
+				}
+			}
+			.item-list{
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: none;
+				}
+				> view{
+					padding: 20rpx 0;
+					&:first-child{
+						margin-right: 20rpx;
+						margin-top: 18rpx;
+					}
+					&:last-child{
+						flex-grow: 1;
+					}
+				}
+				.item-name{
+					word-wrap: break-word;
+					font-size: 32rpx;
+					color: #333;
+					font-weight: bold;
+					margin-top: 10rpx;
+				}
+				.item-nums{
+					padding: 10rpx 0;
+					text{
+						font-size: 32rpx;
+						color: #222222;
+					}
+				}
+				.item-head{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					color: #666;
+					> view{
+						&:first-child{
+							font-size: 28rpx;
+							text{
+								margin-right: 30rpx;
+							}
+						}
+					}
+					.item-no{
+						font-size: 28rpx;
+						background: rgba(3, 54, 146, 0.15);
+						color: #033692;
+						border-radius: 100rpx;
+						padding: 2rpx 30rpx;
+						margin-right: 20rpx;
+						display: block;
+					}
+				}
+			}
+		}
+		.footer{
+			padding: 20upx 60upx;
+			background: #FFFFFF;
+			uni-button{
+				&:after{
+					border: 0;
+				}
+				width: 45%;
+				color: #585858;
+				font-size: 32rpx;
+			}
+		}
+	}
+	
+</style>

+ 431 - 0
pages/digitalShelf/orderList.vue

@@ -0,0 +1,431 @@
+<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.shelfOrderNo}}</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;">
+										 <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>
+									 </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 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 { getShelfOrderList, cancelShelfOrder, 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()
+				// this.shelfGetTotalWaitQty()
+			},
+			// 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
+			},
+			// 待取货数量合计
+			shelfGetTotalWaitQty(){
+				shelfGetTotalWaitQty({billState:'WAIT'}).then(res => {
+					console.log(res)
+					if(res.status == 200){
+						this.tabList[0].count = res.data<=99?res.data:'99+'
+					}
+				})
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  // 状态条件
+			  const state = ['WAIT','FINISH','CLOSE']
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				billState: state[this.swiperCurrent]
+			  }
+			  this.status = "loading"
+			  getShelfOrderList(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
+				})
+			},
+			// 删除
+			delOrder(sn,index){
+				cancelShelfOrder({
+					'sn': sn
+				}).then(res => {
+					console.log(res)
+					if(res.status == 200){
+						this.list.splice(index,1)
+						// this.shelfGetTotalWaitQty()
+						if(this.current == 0){
+							this.tabList[0].count = this.tabList[0].count - 1
+						}
+					}
+					this.message(res.data.message)
+				})
+			},
+			// 确认关闭取货单
+			deleteRow (params,index) {
+			  let _this = this
+			  clzConfirm({
+					title: '提示',
+					content: '确认关闭取货单吗?',
+					success: (ret) => {
+					  if(ret.confirm||ret.index==0){
+						  _this.delOrder(params.shelfOrderSn,index)
+					  }
+					}
+			  })
+			},
+			// 打开扫描取货
+		   sanCodeRow (item) {
+			     uni.navigateTo({
+			     	url:"/pages/digitalShelf/scanBarcode/scanBarcode?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>

+ 385 - 0
pages/digitalShelf/scanBarcode/scanBarcode.vue

@@ -0,0 +1,385 @@
+<template>
+	<view class="orderScanCode-digitalShel flex flex_column">
+		<view class="info-body">
+			<view class="flex align-center orderTj" v-if="info">
+				<view>
+					<view class="redText">{{ info.totalQty }}</view>
+					<view>总数量</view>
+				</view>
+				<view>
+					<view>{{ info.confirmQty }}</view>
+					<view>已扫码</view>
+				</view>
+			</view>
+			<view class="info partList" v-if="partList.length">
+				<view class="infoList">
+					<view class="title">配件列表</view>
+					<view>
+						{{ partList.length }}款,共
+						<text class="redText">{{ totalNums }}</text>
+						件
+					</view>
+				</view>
+				<view v-for="item in partList" :key="item.productSn" class="flex align-center item-list">
+					<view><u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB"></u-image></view>
+					<view>
+						<view class="item-name">
+							<text>{{ item.productName }}</text>
+						</view>
+						<view class="item-nums">
+							<text>{{ item.productCode }}</text>
+						</view>
+						<view class="item-head">
+							<view>
+								数量:
+								<text class="redText">{{ item.totalQty }}</text>
+								已扫:
+								<text>{{ item.confirmQty }}</text>
+							</view>
+							<text class="item-no">{{ item.shelfPlaceCode }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="footer flex align-center" v-if="info">
+			<u-button v-if="!hasScanFinish" :throttle-time="100" @click="scanCode" :style="{ background: '#1283d4', color: '#fff' }" 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" :style="{ background: '#1283d4', color: '#fff' }" shape="circle" type="info">
+				确认取货
+			</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+import { findBySnShelfOrder, outShelfOrder, scanConfirmShelfOrder } from '@/api/shelf.js'
+import { clzConfirm, urlToObj } from '@/libs/tools.js'
+export default {
+	data() {
+		return {
+			barcode:null,
+			shelfOrderSn: null,
+			info: null,
+			partList: [],
+			mpaasScanModule: null
+		}
+	},
+	computed: {
+	   totalNums(){
+		   let ret = 0
+		   this.partList.map(item => {
+			   ret += item.totalQty
+		   })
+		   return ret
+	   },
+	   hasScanFinish(){
+		   return this.info.totalQty == this.info.confirmQty
+	   }
+	},
+	onReady() {
+		// 初始化摄像头
+		this.init()
+	},
+	onLoad(options) {
+		this.shelfOrderSn = options.shelfOrderSn
+		this.getDetail(0)
+	},
+	methods: {
+		// 扫码
+		scanCode(){
+			// this.mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+			// this.mpaasScanModule.mpaasScan({
+			// 	// 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
+			// 	'scanType':  ['qrCode','barCode'],
+			// 	// 是否隐藏相册,默认false不隐藏
+			// 	'hideAlbum': false
+			// },
+			// (ret) => {
+			// 	// 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
+			// 	// 返回值中,resp_message 表示返回结果信息
+			// 	// 返回值中,resp_result 表示扫码结果,只有成功才会有返回
+			// 	if(ret.resp_code == '1000'){
+			// 		this.scanResult(ret.resp_result)
+			// 	}
+			// })
+
+			this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
+			this.mpaasScanModule.scan(
+				{
+					"scanType":["QRCODE","CODE93","CODE128","DATAMATRIX"],
+					"scanMode":"Customized",
+					"scanStyle":{"scanFrameSizePlus":{"width":200,"height":200},"scanFrameSize":200,"scanLight":"visible","scanText":"对准物品二维码","scanTitle":"扫码取货"}
+				},
+				(result) => {
+					console.log(result)
+					if(result.scanStatus == 1){
+						this.scanResult(result.scanValue)
+					}
+				})
+		},
+		// 获取详情
+		getDetail(type){
+		  findBySnShelfOrder({sn: this.shelfOrderSn}).then(res => {
+			  console.log(res,'++++++++')
+			  if(res.status == 200){
+				  this.info = res.data
+				  this.partList = res.data.shelfOrderDetailList
+				  // 此单已全部扫码,是否确认取货
+				  if(this.hasScanFinish){
+					  clzConfirm({
+					  	title: '扫码成功',
+					  	content: '此单已全部扫码,是否确认取货?',
+					  	success: (ret) => {
+					  	  if(ret.confirm||ret.index==0){
+					  		  this.outShelfOrder()
+					  	  }
+					  	}
+					  })
+				  }else{
+					  if(type){
+						 this.confimInfo('是否继续扫码',1)
+					  }
+				  }
+			  }
+		  })
+		},
+		// 确认取货
+		outShelfOrder(){
+			if(this.hasScanFinish){
+				outShelfOrder({sn:this.shelfOrderSn}).then(res => {
+					console.log(res,'确认取货')
+					if(res.status == 200){
+						uni.$emit("refreshOrder")
+						uni.navigateBack()
+					}
+				})
+			}else{
+				this.message("请先扫码取货")
+			}
+		},
+		confimInfo(msg,type){
+			const _this = this
+			clzConfirm({
+				title: type?'扫码成功':'扫码失败',
+				content: msg,
+				confirmText:'继续扫码',
+				success: (ret) => {
+					if(ret.index == 0){
+						_this.scanCode()
+					}
+				}
+			})
+		},
+		// 扫码结果
+		scanResult(qrCode){
+			const _this = this
+			console.log(qrCode)
+			const params = {
+				shelfSn: qrCode.split("&")[0],
+				productCode: qrCode.split("&")[1]
+			}
+			console.log(params)
+			if(params.shelfSn != this.info.shelfSn){
+				_this.confimInfo('该配件不属于此数字货架',0)
+				return
+			}
+			scanConfirmShelfOrder({
+				shelfOrderSn: _this.shelfOrderSn,
+				shelfOrderDetailList:[
+				        {
+				            "productCode": params.productCode,
+				            "confirmQty": 1
+				        }
+				    ]
+			}).then(res => {
+				if(res.status == 200){
+					// 刷新列表
+					_this.getDetail(1)
+				}else{
+					_this.confimInfo(res.message,0)
+				}
+			})
+		},
+		message(title){
+			uni.showToast({
+				icon:'none',
+				title: title
+			})
+		},
+		init(){
+			// const _this = this
+			// // 初始化
+			//  this.barcode = plus.barcode.create('barcode', [plus.barcode.QR], {
+			// 		top:'0px',
+			// 		left:'0px',
+			// 		width: '100%',
+			// 		height: '35%',
+			// 		position: 'static',
+			// 		frameColor: '#00aaff',
+			// 		scanbarColor: '#00aaff'
+			// 	});
+			// // 设置高度
+			// const query = uni.createSelectorQuery().in(this);
+			// query.select('#barcode').boundingClientRect(data => {
+			// 	this.barcode.setStyle({
+			// 			height: data.height	+ 'px'	// 调整扫码控件的位置
+			// 		});
+			// }).exec();
+			// // 扫码成功后
+			// this.barcode.onmarked = function(type, result) {
+			// 	_this.scanResult(result)
+			// }
+			// // 扫码识别出错
+			// this.barcode.onerror = function(error){
+			// 	console.log(error)
+			// 	_this.message("二维码错误!")
+			// 	_this.barcode.start()
+			// }
+
+			//  const currentWebview = this.$mp.page.$getAppWebview();
+			//  currentWebview.append(this.barcode);
+			//  this.barcode.start();
+		}
+	}
+}
+</script>
+
+<style lang="less">
+page {
+	height: 100vh;
+}
+.orderScanCode-digitalShel {
+	height: 100%;
+	.barCode {
+		background-color: #333;
+		height: 20%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		color: #fff;
+	}
+	> view {
+		padding: 20rpx;
+	}
+	.info-body {
+		flex-flow: 1;
+		overflow: auto;
+		height: 100%;
+	}
+	.redText {
+		color: #fb1e1e;
+	}
+	.orderTj {
+		padding: 20rpx;
+		background-color: #fff;
+		> view {
+			text-align: center;
+			border-right: 2rpx solid #eee;
+			width: 50%;
+			color: #666e75;
+			.redText {
+				color: #fb1e1e;
+			}
+			&:last-child {
+				border: 0;
+			}
+			> view {
+				color: #666e75;
+				&:first-child {
+					font-size: 56rpx;
+				}
+			}
+		}
+		border-radius: 20rpx;
+	}
+	.info {
+		background-color: #ffffff;
+		padding: 10rpx 30upx;
+		font-size: 32rpx;
+		margin-top: 20rpx;
+		.infoList {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 20rpx 0;
+			border-bottom: 2rpx solid #f2f2f2;
+			.title {
+				font-weight: bold;
+			}
+			> text {
+				&:first-child {
+					color: #666e75;
+				}
+			}
+		}
+		.item-list {
+			border-bottom: 2rpx solid #f2f2f2;
+			&:last-child {
+				border: none;
+			}
+			> view {
+				padding: 20rpx 0;
+				&:first-child {
+					margin-right: 20rpx;
+					margin-top: 18rpx;
+				}
+				&:last-child {
+					flex-grow: 1;
+				}
+			}
+			.item-name {
+				word-wrap: break-word;
+				font-size: 32rpx;
+				color: #333;
+				font-weight: bold;
+				margin-top: 10rpx;
+			}
+			.item-nums {
+				padding: 10rpx 0;
+				text {
+					font-size: 32rpx;
+					color: #222222;
+				}
+			}
+			.item-head {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				color: #666;
+				> view {
+					&:first-child {
+						font-size: 28rpx;
+						text {
+							margin-right: 30rpx;
+						}
+					}
+				}
+				.item-no {
+					font-size: 28rpx;
+					background: rgba(3, 54, 146, 0.15);
+					color: #033692;
+					border-radius: 100rpx;
+					padding: 2rpx 30rpx;
+					margin-right: 20rpx;
+					display: block;
+				}
+			}
+		}
+	}
+	.footer {
+		padding: 20upx 40upx;
+		background: #ffffff;
+		uni-button {
+			&:after {
+				border: 0;
+			}
+			width: 90%;
+			color: #585858;
+			font-size: 32rpx;
+		}
+	}
+}
+</style>

+ 252 - 0
pages/digitalShelf/settlementManage/settlementAyDetail.vue

@@ -0,0 +1,252 @@
+<template>
+	<view class="settlement-pages">
+		<!-- 授信结算 -->
+		<view class="sxjs-box" v-if="totalMount">
+			<view class="sxjs-head flex flex_column align-center justify_center">
+				<view>累计待结算</view>
+				<view class="edu">
+					¥<text>{{totalMount}}</text>
+				</view>
+			</view>
+		</view>
+		<view class="monthSel">
+			<u-dropdown>
+				<u-dropdown-item @change="changeMonth" v-model="month" :title="mothTitle" :options="monthList"></u-dropdown-item>
+			</u-dropdown>
+		</view>
+		<view class="ds-box">
+			<scroll-view style="height: calc(100vh - 370upx);position: relative;" scroll-y @scrolltolower="loadMore">
+				 <!-- 列表 -->
+				 <view class="ds-list" v-for="item in shelfOrderList" :key="item.id">
+				 	<view class="flex align_center">
+						<view class="orderNo">{{item.shelfOrderNo}}</view>
+				 		<view class="time">{{item.createDate}}</view>
+				 	</view>
+				 	<view class="flex align_center">
+				 		<view class="carImage flex flex_column justify_center">
+				 			<u-image :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
+				 		</view>
+				 		<view class="carModel">
+				 		  {{item.vehicleModel}}
+				 		</view>
+						<view class="price">¥{{item.settleAmount}}</view>
+				 	</view>
+				 </view>
+				 <view style="padding-top: 10%;border:0" v-if="shelfOrderList.length==0 && status!='loading'">
+				 	<u-empty :src="`/static/nodata.png`" icon-size="180" text="暂无记录" img-width="180" mode="list"></u-empty>
+				 </view>
+				 <view style="padding: 20upx;">
+				 	<u-loadmore load-text="正在加载..." v-if="(allData.length>=shelfOrderList.length&&shelfOrderList.length)||status=='loading'" :status="status" />
+				 </view>
+			</scroll-view>
+		</view>
+		<view class="footer" v-if="totalMount">
+			<u-button :throttle-time="100" @click="toPay" :style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">
+				立即支付(¥{{totalMount}})
+			</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { waitSettleForMonth } from '@/api/shelf.js'
+	export default {
+		data() {
+			return {
+				month: -1,
+				info: null,
+				monthList: [],
+				mothTitle: '全部待结算',
+				waitSettleAmount: 0, // 总金额
+				curSettleAmount: 0, // 当前总金额
+				shelfOrderList: [],
+				pageNo:1,
+				pageSize:10,
+				baseData: [],
+				allData: [],
+				status: 'loading'
+			}
+		},
+		computed: {
+			totalMount() {
+				let tm = 0
+				this.shelfOrderList.map(item => {
+					tm = tm + item.settleAmount
+				})
+				return tm.toFixed(2) 
+			},
+			shelfOrderSnList(){
+				let tm = []
+				this.shelfOrderList.map(item => {
+					tm.push(item.shelfOrderSn)
+				})
+				return tm
+			}
+		},
+		onLoad(opts) {
+			this.info =  JSON.parse(decodeURIComponent(opts.data.replace(/%/g, '%25')))
+			this.month = opts.month
+			this.mothTitle = (opts.month!=-1?(opts.month+'月'):'全部') + '待结算'
+			this.waitSettleAmount = this.info.waitSettleAmount
+			this.monthList = [
+				{
+					label: '全部',
+					value: -1
+				}
+			]
+			this.getAyDjsList()
+		},
+		methods: {
+			// 去支付
+			toPay(){
+				this.info.shelfOrderSnList = this.shelfOrderSnList
+				this.info.waitSettleAmount = this.totalMount
+				uni.navigateTo({
+					url:'/pages/pay/settlementPay/settlementPay?data='+encodeURIComponent(JSON.stringify(this.info))
+				})
+			},
+			// 获取待结算列表
+			getAyDjsList(){
+				waitSettleForMonth().then(res => {
+					console.log(res)
+					const list = res.data || []
+					list.map(item => {
+						this.monthList.push({label:item.month,value:item.month})
+					})
+					this.baseData = list
+					// 分页格式化数据
+					this.formatData()
+				})
+			},
+			formatData(){
+				// 全部
+				if(this.month == -1){
+					let all = []
+					this.baseData.map(item => {
+						all = all.concat(item.shelfOrderList)
+					})
+					this.allData = all
+					this.curSettleAmount = this.waitSettleAmount
+				}else{
+					// 某一月
+					const curRow = this.baseData.find(item => item.month == this.month)
+					this.allData = curRow.shelfOrderList
+					this.curSettleAmount = curRow.settleAmount
+				}
+				// 默认显示第一页
+				const allTotal = this.allData.length
+				this.shelfOrderList = this.allData.slice(0,allTotal<=this.pageSize?allTotal:this.pageSize)
+				this.status = allTotal>=this.shelfOrderList.length ? "nomore" : 'loadmore'
+			},
+			changeMonth(e){
+				console.log(e)
+				this.mothTitle = (e!=-1?(e+'月'):'全部') + '待结算'
+				this.pageNo = 1
+				this.status = "loading"
+				this.formatData()
+			},
+			loadMore(event){
+				console.log(event,'滚动到底部')
+				const curCount = this.shelfOrderList.length
+				const total = this.allData.length
+				if(curCount<total){
+					// 下页
+					this.pageNo = this.pageNo + 1
+					this.status = "loading"
+					setTimeout(()=>{
+						const end = this.pageNo * this.pageSize
+						this.shelfOrderList = this.allData.slice(0,end)
+						this.status = total>=this.shelfOrderList.length ? "nomore" : 'loadmore'
+					},500)
+				}else{
+					this.status = "nomore"
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.settlement-pages{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	> view{
+		padding: 30rpx 50rpx;
+	}
+	.monthSel{
+		padding: 0;
+		margin-top: -20rpx;
+		> view{
+			.u-dropdown__menu{
+				width: 40%;
+			}
+		}
+	}
+	.sxjs-box{
+		> view{
+			background-color: #fff;
+			border-radius: 25rpx;
+			min-height: 100rpx;
+			padding: 30rpx;
+			color: #666;
+		}
+		.sxjs-head{
+			width: 100%;
+			text-align: center;
+			font-size: 30rpx;
+			margin-bottom: 0;
+			> .edu{
+				color: #FA3534;
+				padding: 10rpx 0;
+				font-size: 36rpx;
+				text{
+					font-size: 46rpx;
+					font-style: italic;
+					font-weight: 900;
+				}
+			}
+		}
+	}
+	.ds-box{
+		flex-grow: 1;
+		padding: 0 50rpx;
+		overflow: auto;
+		.ds-list{
+			background-color: #fff;
+			border-radius: 25rpx;
+			margin-bottom: 20rpx;
+			min-height: 100rpx;
+			padding: 10rpx;
+			color: #666;
+			> view{
+				padding: 10rpx;
+				font-size: 28rpx;
+				&:first-child{
+					justify-content: space-between;
+				}
+				.time{
+					color: #666E75;
+					font-size: 24rpx;
+				}
+				.price{
+					color: #FA3534;
+					font-size: 32rpx;
+					padding-left: 20rpx;
+				}
+				.carImage{
+					padding-right: 20rpx;
+				}
+				.carModel{
+					color: #222;
+					font-size: 28rpx;
+					flex-grow: 1;
+				}
+				.orderNo{
+					font-size: 28rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 210 - 0
pages/digitalShelf/settlementManage/settlementManage.vue

@@ -0,0 +1,210 @@
+<template>
+	<view class="settlement-pages">
+		<!-- 授信结算 -->
+		<view class="sxjs-box" v-if="settlementType == 'CREDIT'">
+			<view class="sxjs-head flex flex_column align-center justify_center">
+				<view>已用额度</view>
+				<view class="edu">
+					¥<text>{{info.usedAmount}}</text>
+				</view>
+				<view>
+					<u-button :throttle-time="100" size="mini" @click="viewDetail" :style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">查看详情</u-button>
+				</view>
+			</view>
+			<view class="sxjs-head-grid flex align-center justify_between">
+				<view>
+					<view>授信额度</view>
+					<view class="edu">¥<text>{{info.creditLimit}}</text></view>
+				</view>
+				<view>
+					<view>可用额度</view>
+					<view class="edu">¥<text>{{info.usableAmount}}</text></view>
+				</view>
+			</view>
+		</view>
+		<!-- 按月结算 -->
+		<view class="ayjs-box" v-if="settlementType == 'MONTH'">
+			<view class="ayjs-head flex flex_column align-center justify_center">
+				<view>累计待结算</view>
+				<view class="edu">
+					¥<text>{{info.waitSettleAmount}}</text>
+				</view>
+				<view v-if="info.waitSettleAmount">
+					<u-button :throttle-time="100" size="mini" @click="viewDetail('-1')" :style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">查看详情</u-button>
+				</view>
+			</view>
+			<view class="jsList">
+				<view v-for="item in ayJsList" :key="item.month" class="flex align-center justify_between" @click="viewDetail(item.month)">
+					<view>{{item.month}}月</view>
+					<view>
+						<text>¥{{item.settleAmount}}</text>
+						<uni-font-icons color="#999" size="12" type="icon-xiangyoujiantou"></uni-font-icons>
+					</view>
+				</view>
+				<view style="padding-top: 10%;border:0" v-if="ayJsList.length==0 && status!='loading'">
+					<u-empty :src="`/static/nodata.png`" icon-size="120" text="暂无数据" img-width="120" mode="list"></u-empty>
+				</view>
+				<view style="padding: 20upx;border:0" v-if="(total>=ayJsList.length&&ayJsList.length)||status=='loading'">
+					<u-loadmore load-text="正在加载..." :status="status" />
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniIcons from '@/components/uni-icons/uni-icons.vue';
+	import {findStoreShelfSettleRule,waitSettleForMonth} from '@/api/shelf'
+	export default {
+		components: {
+			uniIcons
+		},
+		data() {
+			return {
+				settlementType: '',
+				info: null,
+				ayJsList: [],
+				status: '',
+				total: 0
+			}
+		},
+		onReady() {
+		},
+		onNavigationBarButtonTap(btns){
+			// 结算记录
+			if(btns.index == 0){
+				uni.navigateTo({
+					url: "/pages/digitalShelf/settlementRecord/settlementRecord"
+				})
+			}
+		},
+		onShow() {
+			this.getDetail()
+		},
+		methods: {
+			// 查询详情
+			getDetail(){
+				findStoreShelfSettleRule().then(res => {
+					console.log(res)
+					if(res.status == 200){
+						this.info = res.data
+						this.settlementType = res.data.settleType
+						if(this.settlementType == "MONTH"){
+							// 获取待结算列表
+							this.getAyDjsList()
+						}
+					}
+				})
+			},
+			// 获取待结算列表
+			getAyDjsList(){
+				this.status = 'loading'
+				waitSettleForMonth().then(res => {
+					console.log(res)
+					this.ayJsList = res.data || []
+					this.total = this.ayJsList.length
+					this.status = ''
+				})
+			},
+			// 已用额度详情
+			viewDetail(month){
+				if(this.settlementType == 'CREDIT'){
+					uni.navigateTo({
+						url: "/pages/digitalShelf/settlementManage/settlementSxDetail?data="+encodeURIComponent(JSON.stringify(this.info))
+					})
+				}else{
+					uni.navigateTo({
+						url: "/pages/digitalShelf/settlementManage/settlementAyDetail?month="+month+"&data="+encodeURIComponent(JSON.stringify(this.info))
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.settlement-pages{
+	min-height: 100vh;
+	> view{
+		padding: 30rpx 50rpx;
+	}
+	.sxjs-box{
+		> view{
+			background-color: #fff;
+			border-radius: 25rpx;
+			margin-bottom: 20rpx;
+			min-height: 100rpx;
+			padding: 30rpx;
+			color: #666;
+		}
+		.sxjs-head{
+			width: 100%;
+			text-align: center;
+			font-size: 30rpx;
+			.edu{
+				color: #FA3534;
+				padding: 10rpx 0;
+				font-size: 36rpx;
+				text{
+					font-size: 46rpx;
+					font-style: italic;
+					font-weight: 900;
+				}
+			}
+		}
+		.sxjs-head-grid{
+			> view{
+				width: 50%;
+				border-right: 2rpx solid #eee;
+				text-align: center;
+				.edu{
+					text{
+						font-size: 40rpx;
+						color: #222;
+					}
+				}
+				&:last-child{
+					border: 0;
+				}
+			}
+		}
+	}
+	.ayjs-box{
+		> view{
+			background-color: #fff;
+			border-radius: 25rpx;
+			margin-bottom: 20rpx;
+			min-height: 100rpx;
+			padding: 30rpx;
+			color: #666;
+		}
+		.ayjs-head{
+			width: 100%;
+			text-align: center;
+			font-size: 30rpx;
+			.edu{
+				color: #FA3534;
+				padding: 10rpx 0;
+				font-size: 36rpx;
+				text{
+					font-size: 46rpx;
+					font-style: italic;
+					font-weight: 900;
+				}
+			}
+		}
+		.jsList{
+			> view{
+				border-bottom: 2rpx solid #eee;
+				padding: 20rpx 10rpx;
+				text{
+					margin-left: 10rpx;
+				}
+				&:last-child{
+					border: 0;
+				}
+			}
+		}
+	}
+}
+</style>

+ 269 - 0
pages/digitalShelf/settlementManage/settlementSxDetail.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="settlement-pages">
+		<!-- 授信结算 -->
+		<view class="sxjs-box" v-if="info">
+			<view class="sxjs-head flex flex_column align-center justify_center">
+				<view>已用额度</view>
+				<view class="edu">
+					¥<text>{{info.usedAmount}}</text>
+				</view>
+			</view>
+			<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="line"></view>
+				</view>
+				<view :class="tabIndex==1?'active':''" @click="tabChange(1)">
+					<view>已冻结</view>
+					<view class="edu">¥<text>{{info.freezeAmount}}</text></view>
+					<view class="line"></view>
+				</view>
+			</view>
+		</view>
+		<view class="ds-box">
+			<scroll-view style="height: calc(100vh - 370upx);position: relative;" scroll-y @scrolltolower="loadMore">
+				 <view class="notes-msg" v-if="tabIndex==1">
+				 	已冻结金额是指状态为“待取货”的取货单结算金额合计暂时无需支付,但是会占用授信额度,请尽快处理
+				 </view>
+				 <!-- 列表 -->
+				 <view class="ds-list" v-for="item in list" :key="item.id">
+				 	<view class="flex align_center">
+						<view class="orderNo">{{item.shelfOrderNo}}</view>
+				 		<view class="time">{{item.createDate}}</view>
+				 	</view>
+				 	<view class="flex align_center">
+				 		<view class="carImage flex flex_column justify_center">
+				 			<u-image :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
+				 		</view>
+				 		<view class="carModel">
+				 			{{item.vehicleModel}}
+				 		</view>
+						<view class="price">¥{{item.settleAmount}}</view>
+				 	</view>
+				 </view>
+				 <view style="padding-top: 10%;border:0" v-if="list.length==0 && status!='loading'">
+				 	<u-empty :src="`/static/nodata.png`" icon-size="180" text="暂无记录" img-width="180" mode="list"></u-empty>
+				 </view>
+				 <view style="padding: 20upx;">
+				 	<u-loadmore load-text="正在加载..." v-if="(allData.length>=list.length&&list.length)||status=='loading'" :status="status" />
+				 </view>
+			</scroll-view>
+		</view>
+		<view class="footer" v-if="tabIndex==0&&info.waitSettleAmount>0">
+			<u-button @click="toPay" :throttle-time="100" :style="{background:'#1283d4',color:'#fff'}" shape="circle" type="success">
+				立即支付(¥{{info.waitSettleAmount}})
+			</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniIcons from '@/components/uni-icons/uni-icons.vue';
+	import { waitSettleForSx,shelfSettleBillToPay } from '@/api/shelf.js'
+	export default {
+		components: {
+			uniIcons
+		},
+		data() {
+			return {
+				tabIndex: 0,
+				pageNo: 1,
+				pageSize:10,
+				list: [],
+				allData: [],
+				info:null,
+				status: 'loading',
+				shelfOrderSnList:[]
+			}
+		},
+		onReady() {
+		},
+		onLoad(option) {
+			this.info =  JSON.parse(decodeURIComponent(option.data.replace(/%/g, '%25')))
+			this.getwaitSettleForSx()
+		},
+		methods: {
+			// 去支付
+			toPay(){
+				this.info.shelfOrderSnList = this.shelfOrderSnList
+				uni.navigateTo({
+					url:'/pages/pay/settlementPay/settlementPay?data='+encodeURIComponent(JSON.stringify(this.info))
+				})
+			},
+			waitSettleAmount() {
+				let ret = 0
+				this.allData.map(item => {
+					ret = ret + item.settleAmount
+				})
+				this.info.waitSettleAmount = ret.toFixed(2)
+			},
+			// 获取详细列表
+			getwaitSettleForSx(){
+				const state = ["WAIT","FREEZE","FINISH"]
+				waitSettleForSx({shelfOrderState: state[this.tabIndex]}).then(res => {
+					this.allData = res.data || []
+					console.log(this.allData)
+					// 默认显示第一页
+					const allTotal = this.allData.length
+					this.list = this.allData.slice(0,allTotal<=this.pageSize?allTotal:this.pageSize)
+					this.status = allTotal>=this.list.length ? "nomore" : 'loadmore'
+					if(this.tabIndex==0){
+						// 获取所有sn
+						this.allData.map(item => {
+							this.shelfOrderSnList.push(item.shelfOrderSn)
+						})
+						this.waitSettleAmount()
+					}
+				})
+			},
+			tabChange(i){
+				this.tabIndex = i
+				this.pageNo = 1
+				this.status = "loading"
+				this.allData = []
+				this.list = []
+				this.shelfOrderSnList = []
+				this.getwaitSettleForSx()
+			},
+			loadMore(event){
+				console.log(event,'滚动到底部')
+				const curCount = this.list.length
+				const total = this.allData.length
+				if(curCount<total){
+					// 下页
+					this.pageNo = this.pageNo + 1
+					this.status = "loading"
+					setTimeout(()=>{
+						const end = this.pageNo * this.pageSize
+						this.list = this.allData.slice(0,end)
+						this.status = total>=this.list.length ? "nomore" : 'loadmore'
+					},500)
+				}else{
+					this.status = "nomore"
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.settlement-pages{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	> view{
+		padding: 30rpx 50rpx;
+	}
+	.sxjs-box{
+		> view{
+			background-color: #fff;
+			border-radius: 25rpx;
+			min-height: 100rpx;
+			padding: 30rpx;
+			color: #666;
+		}
+		.sxjs-head{
+			width: 100%;
+			text-align: center;
+			font-size: 30rpx;
+			margin-bottom: 0;
+			> .edu{
+				color: #FA3534;
+				padding: 10rpx 0;
+				font-size: 36rpx;
+				text{
+					font-size: 46rpx;
+					font-style: italic;
+					font-weight: 900;
+				}
+			}
+		}
+		.sxjs-head-grid{
+			margin-top: -40rpx;
+			padding-bottom: 20rpx;
+			> view{
+				width: 50%;
+				border-right: 2rpx solid #eee;
+				text-align: center;
+				color: #999;
+				position: relative;
+				.edu{
+					text{
+						font-size: 40rpx;
+					}
+				}
+				&:last-child{
+					border: 0;
+				}
+				.line{
+					width: 60%;
+					position: absolute;
+					left: 20%;
+					bottom: -20rpx;
+				}
+			}
+			.active{
+				color: #666;
+				.edu{
+					text{
+						color: #222;
+					}
+				}
+				.line{
+					border-bottom: 6rpx solid #0485F6;
+				}
+			}
+		}
+	}
+	.ds-box{
+		flex-grow: 1;
+		padding: 0 50rpx;
+		overflow: auto;
+		.notes-msg{
+			background-color: #F8ECD9;
+			border-radius: 25rpx;
+			margin-bottom: 20rpx;
+			min-height: 100rpx;
+			padding: 30rpx;
+			color: #666E75;
+			font-size: 28rpx;
+		}
+		.ds-list{
+			background-color: #fff;
+			border-radius: 25rpx;
+			margin-bottom: 20rpx;
+			min-height: 100rpx;
+			padding: 10rpx;
+			color: #666;
+			> view{
+				padding: 10rpx;
+				font-size: 28rpx;
+				&:first-child{
+					justify-content: space-between;
+				}
+				.time{
+					color: #666E75;
+					font-size: 24rpx;
+				}
+				.price{
+					color: #FA3534;
+					font-size: 32rpx;
+					padding-left: 20rpx;
+				}
+				.carImage{
+					padding-right: 20rpx;
+				}
+				.carModel{
+					color: #222;
+					font-size: 28rpx;
+					flex-grow: 1;
+				}
+				.orderNo{
+					font-size: 28rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 249 - 0
pages/digitalShelf/settlementRecord/orderPartDetail.vue

@@ -0,0 +1,249 @@
+<template>
+	<view class="orderpartDetail">
+		<!-- 头部车辆信息 -->
+		<div class="flex align-center cpb_header" v-if="info">
+			<div>
+				<u-image :src="info.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+			</div>
+			<div>
+				<div class="flex align-center" v-if="info.vehicleNumber">
+					<carNo color="#0055ff" :val="info.vehicleNumber"></carNo>
+				</div>
+				<div class="flex align-center">
+					<div class="carTits ellipsis-two">
+					  {{info.vehicleModel}}{{info.vehicleModel}}
+					</div>
+				</div>
+				<div class="flex align-center">
+					<div>VIN码:{{info.vin||'暂无'}}</div>
+					<div v-if="info.vin" class="copyText" @click="copyVin(info.vin)"><span>复制</span></div>
+				</div>
+			</div>
+		</div>
+		<view class="info partList" v-if="list.length">
+			<view class="infoList">
+				<view class="title">配件列表</view>
+				<view>
+					{{list.length}}款,共<text class="redText">{{totalNums}}</text>件
+				</view>
+			</view>
+			<view v-for="item in list" :key="item.id" class="flex align-center item-list">
+				<view>
+					<u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
+				</view>
+				<view>
+					<view class="item-name">
+					  <text>{{item.productName}}</text>
+					</view>
+					<view class="item-nums">
+						<text>{{item.productCode}}</text>
+					</view>
+					<view class="item-head">
+						<view class="price">¥{{item.salePrice}}</view>
+						<text class="nums">x {{item.totalQty}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="info" v-if="info">
+			<view class="infoList">
+				<view class="title">单据信息</view>
+				<view class="statu"></view>
+			</view>
+			<view class="infoList dju">
+				<text>订单编号</text>
+				<text>{{info.shelfOrderNo||'--'}}</text>
+			</view>
+			<view class="infoList">
+				<text>下单时间</text>
+				<text>{{info.shelfOrderDate||'--'}}</text>
+			</view>
+			<view class="infoList">
+				<text>下单人员</text>
+				<text>{{info.orderPersonName||'--'}}</text>
+			</view>
+		</view>
+		<view class="info">
+			<view class="infoList">
+				<text>出库时间</text>
+				<text>{{info.outDate||'--'}}</text>
+			</view>
+			<view class="infoList">
+				<text>出库人员</text>
+				<text>{{info.outPersonName||'--'}}</text>
+			</view>
+			<view class="infoList">
+				<text>支付时间</text>
+				<text>{{info.payDate||'--'}}</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import carNo from '@/components/carNo.vue'
+	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
+	import {findBySnShelfOrder} from '@/api/shelf.js'
+	export default {
+		components: {carNo},
+		data() {
+			return {
+				info: null,
+				list: [],
+			}
+		},
+		computed: {
+		   totalNums(){
+			   let ret = 0
+			   this.list.map(item => {
+				   ret += item.totalQty
+			   })
+			   return ret
+		   }
+		},
+		onLoad() {
+			this.info = this.$store.state.vuex_settleOrderDetail
+			this.getDetail()
+		},
+		methods: {
+			// 复制
+			copyVin(vin){
+				clipboard.setText(vin);
+				uni.showToast({
+					icon: 'none',
+					title: 'vin码已复制成功'
+				})
+			},
+			// 获取详情
+			getDetail(){
+				console.log(this.info.shelfOrderSn)
+			  findBySnShelfOrder({sn: this.info.shelfOrderSn}).then(res => {
+				  console.log(res,'++++++++')
+				  if(res.status == 200){
+					  this.list = res.data.shelfOrderDetailList || []
+				  }
+			  })
+			},
+		},
+	}
+</script>
+
+<style lang="less">
+	.orderpartDetail{
+		.cpb_header{
+			background-color: #FFFFFF;
+			padding: 30rpx 15rpx;
+			> div{
+				padding: 0 10rpx;
+				align-items: center;
+				&:first-child{
+					padding-right: 10rpx;
+				}
+				> div{
+					&:first-child{
+						padding-right: 20rpx;
+						flex-grow: 1;
+						color: #818b94;
+						font-size: 24rpx;
+					}
+				}
+			}
+			.copyText{
+				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;
+			}
+			.carTits{
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #222222;
+				line-height: normal;
+				margin-bottom: 10rpx;
+				flex-grow: 1;
+			}
+			.qhbtns{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 20rpx;
+				color: #0485F6;
+				border:2rpx solid #0485F6;
+				border-radius: 50rpx;
+				background: rgba(88, 177, 255, 0.2);
+				width: 200rpx;
+				height: 36rpx;
+				margin-left: 10rpx;
+			}
+		}
+		.info{
+			background-color: #FFFFFF;
+			padding: 10rpx 30upx;
+			font-size: 32rpx;
+			margin-top: 20rpx;
+			.infoList{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 22rpx 0;
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{border: none;}
+				.title{
+					font-weight: bold;
+				}
+				> text{
+					&:first-child{
+						color: #666E75;
+					}
+				}
+			}
+			.redText{
+				color: #FB1E1E;
+			}
+			.item-list{
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: none;
+				}
+				> view{
+					padding: 20rpx 0;
+					&:first-child{
+						margin-right: 20rpx;
+						margin-top: 18rpx;
+					}
+					&:last-child{
+						flex-grow: 1;
+					}
+				}
+				.item-name{
+					word-wrap: break-word;
+					font-size: 32rpx;
+					color: #333;
+					margin-top: 10rpx;
+				}
+				.item-nums{
+					padding: 10rpx 0;
+					text{
+						font-size: 32rpx;
+						color: #222222;
+					}
+				}
+				.item-head{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					color: #666;
+					.price{
+						color: #FB1E1E;
+						font-size: 32rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 262 - 0
pages/digitalShelf/settlementRecord/settlementDetail.vue

@@ -0,0 +1,262 @@
+<template>
+	<view class="settlement-pages">
+		<!-- 授信结算 -->
+		<view class="sxjs-box" v-if="info">
+			<view class="sxjs-head flex justify_between">
+				<view class="flex flex_column align_start justify_center">
+					<view>已结算</view>
+					<view class="edu">
+						¥<text>{{info.settleAmount}}</text>
+					</view>
+				</view>
+				<view class="flex flex_column align_end justify_center">
+					<view>支付方式</view>
+					<view class="pay">
+						{{info.payTypeVal}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="ds-box" v-if="info">
+			<view>
+				<view class="titls">使用记录</view>
+				<scroll-view style="height: calc(100vh - 370upx);position: relative;" scroll-y @scrolltolower="onreachBottom">
+					 <!-- 列表 -->
+					 <view class="ds-list" v-for="item in list" :key="item.id" @click="viewDetail(item)">
+					 	<view class="flex align-center">
+							<view class="orderNo">
+								{{item.shelfOrderNo}}
+							</view>
+					 		<view class="time">{{item.createDate}}</view>
+					 	</view>
+					 	<view class="flex align_center">
+					 		<view class="carImage flex flex_column">
+					 			<u-image :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
+					 		</view>
+					 		<view style="flex-grow: 1;">
+								<!-- <view class="flex" v-if="item.vehicleNumber">
+									<carNo color="#0055ff" :val="item.vehicleNumber"></carNo>
+								</view> -->
+					 		  <view class="carModel flex align_center">
+					 			  {{item.vehicleModel}}
+								  <view class="price">
+								  	¥{{item.settleAmount}}
+								  </view>
+					 		  </view>
+							  <view class="carVin flex">
+								  <view>VIN码:{{item.vin||'暂无'}}</view>
+								  <text v-if="item.vin" @click.stop="copyVin(item.vin)">复制</text>
+							  </view>
+					 		</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" />
+					 </view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import carNo from '@/components/carNo.vue'
+	import uniIcons from '@/components/uni-icons/uni-icons.vue';
+	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
+	import { getShelfOrderList } from "@/api/shelf.js"
+	export default {
+		components: {
+			uniIcons,
+			carNo
+		},
+		data() {
+			return {
+				 info: null,
+				 allData: [],
+				 list: [],
+				 pageSize: 20,
+				 pageNo: 1,
+				 status: 'loading',
+				 total: 0,
+			}
+		},
+		onReady() {
+		},
+		onLoad() {
+			this.info = this.$store.state.vuex_settleRecordDetail
+			// 获取使用记录
+			this.getUseRecord()
+		},
+		methods: {
+			// 复制
+			copyVin(vin){
+				clipboard.setText(vin);
+				uni.showToast({
+					icon: 'none',
+					title: 'vin码已复制成功'
+				})
+			},
+			getUseRecord(pageNo){
+				let _this = this
+				if (pageNo) {
+				  this.pageNo = pageNo
+				}
+				let params = {
+				  pageNo: this.pageNo,
+				  pageSize: this.pageSize,
+				  settleBillSn: this.info.settleBillSn
+				}
+				console.log(params)
+				this.status = "loading"
+				getShelfOrderList(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
+					} else {
+					  _this.list = []
+					  _this.total = 0
+					  _this.noDataText = res.message
+					}
+					 if(this.swiperCurrent == 0){
+						 this.tabList[0].count = _this.total<=99?_this.total:'99+'
+					 }
+					_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				console.log(this.list.length, this.total)
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getUseRecord()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			viewDetail(item){
+				item.payDate = this.info.payDate
+				this.$u.vuex('vuex_settleOrderDetail', item)
+				uni.navigateTo({
+					url: "/pages/digitalShelf/settlementRecord/orderPartDetail"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.settlement-pages{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	> view{
+		padding: 30rpx 50rpx;
+	}
+	.sxjs-box{
+		> view{
+			background-color: #fff;
+			border-radius: 25rpx;
+			min-height: 100rpx;
+			padding: 30rpx;
+			color: #666;
+		}
+		.sxjs-head{
+			width: 100%;
+			text-align: center;
+			font-size: 30rpx;
+			margin-bottom: 0;
+			> view{
+				width: 50%;
+				> .edu{
+					color: #29AD46;
+					padding: 10rpx 0;
+					font-size: 36rpx;
+					text{
+						font-size: 46rpx;
+						font-style: italic;
+						font-weight: 900;
+					}
+				}
+				.pay{
+					padding: 10rpx 0;
+					font-size: 36rpx;
+					color: #222222;
+				}
+			}
+		}
+	}
+	.ds-box{
+		flex-grow: 1;
+		padding: 0 50rpx;
+		overflow: auto;
+		> view{
+			background-color: #fff;
+			border-radius: 25rpx;
+			padding: 30rpx;
+			.titls{
+				font-weight: bold;
+			}
+		}
+		.ds-list{
+			background-color: #fff;
+			min-height: 100rpx;
+			padding: 20rpx 0;
+			color: #666;
+			border-bottom: 2rpx solid #f5f5f5;
+			> view{
+				padding: 10rpx;
+				font-size: 28rpx;
+				&:first-child{
+					justify-content: space-between;
+				}
+				.time{
+					color: #666E75;
+					font-size: 24rpx;
+				}
+				.price{
+					color: #FB1E1E;
+					font-size: 32rpx;
+					padding-left: 20rpx;
+				}
+				.carImage{
+					padding-right: 20rpx;
+				}
+				.carModel{
+					color: #222;
+					font-size: 28rpx;
+					margin-bottom: 10rpx;
+				}
+				.orderNo{
+					color: #666E75;
+					font-size: 28rpx;
+				}
+				.carVin{
+					color: #666E75;
+					font-size: 24upx;
+					> view{
+						word-break:break-all;
+					}
+					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: 10rpx;
+						height: 40rpx;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

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

@@ -0,0 +1,118 @@
+<template>
+	<view class="settlementrecord-pages">
+		<view class="jsList">
+			<view v-for="item in list" :key="item.id" class="flex align_center justify_between" @click="viewDetail(item)">
+				<view>
+					<view>{{item.payDate}}</view>
+					<view class="payType">{{ filterpayType(item.payWay) }}</view>
+				</view>
+				<view>
+					<text>¥{{item.settleAmount}}</text>
+					<uni-font-icons color="#999" size="12" type="icon-xiangyoujiantou"></uni-font-icons>
+				</view>
+			</view>
+			<view style="padding-top: 50%;border:0" v-if="list.length==0 && status!='loading'">
+				<u-empty :src="`/static/nodata.png`" icon-size="240" :text="noDataText" img-width="120" mode="list"></u-empty>
+			</view>
+			<view style="padding: 20upx;border:0" v-if="(total>=list.length&&list.length)||status=='loading'">
+				<u-loadmore load-text="正在加载..." :status="status" />
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getShelfSettleBillList} from "@/api/shelf.js"
+	export default {
+		data() {
+			return {
+				list: [],
+				pageNo: 1,
+				pageSize: 20,
+				total: 0,
+				noDataText: '暂无数据',
+				status: 'loadimg'
+			}
+		},
+		onLoad() {
+			this.getSettleBillList()
+		},
+		methods: {
+			filterpayType(val) {
+				let dataList = this.$store.state.vuex_paymentTypeList;
+				let _value = '';
+				for (let i = 0; i < dataList.length; i++) {
+					if (val == dataList[i].code) {
+						_value = dataList[i].dispName;
+						break;
+					}
+				}
+				return _value;
+			},
+			getSettleBillList(){
+				let params = {
+				  pageNo: this.pageNo,
+				  pageSize: this.pageSize
+				}
+				const _this = this
+				this.status = "loading"
+				getShelfSettleBillList(params).then(res => {
+					console.log(res)
+					if (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
+					} else {
+					  _this.list = []
+					  _this.total = 0
+					  _this.noDataText = res.message
+					}
+					 
+					_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+				})
+			},
+			viewDetail(item){
+				item.payTypeVal = this.filterpayType(item.payWay)
+				this.$u.vuex('vuex_settleRecordDetail', item)
+				uni.navigateTo({
+					url: "/pages/digitalShelf/settlementRecord/settlementDetail"
+				})
+			}
+		},
+		onReachBottom() {
+			if(this.list.length < this.total){
+				this.pageNo += 1
+				this.getSettleBillList()
+			}else{
+				this.status = "nomore"
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.settlementrecord-pages{
+		background-color: #fff;
+		padding: 10rpx 30rpx;
+		min-height: 100vh;
+		.jsList{
+				> view{
+					border-bottom: 2rpx solid #eee;
+					padding: 30rpx 10rpx;
+					color: #666;
+					text{
+						margin-left: 10rpx;
+						color: #222;
+					}
+					.payType{
+						color: #999;
+						margin-top: 10rpx;
+					}
+				}
+			}
+	}
+
+</style>

+ 381 - 0
pages/digitalShelf/stockPut.vue

@@ -0,0 +1,381 @@
+<template>
+	<view class="digitShelf-pagesCons">
+		<view class="tab-body">
+			    <view>
+					<u-tabs-swiper ref="uTabs" :list="tabList" 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">
+									<view class="orderNo">{{item.replenishBillNo||'--'}}</view>
+									<view class="times" v-if="item.billState=='WAIT_CHECK'">{{item.outStockTime}}</view>
+									<view class="times" v-if="item.billState=='FINISH'">{{item.putStockTime}}</view>
+									
+								</view>
+								 <view class="check-row flex align-center">
+									 <view>
+										  <view class="carModel">
+											  {{item.dealerName||'--'}}
+										  </view>
+										  <view class="carVin" v-if="item.billState=='WAIT_CHECK'">
+											  待入库数量:<text>{{item.totalConfirmQty||item.totalConfirmQty==0?item.totalConfirmQty:'--'}}</text>
+										  </view>
+										  <view class="carVin" v-if="item.billState=='FINISH'">
+										  											  已入库数量:<text>{{item.totalPutQty||item.totalPutQty==0?item.totalPutQty:'--'}}</text>
+										  </view>
+									 </view>
+									 <view>
+									 	<button  :hover-stop-propagation="true" @click.stop="viewRow(item)"  class="action finish" size="mini">查看详情</button>
+									 	<!-- <button v-if="swiperCurrent==0" :hover-stop-propagation="true" @click.stop="toPut(item)" class="action finish" size="mini">立即入库</button> -->
+									 </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 v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+							 </view>
+						</scroll-view>
+					</swiper-item>
+				</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getShelfReplenishBilllList } from '@/api/shelf'
+	import { clzConfirm } from '@/libs/tools.js'
+	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
+	import moment from 'moment'
+	export default {
+		components: {},
+		data() {
+			return {
+				theme:'',
+				status: 'loading',
+				noDataText: '暂无数据',
+				tabList: [
+					  {
+						  dispName: '待入库',
+						  typeId: 'WAIT_CHECK'
+					   },
+					  {
+					    dispName: '已入库',
+					  	typeId: 'FINISH'
+					  },
+				  ],
+				current: 0,
+				swiperCurrent: 0,
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+				billState:'', // 状态
+			}
+		},
+		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(){
+				clipboard.setText(this.vinNumber);
+				uni.showToast({
+					icon: 'none',
+					title: 'vin码已复制成功'
+				})
+			},
+			message(title){
+				uni.showToast({
+					icon:'none',
+					title: title
+				})
+			},
+			pageInit(){
+				this.total = 0
+				this.billState = this.tabList[this.current].typeId
+				this.pageNo = 1
+				// 待取货
+				if(this.swiperCurrent == 0){
+					this.finishFlag = ''
+					this.orderFlags = []
+				}
+				// 已取货
+				if(this.swiperCurrent == 1){
+					this.finishFlag = 'SAVE'
+					this.orderFlags = []
+				}
+				// 已取消
+				if(this.swiperCurrent == 2){
+					this.finishFlag = 'FINI'
+					this.orderFlags = ['UNPA','INPA']
+				}
+				
+				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
+			  }
+			  
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				billState:this.tabList[this.current].typeId
+			  }
+			  this.status = "loading"
+			  getShelfReplenishBilllList(params).then(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
+				} 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/stockPutDetail?sn="+item.replenishBillSn
+				})
+			},
+			// 立即入库
+			toPut (params,index) {
+			  let _this = this
+			  clzConfirm({
+					title: '提示',
+					content: '确认立即入库?',
+					success: (ret) => {
+					  if(ret.confirm||ret.index==0){
+					  }
+					}
+			  })
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.digitShelf-pagesCons{
+		width: 100%;
+		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;
+					align-items: center;
+					padding: 20upx 10upx;
+					font-size: 28upx;
+					&:first-child{
+						color: #666E75;
+						font-size: 28upx;
+						padding-bottom: 10upx;
+						.orderNo{
+							font-size: 34upx;
+							color: #222222;
+							width: 45%;
+						}
+						border-bottom: 2upx solid #f5f5f5;
+					}
+					> view{
+						justify-content: space-between;
+						&:first-child{
+							flex-grow: 1;
+							width: 65%;
+						}
+						.carModel{
+							color: #222222;
+							font-size: 32upx;
+							font-weight: bold;
+							line-height: normal;
+							margin-bottom: 10rpx;
+						}
+						.carVin{
+							color: #666E75;
+							text{
+								color: #033692;
+							}
+						}
+					}
+					.carImage{
+						padding-right: 20rpx;
+					}
+					.action{
+						padding: 0 30rpx;
+						color: #fff;
+						border-radius: 100rpx;
+						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>

+ 214 - 0
pages/digitalShelf/stockPutDetail.vue

@@ -0,0 +1,214 @@
+<template>
+	<view class="orderDetail-digitalShel flex flex_column">
+		<view class="contHead">
+			<view class="statusH">
+				<view class="flex flex_column align_center">
+					<view class="status-row">
+						<u-icon :name="pageInfo&&pageInfo.billState=='WAIT_CHECK'?'hourglass-half-fill':'checkmark-circle'" size="42" color="#fff"> 
+						</u-icon>
+						<text>{{pageInfo&&pageInfo.billState=='WAIT_CHECK'?'待入库':'已入库'}}</text>
+					</view>
+					<view class="messageText">配送方式:{{pageInfo&&pageInfo.dispatchTypeValue?pageInfo.dispatchTypeValue:'--'}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="order-body">
+			<view class="info partList">
+				<!-- <view class="infoList">
+					<view class="title">配件列表</view>
+					<view>
+						2款,共<text class="redText">11</text>件
+					</view>
+				</view> -->
+				<view v-for="item in partList" :key="item.id" class="flex align-center item-list">
+					<view>
+						<u-image border-radius="16" width="130" height="130" bg-color="#EBEBEB" :src="item.images"></u-image>
+					</view>
+					<view>
+						<view class="item-name">
+						  <text>{{item.productName||'--'}}</text>
+						</view>
+						<view class="item-nums flex align-center justify_between">
+							<text>{{item.productCode||'--'}}</text>
+							<!-- <view>
+								<u-number-box :min="0" :max="999999"></u-number-box>
+							</view> -->
+							<view v-if="pageInfo&&pageInfo.billState=='FINISH'">
+								<text>入库数量:{{item.putQty||item.putQty==0?item.putQty:'--'}}</text>
+							</view>
+							<view v-else>
+								<text>待入库数量:{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniIcons from "@/components/uni-icons/uni-icons.vue"
+	import moment from 'moment'
+	import { findShelfReplenishBill } from '@/api/shelf.js'
+	import { clzConfirm } from '@/libs/tools.js'
+	import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
+	export default {
+	   name: 'orderDetail-digitalShel',
+	   components: {
+		uniIcons,
+	   },
+	   data() {
+		   return {
+			   info: null,
+			   statusText: '',
+			   statusIcon: '', // 结算状态icon
+			   partList: [], // 配件列表
+			   pageInfo:null
+		   }
+	   },
+	   onReady() {
+	   	 
+	   },
+	   onLoad(option) {
+		   console.log(option,option.sn)
+		  let sn = option.sn
+		  this.getPageInfo(sn)
+	   },
+	   computed: {
+	   },
+	   methods: {
+		   // 复制
+		   copyVin(){
+			clipboard.setText(this.vinNumber);
+			uni.showToast({
+				icon: 'none',
+				title: 'vin码已复制成功'
+			})
+		   },
+		 message(title){
+		 	uni.showToast({
+		 		icon:'none',
+		 		title: title
+		 	})
+		 }, 
+		 // 查询详情
+		 getPageInfo(val){
+			findShelfReplenishBill({sn:val}).then(res=>{
+				if(res.status==200){
+					this.pageInfo=res.data||null
+					this.partList=res.data.clzReplenishBillDetailApiEntityList||[]
+				}
+			})
+		 }
+	   }
+	}
+</script>
+
+<style lang="less">
+	page{
+		height: 100%;
+	}
+	.orderDetail-digitalShel{
+		height: 100%;
+		.redText{
+			color: #FB1E1E;
+		}
+		.order-body{
+			flex-grow: 1;
+			overflow: auto;
+		}
+		.contHead {
+			background-color: white;
+			margin-top: -20rpx;
+			.statusH{
+				> view{
+					padding: 10upx 12%;
+					font-size: 34upx;
+				}
+				.status-row{
+					font-size: 42upx;
+					text{
+						margin-left: 10rpx;
+					}
+				}
+				.messageText{
+					font-size: 30upx;
+					text-align: center;
+					text{
+						color: #ffaa00;
+					}
+					padding: 10rpx 0;
+				}
+			}
+		}
+		.info{
+			background-color: #FFFFFF;
+			padding: 10rpx 30upx;
+			font-size: 32rpx;
+			margin-bottom: 20rpx;
+			.infoList{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 20rpx 0;
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: 0;
+				}
+				.title{
+					font-weight: bold;
+				}
+				> text{
+					&:first-child{
+						color: #666E75;
+					}
+				}
+			}
+			.item-list{
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: none;
+				}
+				> view{
+					padding: 20rpx 0;
+					&:first-child{
+						margin-right: 20rpx;
+						margin-top: 18rpx;
+					}
+					&:last-child{
+						flex-grow: 1;
+					}
+				}
+				.item-name{
+					word-wrap: break-word;
+					font-size: 32rpx;
+					color: #333;
+					font-weight: bold;
+					margin-top: 10rpx;
+				}
+				.item-nums{
+					margin-top: 10rpx;
+					padding: 10rpx 0;
+					text{
+						font-size: 32rpx;
+						color: #222222;
+					}
+				}
+			}
+		}
+		.footer{
+			padding: 20upx 30upx;
+			background: #FFFFFF;
+			uni-button{
+				&:after{
+					border: 0;
+				}
+				width: 100%;
+				color: #585858;
+				font-size: 32rpx;
+			}
+		}
+	}
+	
+</style>

+ 377 - 0
pages/digitalShelf/temproaryStockIn/moreShelfProduct.vue

@@ -0,0 +1,377 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="moreShelfPart-search">
+			<u-search
+			placeholder="请输入关键字查询" 
+			v-model="queryWord" 
+			:show-action="isGobleSearch" 
+			@focus="isGobleSearch=true" 
+			@blur="searchPart"
+			@custom="searchPart" 
+			@search="searchPart" 
+			@clear="searchPart"
+			:action-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', 'padding': '12upx 0'}">
+			</u-search>
+		</view>
+		<view class="moreShelfPart-body">
+			<scroll-view
+			class="nav-right" 
+			scroll-y 
+			@scrolltolower="onreachBottom">
+				<!-- vin适配配件 -->
+				<view>
+					<view class="nav-right-title">该车适配</view>
+					<view class="nav-right-item" v-for="(item, index) in vinPartList" :key="item.id">
+						<view class="uni-col-2">
+							<u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'"  @click="viewImg(item)" border-radius="30" width="120" height="120" bg-color="#EBEBEB" ></u-image>
+						</view>
+						<view class="item-info uni-col-10">
+							<view class="item-name">
+								<text>{{item.name}}</text>
+							</view>
+							<view class="item-detail">
+								<view class="nav-right-item-btns flex align_center justify_between">
+									<view>
+										<text class="item-detail-text">{{item.code}}</text>
+									</view>
+									<view>
+										<u-button :throttle-time="100" class="item-btn" v-if="!item.checked" type="primary" :style="{background:'#1283d4'}" shape="circle"  size="mini" @click="choosePart(item)">选择</u-button>
+										<u-button :throttle-time="100" class="item-btn" v-else type="success" shape="circle" size="mini" @click="choosePart(item,0)">已选择</u-button>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view v-if="vinPartList&&vinPartList.length==0">
+						<u-empty v-if="vinstatus!='loading'" :src="`/static/nodata.png`" icon-size="120" text="暂无配件" mode="list" :margin-top="30"></u-empty>
+					</view>
+					<view style="padding: 20upx;" v-if="vinstatus=='loading'" >
+						<u-loadmore :status="vinstatus" />
+					</view>
+				</view>
+				<!-- 其它配件 -->
+				<view class="nav-right-title" style="margin-top: 20rpx;">其它配件</view>
+				<view class="nav-right-item" v-for="(item, index) in partList" :key="item.id">
+					<view class="uni-col-2">
+						<u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="120" height="120" bg-color="#EBEBEB" ></u-image>
+					</view>
+					<view class="item-info uni-col-10">
+						<view class="item-name">
+							<text>{{item.name}}</text>
+						</view>
+						<view class="item-detail">
+							<view class="nav-right-item-btns flex align_center justify_between">
+								<view>
+									<text class="item-detail-text">{{item.code}}</text>
+								</view>
+								<view>
+									<u-button :throttle-time="100" class="item-btn" v-if="!item.checked" type="primary" :style="{background:'#1283d4'}" shape="circle"  size="mini" @click="choosePart(item)">选择</u-button>
+									<u-button :throttle-time="100" class="item-btn" v-else type="success" shape="circle" size="mini" @click="choosePart(item,1)">已选择</u-button>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="partList&&partList.length==0">
+					<u-empty v-if="status!='loading'" :src="`/static/nodata.png`" icon-size="240" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+				</view>
+				<view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
+					<u-loadmore :status="status" />
+				</view>
+			</scroll-view>
+		</view>
+		<view class="moreShelfPart-footer">
+			您可以选择更多数字货架上暂时没有库存的配件进行临配
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList } from '@/api/shelf'
+	export default {
+		data() {
+			return {
+				queryWord: '',
+				isGobleSearch: false,
+				vinPartList: [],
+				partList: [],
+				pageNo:1,
+				pageSize: 10,
+				vinCode: [],
+				vinNumber: '',
+				total: 0, // 列表总数
+				noDataText: '暂无配件',
+				status: 'loading',
+				vinstatus: 'loading'
+			}
+		},
+		onLoad(opts) {
+			this.vinNumber = opts.vinNumber
+			if(this.vinNumber){
+				this.getCarCodeByVin()
+			}else{
+				this.vinstatus = 'nomore'
+				this.getShelfProductList()
+			}
+		},
+		methods: {
+			viewImg(item){
+				uni.previewImage({
+					urls: [item.images]
+				})
+			},
+			clearSearch(){
+				this.queryWord = ''
+				this.pageNo = 1
+				this.partList = []
+			},
+			// 搜索配件
+			searchPart(){
+				this.getShelfProductList()
+			},
+			getCarCodeByVin(){
+				queryPartCodeByVin({vinNumber:this.vinNumber}).then(res => {
+					console.log(res,'this.vinCode')
+					if(res.status == 200){
+						this.vinCode = res.data
+						this.getVinShelfPartList()
+						this.getShelfProductList()
+					}
+				})
+			},
+			// 根据客户vin查询该车可用数字货架中的配件
+			getVinShelfPartList(){
+				let params = {
+				      queryWord: this.queryWord,
+				      partsClsId: '',
+				      vin: this.vinNumber,
+					  codeList: this.vinCode,
+					  currentInven:0
+				  }
+				this.vinstatus = 'loading'
+				getShelfQueryList(params).then(res => {
+					console.log(res,'getVinShelfPartList')
+					this.vinPartList = res.data.length ? this.fiterChecked(res.data) : []
+					this.vinstatus = 'nomore'
+				})
+			},
+			// 获取数字货架配件列表
+			getShelfProductList(){
+				const _this = this
+				let params = {
+				    pageNo: this.pageNo,
+				    pageSize: this.pageSize,
+					excludeCodeList: this.vinCode,
+					queryWord: this.queryWord,
+					currentInven:0
+				}
+				console.log(params)
+				_this.status = 'loading'
+				getShelfProductList(params).then(res => {
+					uni.hideLoading()
+					console.log(res,'获取数字货架配件列表')
+					if(res.status == 200){
+						let list = res.data.list
+						console.log(list)
+						if (list && list.length>0){
+							// 分页 拼接数据
+							if (_this.pageNo != 1) {
+								_this.partList = _this.partList ? _this.partList.concat(this.fiterChecked(list)) : this.fiterChecked(list)
+							} else {
+								_this.partList = this.fiterChecked(list)
+							}
+							this.total = res.data.count
+							console.log(_this.status)
+							if (_this.partList.length == res.data.count) {
+								_this.status = 'nomore'
+							} else {
+								_this.status = 'loadmore'
+							}
+							console.log(_this.status)
+						} else {
+							console.log(_this.status)
+							_this.partList = list || []
+							this.total = 0
+							_this.status = 'nomore'
+						}
+						console.log(_this.status)
+						_this.noDataText = '暂无配件'
+					}else{
+						_this.status = 'loadmore'
+						_this.partList = []
+						_this.total = 0
+						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+					}
+				})
+			},
+			// 加载更多
+			onreachBottom () {
+				if(this.partList.length < this.total ){
+					if(this.isGobleSearch&&this.queryWord==''){
+						return
+					}
+					this.pageNo++
+					this.getShelfProductList()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 过滤已选择的
+			fiterChecked (list){
+				this.$store.state.vuex_shelfChoosePart.map(item => {
+					let p = list.find(k => {
+						return k.productSn == item.productSn
+					})
+					if(p){
+						p.checked = true
+					}
+				})
+				return list
+			},
+			// 对比已选择项目
+			hasChecked (row){
+				let b = this.$store.state.vuex_shelfChoosePart
+				let has = b.findIndex(item => {
+					return item.productSn && item.productSn == row.productSn
+				})
+				return has
+			},
+			// 选择配件
+			choosePart(item,type){
+				const hs = this.hasChecked(item)
+				const b = this.$store.state.vuex_shelfChoosePart
+				// 取消选择
+				if(hs>=0){
+					item.checked = false
+					b.splice(hs,1)
+				}else{
+					item.checked = true
+					item.qty = 1
+					b.push(item)
+				}
+				if(type==0){
+					this.vinPartList.splice()
+				}else{
+					this.partList.splice()
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.moreShelfPart{
+		height: 100vh;
+		.moreShelfPart-search{
+			padding: 20rpx;
+		}
+		.moreShelfPart-body{
+			flex-grow: 1;
+			background-color: #fff;
+		}
+		.moreShelfPart-footer{
+			padding: 20rpx;
+			color: #191919;
+			font-size: 26rpx;
+			text-align: center;
+		}
+		.nav-right{
+			padding: 0 30upx;
+			height: calc(100vh - 180rpx);
+			box-sizing: border-box;
+			.nav-right-title{
+				font-weight: bold;
+				font-size: 32upx;
+				padding: 10rpx 0;
+			}
+			.nav-right-item{
+				padding: 10upx;
+				border-bottom: 2rpx solid #f5f5f5;
+				display: flex;
+				.item-info{
+					padding-left: 20rpx;
+					.item-name{
+						font-size: 32upx;
+						display: flex;
+						align-items: center;
+						>image{
+							width: 38rpx;
+							height: 38rpx;
+							margin-right: 10rpx;
+						}
+						>text{
+							flex: 1;
+							word-break: break-all;
+						}
+					}
+					.item-detail{
+						.item-detail-info{
+							padding: 10upx 0 4upx;
+						}
+						.item-detail-text{
+							font-size: 24upx;
+							color: #999;
+							margin-right: 20upx;
+							word-break: break-all;
+						}
+						.item-price{
+							margin-top: 10upx;
+							.item-detail-text{
+								color: #333;
+							}
+						}
+						 
+						.nav-right-item-btns{
+							text-align: right;
+							margin-top: 10rpx;
+							> view{
+								&:first-child{
+									.item-btn {
+										margin-right: 10upx;
+										width: auto;
+									}
+								}
+								&:last-child{
+									.item-btn {
+										margin-left: 10upx;
+									}
+								}
+							}
+							.item-btn-icon{
+								margin-left: 30upx;
+								vertical-align: middle;
+							}
+							.item-btn {
+								width: 112upx;
+								&:after{
+									border-color: #aaa;
+								}
+							}
+							.item-btn.btn-unselected{
+								background-color: #2db7f5!important;;
+								border-color: #2db7f5!important;;
+							}
+							.item-btn.btn-selected{
+								background-color: #19be6b!important;;
+								border-color: #19be6b!important;
+							}
+						}
+					}
+				}
+				.item-btn{
+					margin: 0;
+					width: 112upx;
+					color: #fff;
+				}
+				.item-btn.btn-unselected{
+					background-color: #2db7f5!important;;
+					border-color: #2db7f5!important;;
+				}
+				.item-btn.btn-selected{
+					background-color: #19be6b!important;;
+					border-color: #19be6b!important;
+				}
+			}
+		}
+	}
+</style>

+ 246 - 0
pages/digitalShelf/temproaryStockIn/temproaryStockIn.vue

@@ -0,0 +1,246 @@
+<template>
+	<view class="temproaryPages flex flex_column">
+		<view class="temproary-head">
+			<view>经销商:{{$store.state.vuex_storeShelf.dealerName}}</view>
+			<view class="notes">具体的临配价格请与配件经销商沟通确认</view>
+		</view>
+		<view class="temproary-body">
+			<div class="cpb_cart-box flex flex_column">
+				<div class="cpb_cart-tit">
+					<div class="flex align_center">
+						<span class="line"></span>
+						<span>选择配件</span>
+					</div>
+					<div class="add" @click="morePart">添加更多临配配件</div>
+				</div>
+				<div class="cpb_cart-list">
+					<view class="nav-right-item flex" v-for="(item, index) in partList" :key="item.id">
+						<view class="uni-col-2">
+							<u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="120" height="120" bg-color="#EBEBEB" ></u-image>
+						</view>
+						<view class="item-info uni-col-10">
+							<view class="item-name">
+								<text>{{item.name}}</text>
+							</view>
+							<view class="item-detail">
+								<view class="item-detail-info">
+									<view class="flex justify_between">
+										<view class="item-detail-text flex_1">
+											<text class="item-detail-text">{{item.code}}</text>
+										</view>
+										<view class="item-detail-text">
+											<u-number-box v-model="item.qty" @change="numberChange" :index="'cart_'+item.productSn" :min="0"></u-number-box>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</div>
+			</div>
+		</view>
+		<view class="temproary-footer">
+			<u-button type="primary" @click="submitForm" :custom-style="{background:'#1283d4',fontSize:'32rpx'}" shape="circle">确认提交</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { shelfTemporarySave } from '@/api/shelf.js'
+	export default {
+		data() {
+			return {
+				vinNumber: '',
+				dealerPhone: ''
+			}
+		},
+		computed: {
+			partList() {
+				return this.$store.state.vuex_shelfChoosePart
+			}
+		},
+		onLoad(option) {
+			this.vinNumber = option.vinNumber
+		},
+		onReady() {
+			const shelfInfo = this.$store.state.vuex_storeShelf
+			this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
+			// #ifdef APP-PLUS
+			var webView = this.$mp.page.$getAppWebview();
+			if(this.dealerPhone==''){
+				webView.setTitleNViewButtonStyle(0,{text:"",color:"#FFFFFF"}); 
+			}
+			// #endif
+		},
+		// 点击导航栏按钮
+		onNavigationBarButtonTap() {
+			if(this.dealerPhone!=''){
+				uni.makePhoneCall({
+					phoneNumber: this.dealerPhone
+				})
+			}
+		},
+		methods: {
+			viewImg(item){
+				uni.previewImage({
+					urls: [item.images]
+				})
+			},
+			numberChange(e){
+				console.log(e)
+				const rowIndex = this.partList.findIndex(item => 'cart_'+item.productSn == e.index)
+				if(e.value == 0){
+					this.partList.splice(rowIndex,1)
+				}
+			},
+			formatData(){
+				let ret = []
+				this.partList.map(item => {
+						ret.push({
+						 "productSn" : item.productSn,
+						 "price": item.cost,
+						 "qty":item.qty
+						})
+				})
+				return ret
+			},
+			// 更多配件
+			morePart(){
+				uni.navigateTo({
+					url:"/pages/digitalShelf/temproaryStockIn/moreShelfProduct?vinNumber="+this.vinNumber
+				})
+			},
+			// 确认提交
+			submitForm(){
+				if(this.partList.length){
+					shelfTemporarySave({
+					 "temporaryDispatchingBillDetailApiEntityList": this.formatData()
+					}).then(res => {
+						uni.showToast({icon: 'none',title: res.message})
+						if(res.status == 200){
+							setTimeout(()=>{
+								uni.navigateBack()
+							},500)
+						}
+					})
+				}else{
+					uni.showToast({icon: 'none',title: "请选择配件"})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.temproaryPages{
+	height: 100vh;
+	.temproary-head{
+		background-color: #fff;
+		padding: 20rpx;
+		font-size: 32rpx;
+		.notes{
+			font-size: 30rpx;
+			color: #FF9528;
+		}
+	}
+	.temproary-footer{
+		background-color: #fff;
+		padding: 20rpx 10%;
+	}
+	.temproary-body{
+		flex-grow: 1;
+	}
+	.nav-right-item{
+		background-color: #fff;
+		padding: 15upx 25upx;
+		border-bottom: 2rpx solid #f5f5f5;
+		.item-info{
+			padding-left: 20upx;
+			.item-name{
+				font-size: 32upx;
+				color: #191919;
+				display: flex;
+				align-items: center;
+				>image{
+					width: 38rpx;
+					height: 38rpx;
+					margin-right: 10rpx;
+				}
+				>text{
+					flex: 1;
+					word-break: break-all;
+				}
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 10upx 0 4upx;
+					> view{
+						padding-bottom: 10rpx;
+						align-items: center;
+						.item-detail-text{
+							color: #999;
+							.phtxt{
+								color: #0485F6;
+								font-size: 28upx;
+							}
+							.item-price{
+								color: #FB1E1E;
+								font-size: 28upx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	.cpb_cart-box{
+		width: 100%;
+		padding: 20rpx 0 0;
+		font-size: 32rpx;
+		height: 100%;
+		.cpb_cart-tit{
+			background-color: #fff;
+			padding: 20rpx;
+			display: flex;
+			justify-content: space-between;
+			.add{
+				color: #0485F6;
+			}
+			.line{
+				width: 8rpx;
+				height: 34rpx;
+				background-color: #0485F6;
+				border-radius: 6rpx;
+				margin-right: 15rpx;
+			}
+		}
+		.cpb_cart-list{
+			flex-grow: 1;
+			overflow: auto;
+			.item-info{
+				border-bottom:2rpx solid #f8f8f8;
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 10upx 0 4upx;
+					> view{
+						padding-bottom: 30rpx;
+						align-items: center;
+						.item-detail-text{
+							color: #999;
+							.phtxt{
+								color: #0485F6;
+								font-size: 28upx;
+							}
+							.item-price{
+								color: #FB1E1E;
+								font-size: 28upx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 1 - 1
pages/morePage/morePage.vue

@@ -8,7 +8,7 @@
 				<u-cell-item title="库存查询" @click="toPage('/pages/stockQuery/stockQuery')" :title-style="{fontSize:'1em'}">
 					<text slot="icon"></text>
 				</u-cell-item>
-				<u-cell-item title="补货记录" :title-style="{fontSize:'1em'}">
+				<u-cell-item title="补货记录" @click="toPage('/pages/digitalShelf/stockPut')" :title-style="{fontSize:'1em'}">
 					<text slot="icon"></text>
 				</u-cell-item>
 			</u-cell-group>