Ver código fonte

Merge branch 'develop_zhibaodan' of jianguan-web/repairYimatong-mini-html into master

李磊 1 ano atrás
pai
commit
035d9775f6

+ 19 - 0
api/data.js

@@ -69,4 +69,23 @@ export const listLookUp = (params) => {
     url: url,
     method: 'post'
   })
+}
+
+// 发送验证码
+export const sendPhoneVerifyCode = (params) => {
+  let url = `mobileVerifyCode/sendCode`
+  return request({
+    url: url,
+	data: params,
+    method: 'post'
+  })
+}
+// 验证验证码输入是否正确
+export const verifyPhoneCode = (params) => {
+  let url = `mobileVerifyCode/verifyCode`
+  return request({
+    url: url,
+	data: params,
+    method: 'post'
+  })
 }

+ 33 - 0
api/trace.js

@@ -0,0 +1,33 @@
+import request from './request';
+//一物一码-物码列表
+export const getTraceCodeQueryList = (params) => {
+  return request({
+    url: `trace/traceCode/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 质保单列表
+export const getWarrantyQueryList = (params) => {
+  return request({
+    url: `trace/warranty/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 质保单详情
+export const getWarrantyDetail = (params) => {
+  return request({
+    url: `trace/warranty/queryById/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 创建质保单
+export const traceWarrantySave = (params) => {
+  return request({
+    url: `trace/warranty/save`,
+    data: params,
+    method: 'post'
+  })
+}

+ 2 - 2
components/uni-nav-bar/uni-nav-bar.vue

@@ -87,7 +87,7 @@ export default {
     },
     leftIcon: {
       type: String,
-      default: ''
+      default: 'left-nav'
     },
     rightIcon: {
       type: String,
@@ -203,7 +203,7 @@ export default {
 		}
 
 		&--shadow {
-			box-shadow: 0 1px 6px #ccc;
+			// box-shadow: 0 1px 6px #ccc;
 		}
 
 		&--border:after {

+ 1 - 1
components/uni-popup/image-txt-popup.vue

@@ -2,7 +2,7 @@
 	<view class="image-txt-wrap">
 		<image :src="captchaBase" class="image" @click="getCode"></image>
 		<text class="tip-txt">* 点击图片即可切换验证码</text>
-		<input v-model="captcha" @input="inpChange" class="item-inp" name="captcha" type="text" maxlength="4" placeholder="请输入上方的图形验证码" />
+		<input v-model="captcha" @input="inpChange" class="item-inp" name="captcha" type="number" maxlength="4" placeholder="请输入上方的图形验证码" />
 		<button :type="btnType" size="mini" class="popup-button-yz" @click="verify">验证</button>
 	</view>
 </template>

Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 1
libs/tools.js


+ 63 - 13
pages.json

@@ -66,15 +66,6 @@
                 "navigationStyle":"custom"
             }
             
-        }
-        ,{
-            "path" : "pages/vinRecord/vinRecord",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "VIN查询记录",
-                "enablePullDownRefresh": false
-            }
-            
         }
         ,{
             "path" : "pages/morePage/morePage",
@@ -194,6 +185,14 @@
 					"navigationBarTitleText": "页面"
 				}
 			},
+			{
+			    "path" : "vinRecord/vinRecord",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "VIN查询记录",
+			        "enablePullDownRefresh": false
+			    }
+			},
 			{
 			    "path" : "digitalShelf/choosePart",
 			    "style" :                                                                                    
@@ -349,14 +348,65 @@
 			    
 			}
             ,{
-                    "path" : "activeDetail/index",
-                    "style" :                                                                                    
+                "path" : "activeDetail/index",
+                "style" :                                                                                    
                 {
                     "navigationBarTitleText": "活动内容",
                     "enablePullDownRefresh": false
                 }
-                }
-            ]
+            },
+			{
+				"path" : "qualityPolicy/creatOrder",
+				"style" : 
+				{
+					"navigationBarTitleText" : "创建质保单",
+					"enablePullDownRefresh" : false,
+					"navigationStyle":"custom"
+				}
+			},
+			{
+				"path" : "qualityPolicy/searchOrder",
+				"style" : 
+				{
+					"navigationBarTitleText" : "质保单查询",
+					"enablePullDownRefresh" : false
+				}
+			},
+			{
+				"path" : "qualityPolicy/creatCarInfo",
+				"style" : 
+				{
+					"navigationBarTitleText" : "创建质保单",
+					"enablePullDownRefresh" : false,
+					"navigationStyle":"custom"
+				}
+			},
+			{
+				"path" : "qualityPolicy/creatCustomInfo",
+				"style" : 
+				{
+					"navigationBarTitleText" : "创建质保单",
+					"enablePullDownRefresh" : false,
+					"navigationStyle":"custom"
+				}
+			},
+			{
+				"path" : "qualityPolicy/resultOrder",
+				"style" : 
+				{
+					"navigationBarTitleText" : "质保单详情",
+					"enablePullDownRefresh" : false
+				}
+			},
+			{
+				"path" : "qualityPolicy/orderDetail",
+				"style" : 
+				{
+					"navigationBarTitleText" : "质保单详情",
+					"enablePullDownRefresh" : false
+				}
+			}
+        ]
 	}],
 	"preloadRule": {
 		"pages/index/index": {

+ 13 - 4
pages/index/index.vue

@@ -117,7 +117,7 @@
 	} from 'vuex'
 	import scrollBox from '@/components/scrollBox.vue'
 	import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
-	import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode } from '@/api/shelf.js'
+	import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode, queryQplsConfig } from '@/api/shelf.js'
 	import { xprhStoreApplyRead } from '@/api/xprh.js'
 	import { findCurrentRewardRule } from '@/api/rewardRule.js'
 	import { listLookUp, getLookUpDatas, getCurrUserInfo } from '@/api/data.js';
@@ -323,6 +323,13 @@
 					}
 				});
 			},
+			// 获取价格配置
+			getPriceCofig(){
+				const data = this.$store.state.vuex_storeShelf
+				queryQplsConfig({shelfSn: data.shelfSn}).then(res => {
+					this.$store.state.vuex_configPrice = res.data || null
+				})
+			},
 			// 最新用户信息
 			getCurrUserInfo(){
 				getCurrUserInfo().then(res => {
@@ -407,6 +414,8 @@
 						console.log(res)
 						this.$store.state.vuex_storeShelf = res.data;
 						if(res.data){
+							// 获取价格权限配置
+							this.getPriceCofig()
 							// 保证金查询
 							this.getShelfBWPayRecord()
 							// 获取订单信息
@@ -500,8 +509,8 @@
 								if(res.status == 200 && res.data){
 									if(res.data.currentInven){
 										const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
-										const params = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
-										_this.$store.state.vuex_tempData = params
+										const retData = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
+										_this.$store.state.vuex_tempData = retData
 										uni.navigateTo({
 											url: '/pagesA/queryByCode/confirmQh'
 										})
@@ -563,7 +572,7 @@
 			// 查看扫描记录
 			toAllRecord(){
 				uni.navigateTo({
-					url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
+					url: this.hasLogin ? "/pagesA/vinRecord/vinRecord" : '/pages/login/login'
 				})
 			},
 			toUser(){

+ 12 - 0
pages/login/phoneLogin.vue

@@ -108,6 +108,13 @@
 			checkMobile() {
 				if (!this.getCodeing) {
 					if (this.mobile) {
+						if(!this.tyYd){
+							uni.showToast({
+								title: "请阅读并同意隐私政策、服务条款",
+								icon: "none"
+							})
+							return false
+						}
 						if (!isvalidPhone(this.mobile)) {
 							uni.showToast({
 								title: '请输入正确的手机号码',
@@ -120,6 +127,11 @@
 							//  图文验证码
 							this.$refs.imageTxtPopup.open()
 						}
+					}else{
+						uni.showToast({
+							title: '请输入手机号码',
+							icon: 'none'
+						})
 					}
 				}
 			},

+ 15 - 2
pages/morePage/morePage.vue

@@ -35,6 +35,19 @@
 				</u-cell-item>
 			</u-cell-group>
 		</view>
+		<view class="list-box" v-if="$hasPermissions('M_creatWarranty_mini')||$hasPermissions('M_searchWarranty_mini')">
+			<view class="list-title">
+				<u-icon size="38" name="file-text"></u-icon> <text>电子质保单</text>
+			</view>
+			<u-cell-group :border="false">
+				<u-cell-item title="创建质保单" v-if="$hasPermissions('M_creatWarranty_mini')" @click="toPage('/pagesA/qualityPolicy/creatOrder')" :title-style="{fontSize:'1em'}">
+					<text slot="icon"></text>
+				</u-cell-item>
+				<u-cell-item title="质保单查询" v-if="$hasPermissions('M_searchWarranty_mini')" @click="toPage('/pagesA/qualityPolicy/searchOrder')" :title-style="{fontSize:'1em'}">
+					<text slot="icon"></text>
+				</u-cell-item>
+			</u-cell-group>
+		</view>
 		<view class="list-box" v-if="$hasPermissions('M_settlementRecord_mini')||$hasPermissions('M_settlementManage_mini')">
 			<view class="list-title">
 				<u-icon size="36" name="rmb-circle"></u-icon> <text>结算管理</text>
@@ -144,8 +157,8 @@
 				queryQplsConfig({shelfSn: this.shelfSn}).then(res => {
 					this.$store.state.vuex_configPrice = res.data || null
 					const ret = [false,false]
-					ret[0]= res.data.shelf_cost_show == '1'
-					ret[1]= res.data.shelf_price_show == '1'
+					ret[0]= res.data.shelf_cost_show == '1' || res.data.non_shelf_cost_show == '1'
+					ret[1]= res.data.shelf_price_show == '1' || res.data.non_shelf_price_show == '1'
 					this.showPriceSet = ret.filter(item => !!item).length > 0
 				})
 			},

+ 27 - 8
pages/scan-frame/scan-frame.vue

@@ -39,9 +39,16 @@ export default {
       scanShow: true, // 显示操作按钮
 	  sysinfo: null, // 设备信息
 	  imageInfo: null ,// 拍照图片信息
-	  showAuth: false
+	  showAuth: false,
+	  pageType: 'VIN', // 用途,VIN 码识别 或 UUID 唯一码识别
+	  tempImg: ''
     }
   },
+  onLoad(opts) {
+	if(opts && opts.pageType){
+		this.pageType = opts.pageType
+	}
+  },
   onReady() {
   	const sysinfo = uni.getSystemInfoSync()
 	this.sysinfo = sysinfo
@@ -75,9 +82,15 @@ export default {
 	},
 	// 手动输入
 	inputs(){
-		uni.redirectTo({
-			url: "/pages/vinInput/confirmVin?verifyCode=" + "&type=input"
-		})
+		if(this.pageType == 'VIN'){
+			uni.redirectTo({
+				url: "/pages/vinInput/confirmVin?verifyCode=" + "&type=input"
+			})
+		}
+		if(this.pageType == 'UUID'){
+			this.$store.state.vuex_tempData = 'inputCode'
+			uni.navigateBack()
+		}
 	},
     // 相册
     scan() {
@@ -145,6 +158,7 @@ export default {
         src: tempFilePaths,
         quality: 100,
         success: (imageRes) => {
+		  this.tempImg = imageRes.tempFilePath
           // 获取类型
           uni.getImageInfo({
             src: imageRes.tempFilePath,
@@ -173,7 +187,7 @@ export default {
 			// 拿到base64,不需要base64  就把上层的转换去掉
 			this.scanShow = true
 			// 此处为后端接口 传base64图片 进行ocr识别
-			if(this.userInfo.sysUserFlag == '0'){
+			if(this.pageType == 'VIN' && this.userInfo.sysUserFlag == '0'){
 				if(this.vuex_vinScanNums < this.vuex_scanMaxNums){
 					this.parseVinNo(base.data)
 				}else{
@@ -215,9 +229,14 @@ export default {
 		}).then(res => {
 			console.log(res, '识别VIN')
 			if(res.status == 200){
-				uni.redirectTo({
-					url: "/pages/vinInput/confirmVin?verifyCode=123456ads11234567&filePath="+base64Str + "&verifyCode="+res.data + "&type=carmen"
-				})
+				if(this.pageType == 'VIN'){
+					uni.redirectTo({
+						url: "/pages/vinInput/confirmVin?filePath="+base64Str + "&verifyCode="+res.data + "&type=carmen"
+					})
+				}else{
+					this.$store.state.vuex_tempData = {filePath:this.tempImg,retCode:res.data}
+					uni.navigateBack()
+				}
 			}else{
 				uni.showToast({
 					icon: 'none',

+ 11 - 1
pages/stockQuery/stockQuery.vue

@@ -20,6 +20,12 @@
 					 				库存:<text>{{item.qty}}个</text>
 					 			</view>
 					 		</view>
+							<view class="flex" v-if="item.productTypeSn3=='543766811373752320'" style="padding-top: 5px;">
+								<text style="width: 4.5rem;color: #999;">原厂编码:</text>
+								<view style="width: 50%;flex-grow: 1;">
+									<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+								</view>
+							</view>
 					 		<view>{{item.productName}}</view>
 					 	</view>
 					 </view>
@@ -110,6 +116,9 @@
 	.list-box{
 		flex-grow: 1;
 		overflow: auto;
+		/deep/ .u-tag{
+			word-break: break-all;
+		}
 	}
 	.list-item{
 		margin: 20rpx 30rpx;
@@ -135,7 +144,8 @@
 		}
 		.vin-text{
 			.hj-no{
-				background: #f1f1f1;
+				background: #2196F3;
+				color: #ffffff;
 				display: inline-block;
 				border-radius: 10rpx;
 				padding: 0 10rpx;

+ 4 - 6
pages/storeManage/priceSetting/priceSetting.vue

@@ -88,17 +88,11 @@
 		onLoad() {
 			this.shelfSn = this.hasShelf.shelfSn
 			this.priceShowType = this.$store.state.vuex_priceTypeList
-			this.getPriceCofig()
 		},
 		onShow() {
 			this.getRow()
 		},
 		methods:{
-			// 获取价格配置
-			getPriceCofig(){
-				this.priceType[0].show = this.configPrice.shelf_cost_show == '1'
-				this.priceType[1].show = this.configPrice.shelf_price_show == '1'
-			},
 			priceChange(e,item){
 				console.log(e,item)
 				const row = item.storeParamList.find(k => k.paramCode == e.name)
@@ -131,6 +125,10 @@
 					item.carPriceVal = cop?cop.paramValue:''
 					const pp = a.find(b=>b.paramCode=='PURCHASES_PRICE') // 进货价值
 					item.ppPriceVal = pp?pp.paramValue:''
+					
+					// 列表显示价格选项判断
+					this.priceType[0].show = pp.status == 1
+					this.priceType[1].show = cop.status == 1
 					item.priceTypeList = JSON.parse(JSON.stringify(this.priceType.filter(item => item.show)))
 					// 赋值
 					item.priceTypeList.map(key => {

+ 80 - 22
pagesA/digitalShelf/choosePart.vue

@@ -55,12 +55,22 @@
 											</view>
 											<text class="item-detail-text" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
 										</view>
+										<view class="flex" v-if="item.productTypeSn=='543766811373752320'">
+											<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" shape="circle" type="success"></u-tag>
+										</view>
 										<view class="flex justify_between">
 											<view class="item-detail-text flex_1">
-												<view @click="openPriceModal(item,1)">
-													<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice">{{item.price?'¥'+item.price:'暂无价格'}}</text>
-													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&item.affiliation=='SHELF'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
-													<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
+												<!-- 货架产品 -->
+												<view @click="openPriceModal(item,1,showShelfDetial)" v-if="item.affiliation=='SHELF'">
+													<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
+													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
+													<u-icon name="arrow-right" v-if="priceShowVal&&showShelfDetial"></u-icon>
+												</view>
+												<!-- 非货架 -->
+												<view @click="openPriceModal(item,1,showNonShelfDetial)" v-else>
+													<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.non_shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
+													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.non_shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
+													<u-icon name="arrow-right" v-if="priceShowVal&&showNonShelfDetial"></u-icon>
 												</view>
 											</view>
 											<view class="item-detail-text" v-if="item.currentInven">
@@ -69,7 +79,7 @@
 												</u-button>
 												<u-number-box v-else @change="updateVinNums" @blur="updateVinNums" 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">
+											<view class="item-detail-text" v-if="item.affiliation=='NON_SHELF'||!item.currentInven">
 												<text v-if="!item.checked" @click="addPart(item)" class="phtxt">我要急送</text>
 												<u-number-box v-else @change="updateVinNums" @blur="updateVinNums" v-model="item.qty" :index="item.productSn" :min="0"></u-number-box>
 											</view>
@@ -108,11 +118,14 @@
 										<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" v-if="item.productTypeSn=='543766811373752320'">
+										<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" shape="circle" type="success"></u-tag>
+									</view>
 									<view class="flex justify_between">
-										<view class="item-detail-text flex_1" @click="openPriceModal(item,0)">
-											<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice">{{item.price?'¥'+item.price:'暂无价格'}}</text>
-											<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
-											<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
+										<view class="item-detail-text flex_1" @click="openPriceModal(item,0,showShelfDetial)">
+											<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
+											<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
+											<u-icon name="arrow-right" v-if="priceShowVal&&showShelfDetial"></u-icon>
 										</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:'#066cff'}" type="primary" size="mini">
@@ -150,7 +163,7 @@
 					<u-image width="44" height="44" :src="`/static/icon_shopping@3x.png`"></u-image>
 				</div>
 			</div>
-			<view v-if="(showCarPrice||showCostPrice)&&totalAmount">
+			<view>
 				<!-- 合计:<text>¥{{totalAmount}}</text> -->
 			</view>
 			<div>
@@ -178,7 +191,10 @@
 								<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!='SUPER_CATALOGUE'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
+										<text class="item-detail-text" v-if="item.affiliation!='NON_SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
+									</view>
+									<view class="flex" v-if="item.productTypeSn=='543766811373752320'" style="padding-bottom: 5px;">
+										<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" shape="circle" type="success"></u-tag>
 									</view>
 									<view class="flex justify_between">
 										<view class="item-detail-text flex_1">
@@ -208,21 +224,37 @@
 		<!-- 价格查看 -->
 		<u-popup v-model="showPriceModal" mode="center" length="80%" closeable>
 			<view class="show-price-modal" v-if="tempData">
-				<view>
+				<view class="itemlist">
 					<text>产品编码</text>
 					<text>{{tempData.code||'--'}}</text>
 				</view>
-				<view>
+				<view class="itemlist" v-if="tempData.productTypeSn=='543766811373752320'">
+					<text>原厂编码</text>
+					<text>{{tempData.origCode||'--'}}</text>
+				</view>
+				<view class="itemlist">
 					<text>产品名称</text>
 					<text>{{tempData.name||'--'}}</text>
 				</view>
 				<view v-if="tempData.affiliation=='SHELF'">
-					<text>进货价</text>
-					<text>{{tempData.cost?'¥'+tempData.cost:'暂无价格'}}</text>
+					<view class="itemlist" v-if="configPrice.shelf_cost_show == '1'">
+						<text>进货价</text>
+						<text>{{tempData.cost?'¥'+tempData.cost:'暂无价格'}}</text>
+					</view>
+					<view class="itemlist" v-if="configPrice.shelf_price_show == '1'">
+						<text>车主价</text>
+						<text>{{tempData.price?'¥'+tempData.price:'暂无价格'}}</text>
+					</view>
 				</view>
-				<view>
-					<text>车主价</text>
-					<text>{{tempData.price?'¥'+tempData.price:'暂无价格'}}</text>
+				<view v-else>
+					<view class="itemlist" v-if="configPrice.non_shelf_cost_show == '1'">
+						<text>进货价</text>
+						<text>{{tempData.cost?'¥'+tempData.cost:'暂无价格'}}</text>
+					</view>
+					<view class="itemlist" v-if="configPrice.non_shelf_price_show == '1'">
+						<text>车主价</text>
+						<text>{{tempData.price?'¥'+tempData.price:'暂无价格'}}</text>
+					</view>
 				</view>
 			</view>
 		</u-popup>
@@ -300,6 +332,15 @@
 			hasRedPacket(){
 				const rule = this.$store.state.vuex_rewardRule
 				return rule&&rule.ruleStatus == 'release'
+			},
+			configPrice(){
+				return this.$store.state.vuex_configPrice
+			},
+			showShelfDetial(){
+				return this.configPrice.shelf_price_show == '1'&&this.configPrice.shelf_cost_show == '1'
+			},
+			showNonShelfDetial(){
+				return this.configPrice.non_shelf_price_show == '1'&&this.configPrice.non_shelf_cost_show == '1'
 			}
 		},
 		onLoad(opts) {
@@ -344,9 +385,9 @@
 				})
 			},
 			// 打开价格信息弹框
-			openPriceModal(row,type){
+			openPriceModal(row,type,show){
 				console.log(row)
-				if(this.priceShowVal){
+				if(this.priceShowVal&&show){
 					if(type == 0){
 						row.affiliation = "SHELF"
 					}
@@ -517,7 +558,9 @@
 					cost: item.cost,
 					currentInven: item.currentInven,
 					code: item.code,
+					origCode: item.origCode,
 					qty: item.qty,
+					productTypeSn: item.productTypeSn,
 					images: item.images,
 					checked: true,
 					affiliation: item.affiliation
@@ -723,7 +766,7 @@
 	}
 	.show-price-modal{
 		padding: 30px 20px;
-		>view{
+		.itemlist{
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
@@ -802,6 +845,13 @@
 						.item-detail{
 							.item-detail-info{
 								padding: 10upx 0 4upx;
+								/deep/ .u-tag{
+									word-break: break-all;
+									font-size: 28rpx;
+									color: #0fab04eee;
+									border: 0;
+									padding: 0.2rem 0.3rem;
+								}
 								> view{
 									padding-bottom: 10rpx;
 									align-items: center;
@@ -887,6 +937,7 @@
 			}
 			.item-name{
 				font-size: 32rpx;
+				margin-bottom: 5px;
 				.item-tempPart{
 					background: #0055ff;
 					color: #fff;
@@ -903,8 +954,15 @@
 			.item-detail{
 				.item-detail-info{
 					padding: 10upx 0 4upx;
+					/deep/ .u-tag{
+						word-break: break-all;
+						font-size: 28rpx;
+						color: #0fab04eee;
+						border: 0;
+						padding: 0.2rem 0.3rem;
+					}
 					> view{
-						padding-bottom: 30rpx;
+						padding-bottom: 20rpx;
 						align-items: center;
 						.item-detail-text{
 							color: #999;

+ 13 - 0
pagesA/digitalShelf/choosePartResult.vue

@@ -48,6 +48,12 @@
 								<text>{{item.productCode}}</text>
 								<text class="item-no">{{item.shelfPlaceCode}}</text>
 							</view>
+							<view class="flex" v-if="item.productTypeSn3=='543766811373752320'">
+								<text style="width: 5rem;color:#999;">原厂编码:</text>
+								<view style="width: 70%;flex-grow: 1;">
+									<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+								</view>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -79,6 +85,12 @@
 								<span class="item-no" v-if="item.billState == 'WAIT_OUT_WAREHOUSE'">待收货</span>
 								<span class="item-no" v-if="item.billState == 'FINISH'">已完结</span>
 							</view>
+							<view class="flex" v-if="item.productTypeSn3=='543766811373752320'">
+								<text style="width: 5rem;color:#999;">原厂编码:</text>
+								<view style="width: 70%;flex-grow: 1;">
+									<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+								</view>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -395,6 +407,7 @@
 					justify-content: space-between;
 					font-size: 32rpx;
 					color: #666;
+					margin-bottom: 10rpx;
 					.item-no{
 						background: rgba(3, 54, 146, 0.15);
 						color: #033692;

+ 9 - 0
pagesA/digitalShelf/orderDetail.vue

@@ -60,6 +60,12 @@
 						<view class="item-nums">
 							<text>{{item.productCode}}</text>
 						</view>
+						<view class="flex align_center" v-if="item.productTypeSn3=='543766811373752320'" style="margin-bottom: 5px;">
+							<text class="item-detail-text">原厂编码:</text>
+							<view style="width: 50%;flex-grow: 1;">
+								<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+							</view>
+						</view>
 						<view class="item-head">
 							<view>
 								数量:<text class="redText">{{item.totalQty}}</text>
@@ -386,6 +392,9 @@
 				&:last-child{
 					border: none;
 				}
+				/deep/ .u-tag{
+					word-break: break-all;
+				}
 				> view{
 					padding: 20rpx 0;
 					&:first-child{

+ 9 - 0
pagesA/digitalShelf/orderList.vue

@@ -42,6 +42,12 @@
 										  <view class="pcode flex">
 											 <text>{{item.shelfOrderDetailList[0].productCode}}</text>
 										  </view>
+										  <view class="flex align_center" v-if="item.shelfOrderDetailList[0].productTypeSn3=='543766811373752320'" style="padding-bottom: 5px;">
+										  	<text class="item-detail-text">原厂编码:</text>
+										  	<view style="width: 50%;flex-grow: 1;">
+										  		<u-tag :text="item.shelfOrderDetailList[0].origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+										  	</view>
+										  </view>
 										  <view class="carModel flex">
 											  <text>{{item.shelfOrderDetailList[0].productName}}</text>
 										  </view>
@@ -309,6 +315,9 @@
 					display: flex;
 					padding: 20upx 10upx;
 					font-size: 28upx;
+					/deep/ .u-tag{
+						word-break: break-all;
+					}
 					&:first-child{
 						color: #666E75;
 						font-size: 24upx;

+ 6 - 0
pagesA/digitalShelf/stockPutDetail.vue

@@ -52,6 +52,12 @@
 								<text>待入库数量:{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
 							</view>
 						</view>
+						<view class="flex align_center" v-if="item.productTypeSn3=='543766811373752320'" style="margin-top: 5px;">
+							<text class="item-detail-text">原厂编码:</text>
+							<view style="width: 50%;flex-grow: 1;">
+								<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>

+ 10 - 0
pagesA/digitalShelf/tempOrderList/orderDetail.vue

@@ -53,6 +53,12 @@
 								数量:<text class="redText">{{item.qty}}</text>
 							</view>
 						</view>
+						<view class="flex align_center" v-if="item.productTypeSn3=='543766811373752320'" style="padding: 5px 0;">
+							<text class="item-detail-text">原厂编码:</text>
+							<view style="width: 50%;flex-grow: 1;">
+								<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -317,6 +323,9 @@
 				&:last-child{
 					border: none;
 				}
+				/deep/ .u-tag{
+					word-break: break-all;
+				}
 				> view{
 					padding: 20rpx 0;
 					&:first-child{
@@ -346,6 +355,7 @@
 					align-items: center;
 					justify-content: space-between;
 					color: #666;
+					margin-top: 5px;
 					> view{
 						&:first-child{
 							font-size: 28rpx;

+ 265 - 0
pagesA/qualityPolicy/creatCarInfo.vue

@@ -0,0 +1,265 @@
+<template>
+	<view class="pages flex flex_column" :style="{paddingBottom:showCarKeyborde?'40vh':'6rem'}">
+		<uniNavBar title="创建质保单-车辆信息" statusBar :shadow="false" fixed @click-left="toBack"></uniNavBar>
+		<u-read-more toggle close-text="展开全部">
+			<view class="uuid-list">
+				<view class="flex align_center" v-for="item in uuid" :key="item.id">
+					<view class="uuid-info">
+						<view><text>产品名称:</text>{{item.productName}}</view>
+						<view><text>产品编码:</text>{{item.productCode}}</view>
+						<view class="uuid" style="margin-top: 0.2rem;"><text>唯一码:</text>{{item.traceCode}}</view>
+					</view>
+					<view v-if="item.productMsg" class="uuid-img" @click="viewImg(item.productMsg)">
+						<image :src="item.productMsg"></image>
+					</view>
+				</view>
+			</view>
+		</u-read-more>
+		<view class="forms">
+			<view class="forms-tits">车辆信息</view>
+			<view class="flex align_center">
+				<view class="labes"><text>*</text>扫描VIN码:</view>
+				<view class="inputs"><image style="width: 100%;height: 35px;background: #eaeaea;" :src="tempImg"></image></view>
+				<view class="btns" @click="openCamera"><image src="../../static/tab/tab_scan_normal.png"></image></view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes"><text>*</text>识别VIN码:</view>
+				<view class="inputs"><u-input :focus="focusInput" @focus="hideCarinput" @blur="getCarInfo" v-model="form.vin" maxlength="17" border clearable type="text" placeholder="请输入VIN码"></u-input></view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes" style="width: 4.5rem;"><text>*</text>里程数:</view>
+				<view class="inputs"><u-input v-model="form.mileage" @focus="hideCarinput" type="number" border maxlength="99999999" clearable placeholder="请输入里程数"></u-input></view>
+				<view class="btns">KM</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes" style="width: 4.5rem;">车牌号:</view>
+				<view class="inputs">
+					<car-number-input ref="carInput" @numberInputResult="vehicleNumberResult" @show="showCarInput" :defaultStr="form.vehicleNumber"></car-number-input>
+				</view>
+			</view>
+		</view>
+		 
+		<view class="buttons flex align_center">
+			<u-button type="default" @click="toBack">上一步</u-button>
+			<u-button type="primary" :loading="loading" @click="saveForm">下一步</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getVehicleInfoByVin } from '@/api/car'
+	import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
+	export default {
+		components: {
+			uniNavBar
+		},
+		data() {
+			return {
+				tempImg: '',
+				form:{
+					vin: '',
+					mileage: '',
+					vehicleNumber: '',
+					carBrand: '',
+					carModel: '',
+					// icon:'',
+					// year:'',
+					// text:''
+				},
+				uuid: [],
+				focusInput: false,
+				loading: false,
+				showCarKeyborde: false
+			}
+		},
+		 
+		onUnload() {
+			this.$store.state.vuex_uuidTempData.carInfo = this.form
+		},
+		onLoad() {
+			const tempData = this.$store.state.vuex_uuidTempData
+			this.uuid = tempData&&tempData.traceCodeList ? tempData.traceCodeList : []
+			this.form = Object.assign(this.form,tempData&&tempData.carInfo ? tempData.carInfo : {})
+		},
+		onShow() {
+			const ret = this.$store.state.vuex_tempData
+			if(ret&&ret.retCode){
+				this.tempImg = ret.filePath
+				this.form.vin = ret.retCode
+				if(ret.retCode){
+					this.getCarInfo()
+				}
+			}
+			this.focusInput = ret&&ret=="inputCode"
+		},
+		onHide() {
+			this.tempImg = ''
+			this.$store.state.vuex_tempData = null
+		},
+		methods: {
+			toBack(){
+				uni.redirectTo({
+					url: "/pagesA/qualityPolicy/creatOrder"
+				})
+			},
+			viewImg(img){
+				uni.previewImage({
+					urls: [img]
+				})
+			},
+			hideCarinput(){
+				this.$refs.carInput.showOrHidePop(-1)
+			},
+			showCarInput(v){
+				this.showCarKeyborde = v
+			},
+			vehicleNumberResult(e){
+				this.form.vehicleNumber = e
+			},
+			openCamera(){
+				uni.navigateTo({
+					url: "/pages/scan-frame/scan-frame?pageType=UUID"
+				})
+			},
+			//获取车辆信息
+			async getCarInfo(){
+				this.loading = true
+				const ret = await getVehicleInfoByVin({vin: this.form.vin})
+				if(ret.data){
+					this.form.carBrand = ret.data.brand_name
+					this.form.carModel = ret.data.model_name
+					// this.form.icon = ret.data.icon
+					// this.form.year = ret.data.year
+					// this.form.text = ret.data.text
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: ret.message
+					})
+				}
+				this.loading = false
+			},
+			saveForm(){
+				if(this.form.vin == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请扫描或手动输入VIN码'
+					})
+					return
+				}
+				if(this.form.mileage == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入里程数'
+					})
+					return
+				}
+				if(this.form.vehicleNumber.length>0 && this.form.vehicleNumber.length < 7){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入正确的车牌号码'
+					})
+					return
+				}
+				
+				this.$store.state.vuex_uuidTempData.carInfo = this.form
+				uni.redirectTo({
+					url: "/pagesA/qualityPolicy/creatCustomInfo"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	background: #f8f8f8;
+	padding-bottom: 6rem;
+	overflow: auto;
+	.uuid-list{
+		background: #fff;
+		text-indent: 0;
+		line-height: normal;
+		font-size: 28rpx;
+		> view{
+			justify-content: space-between;
+			border-bottom: 1px solid #eee;
+			padding: 0.6rem 1rem;
+		}
+		color: #666;
+		.uuid-info{
+			flex-grow: 1;
+			line-height: 1.5rem;
+			width: 50%;
+			> view{
+				color: #666;
+				text{
+					color: #000;
+					width: 70px;
+					float: left;
+				}
+			}
+		}
+		.uuid-img{
+			width: 6rem;
+			height: 6rem;
+			border: 1px solid #eee;
+			overflow: hidden;
+			display: flex;
+			align-items: center;
+			margin-left: 0.5rem;
+			image {
+				max-width: 100%;
+				max-height: 100%;
+				background: #eaeaea;
+			}
+		}
+		margin-bottom: 0.5rem;
+	}
+	.buttons{
+		padding: 1rem 2rem 2rem;
+		position: fixed;
+		width: 100%;
+		bottom: 0;
+		left: 0;
+		background: #fff;
+		z-index: 90;
+		border-top: 1px solid #eee;
+		justify-content: space-around;
+		/deep/ .u-btn{
+			width: 7rem;
+		}
+	}
+}
+.forms{
+	background: #fff;
+	.forms-tits{
+		font-weight: bold;
+		color: #333;
+	}
+	> view{
+		border-bottom: 1px solid #eee;
+		padding: 0.6rem 1rem;
+	}
+	.labes{
+		width: 6rem;
+		text-align: right;
+		padding-right: 0.6rem;
+		text{
+			color: red;
+			margin-right: 5px;
+		}
+	}
+	.inputs{
+		flex-grow: 1;
+	}
+	.btns{
+		width: 3rem;
+		text-align: center;
+		image{
+			width: 1.6rem;
+			height: 1.6rem;
+		}
+	}
+}
+</style>

+ 361 - 0
pagesA/qualityPolicy/creatCustomInfo.vue

@@ -0,0 +1,361 @@
+<template>
+	<view class="pages flex flex_column">
+		<uniNavBar title="创建质保单-客户信息" statusBar :shadow="false" @click-left="toBack"></uniNavBar>
+		<view class="forms" v-if="carInfo">
+			<view class="forms-tits">车辆信息</view>
+			<view class="flex align_center">
+				<view class="labes">车辆品牌:</view>
+				<view class="inputs">{{carInfo.carBrand}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">车型:</view>
+				<view class="inputs">{{carInfo.carModel}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes" @click="showTip">里程数<u-icon color="#ff8100" size="30" name="question-circle-fill"></u-icon>:</view>
+				<view class="inputs">{{carInfo.mileage}}KM</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">车牌号:</view>
+				<view class="inputs">{{carInfo.vehicleNumber||'--'}}</view>
+			</view>
+		</view>
+		
+		<view class="forms">
+			<view class="forms-tits">客户联系方式</view>
+			<view class="flex align_center">
+				<view class="labes"><text>*</text>客户姓名:</view>
+				<view class="inputs"><u-input :focus="focusInput" v-model="form.customName" maxlength="30" border clearable type="text" placeholder="请输入客户姓名"></u-input></view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes"><text>*</text>手机号码:</view>
+				<view class="inputs"><u-input v-model="form.customMobile" type="number" maxlength="11" border clearable placeholder="请输入手机号码"></u-input></view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes"><text>*</text>验证码:</view>
+				<view class="inputs"><u-input v-model="form.vericode" type="number" maxlength="6" border clearable placeholder="请输入验证码"></u-input></view>
+				<view class="btns" @click="checkMobile()" >{{codeText}}</view>
+			</view>
+			<view class="forms-foot flex align_center">
+				<u-checkbox v-model="checkedXy">您已知晓</u-checkbox>
+				<text class="links" @click="readXy()">《箭冠轮胎质保法律条款》</text>
+			</view>
+		</view>
+		 
+		<view class="buttons flex align_center">
+			<u-button type="default" @click="toBack">上一步</u-button>
+			<u-button type="primary" :loading="loading" @click="saveForm">确定</u-button>
+		</view>
+		<!-- 图文验证码 -->
+		<uni-popup @change="changeModal" ref="imageTxtPopup" type="center">
+			<popup-con title="图文验证码" :popBtn="popBtn" :changeImg="changeImg" @captchaImg="captchaVerify"></popup-con>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import uniPopup from '@/components/uni-popup/uni-popup.vue'
+	import popupCon from '@/components/uni-popup/popup-con.vue'
+	import {
+		sendPhoneVerifyCode,
+		verifyPhoneCode
+	} from '@/api/data.js'
+	import {
+		isvalidPhone
+	} from '@/libs/validate.js'
+	import{ traceWarrantySave, getTraceCodeQueryList } from '@/api/trace.js'
+	import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
+	
+	export default {
+		components: {
+			uniPopup,
+			popupCon,
+			uniNavBar
+		},
+		data() {
+			return {
+				changeImg: false, //  是否重新更换图形验证码
+				randomCode: '', //  图片验证码随机码
+				popBtn: [], //  name为操作按钮名称,color为操作按钮颜色值
+				codeText: '获取验证码',
+				getCodeing: false,
+				totalTime: 60,
+				isDisabled: false ,// 倒计时按钮是否禁用
+				checkedXy: false,
+				carInfo:{
+					vin: '',
+					mileage: '',
+					vehicleNumber: '',
+					carBrand: '',
+					carModel: '',
+				},
+				form:{
+					customName: '',
+					customMobile: '',
+					vericode: ''
+				},
+				uuid: [],
+				loading: false
+			}
+		},
+		onLoad() {
+			const tempData = this.$store.state.vuex_uuidTempData
+			this.uuid = tempData&&tempData.traceCodeList ? tempData.traceCodeList : [],
+			this.carInfo = Object.assign(this.carInfo, tempData.carInfo)
+			this.form = Object.assign(this.form,tempData&&tempData.customerInfo ? tempData.customerInfo : {})
+			this.form.vericode = ''
+		},
+		onUnload() {
+			this.$store.state.vuex_uuidTempData.customerInfo = this.form
+		},
+		methods: {
+			toBack(){
+				uni.redirectTo({
+					url: "/pagesA/qualityPolicy/creatCarInfo"
+				})
+			},
+			showTip(){
+				uni.showModal({
+					title: "提示",
+					content: "使用超过3年或者行驶超过5万公里则不在质保期内。",
+					showCancel: false,
+					confirmText: "知道了"
+				})
+			},
+			readXy(){
+				const baseUrl = getApp().globalData.baseUrl
+				uni.navigateTo({
+					url: "/pagesA/h5Page/index?src="+baseUrl.replace('/saas/clz/','/')+'zbd/clause.html?t='+new Date().getTime()
+				})
+			},
+			// 获取验证码
+			getCode() {
+				let sid = null
+				sid = setInterval(() => {
+					if (this.totalTime > 0) {
+						this.totalTime = this.totalTime - 1
+						this.codeText = '已发送' + this.totalTime + 's'
+						if (this.totalTime < 60) {
+							this.isDisabled = true
+						}
+					} else {
+						this.isDisabled = false
+						clearInterval(sid)
+						this.getCodeing = false
+						this.codeText = '获取验证码'
+						this.totalTime = 60
+					}
+				}, 1000)
+			},
+			// 验证手机
+			checkMobile() {
+				if(this.isDisabled){return}
+				if (!this.getCodeing) {
+					if (this.form.customMobile) {
+						console.log(!isvalidPhone(this.form.customMobile))
+						if (!isvalidPhone(this.form.customMobile)) {
+							uni.showToast({
+								title: '请输入正确的手机号码',
+								icon: 'none'
+							})
+							return false
+						} else {
+							this.getCodeing = true
+							this.retsetCode()
+							//  图文验证码
+							this.$refs.imageTxtPopup.open()
+						}
+					}else{
+						uni.showToast({
+							title: '请输入手机号码',
+							icon: 'none'
+						})
+					}
+				}
+			},
+			changeModal(val) {
+				if (val.show == false) {
+					this.getCodeing = false
+				}
+			},
+			//  验证图片验证码
+			captchaVerify(code, nowRandomCode) {
+				const _this = this
+				let obj = {}
+				obj.mobile = this.form.customMobile
+				obj.random = nowRandomCode
+				obj.code = code
+				obj.signName = '修配易码通'
+				//  发送短信验证码
+				sendPhoneVerifyCode(obj).then(res => {
+					console.log(JSON.stringify(res.data))
+					if (res.status == 200) { //  验证码输入正确
+						_this.randomCode = nowRandomCode //  图片验证码随机码
+						//  关闭   图形验证码 弹框
+						_this.$refs.imageTxtPopup.close()
+						//  开启倒计时
+						_this.getCode()
+						uni.showToast({
+							icon: 'none',
+							title: '验证码发送成功'
+						})
+					} else { //  验证码输入错误
+						_this.retsetCode()
+						uni.showToast({
+							icon: 'none',
+							title: res.message,
+							duration: 5000
+						})
+					}
+				})
+			},
+			// 重新触发获取图片验证码
+			retsetCode() {
+				const _this = this
+				_this.code = ''
+				_this.randomCode = ''
+				//  切换验证码重新校验
+				_this.changeImg = false
+				_this.$nextTick(function() {
+					_this.changeImg = true
+				})
+			},
+			async saveForm(){
+				if(this.form.customName == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入客户名称'
+					})
+					return
+				}
+				if(this.form.customMobile == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入电话号码'
+					})
+					return
+				}
+				if(this.form.vericode == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入验证码'
+					})
+					return
+				}
+				if(!this.checkedXy){
+					uni.showToast({
+						icon: 'none',
+						title: '请勾选已知晓并阅读《箭冠轮胎质保法律条款》'
+					})
+					return
+				}
+				this.$store.state.vuex_uuidTempData.customerInfo = this.form
+				const formData = this.$store.state.vuex_uuidTempData
+				console.log(formData)
+				
+				// 验证验证码是否正确
+				const phoneCodeIsOk = await verifyPhoneCode({mobile: this.form.customMobile, code: this.form.vericode })
+				if(phoneCodeIsOk.status == 200){
+					const params = {...formData.carInfo,...formData.customerInfo}
+					const uuidList = []
+					formData.traceCodeList.map(item => {
+						uuidList.push(item.traceCode)
+					})
+					params.traceCodeList = uuidList
+					params.clientFlag = 'applet'
+					console.log(params)
+					// 保存数据
+					this.loading = true
+					const res = await traceWarrantySave(params)
+					
+					if(res.status == 200){
+						uni.showToast({
+							icon: 'none',
+							title: res.message
+						})
+						this.$store.state.vuex_tempData = null
+						uni.redirectTo({
+							url: "/pagesA/qualityPolicy/resultOrder"
+						})
+					}else{
+						uni.showModal({
+							title: '提示',
+							content: res.message,
+							confirmText: "知道了",
+							showCancel: false,
+						})
+					}
+					this.loading = false
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '验证码不正确'
+					})
+					this.form.vericode = ''
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	background: #f8f8f8;
+	padding-bottom: 6rem;
+	overflow: auto;
+	 
+	.buttons{
+		padding: 1rem 2rem 2rem;
+		position: fixed;
+		width: 100%;
+		bottom: 0;
+		left: 0;
+		background: #fff;
+		z-index: 90;
+		border-top: 1px solid #eee;
+		justify-content: space-around;
+		/deep/ .u-btn{
+			width: 7rem;
+		}
+	}
+}
+.forms{
+	background: #fff;
+	margin-bottom: 0.5rem;
+	.forms-tits{
+		font-weight: bold;
+		color: #333;
+	}
+	.forms-foot{
+		padding-left: 1.5rem;
+		color: #999;
+		.links{
+			color: #55aaff;
+		}
+		/deep/.u-checkbox__label{
+			margin-right: 0;
+		}
+	}
+	> view{
+		border-bottom: 1px solid #eee;
+		padding: 0.6rem 1rem;
+	}
+	.labes{
+		width: 5.2rem;
+		text{
+			color: red;
+			margin-right: 5px;
+		}
+	}
+	.inputs{
+		flex-grow: 1;
+	}
+	.btns{
+		padding: 0 0.3rem;
+		text-align: center;
+		color: dodgerblue;
+		font-size: 0.8rem;
+		width: 5rem;
+	}
+}
+</style>

+ 183 - 0
pagesA/qualityPolicy/creatOrder.vue

@@ -0,0 +1,183 @@
+<template>
+	<view class="pages flex flex_column">
+		<uniNavBar title="创建质保单-唯一码" statusBar :shadow="false" @click-left="toBack"></uniNavBar>
+		<view class="forms">
+			<view class="flex align_center">
+				<view class="labes">扫描唯一码:</view>
+				<view class="inputs">
+					<u-button size="medium" @click="openCamera"><image style="height: 0.9rem;width: 0.9rem;margin-right: 0.3rem;" src="../../static/tab/tab_scan_normal.png"></image> 点击扫描 </u-button>
+				</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">识别唯一码:</view>
+				<view class="inputs"><u-input :focus="focusInput" v-model="uuidCode" maxlength="15" border clearable type="number" placeholder="请输入唯一码"></u-input></view>
+				<view class="btns"><u-button :loading="loading" :custom-style="{padding:'0 20rpx'}" type="primary" size="medium" @click="addTags">添加</u-button></view>
+			</view>
+		</view>
+		<view class="tags-box">
+			<u-tag v-for="item in uuid" :key="item.id" :text="item.traceCode" closeable @close="tagClick(item)" />
+		</view>
+		<view class="buttons">
+			<u-button type="primary" @click="saveForm">下一步</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
+	import { getTraceCodeQueryList } from '@/api/trace'
+	export default {
+		components: {
+			uniNavBar
+		},
+		data() {
+			return {
+				tempImg: '',
+				uuidCode: '',
+				uuid: [],
+				focusInput: false,
+				loading: false
+			}
+		},
+		onShow() {
+			const uuidTemp = this.$store.state.vuex_uuidTempData
+			// 如果有未完成的质保单
+			if(uuidTemp && uuidTemp.traceCodeList){
+				this.uuid = uuidTemp.traceCodeList
+			}
+		},
+		onHide() {
+			this.$store.state.vuex_tempData = null
+		},
+		methods: {
+			toBack(){
+				uni.navigateBack()
+			},
+			tagClick(item){
+				const index = this.uuid.findIndex(k => k.traceCode == item.traceCode)
+				if(index>=0){
+					this.uuid.splice(index,1)
+				}
+			},
+			async addTags(){
+				if(this.uuid.length>=4){
+					uni.showToast({
+						icon: 'none',
+						title: '唯一码一次最多可添加4个,请进行删减后再添加。'
+					})
+					return
+				}
+				const hasCode = this.uuid.find(item => item.traceCode == this.uuidCode)
+				if(hasCode){
+					uni.showToast({
+						icon: 'none',
+						title: '唯一码已添加!'
+					})
+					return
+				}
+				if(this.uuidCode){
+					this.loading = true
+					const hasCode = await getTraceCodeQueryList({traceCode: this.uuidCode,pageSize:1,pageNo:1}).then(res => res.data)
+					console.log(hasCode)
+					// 已存在,且没有使用过
+					if(hasCode.count==0){
+						uni.showToast({
+							icon: 'none',
+							title: '唯一码不存在'
+						})
+						this.loading = false
+						return
+					}
+					if(hasCode.list && hasCode.list.length > 0){
+						if(!hasCode.list[0].warrantyState){
+							this.uuid.push(hasCode.list[0])
+						}else{
+							uni.showToast({
+								icon: 'none',
+								title: '唯一码已使用'
+							})
+						}
+					}
+					this.uuidCode = ''
+					this.loading = false
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请扫描或手动输入唯一码'
+					})
+				}
+			},
+			openCamera(){
+				const _this = this
+				uni.scanCode({
+					scanType: ['barCode','datamatrix','pdf417'],
+					success: function (res) {
+						// console.log('条码类型:' + res.scanType);
+						// console.log('条码内容:' + res.result);
+						// _this.tempImg = ret.filePath
+						_this.uuidCode = res.result
+						_this.focusInput = true
+					}
+				});
+			},
+			saveForm(){
+				if(this.uuid.length){
+					if(this.$store.state.vuex_uuidTempData){
+						this.$store.state.vuex_uuidTempData.traceCodeList = this.uuid
+					}else{
+						this.$store.state.vuex_uuidTempData = {traceCodeList: this.uuid}
+					}
+					uni.redirectTo({
+						url: "/pagesA/qualityPolicy/creatCarInfo"
+					})
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请先添加唯一码'
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	background: #fff;
+	.tags-box{
+		flex-grow: 1;
+		padding: 1rem;
+		/deep/ .u-tag{
+			margin: 0.5rem 1rem;
+		}
+	}
+	.buttons{
+		padding: 1rem 6rem 3rem;
+	}
+}
+.forms{
+	padding: 1rem 0 0;
+	> view{
+		border-bottom: 1px solid #eee;
+		padding: 0.6rem 1rem;
+	}
+	.labes{
+		width: 5rem;
+	}
+	.inputs{
+		flex-grow: 1;
+		button{
+			width: 100%;
+		}
+	}
+	.btns{
+		width: 3rem;
+		text-align: center;
+		image{
+			width: 1.6rem;
+			height: 1.6rem;
+		}
+	}
+}
+</style>

+ 221 - 0
pagesA/qualityPolicy/orderDetail.vue

@@ -0,0 +1,221 @@
+<template>
+	<view class="pages flex flex_column" v-if="detail">
+		<u-read-more toggle close-text="展开全部">
+			<view class="uuid-list">
+				<view>
+					<view class="flex align_center">
+						<view class="uuid-info">
+							<view><text>产品名称:</text>{{detail.productName}}</view>
+							<view style="margin-top: 0.2rem;"><text>产品编码:</text>{{detail.productCode}}</view>
+						</view>
+						<view v-if="detail.productMsg" class="uuid-img" @click="viewPic(detail.productMsg)">
+							<image :src="detail.productMsg"></image>
+						</view>
+					</view>
+					<view class="uuid-info" style="width: 100%;">
+						<view class="uuid" style="margin-top: 0.2rem;"><text>唯一码:</text>{{detail.traceCode}}</view>
+						<view class="uuid"><view style="display: inline-block;color: #000;" @click.stop="showTip">质保时间<u-icon size="30" color="#ff8100" name="question-circle-fill"></u-icon>:</view>{{detail.warrantyStartDate.split(' ')[0]}}至{{detail.warrantyEndDate.split(' ')[0]}}</view>
+					</view>
+					<view class="state" :class="detail.state"></view>
+				</view>
+			</view>
+		</u-read-more>
+		<view class="forms">
+			<view class="forms-tits">门店信息</view>
+			<view class="flex align_center">
+				<view class="labes">门店名称:</view>
+				<view class="inputs">{{detail.storeName||'--'}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">姓名:</view>
+				<view class="inputs">{{detail.storeManager||'--'}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">电话:</view>
+				<view class="inputs">{{detail.storeTele?detail.storeTele+'/':''}}{{detail.storeMobile||"--"}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">汽配经销商:</view>
+				<view class="inputs">{{detail.dealerName||'--'}}</view>
+			</view>
+		</view>
+		<view class="forms">
+			<view class="forms-tits">车辆信息</view>
+			<view class="flex align_center">
+				<view class="labes">车辆品牌:</view>
+				<view class="inputs">{{detail.carBrand||'--'}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">车型:</view>
+				<view class="inputs">{{detail.carModel||'--'}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">里程数:</view>
+				<view class="inputs">{{detail.mileage}}KM</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">车牌号:</view>
+				<view class="inputs">{{detail.vehicleNumber||'--'}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">客户姓名:</view>
+				<view class="inputs">{{detail.customName||'--'}}</view>
+			</view>
+			<view class="flex align_center">
+				<view class="labes">手机号码:</view>
+				<view class="inputs">{{detail.customMobile||'--'}}</view>
+			</view>
+		</view>
+		<view class="buttons flex align_center">
+			<u-button type="primary" @click="shareCode">保存二维码分享给客户</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getWarrantyDetail } from "@/api/trace"
+	import { sharePic } from "@/libs/tools.js"
+	export default {
+		data() {
+			return {
+				detail: null,
+				id: ''
+			}
+		},
+		onLoad(opts) {
+			this.id = opts.id
+			this.getDetail()
+		},
+		methods: {
+			viewPic(img){
+				uni.previewImage({
+					urls: [img]
+				})
+			},
+			showTip(){
+				uni.showModal({
+					title: "提示",
+					content: "使用超过3年或者行驶超过5万公里则不在质保期内。",
+					showCancel: false,
+					confirmText: "知道了"
+				})
+			},
+			getDetail(){
+				uni.showLoading({
+					mask:true,
+					title: "正在查询..."
+				})
+				getWarrantyDetail({id: this.id}).then(res => {
+					this.detail = res.data
+					uni.hideLoading()
+				})
+			},
+			shareCode(){
+				sharePic()
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	background: #f8f8f8;
+	padding-bottom: 7rem;
+	overflow: auto;
+	.uuid-list{
+		background: #fff;
+		text-indent: 0;
+		line-height: normal;
+		font-size: 28rpx;
+		> view{
+			justify-content: space-between;
+			border-bottom: 1px solid #eee;
+			padding: 0.6rem 1rem;
+			position: relative;
+		}
+		.state{
+			background-repeat: no-repeat;
+			background-size: 100%;
+			background-position: center center;
+			position: absolute;
+			width: 4.5rem;
+			height: 4.5rem;
+			z-index: 1000;
+			bottom: 0.5rem;
+			right: 1rem;
+		}
+		.RUN{
+			background-image: url(/pagesA/static/inhand.png);
+		}
+		.END{
+			background-image: url(/pagesA/static/outof.png);
+		}
+		color: #666;
+		.uuid-info{
+			flex-grow: 1;
+			line-height: 1.5rem;
+			width: 50%;
+			> view{
+				color: #666;
+				> text{
+					color: #000;
+					width: 70px;
+					float: left;
+				}
+			}
+		}
+		.uuid-img{
+			width: 6rem;
+			height: 6rem;
+			border: 1px solid #eee;
+			overflow: hidden;
+			display: flex;
+			align-items: center;
+			margin-left: 0.5rem;
+			image {
+				max-width: 100%;
+				max-height: 100%;
+				background: #eaeaea;
+			}
+		}
+	}
+	.buttons{
+		padding: 1rem 2rem 2rem;
+		position: fixed;
+		width: 100%;
+		bottom: 0;
+		left: 0;
+		background: #fff;
+		z-index: 10000;
+		border-top: 1px solid #eee;
+		justify-content: space-around;
+		/deep/ .u-btn{
+			width: 15rem;
+		}
+	}
+}
+.forms{
+	background: #fff;
+	margin-top: 0.5rem;
+	.forms-tits{
+		font-weight: bold;
+		color: #333;
+	}
+	> view{
+		border-bottom: 1px solid #eee;
+		padding: 0.6rem 1rem;
+	}
+	.labes{
+		width: 6rem;
+		padding-right: 0.6rem;
+		text{
+			color: red;
+			margin-right: 5px;
+		}
+	}
+	.inputs{
+		flex-grow: 1;
+	}
+}
+</style>

+ 89 - 0
pagesA/qualityPolicy/resultOrder.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="pages">
+		<view class="success-box">
+			<view class="success-tit">质保单领取成功</view>
+			<view class="success-code">
+				<image :src="codeImg"></image>
+			</view>
+			<view class="success-tips">车主可用微信扫此二维码查看质保单详情</view>
+		</view>
+		<view class="buttons flex justify_between">
+			<u-button type="default" @click="shareCode">保存二维码</u-button>
+			<u-button type="primary" @click="saveForm">查看质保信息</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getZbdQrCode, sharePic } from '@/libs/tools'
+	export default {
+		data() {
+			return {
+				detail: null,
+				codeImg: ''
+			}
+		},
+		onLoad() {
+			this.detail = this.$store.state.vuex_uuidTempData
+			this.codeImg = getZbdQrCode()
+		},
+		onUnload() {
+			this.$store.state.vuex_uuidTempData = null
+		},
+		methods: {
+			// 保存二维码到相册并打开详情页面
+			saveForm(){
+				uni.redirectTo({
+					url: "/pagesA/qualityPolicy/searchOrder?mobile="+this.detail.customerInfo.customMobile
+				})
+			},
+			shareCode(){
+				sharePic()
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	background: #fff;
+	.success-box{
+		text-align: center;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		margin-top: 10vh;
+		.success-tit{
+			font-weight: bold;
+			color: #4CAF50;
+			font-size: 1rem;
+		}
+		.success-code{
+			padding: 2rem;
+			image{
+				width: 10rem;
+				height: 10rem;
+			}
+		}
+		.success-tips{
+			color: #fd920e;
+		}
+	}
+	 
+	.buttons{
+		padding: 1rem 2rem 2rem;
+		position: fixed;
+		width: 100%;
+		bottom: 0;
+		left: 0;
+		background: #fff;
+		z-index: 10000;
+		border-top: 1px solid #eee;
+		justify-content: space-around;
+		/deep/ .u-btn{
+			width: 8rem;
+		}
+	}
+}
+</style>

+ 196 - 0
pagesA/qualityPolicy/searchOrder.vue

@@ -0,0 +1,196 @@
+<template>
+	<view class="pages flex flex_column">
+		<view class="search-box">
+			<u-search placeholder="请输入唯一码/手机号码" v-model="queryWord" @search="pageInit" @custom="pageInit"></u-search>
+		</view>
+		<view class="uuid-listbox">
+			<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+				<view class="uuid-list">
+						<view
+							v-for="(item,index) in list"
+							:key="item.id" 
+							 @click="toDetail(item)"
+						>
+							<view class="flex align_center">
+								<view class="uuid-info">
+									<view><text>产品名称:</text>{{item.productName}}</view>
+									<view style="margin-top: 0.2rem;"><text>产品编码:</text>{{item.productCode}}</view>
+								</view>
+								<view class="uuid-img" v-if="item.productMsg">
+									<image :src="item.productMsg"></image>
+								</view>
+							</view>
+							<view class="uuid-info" style="width: 100%;">
+								<view class="uuid" style="margin-top: 0.2rem;"><text>唯一码:</text>{{item.traceCode}}</view>
+								<view class="uuid"><view style="display: inline-block;color: #000;" @click.stop="showTip">质保时间<u-icon size="30" color="#ff8100" name="question-circle-fill"></u-icon>:</view>{{item.warrantyStartDate.split(' ')[0]}}至{{item.warrantyEndDate.split(' ')[0]}}</view>
+								<view class="uuid"><text>手机号码:</text>{{item.customMobile}}</view>
+							</view>
+							<view class="state" :class="item.state"></view>
+						</view>
+						<view style="border: 0;background: none;">
+								<u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+								<u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+						</view>
+				</view>
+			</scroll-view>
+		</view>  
+	</view>
+</template>
+
+<script>
+	import { getWarrantyQueryList } from "@/api/trace"
+	export default {
+		data() {
+			return {
+				queryWord: '',
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+				status: 'loading',
+				noDataText: '暂无数据',
+			}
+		},
+		onLoad(opts) {
+			this.queryWord = opts.mobile || ''
+			this.pageInit()
+		},
+		methods: {
+			pageInit(){
+				this.status = 'loading'
+				this.total = 0
+				this.pageNo = 1
+				uni.showLoading({
+					mask:true,
+					title: "正在查询..."
+				})
+				this.getRow()
+			},
+			showTip(){
+				uni.showModal({
+					title: "提示",
+					content: "使用超过3年或者行驶超过5万公里则不在质保期内。",
+					showCancel: false,
+					confirmText: "知道了"
+				})
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  // 查询条件
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				queryWord: this.queryWord
+			  }
+			  this.status = "loading"
+			  getWarrantyQueryList(params).then(res => {
+				if (res.status == 200) {
+				  const retList = res.data.list
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(retList || [])
+				  }else{
+					  _this.list = retList || []
+				  }
+				  _this.total = res.data.count || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = '暂无数据'
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+				uni.hideLoading()
+			  })
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			toDetail(item){
+				uni.navigateTo({
+					url: "/pagesA/qualityPolicy/orderDetail?id="+item.id
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	background: #f8f8f8;
+	overflow: auto;
+	.search-box{
+		padding: 0.6rem 1rem;
+		background: #fff;
+	}
+	.uuid-listbox{
+		flex-grow: 1;
+		height: calc(100vh - 52px);
+	}
+	.uuid-list{
+		> view{
+			justify-content: space-between;
+			border-bottom: 1px solid #eee;
+			padding: 0.6rem 1rem;
+			position: relative;
+			background: #fff;
+			margin-top: 0.2rem;
+		}
+		.state{
+			background-repeat: no-repeat;
+			background-size: 100%;
+			background-position: center center;
+			position: absolute;
+			width: 4.5rem;
+			height: 4.5rem;
+			z-index: 1000;
+			bottom: 0.5rem;
+			right: 1rem;
+		}
+		.RUN{
+			background-image: url(/pagesA/static/inhand.png);
+		}
+		.END{
+			background-image: url(/pagesA/static/outof.png);
+		}
+		color: #666;
+		.uuid-info{
+			flex-grow: 1;
+			line-height: 1.5rem;
+			width: 50%;
+			> view{
+				color: #666;
+				> text{
+					color: #000;
+					width: 70px;
+					float: left;
+				}
+			}
+		}
+		 
+		.uuid-img{
+			width: 6rem;
+			height: 6rem;
+			border: 1px solid #eee;
+			overflow: hidden;
+			display: flex;
+			align-items: center;
+			margin-left: 0.5rem;
+			image {
+				max-width: 100%;
+				max-height: 100%;
+				background: #eaeaea;
+			}
+		}
+	}
+}
+</style>

+ 13 - 1
pagesA/queryByCode/confirmQh.vue

@@ -3,6 +3,12 @@
 		 <view class="productInfo">
 			 <view><u-image :src="nowData.images" border-radius="16" width="160" height="160" bg-color="#EBEBEB"></u-image></view>
 			 <view style="display: block;"><text class="item-no">{{ nowData.shelfPlaceCode }}</text><text>{{ nowData.code }}</text></view>
+			 <view class="flex align_center" v-if="nowData.productTypeSn=='543766811373752320'" style="padding-top: 5px;">
+			 	<text class="item-detail-text" style="width: 5rem;">原厂编码:</text>
+			 	<view>
+					<u-tag :text="nowData.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+				</view>
+			 </view>
 			 <view class="item-name">
 			 	<text>{{ nowData.name }}</text>
 			 </view>
@@ -133,6 +139,12 @@
 	padding: 50rpx 30rpx;
 	height: 100vh;
 	.productInfo{
+		.item-detail-text{
+			color: #999;
+		}
+		/deep/ .u-tag{
+			word-break: break-all;
+		}
 		> view{
 			text-align: center;
 			display: flex;
@@ -145,7 +157,7 @@
 				background: rgba(3, 54, 146, 0.15);
 				border-radius: 20rpx;
 				color: #033692;
-				font-size: 24rpx;
+				font-size: 28rpx;
 			}
 			padding: 10rpx;
 		}

+ 12 - 0
pagesA/queryByCode/queryByCode.vue

@@ -29,6 +29,12 @@
 								<view class="pname flex align_center justify_between">
 									<view class="code"><text>{{item.shelfPlaceCode}}</text>{{item.code}}</view>
 								</view>
+								<view class="flex align_center" v-if="item.productTypeSn=='543766811373752320'" style="padding-top: 5px;">
+									<text class="item-detail-text">原厂编码:</text>
+									<view style="width: 50%;flex-grow: 1;">
+										<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+									</view>
+								</view>
 								<view class="ptxt">
 									<view>
 										<text class="pcode">{{item.name}}</text>
@@ -239,6 +245,12 @@
 				.pinfo{
 					flex-grow: 1;
 					padding-left: 20rpx;
+					/deep/ .u-tag{
+						word-break: break-all;
+					}
+					.item-detail-text{
+						color: #999;
+					}
 					.pname{
 						font-size: 28rpx;
 						color: #191919;

BIN
pagesA/static/inhand.png


BIN
pagesA/static/outof.png


+ 156 - 0
pagesA/vinRecord/vinRecord.vue

@@ -0,0 +1,156 @@
+<template>
+	<view class="vinRecord flex flex_column">
+		<!-- <view class="des">仅可查看最近7天的VIN查询记录</view> -->
+		<swiper class="list-box">
+			<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;">
+				<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+					<view class="list-item flex align_center justify_between" v-for="item in list" :key="item.id" @click="toChoosePart(item)">
+						<view v-if="userInfo&&userInfo.sysUserFlag == '1'">
+							<u-image shape="circle" :src="item.icon||'@/static/def_imgs.png'" width='90' height="90"></u-image>
+						</view>
+						<view>
+							<view class="flex align_center justify_between">
+								<text class="vin-text">{{item.vinCode}}</text>
+								<text class="time-text">{{item.createDate}}</text>
+							</view>
+							<view v-if="userInfo&&userInfo.sysUserFlag == '1'">{{item.modelInfo}}</view>
+						</view>
+					</view>
+					 <view style="padding: 20upx;">
+						 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+						 <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+					 </view>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import { getScanVinLogList }from '@/api/car.js'
+	import moment from 'moment'
+	export default {
+		data() {
+			return {
+				status: 'loading',
+				noDataText: '暂无数据',
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+			}
+		},
+		onLoad() {
+			this.pageInit()
+		},
+		computed: {
+			hasShelf(){
+				return this.$store.state.vuex_storeShelf
+			},
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			}
+		},
+		methods: {
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  // 查询条件
+			  let params = {
+				// beginDate: moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00'),
+				// endDate: moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59'),
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				identifyType: this.userInfo ? this.userInfo.identifyType : ''
+			  }
+			  this.status = "loading"
+			  getScanVinLogList(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  const retList = res.data.list.filter(item => item.vinCode)
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(retList || [])
+				  }else{
+					  _this.list = retList || []
+				  }
+				  _this.total = res.data.count || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = '暂无数据'
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			toChoosePart(item){
+				item.text = item.modelInfo
+				uni.navigateTo({
+					url: "/pagesA/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.vinRecord{
+	width: 100%;
+	height: 100vh;
+	background: #f8f8f8;
+	.des{
+		text-align: center;
+		color: #999;
+		font-size: 12px;
+		padding: 20rpx 15rpx;
+	}
+	.list-box{
+		flex-grow: 1;
+		overflow: auto;
+	}
+	.list-item{
+		margin: 20rpx 30rpx;
+		border:2rpx solid #f8f8f8;
+		box-shadow: 2rpx 2rpx 6rpx #eee;
+		border-radius: 20rpx;
+		padding: 20rpx 15rpx;
+		background: #ffffff;
+		> view{
+			padding: 0 10rpx;
+			&:last-child{
+				flex-grow: 1;
+				>view{
+					padding: 10rpx 0;
+				}
+			}
+		}
+		.time-text{
+			font-size: 10px;
+			color: #999;
+		}
+		&:first-child{
+			margin-top: 10rpx;
+		}
+		&:active{
+			opacity: 0.6;
+			transform:scale(0.9);
+		}
+	}
+}
+</style>

+ 2 - 1
store/index.js

@@ -15,7 +15,7 @@ try{
 }
 
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
-let saveStateKeys = ['vuex_carBrandList'];
+let saveStateKeys = ['vuex_carBrandList','vuex_uuidTempData'];
 
 // 保存变量到本地存储中
 const saveLifeData = function(key, value){
@@ -64,6 +64,7 @@ const store = new Vuex.Store({
 		vuex_storeAuthInfo: null ,// 门店认证状态信息
 		vuex_tempData: null, // 临时数据
 		vuex_configPrice: null, // 价格显示配置
+		vuex_uuidTempData: lifeData.vuex_uuidTempData ? lifeData.vuex_uuidTempData : null, // 唯一码临时数据
 		vuex_tabBarList: [
 			{
 				"pagePath": "/pages/index/index",

+ 9 - 0
uni_modules/car-number-input/changelog.md

@@ -0,0 +1,9 @@
+## 1.0.4(2022-10-13)
+修复支付宝小程序图标显示问题
+## 1.0.3(2022-10-08)
+修复图标显示问题,图片改用base64编码
+## 1.0.2(2022-09-21)
+修复微信小程序新能源图标显示问题
+## 1.0.1(2022-09-19)
+1.修复输入返回值赋值给默认值的问题
+2.修复新能源字体在谷歌浏览器展示问题

Diferenças do arquivo suprimidas por serem muito extensas
+ 102 - 0
uni_modules/car-number-input/components/car-number-input/car-number-input.vue


+ 26 - 0
uni_modules/car-number-input/package.json

@@ -0,0 +1,26 @@
+{
+    "id": "car-number-input",
+    "displayName": "车牌选择组件+键盘(包含新能源车牌)",
+    "version": "1.0.4",
+    "description": "车牌输入组件+键盘,包含新能源车牌",
+    "keywords": [
+        "车牌",
+        "车牌选择器",
+        "键盘",
+        "车牌键盘",
+        "车牌选择"
+    ],
+    "dcloudext": {
+        "contact": {
+            "qq": ""
+        },
+        "declaration": {
+            "ads": "无",
+            "data": "无",
+            "permissions": "无"
+        },
+        "npmurl": "",
+        "type": "component-vue"
+    },
+    "repository": ""
+}

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff