gjy 3 anni fa
parent
commit
dc037efc90

+ 43 - 5
components/upload.vue

@@ -17,7 +17,10 @@
 				:src="item.url || item.path" :mode="imageMode"></image>
 		</view>
 		<slot name="file" :file="lists"></slot>
-		<view style="display: inline-block;" :class="custom?'customStyle':'default'"
+		<view style="display: inline-block;" :style="{
+			background:customBack,
+			border:customBorder
+		}" :class="custom?'customStyle':'default'"
 			@tap="selectFile" v-if="maxCount > lists.length">
 			<slot name="addBtn"></slot>
 			<img v-if="custom&&options.bgc!=''" :src="options.bgc" alt="" class="imgstyle">
@@ -25,10 +28,17 @@
 					width: width + 'rpx',
 					height: width + 'rpx'
 				}">
-				<u-icon v-if="custom" name="camera-fill" class="" size="100" color="#617E8B"></u-icon>
+				<u-icon v-if="custom&&!customBtn" name="camera-fill" class="" size="100" color="#617E8B"></u-icon>
+				<image v-if="custom&&customBtn" :style="{
+				width: customBtnWidth + 'px',
+				height: customBtnHeight + 'px'
+			}" :src="customBtnImage" mode=""></image>
 				<image v-if="!custom" style='width:23px;height:23px;' src="../static/img/liangmai/xiangji-2.png" mode=""></image>
 				<view v-if="!custom" class="u-add-tips">{{ uploadText }}</view>
-				<view v-if="custom" class="u-add-tips">{{ options.text }}</view>
+				<view v-if="custom" :style="{
+				color: customBtnColor,
+				'font-size':customBtnFontSize+'px',
+			}" class="u-add-tips">{{ options.text }}</view>
 			</view>
 		</view>
 		<!-- <view class="custom-style" v-if="custom"
@@ -95,8 +105,8 @@
 			// 最大上传数量
 			maxCount: {
 				type: [String, Number],
-				default: 52
-			},
+				default: 52,
+				},
 			//  是否显示进度条
 			showProgress: {
 				type: Boolean,
@@ -191,6 +201,34 @@
 				type: Boolean,
 				default: false
 			},
+			customBtnImage: {
+				type: String,
+				default: ''
+			},
+			customBtnWidth: {
+				type: Number,
+				default: 0
+			},
+			customBtnHeight: {
+				type: Number,
+				default: 0
+			},
+			customBtnColor: {
+				type: String,
+				default: '#617E8B'
+			},
+			customBack:{
+				type: String,
+				default: '#F5F6FA'
+			},
+			customBorder:{
+				type: String,
+				default: '2px dashed #C6CBCE'
+			},
+			customBtnFontSize:{
+				type: String,
+				default: '18'
+			},
 			// 内部预览图片区域和选择图片按钮的区域宽度,高等于宽
 			width: {
 				type: [String, Number],

+ 1 - 1
config/index.js

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

+ 63 - 63
pages.json

@@ -544,74 +544,74 @@
             
         }
 
-	 //    ,{
-  //           "path" : "pages/grain_pulse/distribution/distribution",
-  //           "style" :                                                                                    
-  //           {
-  //               "navigationBarTitleText": "分布",
-  //               "enablePullDownRefresh": false
-		// 		// "app-plus": {  
-		// 		//                 "subNVues":[{  
-		// 		//                     "id": "popup", 
-		// 		//                     "path": "pages/grain_pulse/distribution/subNvue/popup.nvue",
-		// 		//                     "type": "popup",
-		// 		//                     "style": {  
-		// 		//                         "position": "absolute",  
-		// 		//                         "dock": "bottom",  
-		// 		//                         "width": "100upx",  
-		// 		//                         "height": "150upx",  
-		// 		//                         "background": "red"  
-		// 		//                     }  
-		// 		//                 }]  
-		// 		//             } 
-  //   //             "enablePullDownRefresh": false
-  //           }
-  //       }
-  //       ,{
-  //           "path" : "pages/grain_pulse/position/position",
-  //           "style" :                                                                                    
-  //           {
-  //               "navigationBarTitleText": "定位",
-  //               "enablePullDownRefresh": false
-  //           }
+	    ,{
+            "path" : "pages/grain_pulse/distribution/distribution",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "分布",
+                "enablePullDownRefresh": false
+				// "app-plus": {  
+				//                 "subNVues":[{  
+				//                     "id": "popup", 
+				//                     "path": "pages/grain_pulse/distribution/subNvue/popup.nvue",
+				//                     "type": "popup",
+				//                     "style": {  
+				//                         "position": "absolute",  
+				//                         "dock": "bottom",  
+				//                         "width": "100upx",  
+				//                         "height": "150upx",  
+				//                         "background": "red"  
+				//                     }  
+				//                 }]  
+				//             } 
+    //             "enablePullDownRefresh": false
+            }
+        }
+        ,{
+            "path" : "pages/grain_pulse/position/position",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "定位",
+                "enablePullDownRefresh": false
+            }
             
