lilei 4 月之前
父节点
当前提交
07cba2cd86

+ 3 - 3
components/ba-tree-picker/ba-tree-picker.vue

@@ -408,7 +408,7 @@
 		right: 0rpx;
 		bottom: 0rpx;
 		left: 0rpx;
-		z-index: 100;
+		z-index: 100001;
 		background-color: rgba(0, 0, 0, .4);
 		opacity: 0;
 		transition: all 0.3s ease;
@@ -436,8 +436,8 @@
 		display: flex;
 		/* #endif */
 		flex-direction: column;
-		z-index: 1002;
-		top: 20%;
+		z-index: 100002;
+		top: 30%;
 		transition: all 0.3s ease;
 		transform: translateY(100%);
 	}

+ 13 - 34
pages/sales/productSearch.vue

@@ -43,7 +43,7 @@
 		<!-- 产品品牌 -->
 		<productBrand :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
 		<!-- 产品分类 -->
-		<productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @clean="typeClean" @close="showTypeModal=false" />
+		<productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @close="showTypeModal=false" />
 		<!-- 选择收款方式 -->
 		<u-picker v-model="warehouseModal" @confirm="warehouseChange" :range="warehouseList" range-key="name" mode="selector"></u-picker>
 	</view>
@@ -95,18 +95,14 @@
 				brandModal: false,
 				brandName: '',
 				showTypeModal: false,
