瀏覽代碼

前端小程序 sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
954bab550b

+ 1 - 1
config/index.js

@@ -1,5 +1,5 @@
 const dev = {
-	// baseUrl: 'http://192.168.1.120:8090/',
+	baseUrl: 'http://192.168.1.120:8090/',
 	baseUrl: 'https://www.zthymaoyi.com',
 	baseUrlNew: 'http://192.168.1.120:8090/',
 	h5Appid: 'wxb66b599f7f61b46f',

+ 1 - 0
pageA/product/business_buy.vue

@@ -305,6 +305,7 @@
 						}
 					}
 					var that=this
+					this.purchaseOrder.commonId=that.userInfo.id
 					this.purchaseOrder.pcFlag=0
 					uni.showModal({
 						content: '订单提交后将发送给买方,是否确定提交?',

+ 1 - 1
pageA/product/detail.vue

@@ -415,7 +415,7 @@
 									success: function (res) {
 								        if (res.confirm) {
 											uni.navigateTo({//跳转页面
-												url:"../index/index"
+												url:`/pages/attestation/index`
 											})
 								        } else if (res.cancel) {
 								        }

+ 65 - 34
pageA/product/lookup.vue

@@ -127,6 +127,24 @@
 			mSearch
 		},
 		methods: {
+			//详情
+			navToDetailPage(item) {
+				let id = item.id;
+				if (item.unitPrice === 0) {
+					this.contactUs();
+				} else {
+					if (this.TabCur == 0) {
+						uni.navigateTo({
+							url: `/pageA/product/detail?id=${id}`
+						})
+					} else {
+						uni.navigateTo({
+							url: `/pageA/product/sales_detail?id=${id}`
+						})
+					}
+			
+				}
+			},
 			init() {
 				this.loadDefaultKeyword();
 				this.loadOldKeyword();
@@ -245,10 +263,20 @@
 			},
 			//执行搜索
 			doSearch(e) {
-				if(e.detail.value.length>0){
-					this.isShowKeywordList=true
-				}else{
-					this.isShowKeywordList=false
+				if(e.detail){
+					if(e.detail.value.length>0){
+						this.isShowKeywordList=true
+					}else{
+						this.isShowKeywordList=false
+					}
+				}
+				else if(e){
+					if(e.length>0){
+						this.isShowKeywordList=true
+						this.searchKeyWord = e
+					}else{
+						this.isShowKeywordList=false
+					}
 				}
 				uni.showLoading({
 					title: '正在加载',
@@ -256,22 +284,23 @@
 				})
 				var param1=''
 				if (this.TabCur == 0) {
-									param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
-								} else {
-									param1 = 'buy'
-								}
-								this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+				} else {
+					param1 = '/salePlanInfo/selectSalePlanInfo'
+				}
+				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
 				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-									uni.hideLoading()
-									this.keywordList=res.data.data.records
-								})
-								.catch(res => {
-									uni.showToast({
-										title: res.errmsg,
-										icon:'none',
-										duration: 2000
-									})
-								});
+					uni.hideLoading()
+					this.keywordList=res.data.data.records
+				})
+				.catch(res => {
+					uni.hideLoading()
+					uni.showToast({
+						title: res.errmsg,
+						icon:'none',
+						duration: 2000
+					})
+				});
 				// console.log(key)
 				// console.log(this.keyword)
 				// key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
@@ -284,15 +313,15 @@
 			},
 			tabcarchange(status){
 				this.TabCur=status
+				var param1 = ''
 				if (this.TabCur == 0) {
-									param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
-								} else {
-									param1 = 'buy'
-								}
-								this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+				} else {
+					param1 = '/salePlanInfo/selectSalePlanInfo'
+				}
+				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
 				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
 					if(res.data.code==200){
-						uni.hideLoading()
 						this.keywordList=res.data.data.records
 					}else{
 						uni.showToast({
@@ -300,16 +329,18 @@
 							icon:'none',
 							duration: 2000
 						})
+						
 					}
