lilei пре 1 година
родитељ
комит
43f03b30be

+ 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 {

+ 6 - 3
pages.json

@@ -361,7 +361,8 @@
 				"style" : 
 				{
 					"navigationBarTitleText" : "创建质保单",
-					"enablePullDownRefresh" : false
+					"enablePullDownRefresh" : false,
+					"navigationStyle":"custom"
 				}
 			},
 			{
@@ -377,7 +378,8 @@
 				"style" : 
 				{
 					"navigationBarTitleText" : "创建质保单",
-					"enablePullDownRefresh" : false
+					"enablePullDownRefresh" : false,
+					"navigationStyle":"custom"
 				}
 			},
 			{
@@ -385,7 +387,8 @@
 				"style" : 
 				{
 					"navigationBarTitleText" : "创建质保单",
-					"enablePullDownRefresh" : false
+					"enablePullDownRefresh" : false,
+					"navigationStyle":"custom"
 				}
 			},
 			{

+ 16 - 2
pagesA/qualityPolicy/creatCarInfo.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="pages flex flex_column">
+		<uniNavBar title="创建质保单-车辆信息" statusBar :shadow="false" @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">
@@ -8,7 +9,7 @@
 						<view>产品编码:{{item.productCode}}</view>
 						<view class="uuid">唯一码:{{item.traceCode}}</view>
 					</view>
-					<view class="uuid-img">
+					<view v-if="item.productMsg" class="uuid-img" @click="viewImg(item.productMsg)">
 						<image style="width: 100%;height: 80px;background: #eaeaea;" :src="item.productMsg"></image>
 					</view>
 				</view>
@@ -41,14 +42,18 @@
 		 
 		<view class="buttons flex align_center">
 			<u-button type="default" @click="toBack">上一步</u-button>
-			<u-button type="primary" :loading="loading" @click="saveForm">确定</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: '',
@@ -67,6 +72,10 @@
 				loading: 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 : []
@@ -92,6 +101,11 @@
 					url: "/pagesA/qualityPolicy/creatOrder"
 				})
 			},
+			viewImg(img){
+				uni.previewImage({
+					urls: [img]
+				})
+			},
 			vehicleNumberResult(e){
 				this.form.vehicleNumber = e
 			},

+ 11 - 5
pagesA/qualityPolicy/creatCustomInfo.vue

@@ -1,5 +1,6 @@
 <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">
@@ -16,7 +17,7 @@
 			</view>
 			<view class="flex align_center">
 				<view class="labes">车牌号:</view>
-				<view class="inputs">{{carInfo.vehicleNumber}}</view>
+				<view class="inputs">{{carInfo.vehicleNumber||'--'}}</view>
 			</view>
 		</view>
 		
@@ -35,9 +36,9 @@
 				<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" @click="readXy()">
+			<view class="forms-foot flex align_center">
 				<u-checkbox v-model="checkedXy">您已知晓</u-checkbox>
-				<text class="links">《箭冠轮胎质保法律条款》</text>
+				<text class="links" @click="readXy()">《箭冠轮胎质保法律条款》</text>
 			</view>
 		</view>
 		 
@@ -63,11 +64,13 @@
 		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
+			popupCon,
+			uniNavBar
 		},
 		data() {
 			return {
@@ -102,6 +105,9 @@
 			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({
@@ -111,7 +117,7 @@
 			readXy(){
 				const baseUrl = getApp().globalData.baseUrl
 				uni.navigateTo({
-					url: "/pagesA/h5Page/index?src="+baseUrl.replace('/saas/clz/','/')+'/zbd/clause.html'
+					url: "/pagesA/h5Page/index?src="+baseUrl.replace('/saas/clz/','/')+'zbd/clause.html'
 				})
 			},
 			// 获取验证码

+ 19 - 5
pagesA/qualityPolicy/creatOrder.vue

@@ -1,5 +1,6 @@
 <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>
@@ -9,7 +10,7 @@
 			</view>
 			<view class="flex align_center">
 				<view class="labes">识别唯一码:</view>
-				<view class="inputs"><u-input :focus="focusInput" v-model="uuidCode" maxlength="20" border clearable type="text" placeholder="请输入唯一码"></u-input></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>
@@ -17,14 +18,18 @@
 			<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>
+			<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: '',
@@ -38,15 +43,16 @@
 			const uuidTemp = this.$store.state.vuex_uuidTempData
 			// 如果有未完成的质保单
 			if(uuidTemp && uuidTemp.traceCodeList){
-				uuidTemp.traceCodeList.map(item => {
-					this.addTags(item.traceCode)
-				})
+				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){
@@ -61,6 +67,14 @@
 					})
 					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)

+ 1 - 1
pagesA/qualityPolicy/orderDetail.vue

@@ -8,7 +8,7 @@
 							<view>产品名称:{{detail.productName}}</view>
 							<view style="margin-top: 0.2rem;">产品编码:{{detail.productCode}}</view>
 						</view>
-						<view class="uuid-img" @click="viewPic(detail.productMsg)">
+						<view v-if="detail.productMsg" class="uuid-img" @click="viewPic(detail.productMsg)">
 							<image style="width: 100%;height: 80px;background: #eaeaea;" :src="detail.productMsg"></image>
 						</view>
 					</view>

+ 1 - 1
pagesA/qualityPolicy/searchOrder.vue

@@ -16,7 +16,7 @@
 									<view>产品名称:{{item.productName}}</view>
 									<view style="margin-top: 0.2rem;">产品编码:{{item.productCode}}</view>
 								</view>
-								<view class="uuid-img">
+								<view class="uuid-img" v-if="item.productMsg">
 									<image style="width: 100%;height: 80px;background: #eaeaea;" :src="item.productMsg"></image>
 								</view>
 							</view>

+ 1 - 0
uni_modules/car-number-input/components/car-number-input/car-number-input.vue

@@ -111,6 +111,7 @@
 					for (let i in valList) {
 						this.inputList[i] = valList[i]
 					}
+					this.inputList.splice()
 				}
 			},
 			curInput(val){