-  //       }
-  //       ,{
-  //           "path" : "pages/grain_pulse/selectCity/selectCity",
-  //           "style" :                                                                                    
-  //           {
-  //               "navigationBarTitleText": "城市",
-  //               "enablePullDownRefresh": false
-  //           }
+        }
+        ,{
+            "path" : "pages/grain_pulse/selectCity/selectCity",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "城市",
+                "enablePullDownRefresh": false
+            }
             
-  //       }
-  //       ,{
-  //           "path" : "pages/grain_pulse/localtion/localtion",
-  //           "style" :                                                                                    
-  //           {
-  //               "navigationBarTitleText": "位置",
-  //               "enablePullDownRefresh": false
-  //           }
+        }
+        ,{
+            "path" : "pages/grain_pulse/localtion/localtion",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "位置",
+                "enablePullDownRefresh": false
+            }
             
-  //       }
-		// ,{
-		//     "path" : "pages/grain_pulse/localtion/coordinate",
-		//     "style" :                                                                                    
-		//     {
-		//         "navigationBarTitleText": "坐标",
-		//         "enablePullDownRefresh": false
-		//     }
+        }
+		,{
+		    "path" : "pages/grain_pulse/localtion/coordinate",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "坐标",
+		        "enablePullDownRefresh": false
+		    }
 		    