-				nowData: {
-					data: [],
-					indArr: [],
-					nowInd: 0
-				},
+				nowData: [],
 				action: baseUrl + 'vinIdentify/ocr',
 			}
 		},
 		computed: {
 			productTypeNameArr: function() {
 				let str = ''
-				this.nowData.data.map(item => {
+				this.nowData.map(item => {
 					str += item.productTypeName+' / '
 				})
 				return str ? str.substr(0, str.length-3) : ''
@@ -131,15 +127,7 @@
 				this.form.cost = this.defaultParams && this.defaultParams.cost || false
 				this.form.cityPrice = this.defaultParams && this.defaultParams.cityPrice || false
 				this.brandName = this.defaultParams && this.defaultParams.brandName || ''
-				if(this.defaultParams && this.defaultParams.nowData){
-					this.nowData = this.defaultParams.nowData
-				}else{
-					this.nowData = {
-						data: [],
-						indArr: [],
-						nowInd: 0
-					}
-				}
+				this.nowData = this.defaultParams && this.defaultParams.nowData ? this.defaultParams.nowData : []
 				this.warehouseName = this.defaultParams && this.defaultParams.warehouseName || ''
 			},
 			// 查询
@@ -156,11 +144,7 @@
 			// 重置
 			resetForm() {
 				this.warehouseName = ''
-				this.nowData = {
-					data: [],
-					indArr: [],
-					nowInd: 0
-				}
+				this.nowData = []
 				this.$refs.uForm.resetFields()
 				this.$emit('refresh', {})
 				this.isShow = false
@@ -168,7 +152,6 @@
 				this.typeClean()
 			},
 			uploadSuccess(res){
-				console.log(res)
 				if(res.status == 200){
 					this.form.vinCode = res.data
 				}else{
@@ -187,22 +170,18 @@
 			},
 			// 选择分类
 			typeChoose(obj){
-				this.nowData = {
-					data: obj.data,
-					indArr: obj.indArr,
-					nowInd: obj.nowInd
+				if(obj){
+					this.nowData = obj
+					this.form.productTypeSn1 = obj[0].productTypeSn
+					this.form.productTypeSn2 = obj[1].productTypeSn
+					this.form.productTypeSn3 = obj[2].productTypeSn
+				}else{
+					this.typeClean()
 				}
-				this.form.productTypeSn1 = this.nowData.data[0]&&this.nowData.data[0].productTypeSn ? this.nowData.data[0].productTypeSn : undefined
-				this.form.productTypeSn2 = this.nowData.data[1]&&this.nowData.data[1].productTypeSn ? this.nowData.data[1].productTypeSn : undefined
-				this.form.productTypeSn3 = this.nowData.data[2]&&this.nowData.data[2].productTypeSn ? this.nowData.data[2].productTypeSn : undefined
 			},
 			// 清空分类
 			typeClean(){
-				this.nowData = {
-					data: [],
-					indArr: [],
-					nowInd: 0
-				}
+				this.nowData = []
 				this.form.productTypeSn1 = undefined
 				this.form.productTypeSn2 = undefined
 				this.form.productTypeSn3 = undefined

+ 11 - 19
pages/sales/search.vue

@@ -22,7 +22,7 @@
 		<!-- 产品品牌 -->
 		<productBrand :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
 		<!-- 产品分类 -->
-		<productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @clean="typeClean" @close="showTypeModal=false" />
+		<productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @close="showTypeModal=false" />
 		<!-- 选择产品状态 -->
 		<u-picker v-model="onlineFalgModal" @confirm="onlineFalgChange" :range="onlineFlagList" range-key="dispName" mode="selector"></u-picker>
 	</view>
@@ -43,7 +43,7 @@
 		computed: {
 			productTypeNameArr: function() {
 				let str = ''
-				this.nowData.data.map(item => {
+				this.nowData.map(item => {
 					str += item.productTypeName+' / '
 				})
 				return str ? str.substr(0, str.length-3) : ''
@@ -67,11 +67,7 @@
 					backgroundColor: this.$config('primaryColor'),
 					color: '#fff'
 				},
-				nowData: {
-					data: [],
-					indArr: [],
-					nowInd: 0
-				},
+				nowData: [],
 				brandName: '',
 				isShow:this.showModal,
 				showTypeModal: false,
@@ -113,22 +109,18 @@
 			},
 			// 选择分类
 			typeChoose(obj){
-				this.nowData = {
-					data: obj.data,
-					indArr: obj.indArr,
-					nowInd: obj.nowInd
+				if(obj){
+					this.nowData = obj
+					this.form.productTypeSn1 = obj[0].productTypeSn
+					this.form.productTypeSn2 = obj[1].productTypeSn
+					this.form.productTypeSn3 = obj[2].productTypeSn
+				}else{
+					this.typeClean()
 				}
-				this.form.productTypeSn1 = this.nowData.data[0]&&this.nowData.data[0].productTypeSn ? this.nowData.data[0].productTypeSn : undefined
-				this.form.productTypeSn2 = this.nowData.data[0]&&this.nowData.data[1].productTypeSn ? this.nowData.data[1].productTypeSn : undefined
-				this.form.productTypeSn3 = this.nowData.data[0]&&this.nowData.data[2].productTypeSn ? this.nowData.data[2].productTypeSn : undefined
 			},
 			// 清空分类
 			typeClean(){
-				this.nowData = {
-					data: [],
-					indArr: [],
-					nowInd: 0
-				}
+				this.nowData = []
 				this.form.productTypeSn1 = undefined
 				this.form.productTypeSn2 = undefined
 				this.form.productTypeSn3 = undefined

+ 1 - 3
pages/sales/searchParts.vue

@@ -22,10 +22,8 @@
 
 <script>
 	import productBrand from '@/pages/common/productBrand.vue'
-	import productType from '@/pages/common/productType.vue'
-	import { dealerProductTypeList } from '@/api/dealerProductType'
 	export default{
-		components: { productBrand, productType },
+		components: { productBrand },
 		props:{
 			showModal:{
 				type: Boolean,

+ 1 - 2
pages/stock/index.vue

@@ -39,7 +39,7 @@
 		<!-- 产品品牌 -->
 		<productBrand ref="productBrand" :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
 		<!-- 产品分类 -->
-		<productType ref="productType" :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @clean="typeClean" @close="showTypeModal=false" />
+		<productType ref="productType" :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @close="showTypeModal=false" />
 	</view>
 </template>
 
@@ -173,7 +173,6 @@
 			},
 			// 选择分类
 			typeChoose(obj){
-				console.log(obj)
 				if(obj){
 					this.nowData = obj
 					this.form.productTypeSn1 = obj[0].productTypeSn