浏览代码

前端gjy

gjy 3 年之前
父节点
当前提交
bb1be8855e
共有 4 个文件被更改,包括 68 次插入35 次删除
  1. 1 1
      config/index.js
  2. 17 17
      pageA/product/business_buy.vue
  3. 40 7
      pageA/product/lookup.vue
  4. 10 10
      pageD/warehousings/warehousings.vue

+ 1 - 1
config/index.js

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

+ 17 - 17
pageA/product/business_buy.vue

@@ -255,7 +255,7 @@
 				},
 				commit(){
 					if(!this.purchaseOrder.transactionsNumber){
-						this.$api.msg('出售价格不能为空')
+						this.$api.msg('出售数量不能为空')
 						return
 					}
 					if(this.purchaseOrder.transactionsNumber>10000||this.purchaseOrder.transactionsNumber<1){
@@ -309,27 +309,27 @@
 							if (res.confirm) {
 								that.$api.doRequest('post','/purchaseOrder/api/insertPurchaseOrder', that.purchaseOrder).then(res => {
 									if(res.data.code==200){
-										// that.$api.doRequest('post','/purchaseOrder/api/submitPurchaseOrder', {id:res.data.data}).then(res1 => {
-										// 	if(res1.data.code==200){
+										that.$api.doRequest('post','/purchaseOrder/api/submitPurchaseOrder', {id:res.data.data}).then(res1 => {
+											if(res1.data.code==200){
 												uni.showToast({
 													title: '提交成功,等待买方回复',
 													icon: 'none',
 													duration: 2000
 												})
-										// 	}else{
-										// 		uni.showToast({
-										// 			title: res.data.message,
-										// 			icon: 'none',
-										// 			duration: 2000
-										// 		})
-										// 	}
-										// }).catch(res => {
-										// 	uni.showToast({
-										// 		title: res.data.message,
-										// 		icon: 'none',
-										// 		duration: 2000
-										// 	})
-										// })
+											}else{
+												uni.showToast({
+													title: res.data.message,
+													icon: 'none',
+													duration: 2000
+												})
+											}
+										}).catch(res => {
+											uni.showToast({
+												title: res.data.message,
+												icon: 'none',
+												duration: 2000
+											})
+										})
 										// uni.navigateBack();
 									}else{
 										uni.showToast({

+ 40 - 7
pageA/product/lookup.vue

@@ -4,10 +4,10 @@
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 			<view style='flex:6;' class="search-form round" >
 				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" v-model="searchKeyWord" @input="doSearch" placeholder="请输入货名或标题" confirm-type="search"></input>
+				<input type="text" v-model="searchKeyWord" placeholder="请输入货名或标题" confirm-type="search"></input>
 				
 			</view>
-			<view @click='emptysearch1' style="width:4%;flex:1;">{{content}}</view>
+			<view @click='doSearch' style="width:4%;flex:1;">搜索</view>
 			<text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text>
 			</view>
 			<!-- mSearch组件 如果使用原样式,删除组件元素-->
@@ -180,15 +180,48 @@
 			blur(){
 				uni.hideKeyboard()
 			},
-			emptysearch1(){
-				if(this.content=='取消'){
-					this.searchKeyWord=''
-					this.content='搜索'
+			doSearch(keyword){
+				if(keyword){
+					this.searchKeyWord=keyword
 				}
+				if(this.searchKeyWord.length>0){
+						this.isShowKeywordList=true
+						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:this.searchKeyWord}).then(res => {
+						})
+						.catch(res => {
+							
+						});
+					}else{
+						this.isShowKeywordList=false
+						this.loadOldKeyword()
+						this.loadHotKeyword()
+					}
+				uni.showLoading({
+					title: '正在加载',
+					mask:true
+				})
+				var param1=''
+				if (this.TabCur == 0) {
+					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.hideLoading()
+					uni.showToast({
+						title: res.errmsg,
+						icon:'none',
+						duration: 2000
+					})
+				});
 			},
 			emptysearch(){
 				this.searchKeyWord=''
-				this.content='搜索'
 			},
 			loadHotKeyword(){
 				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo',{pageSize:this.pageSize,

+ 10 - 10
pageD/warehousings/warehousings.vue

@@ -85,13 +85,13 @@
 				<view class="c-row b-b">
 					<view class="title">扣款金额</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入扣款金额" name="input" v-model="WarehouseInOutInfo.deductionAmount"></input>
+						<input style="font-size:14px" placeholder="请输入扣款金额" name="input" v-model="WarehouseInOutInfo.deductionAmount"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">扣款项</view>
 					<view class="con-list">
-						<input maxlength='16' placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
+						<input style="font-size:14px" maxlength='16' placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
@@ -128,49 +128,49 @@
 				<view class="c-row b-b">
 					<view class="title">质检员</view>
 					<view class="con-list">
-						<input maxlength='10' minlength='2' placeholder-style="font-size:14px" placeholder="请输入质检员姓名" name="input" v-model="list.qualityInspector"></input>
+						<input maxlength='10' minlength='2' style="font-size:14px" placeholder="请输入质检员姓名" name="input" v-model="list.qualityInspector"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">蛋白(%)>=</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入蛋白占比" name="input" v-model="list.protein"></input>
+						<input style="font-size:14px" placeholder="请输入蛋白占比" name="input" v-model="list.protein"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">水分(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入水分占比" name="input" v-model="list.waterContent"></input>
+						<input style="font-size:14px" placeholder="请输入水分占比" name="input" v-model="list.waterContent"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">容重(克/升)>= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入容重" name="input" v-model="list.bulkDensity"></input>
+						<input style="font-size:14px" placeholder="请输入容重" name="input" v-model="list.bulkDensity"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">热损伤(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入热损伤占比" name="input" v-model="list.jiaorenli"></input>
+						<input style="font-size:14px" placeholder="请输入热损伤占比" name="input" v-model="list.jiaorenli"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">杂质(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入杂质占比" name="input" v-model="list.impurity"></input>
+						<input style="font-size:14px" placeholder="请输入杂质占比" name="input" v-model="list.impurity"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">霉变粒(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入霉变粒占比" name="input" v-model="list.mildewGrain"></input>
+						<input style="font-size:14px" placeholder="请输入霉变粒占比" name="input" v-model="list.mildewGrain"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">不完整粒(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入不完整粒占比" name="input"
+						<input style="font-size:14px" placeholder="请输入不完整粒占比" name="input"
 							v-model="list.imperfectGrain"></input>
 					</view>
 				</view>