-									
-								})
-								.catch(res => {
-									uni.showToast({
-										title: res.errmsg,
-										icon:'none',
-										duration: 2000
-									})
-								});
+					uni.hideLoading()
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.errmsg,
+							icon:'none',
+							duration: 2000
+						})
+					});
 			},
 			//保存关键字到历史记录
 			saveKeyword(keyword) {

+ 19 - 2
pageD/identity/companyIdentityThree.vue

@@ -37,12 +37,25 @@
 			</view>
 		</view>
 		<view class="c-row b-b">
-			<text class="tit">开户支行</text>
+			<!-- <text class="tit">开户支行</text>
 			<picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
 				<view class="con-list">
 					{{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
 				</view>
-			</picker>
+			</picker> -->
+			<text class="tit">开户支行</text>
+			<view v-if="zhihangStatus" class="con-list">
+				<picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
+					<view class="con-list">
+						{{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
+					</view>
+				</picker>
+			</view>
+			<view v-else class="con-list">
+				<input placeholder="请填写" name="input" v-model="identityAuthenticationInfo.bankDepositBranch"></input>
+			</view>
+			<button v-if="zhihangStatus" class='cu-btn bg-green shadow' @click="changeZhihang">填写</button>
+			<button v-else class='cu-btn bg-green shadow' @click="changeZhihang">识别</button>
 		</view>
 		<view class="c-row b-b" v-if="identityAuthenticationInfo.customerTypeFlag == 1">
 			<text class="tit">收款人姓名</text>
@@ -111,6 +124,7 @@
 				bankType: [],
 				certificates:true,
 				certificatesTwo:true,
+				zhihangStatus:true,
 			}
 		},
 		computed: {
@@ -179,6 +193,9 @@
 				this.Model = this.bankType[this.bankIndex];
 				this.identityAuthenticationInfo.bankDepositBranch = this.bankType[this.bankIndex];
 			},
+			changeZhihang(){
+				this.zhihangStatus = !this.zhihangStatus
+			},
 			commit() {
 				if (this.bankid[0] == '' || this.bankid[0] == null) {
 					this.$api.msg('请上传银行卡正面')

+ 19 - 15
pages/attestation/index.vue

@@ -83,6 +83,7 @@
 					this.identityAuthenticationInfo.commonId = this.userInfo.id
 					this.identityAuthenticationInfo.customerTypeFlag = 3
 					this.identityAuthenticationInfo.customerType = "粮农"
+					this.identityAuthenticationInfo.customerPhone = this.userInfo.phone
 					uni.showModal({
 						content: '确认后您将获得粮农身份,是否确认该身份?',
 						showCancel: true,
@@ -101,7 +102,7 @@
 								})
 								.catch(res => {
 									uni.showToast({
-										title: res.errmsg,
+										title: res.message,
 										icon: 'none',
 										duration: 2000
 									})
@@ -115,6 +116,7 @@
 					this.identityAuthenticationInfo.customerTypeFlag = 3
 					this.identityAuthenticationInfo.customerType = "粮农"
 					this.identityAuthenticationInfo.id = this.id
+					this.identityAuthenticationInfo.customerPhone = this.userInfo.phone
 					uni.showModal({
 						content: '确定取消粮农身份?',
 						showCancel: true,
@@ -266,16 +268,19 @@
 				this.$api.doRequest('get', '/identityAuthenticationInfo/selectCount', {
 					customerTypeFlag:3,customerType:"粮农"
 					}, 'application/json;charset=UTF-8').then(res => {
-						if(res.data.data.id == "" || res.data.data.id == null){
-							this.changes = "确认"
-						}else if(res.data.data.id != "" || res.data.data.id == null){
-							this.changes = "取消"
-						}	
-						this.id = res.data.data.id
+						if(res.data.data){
+							if(res.data.data.id == "" || res.data.data.id == null){
+								this.changes = "确认"
+							}else if(res.data.data.id != "" || res.data.data.id == null){
+								this.changes = "取消"
+							}	
+							this.id = res.data.data.id
+						}
+						
 					})
 					.catch(res => {
 						uni.showToast({
-							title: res.errmsg,
+							title: res.message,
 							icon: 'none',
 							duration: 2000
 						})
@@ -345,9 +350,8 @@
 
 	.homePage {
 		width: 100%;
-		height: 200px;
-
-		margin-top: 20px;
+		height: 350rpx;
+		margin-top: 20rpx;
 
 	}
 
@@ -374,13 +378,13 @@
 
 	.homePage1 {
 		width: 100%;
-		height: 200px;
-		margin-top: 20px;
+		height: 350rpx;
+		margin-top: 50rpx;
 	}
 	.homePage2 {
 		width: 100%;
-		height: 200px;
-		margin-top: 20px;
+		height: 350rpx;
+		margin-top: 50rpx;
 	}
 
 	.background {

+ 44 - 34
pages/business/business.vue

@@ -122,7 +122,7 @@
 		},
 		//下拉刷新
 		onPullDownRefresh() {
-			this.pageSize = 1
+			this.currentPage = 1
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadData()
@@ -130,7 +130,7 @@
 		onReachBottom() { //上拉触底函数
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
 				this.isLoadMore = true
-				this.pages += 1
+				this.currentPage += 1
 				this.getIndexBuyData()
 			}
 		},
@@ -148,6 +148,7 @@
 			},
 			tabcarchange(status) {
 				this.TabCur = status
+				this.currentPage = 1
 				this.pageSize = 10
 				this.loadData()
 			},
@@ -163,15 +164,15 @@
 				})
 			},
 			locationChange(e) {
-
+				this.location = e.detail.value
 				this.receivePrivate = e.detail.value
-				this.pageSize = 1
+				this.currentPage = 1
 				this.loadData()
 			},
 			tabSelect(e) {
 				this.TabCur = e.currentTarget.dataset.id;
 				this.category = this.TabCur
-				this.pageSize = 1
+				this.currentPage = 1
 				this.loadData()
 			},
 			fabu() {
@@ -206,12 +207,13 @@
 						showFlag: 1,
 						currentPage: this.currentPage,
 						searchKeyWord: this.searchKeyWord,
-						receivePrivate: this.receivePrivate
+						receivePrivate: this.receivePrivate =="0" ? '':this.locationType[this.receivePrivate]
 					}).then(res => {
 						uni.hideLoading()
 						this.buyInfo = res.data.data.records
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.showToast({
 							title: res.errmsg,
 							icon: 'none',
@@ -287,39 +289,46 @@
 			},
 			getIndexBuyData() {
 				const that = this
-				var pages = that.pages
-				var limit = that.limit
-
 				uni.showLoading({
 					title: '正在加载',
 					mask: true
 				})
-				that.$api.request('buy', 'getBuyListInfo', {
-					page: pages,
-					limit: limit
-				}, failres => {
-					that.$api.msg(failres.errmsg)
-					that.isLoadMore = false
-					that.loadStatus = 'nomore'
-					if (that.pages > 1) {
-						that.pages -= 1
-					}
-					uni.hideLoading()
-				}).then(res => {
-					let data = res.data
-					//采购信息
-					if (data.length > 0) {
-						that.buyInfo = that.buyInfo.concat(data)
-						that.isLoadMore = false
-					} else {
-						if (that.pages > 1) {
-							that.pages -= 1
+				var param1 = ''
+				if (that.TabCur == 0) {
+					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+				} else {
+					param1 = '/salePlanInfo/selectSalePlanInfo'
+				}
+				this.$api.doRequest('get', param1, {
+						pageSize: this.pageSize,
+						showFlag: 1,
+						currentPage: this.currentPage,
+						searchKeyWord: this.searchKeyWord,
+						receivePrivate: this.receivePrivate
+					}).then(res => {
+						uni.hideLoading()
+						// this.buyInfo = res.data.records
+						let data = res.data.data.records
+						//采购信息
+						if (data.length > 0) {
+							that.buyInfo = that.buyInfo.concat(data)
+							that.isLoadMore = false
+						} else {
+							if (that.currentPage > 1) {
+								that.currentPage -= 1
+							}
+							that.isLoadMore = true
+							that.loadStatus = 'nomore'
 						}
-						that.isLoadMore = true
-						that.loadStatus = 'nomore'
-					}
-					uni.hideLoading()
-				})
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none',
+							duration: 2000
+						})
+					});
 			}
 
 		}
@@ -367,6 +376,7 @@
 
 	.search-form {
 		background: #F5F6F9;
+		padding-left: 20rpx;
 	}
 
 	.title-tip {

+ 24 - 24
pages/user/user.vue

@@ -276,32 +276,32 @@
 				  });
 			},
 			loadData(){
-				const that = this
-				if(uni.getStorageSync("PageCur")){
-					that.PageCur = uni.getStorageSync("PageCur");
-				}
-				that.userInfoTmp = uni.getStorageSync("userInfo")
-				uni.showLoading({
-					title: '正在加载',
-					mask:true
-				})
-				that.$api.request('integral', 'getIndexData', failres => {
-					that.$api.msg(failres.errmsg)
-					uni.hideLoading()
-				}).then(res => {
-					let data = res.data
-					uni.setStorageSync("message", data.message);
-					uni.setStorageSync("task", data.task);
-					uni.setStorageSync("contract", data.contract);
-					uni.setStorageSync('showTran', data.showTran);
+				// const that = this
+				// if(uni.getStorageSync("PageCur")){
+				// 	that.PageCur = uni.getStorageSync("PageCur");
+				// }
+				// that.userInfoTmp = uni.getStorageSync("userInfo")
+				// uni.showLoading({
+				// 	title: '正在加载',
+				// 	mask:true
+				// })
+				// that.$api.request('integral', 'getIndexData', failres => {
+				// 	that.$api.msg(failres.errmsg)
+				// 	uni.hideLoading()
+				// }).then(res => {
+				// 	let data = res.data
+				// 	uni.setStorageSync("message", data.message);
+				// 	uni.setStorageSync("task", data.task);
+				// 	uni.setStorageSync("contract", data.contract);
+				// 	uni.setStorageSync('showTran', data.showTran);
 					
-					that.showTran = data.showTran
-					that.gridList[4].tips = data.task
-					that.gridList[2].tips = data.contract
-					that.companyId = data.companyId
-					uni.hideLoading()
+				// 	that.showTran = data.showTran
+				// 	that.gridList[4].tips = data.task
+				// 	that.gridList[2].tips = data.contract
+				// 	that.companyId = data.companyId
+				// 	uni.hideLoading()
 				
-				})
+				// })
 			},
 			gridClick (item, index) {
 				var that = this