-		// }
-  //       ,{
-  //           "path" : "pages/grain_pulse/distribution/distribution",
-  //           "style" :                                                                                    
-  //           {
-  //               "navigationBarTitleText": "",
-  //               "enablePullDownRefresh": false
-  //           }
+		}
+        ,{
+            "path" : "pages/grain_pulse/distribution/distribution",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
             
-  //       }
+        }
     ],
 	"subpackages": [{
 			"root": "pageA",

+ 101 - 25
pages/grain_pulse/enter.vue

@@ -8,13 +8,13 @@
 			请完善入驻信息
 		</view>
 		<u-form class="forList">
-			<view class="modular">
+			<view style='padding-bottom:20px;' class="modular">
 				<u-form-item label="公司名称" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.compName" input-align="right" class="write Medium"
+					<u-input maxlength='25' v-model="deptList.compName" input-align="right" class="write Medium"
 						placeholder="请输入公司名称" />
 				</u-form-item>
 				<view>
-					<view class="title Regular" style="margin-top: 15rpx;">主类型(可多选,必须为真实经营类型)</view>
+					<view class="title Regular" style="margin-top: 15rpx;">主类型(可多选,必须为真实经营类型)</view>
 					<view v-for="(item,index) in management" class="choice">
 						<!-- 	<u-tag :type="types[index] == null ? 'info' : types[index]" :text="item" show="show"
 							@click="singleClick(index)"></u-tag> -->
@@ -25,13 +25,22 @@
 				</view>
 			</view>
 			<view class="modular">
-				<u-form-item label="标题" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.title" input-align="right" class="write Regular"
+				<u-form-item label="标题" label-width="30%" prop="title" class="title Regular">
+					<u-input maxlength="16" v-model="deptList.title" input-align="right" class="write Regular"
 						placeholder="用于封面展示,2-16个字" />
 				</u-form-item>
-				<u-form-item label="公司简介" label-width="30%" class="title Regular">
-					<u-input v-model="deptList.companyProfile" input-align="right" class="write Regular" type="textarea"
-						placeholder="请输入企业简介,如经营项目、产品类型、企业规模等,10-60个字" />
+				<u-form-item label-position='top' label="公司简介" label-width="30%" class="title Regular">
+					<!-- <u-input  input-align="right"  type="textarea"
+						 /> -->
+						 <view class='companyProfilewrap'>
+							 <textarea class="write Regular companyProfile" 
+							 maxlength="60" 
+							 placeholder="请输入企业简介,如经营项目、产品类型、企业规模等,10-60个字"
+							  v-model="deptList.companyProfile" name="" id="" cols="10" rows="3">
+							  </textarea>
+							  <view class='companyProfilecontent'>{{deptList.companyProfile.length}}/60个字</view>
+						 </view>
+						
 				</u-form-item>
 			</view>
 			<view class="modular">
@@ -54,13 +63,17 @@
 						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
 							:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
 							@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
-							:options="uploadOptions" :custom="uploadCustom" @on-progress="onProgress"></upload>
+							:options="uploadOptions" customBorder='2px dashed #D8DEF7' customBtnFontSize="14" customBtnColor="#6A7282" :customBtnHeight='custombtnheight'
+							 :customBtnWidth='custombtnwidth' customBack='#F9FAFE' :customBtnImage="custombtnimage" :customBtn='custombtn'
+							  :custom="uploadCustom" @on-progress="onProgress"></upload>
 					</view>
 					<view v-if="license2 != ''">
 						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
 							:size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError"
 							@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
-							:options="uploadOptions1" :custom="uploadCustom" @on-progress="onProgress"></upload>
+							:options="uploadOptions1"  customBack='#FEF9FA' customBorder='2px dashed #F9D5DC' customBtnFontSize="14" customBtnColor="#6A7282" :customBtnHeight='custombtnheight'
+							 :customBtnWidth='custombtnwidth' :customBtnImage="custombtnimage" :customBtn='custombtn'
+							  :custom="uploadCustom" @on-progress="onProgress"></upload>
 					</view>
 				</view>
 			</view>
@@ -102,13 +115,16 @@
 					"text": "上传封面图片",
 					"bgc": ""
 				},
+				errorType: ['message'],
 				uploadOptions1: {
 					"text": "上传营业执照",
 					"bgc": ""
 				},
 				mainBusinessType: [],
 				uploadCustom: true,
-				deptList: {},
+				deptList: {
+					companyProfile:''
+				},
 				management: [{
 						name: "粮库",
 						checked: false
@@ -142,11 +158,17 @@
 				show: false,
 				// anNiuCss:"types",
 				anNiuCss: [],
+				custombtn:true,
+				custombtnimage:'../../static/img/liangmai/ic_shanchuan@3x.png',
+				custombtnwidth:50,
+				custombtnheight:50,
 				license1: "../../static/img/authentication/business@3x.png",
 				license2: "../../static/img/authentication/business@3x.png",
 
 			}
 		},
+		onLoad() {
+		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
@@ -205,10 +227,54 @@
 			},
 			submit() {
 				var that = this
-				// if (!this.deptList.title) {
-				// 	this.$api.msg('标题不能为空')
-				// 	return
-				// }
+				if (!this.deptList.compName) {
+					this.$api.msg('公司名称不能为空')
+					return
+				}
+				if (this.mainBusinessType.length==0) {
+					this.$api.msg('至少选择一个主营类型')
+					return
+				}
+				if (!this.deptList.title) {
+					this.$api.msg('标题不能为空')
+					return
+				}
+				if (!this.deptList.companyProfile) {
+					this.$api.msg('企业简介不能为空')
+					return
+				}
+				if (!this.deptList.longitude&&!this.deptList.longitude) {
+					this.$api.msg('上传坐标不能为空')
+					return
+				}
+				if (!this.deptList.detailedAddress) {
+					this.$api.msg('详细地址不能为空')
+					return
+				}
+				if (!this.deptList.attachmentAddress) {
+					this.$api.msg('封面照片不能为空')
+					return
+				}
+				if (!this.deptList.licenseAddress) {
+					this.$api.msg('营业执照不能为空')
+					return
+				}
+				if (this.deptList.compName.length<2||this.deptList.compName.length>25) {
+					this.$api.msg('公司名称输入错误')
+					return
+				}
+				if (this.deptList.title.length<2||this.deptList.title.length>16) {
+					this.$api.msg('标题长度2-16个字')
+					return
+				}
+				if (this.deptList.companyProfile.length<10||this.deptList.companyProfile.length>60) {
+					this.$api.msg('简介长度10-60个字')
+					return
+				}
+				if (this.deptList.detailedAddress.length<2||this.deptList.detailedAddress.length>12) {
+					this.$api.msg('详细地址2-12个字')
+					return
+				}
 				// this.show = true
 				// return
 				this.deptList.mainBusinessType=this.mainBusinessType.toString()
@@ -313,32 +379,24 @@
 	.choice {
 		margin-top: 10px;
 		display: inline-block;
-		margin-bottom: 6px;
 	}
 
 	.title {
-		margin-left: 20rpx;
 		color: #71747C;
 	}
 
 	.types {
-		width: 55px;
-		height: 30px;
 		background-color: #F4FAF8;
 		text-align: center;
-		line-height: 32px;
 		border-radius: 20px;
-		margin-left: 14px;
+		margin-left: 5px;
+		padding:8px 19px;
 	}
 
 	.types1 {
-		width: 55px;
-		height: 30px;
 		background-color: #22C572;
 		text-align: center;
-		line-height: 32px;
 		border-radius: 20px;
-		margin-left: 14px;
 		color: #FFFFFF;
 	}
 
@@ -358,6 +416,7 @@
 		border-radius: 10px;
 		margin-top: 10px;
 		position:relative;z-index:2;
+		padding:0 12.5px;
 	}
 
 	.forList {
@@ -396,4 +455,21 @@
 		margin: 0 auto;
 		font-size: 16px;
 	}
+	.companyProfilewrap{
+		position:relative;
+		width:100%;
+	}
+	.companyProfile{
+		width:90%;height:138px;
+		background:#F9F9FA;
+		font-size:13px;
+		padding:13px;
+		border-radius:5px;
+	}
+	.companyProfilecontent{
+		position:absolute;
+		bottom:10px;
+		right:15px;
+		font-size:13px;
+	}
 </style>

+ 36 - 6
pages/task/my_task.vue

@@ -15,18 +15,24 @@
 		<view class="introduce-section">
 			<view v-for="(item, index) in taskInfo" :key="index" class="guess-item" @click="navToDetailPage(item)">
 				<view class="title flex">
-					<text>
+					<text v-if='statusFlag==1'>
 						{{item.carNo}}({{item.tranCarNo}})
 					</text>
+					<text v-else>{{item.messageTitle}}</text>
 					<view  class="title-tip-a" v-if="item.statusFlag==3">已完成</view>
 					<view  class="title-tip" v-if="item.statusFlag==1">未完成</view>
 				</view>
-				<view class="flex title_b">
+				<view v-if='statusFlag==1' class="flex title_b">
 					<view class="title-tip">
 						{{item.contractNo}}
 					</view>
 					<view class="title-tip-b">{{item.inOutDate}}</view>
 				</view>
+				<view v-else class="flex title_b">
+					<view class="title">
+						{{item.messageContent}}
+					</view>
+				</view>
 				<u-tag :text="item.taskType" type="success" v-if="item.taskType == '出库任务'"/>
 				<u-tag :text="item.taskType" type="primary" v-if="item.taskType == '入库任务'"/>
 			</view>
@@ -62,6 +68,10 @@
 					pageSize: 10,
 					currentPage: 1
 				},
