浏览代码

Merge branch 'develop_szhj05' of http://git.chelingzhu.com/jianguan-web/qpls-md-app into develop_szhj05

lilei 2 年之前
父节点
当前提交
6f5aa68119
共有 5 个文件被更改,包括 104 次插入68 次删除
  1. 1 1
      config/index.js
  2. 3 2
      pages.json
  3. 29 23
      pages/vinAnalyse/search.vue
  4. 68 35
      pages/vinAnalyse/shelfAnalyse.vue
  5. 3 7
      pages/vinAnalyse/shelfList.vue

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.0.182:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.0.115:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 3 - 2
pages.json

@@ -681,7 +681,7 @@
 		    "style" :                                                                                    
 		    {
 		        "navigationBarTitleText": "选择货架",
-		        "enablePullDownRefresh": false
+		       "enablePullDownRefresh": false
 		    }
 		    
 		}
@@ -690,7 +690,7 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "选择货架",
-                "enablePullDownRefresh": false
+                "enablePullDownRefresh": true
             }
             
         }
@@ -699,6 +699,7 @@
             "style": {
             	"navigationBarTitleText": "vin分析",
             	"navigationStyle":"custom",
+				 "enablePullDownRefresh": true,
             	"app-plus":{
             		"titleNView": {
             			"titleAlign": "left",

+ 29 - 23
pages/vinAnalyse/search.vue

@@ -6,34 +6,34 @@
 					<u-input clearable v-model="form.date" disabled placeholder="请选择扫描时间区间" class="form-item-inp" @click="showDate=true" />
 					<u-icon v-show="form.date.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearTime"></u-icon>
 				</u-form-item>
-				<u-form-item label="VIN"><u-input v-model.trim="form.code" placeholder="请输入VIN"/></u-form-item>
-				<u-form-item label="车辆品牌"><u-input v-model.trim="form.origCode" placeholder="请输入车辆品牌"/></u-form-item>
-				<u-form-item label="车型"><u-input v-model.trim="form.name" placeholder="请输入车型"/></u-form-item>
+				<u-form-item label="VIN"><u-input v-model.trim="form.vinCode" placeholder="请输入VIN"/></u-form-item>
+				<u-form-item label="车辆品牌"><u-input v-model.trim="form.brandName" placeholder="请输入车辆品牌"/></u-form-item>
+				<u-form-item label="车型"><u-input v-model.trim="form.modelName" placeholder="请输入车型"/></u-form-item>
 				<u-form-item label="空调滤清器" label-position="top">
-					<u-radio-group v-model="value" :size="28">
+					<u-radio-group v-model="form.airConditionerFilterFlag" :size="28">
 						<u-radio 
 							v-for="(item, index) in list" :key="index" 
-							:name="item.val"
+							:name="item.val" :disabled="item.disabled"
 						>
 							{{item.name}}
 						</u-radio>
 					</u-radio-group>
 				</u-form-item>
 				<u-form-item label="空气滤清器" label-position="top">
-					<u-radio-group v-model="value" :size="28">
+					<u-radio-group v-model="form.airFilterFlag" :size="28">
 						<u-radio 
 							v-for="(item, index) in list" :key="index" 
-							:name="item.val"
+							:name="item.val" :disabled="item.disabled"
 						>
 							{{item.name}}
 						</u-radio>
 					</u-radio-group>
 				</u-form-item>
 				<u-form-item label="机油滤清器" label-position="top">
-					<u-radio-group v-model="value" :size="28">
+					<u-radio-group v-model="form.engineOilFilterFlag" :size="28">
 						<u-radio 
 							v-for="(item, index) in list" :key="index" 
-							:name="item.val"
+							:name="item.val" :disabled="item.disabled"
 						>
 							{{item.name}}
 						</u-radio>
@@ -65,13 +65,12 @@
 					date: '',
 					beginDate: '',
 					endDate: '',
-					code: '', //  产品编码
-					name: '', //  产品名称
-					origCode: '', //  原厂编码
-					productBrandSn: undefined, //  产品品牌
-					productTypeSn1: undefined, //  产品分类1
-					productTypeSn2: undefined, //  产品分类2
-					productTypeSn3: undefined, //  产品分类3
+					airConditionerFilterFlag:undefined,
+					airFilterFlag:undefined,
+					engineOilFilterFlag:undefined,
+					vinCode: undefined, 
+					brandName: undefined,//车辆品牌
+					modelName: undefined//车型
 				},
 				customBtnStyle: {  //  自定义按钮样式
 					borderColor: this.$config('primaryColor'),
@@ -81,17 +80,17 @@
 				list: [
 					{
 						name: '有适配',
-						val:'1',
+						val:1,
 						disabled: false
 					},
 					{
 						name: '无适配',
-						val:'0',
+						val:2,
 						disabled: false
 					},
 					{
 						name: '空(--)',
-						val:'',
+						val:0,
 						disabled: false
 					}
 				],
@@ -116,16 +115,23 @@
 			},
 			// 表单清空
 			handleClean(){
-				this.form.code = ''
-				this.form.name = ''
-				this.form.origCode = ''
+				this.form={
+					date: '',
+					beginDate: '',
+					endDate: '',
+					airConditionerFilterFlag:undefined,
+					airFilterFlag:undefined,
+					engineOilFilterFlag:undefined,
+					vinCode: undefined, 
+					brandName: undefined,//车辆品牌
+					modelName: undefined//车型
+				}
 				setTimeout(()=>{
 					this.handleSearch()
 				},300)
 			},
 			handleSearch(){
 				let data = JSON.parse(JSON.stringify(this.form))
-				console.log(data)
 				this.$emit('refresh', data)
 				this.isShow=false
 			},

+ 68 - 35
pages/vinAnalyse/shelfAnalyse.vue

@@ -5,7 +5,7 @@
 				<u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in tabList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
 			</u-checkbox-group>
 			<view class="search" @click="showModal=true">
-				筛选 <u-icon name="arrow-down"></u-icon>
+				<text>筛选</text> <u-icon name="arrow-down"></u-icon>
 			</view>
 		</view>
 		<scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
@@ -13,18 +13,18 @@
 				<view class="st-detailList-main-item" v-for="(item, index) in listData" :key="item.id" @click="toViewDetail(item)">
 					<view class="st-detailList-item-con flex align_center">
 						<view class="pimgs">
-							<u-image :src="item.productMainPic&&item.productMainPic.imageUrl?item.productMainPic.imageUrl:`../../static/${theme}/def_img@2x.png`" width="100" height="100" border-radius="10"></u-image>
+							<u-image :src="item.icon?item.icon:`../../static/${theme}/def_img@2x.png`" width="100" height="100" border-radius="10"></u-image>
 						</view>
-						<view class="flex_1">
+						<view class="flex_1 pimgs_right">
 							<view class="flex align_center justify_between">
 								<view>
-									LJJLDS234DD323453
+									{{item.vinCode}}
 								</view>
 								<view class="font_13">
-									2022-05-06 12:25:36
+									{{item.createDate}}
 								</view>
 							</view>
-							<view class="padding_3">{{item.name || '--'}} </view>
+							<view class="padding_3">{{item.modelInfo || '--'}} </view>
 						</view>
 					</view>
 					<view class="price-all flex" v-if="selPriceShow">
@@ -62,7 +62,7 @@
 						<view class="pimgs">
 							<u-image :src="tempData.productMainPic&&tempData.productMainPic.imageUrl?tempData.productMainPic.imageUrl:`../../static/${theme}/def_img@2x.png`" width="100" height="100" border-radius="10"></u-image>
 						</view>
-						<view class="flex_1">
+						<view class="flex_1 pimgs_right">
 							<view class="padding_3">{{tempData.name || '--'}} </view>
 							<view class="font_13">
 								VIN:LJJLDS234DD323453
@@ -113,11 +113,11 @@
 
 <script>
 	import { toThousands } from '@/libs/tools'
-	import { dealerProductList } from '@/api/sales'
+	import { queryPage,queryDetail } from '@/api/vinLog'
 	import search from './search.vue'
-	import copyText from '@/pages/common/copyText.vue'
+	// import copyText from '@/pages/common/copyText.vue'
 	export default{
-		components:{search,copyText},
+		components:{search},
 		data(){
 			return{
 				toThousands,
@@ -138,7 +138,8 @@
 				params:{},
 				detail: null,
 				tempData: null,
-				productList: []
+				productList: [],
+				shelfSn:''//货架名称
 			}
 		},
 		onNavigationBarButtonTap(e){
@@ -163,13 +164,18 @@
 			}
 		},
 		onLoad(option) {
-			this.selfId = option.selfId
-			this.getSelfDetail();
+			this.shelfSn = option.shelfSn
+			let ajaxData={
+				shelf_sn:option.shelfSn,
+				pageNo: this.pageNo, 
+				pageSize: this.pageSize 
+			}
+			this.getList(ajaxData);
 			this.theme = getApp().globalData.theme
-			uni.setNavigationBarTitle({
-				title: this.detail.shelfName
-			})
-			this.getList()
+			// uni.setNavigationBarTitle({
+			// 	title: this.detail.shelfName
+			// })
+			// this.getList()
 		},
 		methods:{
 			toPage(url){
@@ -179,21 +185,23 @@
 			},
 			// 刷新列表
 			refreshList(val){
+				debugger
 				this.params =val ? val : {},
 				this.listData = []
 				this.totalNum = 0
-				this.getList(1)
+				let ajaxData={
+					shelf_sn:this.shelfSn,
+					pageNo:1, 
+					pageSize: this.pageSize 
+				}
+				
+				this.getList(ajaxData);
 			},
 			// 列表
-			getList(pageNo){
+			getList(params){
 				const _this = this
-				if (pageNo) {
-					this.pageNo = pageNo
-				}
-				let params = Object.assign(this.params, { pageNo: this.pageNo, pageSize: this.pageSize })
 				this.status = "loading"
-				console.log(params)
-				dealerProductList(params).then(res => {
+				queryPage(params).then(res => {
 					if (res.status == 200) {
 						if(this.pageNo>1){
 							this.listData = this.listData.concat(res.data.list || [])
@@ -209,18 +217,27 @@
 					this.status = "loadmore"
 				})
 			},
-			// scroll-view到底部加载更多
-			onreachBottom() {
-				if(this.listData.length < this.totalNum){
-					this.pageNo += 1
-					this.getList()
-				}
-			},
+			
 			// 查看销售记录
 			toViewDetail(row){
 				 this.tempData = row
 				 this.showCart = true
 			}
+		},
+		// scroll-view到底部加载更多
+		onReachBottom() {
+			
+			if(this.listData.length < this.totalNum){
+				this.pageNo += 1
+				let ajaxData={
+					shelf_sn:this.shelfSn,
+					pageNo: this.pageNo, 
+					pageSize: this.pageSize 
+				}
+				this.getList(ajaxData)
+			}else{
+				this.status = "nomore"
+			}
 		}
 	}
 </script>
@@ -238,34 +255,45 @@
 			color: #191919;
 			.search{
 				color:#00aaff;
+				width: 90rpx;;
 			}
 		}
 		.product-list{
-			height: calc(100vh - 84upx);
 				.st-detailList-main{
 					padding: 20upx;
 					.st-detailList-main-item{
+						width: 100%;
+						box-sizing: border-box;
 						background: #ffffff;
 						padding: 20upx;
 						margin-bottom: 25upx;
 						border-radius: 25upx;
 						box-shadow: 1px 1px 3px #EEEEEE;
 						.st-detailList-item-con{
+							width: 100%;
+							box-sizing: border-box;
 							padding: 20upx 0;
 							font-size: 28upx;
 							.red{
 								color: red;
 							}
 							.pimgs{
+								width: 100rpx;
+								height: 100rpx;
 								margin-right: 16upx;
 							}
+							.pimgs_right{
+								width:calc(100% - 116upx);
+							}
 							.font_13{
 								font-size: 24upx;
 								color: #999;
 							}
 							.padding_3{
-								padding: 6upx 0;
-								word-break: break-all;
+								margin: 6upx 0;
+								overflow:hidden;
+								text-overflow: ellipsis;
+								white-space: nowrap	
 							}
 						}
 						.price-all{
@@ -342,9 +370,14 @@
 				.st-detailList-item-con{
 					padding: 20upx 0;
 					font-size: 28upx;
+					
 					.pimgs{
 						margin-right: 16upx;
 					}
+					.pimgs_right{
+						background-color: red;
+						width:calc(100% - 66upx);
+					}
 					.font_13{
 						font-size: 24upx;
 					}

+ 3 - 7
pages/vinAnalyse/shelfList.vue

@@ -46,7 +46,6 @@
 </template>
 
 <script>
-	// import { selectShelfStockCheck, stockCheckDeleteBySn } from '@/api/stockCheck'
 	import { getShelfList } from '@/api/shelf'
 	import { clzConfirm } from '@/libs/tools'
 	export default {
@@ -100,8 +99,7 @@
 								_this.shelfList = res.data.list
 							}
 							_this.total = res.data.count
-							console.log(res.data.count)
-							if (_this.shelfList.length == res.data.count) {
+							if (_this.shelfList.length == res.data.count) {//是否是最后一页
 								_this.status = 'nomore'
 							} else {
 								_this.status = 'loadmore'
@@ -113,7 +111,6 @@
 							_this.noDataText = '没有查询到相关货架'
 						}
 						_this.noDataText = '暂无货架'
-						_this.setChecked()
 					}else{
 						_this.status = 'loadmore'
 						_this.shelfList = []
@@ -125,12 +122,12 @@
 			},
 			viewDetail(item){
 				uni.navigateTo({
-					url:"/pages/vinAnalyse/shelfAnalyse?selfId="+item.id
+					url:"/pages/vinAnalyse/shelfAnalyse?shelfSn="+item.shelfSn
 				})
 			},
 		},
 		// 上拉加载更多
-		onreachBottom () {
+		onReachBottom () {
 			if(this.shelfList.length < this.total ){
 				if(this.isGobleSearch&&this.shelfName==''){
 					return
@@ -157,7 +154,6 @@
 		}
 		.nav-right{
 			padding: 0 30upx;
-			height: calc(100vh - 110rpx);
 			box-sizing: border-box;
 			overflow: auto;
 			.nav-right-item{