+				data: {
+					pageSize: 10,
+					currentPage: 1
+				},
 				keyword:""
 			};
 		},
@@ -153,23 +163,37 @@
 					uni.hideLoading()
 				})
 			},
-			getIndexBuyData() {
+			getIndexBuyData(status) {
 				const that = this
 				var pages = that.pages
 				var limit = that.limit
+				var url=''
 				uni.showLoading({
 					title:"正在加载"
 				})
+			   var data={}
 				this.warehouseInOutInfo.statusFlag = this.statusFlag
 				this.warehouseInOutInfo.phone = this.userInfo.phone
 				this.warehouseInOutInfo.pcFlag = 0
+				if(this.statusFlag==1){
+					data=this.warehouseInOutInfo
+					url='/warehouseInOutInfo/selectInfo'
+				}else{
+					data=this.data
+					url='/commonUser/query/findHisPageNoticeTasks'
+				}
 				//this.warehouseInOutInfo.status = this.status
-				this.$api.doRequest('get', '/warehouseInOutInfo/selectInfo', this.warehouseInOutInfo).then(res => {
+				this.$api.doRequest('get', url, data).then(res => {
 					if (res.data.code == 200) {
 						let data = res.data.data.records
 						//采购信息
 						if (data.length > 0) {
-							that.taskInfo = that.taskInfo.concat(data)
+							if(status){
+								that.taskInfo=data
+							}else{
+								that.taskInfo = that.taskInfo.concat(data)
+							}
+							
 							
 						} else {
 							if (that.pages > 1) {
@@ -203,7 +227,7 @@
 			tabcarchange(statusFlag) {
 				this.statusFlag = statusFlag
 				this.pageSize = 1
-				this.getIndexBuyData()
+				this.getIndexBuyData(1)
 			},
 			navToDetailPage(item) {
 				if(item.taskType == "入库任务"){
@@ -249,6 +273,12 @@
 		line-height: 40px;
 		flex: 2.5;
 	}
+	.introduce-section .title_b .title{
+		font-size: 13px;
+		height:40px;
+		padding:10px 0;
+		flex: 2.5;
+	}
 	.introduce-section .title_b .title-tip-b{
 		flex: 1;
 		font-size: 13px;

BIN
static/img/liangmai/ic_shanchuan.png


BIN
static/img/liangmai/ic_shanchuan@2x.png


BIN
static/img/liangmai/ic_shanchuan@3x.png