wangchao 3 anni fa
parent
commit
24402cf800
56 ha cambiato i file con 2371 aggiunte e 986 eliminazioni
  1. 14 5
      .hbuilderx/launch.json
  2. 5 1
      App.vue
  3. 6 0
      AuthKey_6465D27N2F.p8
  4. 69 82
      common/appUpdate.js
  5. BIN
      components/bert-suggest/icons/contact.png
  6. BIN
      components/bert-suggest/icons/image.png
  7. BIN
      components/bert-suggest/icons/suggestion.png
  8. 98 0
      components/bert-suggest/suggest.vue
  9. 4 4
      components/swiperup.vue
  10. 431 0
      components/uni-card/uni-card.vue
  11. 300 103
      components/uview-ui/libs/util/area.js
  12. 0 0
      components/uview-ui/libs/util/city.js
  13. 1 1
      components/uview-ui/libs/util/province.js
  14. 2 2
      config/index.js
  15. 4 1
      main.js
  16. 2 2
      manifest.json
  17. 5 2
      pageA/product/business_buy.vue
  18. 9 6
      pageA/product/business_sale.vue
  19. 1 1
      pageA/product/sales_detail.vue
  20. 1 2
      pageB/contract/collectLook.vue
  21. 23 5
      pageB/contract/contract.vue
  22. 6 8
      pageB/contract/contract_detail.vue
  23. 37 2
      pageB/contract/enclosures.vue
  24. 3 9
      pageB/contract/look.vue
  25. 0 5
      pageD/identity/companyIdentityLook.vue
  26. 10 7
      pageD/identity/companyIdentityThree.vue
  27. 8 20
      pageD/identity/driverIdentity.vue
  28. 10 3
      pageD/myRelease/Identity_switching.vue
  29. 176 95
      pageD/myRelease/buyEdit.vue
  30. 144 120
      pageD/myRelease/buyGrain.vue
  31. 4 4
      pageD/myRelease/sellDetails.vue
  32. 268 112
      pageD/myRelease/sellEdit.vue
  33. 151 105
      pageD/myRelease/sellGrain.vue
  34. 31 31
      pageD/warehousings/ex_warehouse.vue
  35. 74 33
      pageD/warehousings/warehousings.vue
  36. 9 1
      pages.json
  37. 39 81
      pages/attestation/index.vue
  38. 17 16
      pages/attestation/indexThree.vue
  39. 3 1
      pages/attestation/indexTwo.vue
  40. 31 0
      pages/business/business.vue
  41. 4 2
      pages/public/code.vue
  42. 15 3
      pages/public/login_account_number.vue
  43. 4 2
      pages/public/register.vue
  44. 4 2
      pages/public/reset.vue
  45. 32 1
      pages/sale/information.vue
  46. 15 2
      pages/task/my_task.vue
  47. 31 0
      pages/tran/tran.vue
  48. 30 0
      pages/user/fankui.vue
  49. 3 4
      pages/user/setUp.vue
  50. 22 16
      pages/user/set_nickname.vue
  51. 18 13
      pages/user/set_picture.vue
  52. 94 25
      pages/user/user.vue
  53. 2 7
      store/index.js
  54. 101 39
      websocket_sdk.js
  55. BIN
      yiliangyiyun.mobileprovision
  56. BIN
      证书.p12

+ 14 - 5
.hbuilderx/launch.json

@@ -2,10 +2,19 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
-            "type": "uniCloud",
-            "default": {
-                "launchtype": "remote"
-            }
-        }
+     	"app-plus" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"default" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"type" : "uniCloud"
+     }
     ]
 }

+ 5 - 1
App.vue

@@ -13,7 +13,11 @@
 		},
 		onLaunch: function() {
 			// #ifdef APP-PLUS
-			appUpdate()
+			let type = uni.getSystemInfoSync().platform
+			console.log(type)
+			if(type == "android"){
+				appUpdate()
+			}
 			// #endif
 			this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';

+ 6 - 0
AuthKey_6465D27N2F.p8

@@ -0,0 +1,6 @@
+-----BEGIN PRIVATE KEY-----
+MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgKuRfyjQBCfmmZaEy
+TtxSYc6iGFyNYtcQboS4fpRkm3OgCgYIKoZIzj0DAQehRANCAAQtNN5TzB1SpBBJ
+gQ6w0fetmm3XzN/Q94joy0oNYw0eURSsQOiN5I/LY3echAi13QLJk4rj5KfgZGFX
+O7Yi2xUv
+-----END PRIVATE KEY-----

+ 69 - 82
common/appUpdate.js

@@ -3,91 +3,78 @@
 
 import * as config from '../config'
 export default function appUpdate() {
-	var data ={
-			appid: plus.runtime.appid,
-			version: plus.runtime.version,
-			imei: "1"
-		}
 		
-	let baseUrl = config.def().baseUrl
-	let _gp = 'user'
-	let _mt = 'updateAppVersion'
+	let baseUrlNew = config.def().baseUrlNew
 	uni.request({
-		url: baseUrl + '/m.api',
-		data: {
-			...data,
-			_gp,
-			_mt
-		},
-		method: 'POST',
-		header: {
-			'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
-			'ACCESSTOKEN': 'accessToken'
-		},
-		success: (res) => {
-			
-			console.log("uni.request update success",res)
-			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
-				let client_version = wgtinfo.version
-				var flag_update = client_version.split(".").splice(0, 2).join(".") != res.data.data.version.split(".").splice(0, 2)
-					.join(".")
-				var flag_hot = (Number(client_version.split(".")[2]) < Number(res.data.data.version.split(".")[2])) & !flag_update
-				console.log("client_version",client_version) 
-				console.log("flag_update",flag_update)
-				console.log("flag_hot",flag_hot)
-
-				if (flag_update) {
-					console.log("更新弹窗")
-					// 提醒用户更新
-					uni.showModal({
-						title: '更新提示',
-						content: res.data.data.note,
-						success: (showResult) => {
-							if (showResult.confirm) {
-								plus.nativeUI.toast("正在准备环境,请稍后!");
-								console.log(res.data.data.url, )
-								var dtask = plus.downloader.createDownload(res.data.data.url, {
-									method: 'GET',
-									filename: '_doc/update/'
-								}, function(d, status) {
-									if (status == 200) {
-										var path = d.filename; //下载apk
-										plus.runtime.install(path); // 自动安装apk文件
-									} else {
-										plus.nativeUI.alert('版本更新失败:' + status);
-									}
-								});
-								dtask.start();
+	    url: baseUrlNew + '/appVersion/selectInfo',
+	    data: {
+	    	appid: plus.runtime.appid,
+	    	version: plus.runtime.version,
+	    	imei: "1"
+	    },
+	    method: 'GET',
+	    success: (res) => {			
+	    	if (res.statusCode === 200) {
+				console.log("uni.request update success",res)
+				plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
+					let client_version = wgtinfo.version
+					var flag_update = client_version.split(".").splice(0, 2).join(".") != res.data.data.version.split(".").splice(0, 2)
+						.join(".")
+					var flag_hot = (Number(client_version.split(".")[2]) < Number(res.data.data.version.split(".")[2])) & !flag_update
+					console.log("client_version",client_version) 
+					console.log("flag_update",flag_update)
+					console.log("flag_hot",flag_hot)
+				
+					if (flag_update) {
+						console.log("更新弹窗")
+						// 提醒用户更新
+						uni.showModal({
+							title: '更新提示',
+							content: res.data.data.note,
+							success: (showResult) => {
+								if (showResult.confirm) {
+									plus.nativeUI.toast("正在准备环境,请稍后!");
+									console.log(res.data.data.url, )
+									var dtask = plus.downloader.createDownload(res.data.data.url, {
+										method: 'GET',
+										filename: '_doc/update/'
+									}, function(d, status) {
+										if (status == 200) {
+											var path = d.filename; //下载apk
+											plus.runtime.install(path); // 自动安装apk文件
+										} else {
+											plus.nativeUI.alert('版本更新失败:' + status);
+										}
+									});
+									dtask.start();
+								}
 							}
-						}
-					})
-				} else if (flag_hot) {
-					console.log("热更新") 
-					uni.downloadFile({
-						url: res.data.data.wgtUrl,
-						success: (downloadResult) => {
-							console.log(downloadResult.tempFilePath)
-							if (downloadResult.statusCode === 200) {
-								plus.nativeUI.toast(`正在热更新!${res.data.data.versionCode}`);
-								plus.runtime.install(downloadResult.tempFilePath, {
-									force: false
-								}, function() {
-									plus.nativeUI.toast("热更新成功");
-									plus.runtime.restart();
-								}, function(e) {
-									console.log(e)
-									plus.nativeUI.toast(`热更新失败:${e.message}`);
-								});
+						})
+					} else if (flag_hot) {
+						console.log("热更新") 
+						uni.downloadFile({
+							url: res.data.data.wgtUrl,
+							success: (downloadResult) => {
+								console.log(downloadResult.tempFilePath)
+								if (downloadResult.statusCode === 200) {
+									plus.nativeUI.toast(`正在热更新!${res.data.data.versionCode}`);
+									plus.runtime.install(downloadResult.tempFilePath, {
+										force: false
+									}, function() {
+										plus.nativeUI.toast("热更新成功");
+										plus.runtime.restart();
+									}, function(e) {
+										console.log(e)
+										plus.nativeUI.toast(`热更新失败:${e.message}`);
+									});
+								}
 							}
-						}
-					});
-				}
-
-			});
-
-
-
-
-		}
+						});
+					}
+				
+				});
+	    	}
+	    }
 	})
+
 }

BIN
components/bert-suggest/icons/contact.png


BIN
components/bert-suggest/icons/image.png


BIN
components/bert-suggest/icons/suggestion.png


+ 98 - 0
components/bert-suggest/suggest.vue

@@ -0,0 +1,98 @@
+<template>
+	<view>
+		<uni-card class="box" :isFull="true" title="反馈意见" :thumbnail="contentIcon">
+			<textarea v-model="data.content" placeholder="您的反馈对我们非常重要,请在此输入."></textarea>
+		</uni-card>
+		<uni-card class="box" :isFull="true" title="联系方式" :thumbnail="contactIcon">
+			<input v-model="data.contact" placeholder="手机 QQ或e-mail,方便我们联系您" />
+		</uni-card>
+		<button class="submit-btn" @click="submit">提交</button>
+	</view>
+</template>
+
+<script>
+	import uniCard from '@/components/uni-card/uni-card.vue';
+	export default {
+		components:{
+			uniCard
+		},
+		data() {
+			return {
+				data: {
+					imgList: [],
+					content: "",
+					contact: ""
+				},
+				contentIcon: require("./icons/suggestion.png"),
+				contactIcon: require("./icons/contact.png"),
+				imgListIcon: require("./icons/image.png")
+			}
+		},
+		methods: {
+			chooseImage() {
+				let _self = this;
+				uni.chooseImage({
+					sizeType: ['compressed', 'original'],
+					sourceType: ['album', 'camera'],
+					success: function(res) {
+						_self.data.imgList = _self.data.imgList.concat(res.tempFiles)
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				});
+			},
+			removeImage(index) {
+				this.data.imgList.splice(index, 1)
+			},
+			previewImage(index) {
+				uni.previewImage({
+					current: index,
+					urls: this.data.imgList.map(r => r.path)
+				});
+			},
+			submit() {
+				this.$emit("submit", this.data)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.box {
+		margin-bottom: 20rpx;
+	}
+	.imgs {
+		position: relative;
+		display: inline-flex;
+		flex-wrap: wrap;
+		margin: 10rpx;
+		width: 150rpx;
+		height: 150rpx;
+		.img {
+			width: 100%;
+			height: 100%;
+			border-radius: 10rpx;
+			border: 1rpx solid #ebebeb;
+		}
+		.remove {
+			line-height: 30rpx;
+			text-align: center;
+			border-radius: 10rpx;
+			position: absolute;
+			right: 0rpx;	
+			top: 0rpx;
+			width: 30rpx;
+			height: 30rpx;
+			font-weight: bold;
+			background-color: #e53c25;
+		}
+		.add-img {
+			background-color: #f0f0f0;
+		}
+	}
+	.submit-btn {
+		background-color: #49abe8;
+		margin: 20rpx 0;
+	}
+</style>

+ 4 - 4
components/swiperup.vue

@@ -93,8 +93,8 @@
 		position: absolute;
 		background: #fff;
 		display: block;
-		width: 37px;
-		height: 37px;
+		width: 78rpx;
+		height: 78rpx;
 		left: -15px;
 		z-index: 1;
 		-webkit-border-radius: 30%;
@@ -105,8 +105,8 @@
 		position: absolute;
 		background: #fff;
 		display: block;
-		width: 37px;
-		height: 37px;
+		width: 78rpx;
+		height: 78rpx;
 		right: -15px;
 		z-index: 1;
 		-webkit-border-radius: 30%;

+ 431 - 0
components/uni-card/uni-card.vue

@@ -0,0 +1,431 @@
+<template>
+	<view class="uni-card uni-border"
+		:class="{ 'uni-card--full': isFull === true || isFull === 'true', 'uni-card--shadow': isShadow === true || isShadow === 'true'}">
+		<!-- 基础 -->
+		<view v-if="mode === 'basic' && title" @click.stop="onClick" class="uni-card__head-padding">
+			<view class="uni-card__header uni-border-bottom">
+				<slot name="header">
+					<view v-if="thumbnail" class="uni-card__header-extra-img-view">
+						<image :src="thumbnail" class="uni-card__header-extra-img" />
+					</view>
+					<text class="uni-card__header-title-text">{{ title }}</text>
+					<text v-if="extra" class="uni-card__header-extra-text">{{ extra }}</text>
+				</slot>
+			</view>
+		</view>
+		<!-- 标题 -->
+		<view v-if="mode === 'title'" @click.stop="onClick" class="uni-card__head-padding">
+			<view class="uni-card__title uni-border-bottom">
+				<slot name="header">
+					<view class="uni-card__title-box">
+						<view v-if="thumbnail" class="uni-card__title-header">
+							<image class="uni-card__title-header-image" :src="thumbnail" mode="scaleToFill" />
+						</view>
+						<view class="uni-card__title-content">
+							<text class="uni-card__title-content-title uni-ellipsis">{{ title }}</text>
+							<text class="uni-card__title-content-extra uni-ellipsis">{{ subTitle }}</text>
+						</view>
+					</view>
+					<view v-if="extra">
+						<text class="uni-card__header-extra-text">{{ extra }}</text>
+					</view>
+				</slot>
+			</view>
+		</view>
+		<!-- 图文 -->
+		<view v-if="mode === 'style'" class="uni-card__thumbnailimage" @click.stop="onClick">
+			<view class="uni-card__thumbnailimage-box">
+				<image v-if="thumbnail" class="uni-card__thumbnailimage-image" :src="thumbnail" mode="aspectFill" />
+				<uni-icons v-if="!thumbnail" type="image" size="30" color="#999" />
+			</view>
+			<view v-if="title" class="uni-card__thumbnailimage-title">
+				<text class="uni-card__thumbnailimage-title-text">{{ title }}</text>
+			</view>
+		</view>
+		<!-- 内容 -->
+		<view class="uni-card__content uni-card__content--pd" @click.stop="onClick">
+			<view v-if="mode === 'style' && extra" class=""><text class="uni-card__content-extra">{{ extra }}</text>
+			</view>
+			<slot />
+		</view>
+		<!-- 底部 -->
+		<view v-if="note" class="uni-card__footer uni-border-top">
+			<slot name="footer">
+				<text class="uni-card__footer-text">{{ note }}</text>
+			</slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * Card 卡片
+	 * @description 卡片视图组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=22
+	 * @property {String} title 标题文字
+	 * @property {String} subTitle 副标题(仅仅mode=title下生效)
+	 * @property {String} extra 标题额外信息
+	 * @property {String} note 底部信息
+	 * @property {String} thumbnail 标题左侧缩略图
+	 * @property {String} mode = [basic|style|title] 卡片模式
+	 * 	@value basic 基础卡片
+	 * 	@value style 图文卡片
+	 * 	@value title 标题卡片
+	 * @property {Boolean} isFull = [true | false] 卡片内容是否通栏,为 true 时将去除padding值
+	 * @property {Boolean} isShadow = [true | false] 卡片内容是否开启阴影
+	 * @event {Function} click 点击 Card 触发事件
+	 * @example <uni-card title="标题文字" thumbnail="xxx.jpg" extra="额外信息" note="Tips">内容主体,可自定义内容及样式</uni-card>
+	 */
+	export default {
+		name: 'UniCard',
+		emits:['click'],
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			subTitle: {
+				type: String,
+				default: ''
+			},
+			extra: {
+				type: String,
+				default: ''
+			},
+			note: {
+				type: String,
+				default: ''
+			},
+			thumbnail: {
+				type: String,
+				default: ''
+			},
+			mode: {
+				type: String,
+				default: 'basic'
+			},
+			isFull: {
+				// 内容区域是否通栏
+				type: Boolean,
+				default: false
+			},
+			isShadow: {
+				// 是否开启阴影
+				type: [Boolean, String],
+				default: false
+			}
+		},
+		methods: {
+			onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-card {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		flex: 1;
+		box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+		/* #endif */
+		margin: $uni-spacing-col-lg $uni-spacing-row-lg;
+		background-color: $uni-bg-color;
+		position: relative;
+		flex-direction: column;
+		border-radius: 5px;
+		overflow: hidden;
+		/* #ifdef H5 */
+		cursor: pointer;
+		/* #endif */
+	}
+
+
+
+	.uni-border {
+		position: relative;
+		/* #ifdef APP-NVUE */
+		border-color: $uni-border-color;
+		border-style: solid;
+		border-width: 0.5px;
+		/* #endif */
+		z-index: 1;
+	}
+
+	/* #ifndef APP-NVUE */
+	.uni-border:after {
+		content: '';
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		top: 0;
+		right: 0;
+		border: 1px solid $uni-border-color;
+		border-radius: 10px;
+		box-sizing: border-box;
+		width: 200%;
+		height: 200%;
+		transform: scale(0.5);
+		transform-origin: left top;
+		z-index: -1;
+	}
+
+	/* #endif */
+
+	.uni-border-bottom {
+		position: relative;
+		/* #ifdef APP-NVUE */
+		border-bottom-color: $uni-border-color;
+		border-bottom-style: solid;
+		border-bottom-width: 0.5px;
+		/* #endif */
+		z-index: 1;
+	}
+
+	/* #ifndef APP-NVUE */
+	.uni-border-bottom:after {
+		content: '';
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		top: 0;
+		right: 0;
+		border-bottom: 1px solid $uni-border-color;
+		box-sizing: border-box;
+		width: 200%;
+		height: 200%;
+		transform: scale(0.5);
+		transform-origin: left top;
+		z-index: -1;
+	}
+
+	/* #endif */
+	.uni-border-top {
+		position: relative;
+		/* #ifdef APP-NVUE */
+		border-top-color: $uni-border-color;
+		border-top-style: solid;
+		border-top-width: 0.5px;
+		/* #endif */
+		z-index: 1;
+	}
+
+	/* #ifndef APP-NVUE */
+	.uni-border-top:after {
+		content: '';
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		top: 0;
+		right: 0;
+		border-top: 1px solid $uni-border-color;
+		box-sizing: border-box;
+		width: 200%;
+		height: 200%;
+		transform: scale(0.5);
+		transform-origin: left top;
+		z-index: -1;
+	}
+
+	/* #endif */
+
+	.uni-card__thumbnailimage {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		// display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		height: 150px;
+		background-color: #F1F1F1;
+		overflow: hidden;
+	}
+
+	.uni-card__thumbnailimage-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		height: 150px;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		overflow: hidden;
+	}
+
+	.uni-card__thumbnailimage-image {
+		flex: 1;
+	}
+
+	.uni-card__thumbnailimage-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		flex-direction: row;
+		padding: $uni-spacing-col-base $uni-spacing-col-lg;
+		background-color: $uni-bg-color-mask;
+	}
+
+	.uni-card__thumbnailimage-title-text {
+		flex: 1;
+		font-size: $uni-font-size-base;
+		color: #fff;
+	}
+
+	.uni-card__title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		padding: 10px;
+
+	}
+
+	.uni-card__title-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		align-items: center;
+		overflow: hidden;
+	}
+
+	.uni-card__title-header {
+		width: 40px;
+		height: 40px;
+		overflow: hidden;
+		border-radius: 5px;
+		padding-right: 10px;
+	}
+
+	.uni-card__title-header-image {
+		width: 40px;
+		height: 40px;
+	}
+
+	.uni-card__title-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		flex: 1;
+		height: 40px;
+		overflow: hidden;
+	}
+
+	.uni-card__title-content-title {
+		font-size: $uni-font-size-base;
+		line-height: 22px;
+	}
+
+	.uni-card__title-content-extra {
+		font-size: $uni-font-size-sm;
+		line-height: 27px;
+		color: $uni-text-color-grey;
+	}
+
+	.uni-card__header {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		position: relative;
+		flex-direction: row;
+		padding: $uni-spacing-col-lg;
+		align-items: center;
+	}
+
+	.uni-card__header-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		margin-right: $uni-spacing-col-base;
+		justify-content: flex-start;
+		align-items: center;
+	}
+
+	.uni-card__header-title-text {
+		font-size: $uni-font-size-lg;
+		flex: 1;
+		color: #333;
+	}
+
+	.uni-card__header-extra-img {
+		height: $uni-img-size-sm;
+		width: $uni-img-size-sm;
+		margin-right: $uni-spacing-col-base;
+	}
+
+	.uni-card__header-extra-text {
+		flex: 1;
+		margin-left: $uni-spacing-col-base;
+		font-size: $uni-font-size-sm;
+		text-align: right;
+		color: $uni-text-color-grey;
+	}
+
+	.uni-card__content {
+		color: $uni-text-color;
+	}
+
+	.uni-card__content--pd {
+		padding: $uni-spacing-col-lg;
+	}
+
+	.uni-card__content-extra {
+		font-size: $uni-font-size-base;
+		padding-bottom: 10px;
+		color: $uni-text-color-grey;
+	}
+
+	.uni-card__footer {
+		justify-content: space-between;
+		padding: $uni-spacing-col-lg;
+	}
+
+	.uni-card__footer-text {
+		color: $uni-text-color-grey;
+		font-size: $uni-font-size-sm;
+	}
+
+	.uni-card--shadow {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.1);
+		/* #endif */
+	}
+
+	.uni-card--full {
+		margin: 0;
+		border-radius: 0;
+	}
+
+	/* #ifndef APP-NVUE */
+	.uni-card--full:after {
+		border-radius: 0;
+	}
+
+	/* #endif */
+	.uni-ellipsis {
+		/* #ifndef APP-NVUE */
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		/* #endif */
+	}
+
+	.uni-card__head-padding {
+		// mar: 12px;
+	}
+</style>

File diff suppressed because it is too large
+ 300 - 103
components/uview-ui/libs/util/area.js


File diff suppressed because it is too large
+ 0 - 0
components/uview-ui/libs/util/city.js


+ 1 - 1
components/uview-ui/libs/util/province.js

@@ -1 +1 @@
-var provinceData=[{"label":"全部","value":"10"},{"label":"北京市","value":"11"},{"label":"天津市","value":"12"},{"label":"河北省","value":"13"},{"label":"山西省","value":"14"},{"label":"内蒙古自治区","value":"15"},{"label":"辽宁省","value":"21"},{"label":"吉林省","value":"22"},{"label":"黑龙江省","value":"23"},{"label":"上海市","value":"31"},{"label":"江苏省","value":"32"},{"label":"浙江省","value":"33"},{"label":"安徽省","value":"34"},{"label":"福建省","value":"35"},{"label":"江西省","value":"36"},{"label":"山东省","value":"37"},{"label":"河南省","value":"41"},{"label":"湖北省","value":"42"},{"label":"湖南省","value":"43"},{"label":"广东省","value":"44"},{"label":"广西壮族自治区","value":"45"},{"label":"海南省","value":"46"},{"label":"重庆市","value":"50"},{"label":"四川省","value":"51"},{"label":"贵州省","value":"52"},{"label":"云南省","value":"53"},{"label":"西藏自治区","value":"54"},{"label":"陕西省","value":"61"},{"label":"甘肃省","value":"62"},{"label":"青海省","value":"63"},{"label":"宁夏回族自治区","value":"64"},{"label":"新疆维吾尔自治区","value":"65"},{"label":"台湾","value":"66"},{"label":"香港","value":"67"},{"label":"澳门","value":"68"}];export default provinceData;
+var provinceData=[{"label":"北京市","value":"11"},{"label":"天津市","value":"12"},{"label":"河北省","value":"13"},{"label":"山西省","value":"14"},{"label":"内蒙古自治区","value":"15"},{"label":"辽宁省","value":"21"},{"label":"吉林省","value":"22"},{"label":"黑龙江省","value":"23"},{"label":"上海市","value":"31"},{"label":"江苏省","value":"32"},{"label":"浙江省","value":"33"},{"label":"安徽省","value":"34"},{"label":"福建省","value":"35"},{"label":"江西省","value":"36"},{"label":"山东省","value":"37"},{"label":"河南省","value":"41"},{"label":"湖北省","value":"42"},{"label":"湖南省","value":"43"},{"label":"广东省","value":"44"},{"label":"广西壮族自治区","value":"45"},{"label":"海南省","value":"46"},{"label":"重庆市","value":"50"},{"label":"四川省","value":"51"},{"label":"贵州省","value":"52"},{"label":"云南省","value":"53"},{"label":"西藏自治区","value":"54"},{"label":"陕西省","value":"61"},{"label":"甘肃省","value":"62"},{"label":"青海省","value":"63"},{"label":"宁夏回族自治区","value":"64"},{"label":"新疆维吾尔自治区","value":"65"},{"label":"台湾","value":"66"},{"label":"香港","value":"67"},{"label":"澳门","value":"68"}];export default provinceData;

+ 2 - 2
config/index.js

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

+ 4 - 1
main.js

@@ -204,7 +204,10 @@ const doRequest = (method, url, data,header)=> {
                     resolve(result)
                 },
                 fail: function(e) {
-                    console.log('error in...')
+                    console.log('error in...',e)
+					uni.showToast({
+						title:e
+					})
                     // reject调用后,即可传递到调用方使用catch或者async+await同步方式进行处理逻辑
                     reject(e)
                 },

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.0.8",
-    "versionCode" : 108,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},

+ 5 - 2
pageA/product/business_buy.vue

@@ -27,7 +27,7 @@
 		<view   class="c-row b-b ">
 			<view class="title">收货库</view>
 			<view class="con-list">
-				<view class="title">{{purchaseOrder.receivePrivate}}{{purchaseOrder.receiveCity}}{{purchaseOrder.receiveArea}}{{purchaseOrder.receiveWarehouse}}</view>
+				<view class="title">{{purchaseOrder.receiveWarehouse}}</view>
 			</view>
 		</view>
 		<view v-if='companyId!=2' class="c-row b-b">
@@ -164,7 +164,7 @@
 					bankNameIndex:0,
 					packingIndex:0,
 					invoiceIndex:0,
-					packingType: ['散袋(默认)','大袋','小袋'],
+					packingType: ['散','大袋','小袋'],
 					// invoiceType: ['不开发票', '普通发票', '增值税发票'],
 					invoiceType: ['不开发票','增值税发票'],
 					acceptType: ['第三方检验(国家检验资质)', '交收地库或港出具的检验', '现场看货','其他'],
@@ -311,6 +311,9 @@
 									if(res.data.code==200){
 										that.$api.doRequest('post','/purchaseOrder/api/submitPurchaseOrder', {id:res.data.data}).then(res1 => {
 											if(res1.data.code==200){
+												uni.navigateTo({
+													url: `/pages/business/business`
+												})
 												uni.showToast({
 													title: '提交成功,等待买方回复',
 													icon: 'none',

+ 9 - 6
pageA/product/business_sale.vue

@@ -27,7 +27,7 @@
 		<view   class="c-row b-b ">
 			<view class="title">出货库</view>
 			<view class="con-list">
-				<view class="title">{{purchaseOrder.sendPrivate}}{{purchaseOrder.sendCity}}{{purchaseOrder.sendArea}}{{purchaseOrder.sendWarehouse}}</view>
+				<view class="title">{{purchaseOrder.sendWarehouse}}</view>
 			</view>
 		</view>
 		<view v-if='companyId!=2' class="c-row b-b">
@@ -55,7 +55,7 @@
 			<view   class="title">销售单价(元/吨)</view>
 			<view class="con-list">
 				<view class="picker">
-					<text>{{purchaseOrder.unitPrice}}</text>
+					<text>{{purchaseOrder.salePrice}}</text>
 				</view>
 				</view>
 		</view>
@@ -140,7 +140,7 @@
 						memo:'',
 						buyer:'',
 						buyerPhone:'',
-						unitPrice:0,
+						salePrice:0,
 						address:'',
 						count:0,
 						province:'',
@@ -180,7 +180,7 @@
 					memo:'',
 					buyer:'',
 					buyerPhone:'',
-					unitPrice:0,
+					salePrice:0,
 					address:'',
 					count:0,
 					id:0,
@@ -222,7 +222,7 @@
 				this.purchaseOrder.buyer = options.buyer
 				this.purchaseOrder.customer = options.customerName
 				this.purchaseOrder.basis = options.basisPrice
-				this.purchaseOrder.unitPrice = options.unitPrice
+				this.purchaseOrder.salePrice = options.salePrice
 				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
 				this.purchaseOrder.settlementPrice = options.basisPrice
 				this.purchaseOrder.salePlanType = options.salePlanType
@@ -255,7 +255,7 @@
 						url: `/pageA/product/Identity_switching?goodsName=${this.purchaseOrder.goodsName}
 						&receivePrivate=${this.purchaseOrder.receivePrivate}&receiveCity=${this.purchaseOrder.receiveCity}
 						&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
-						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
+						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&salePrice=${this.purchaseOrder.salePrice}
 						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&salePlanType=${this.purchaseOrder.salePlanType}
 						&salePlanNo=${this.purchaseOrder.salePlan}`
 					})
@@ -323,6 +323,9 @@
 											icon: 'none',
 											duration: 2000
 										})
+										uni.navigateTo({
+											url: `/pages/business/business`
+										})
 										// uni.navigateBack();
 									}else{
 										uni.showToast({

+ 1 - 1
pageA/product/sales_detail.vue

@@ -384,7 +384,7 @@
 							uni.navigateTo({
 								url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}
 										&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}
-										&basisPrice=${this.goods.basisPrice}&salPrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}
+										&basisPrice=${this.goods.basisPrice}&salePrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}
 										&salePlanType=${this.goods.salePlanType}&salePlan=${this.goods.salePlanNo}&baggingNotes=${this.goods.baggingNotes}&compId=${this.goods.compId}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}

+ 1 - 2
pageB/contract/collectLook.vue

@@ -40,7 +40,6 @@
 					<text class="tit">净重(吨)</text>
 					<view style="font-size: 18px;margin-left: 80px;">{{item.loadNetWeight}}<text class="hair">发</text></view>
 					<view class="con-list">
-						
 						<view v-if="item.confirmFlag == 1" style="color: #FE6430;">未收货</view>
 						<view v-if="item.confirmFlag == 3" style="color: #22C572;">已收货</view>
 					</view>
@@ -168,7 +167,7 @@
 						this.goods.goodsName + '&tranCarNo=' + tranCarNo,
 
 					url: `/pageB/contract/contract_detail?contractNo=` + this.goods.contractNo + '&goodsName=' +
-						this.goods.goodsName + '&tranCarNo=' + tranCarNo + '&palnId=' + this.planId
+						this.goods.goodsName + '&tranCarNo=' + tranCarNo + '&planId=' + this.planId
 
 				})
 			},

+ 23 - 5
pageB/contract/contract.vue

@@ -62,7 +62,7 @@
 				<view class='shade-content-item'>
 					<view class="titles">请于以下时间段进行点价操作:</view>
 					<view class="timeslot">11:30 ~ 12:30</view>
-					<view class="timeslot">15:20 ~ 20:00</view>
+					<view class="timeslot">15:30 ~ 20:00</view>
 					<view class="timeslot">23:00 ~ 08:00</view>
 				</view>
 				<view class="cancel" @click='shadestatus=false'>知道了</view>
@@ -228,13 +228,31 @@
 				}
 			},
 			commit(item) {
-				uni.navigateTo({
-					url: `/pageB/contract/enclosures?id=${item.id}`
-				})
+				console.log(item)
+				var list = item.addressUrl.toString().split(',')
+				if(list.length > 0){
+					uni.downloadFile({
+					  url: list[0],
+					  success: function (res) {
+					    var filePath = res.tempFilePath;
+					    uni.openDocument({
+					      filePath: filePath,
+					      success: function (res) {
+							  uni.hideLoading()
+					        console.log('打开文档成功');
+					      }
+					    });
+					  },
+					})
+				}
+				
+				// uni.navigateTo({
+				// 	url: `/pageB/contract/enclosures?addressUrl=${item.addressUrl}`
+				// })
 			},
 			commit1(item) {
 				uni.navigateTo({
-					url: `/pageB/contract/look?id=${item.id}&contractNo=${item.contractNo}&contracter=${item.contracter}&goodsName=${item.goodsName}`
+					url: `/pageB/contract/look?id=${item.id}&planId=${item.planId}&contractNo=${item.contractNo}&contracter=${item.contracter}&goodsName=${item.goodsName}`
 				})
 			},
 			commit2(item) {

+ 6 - 8
pageB/contract/contract_detail.vue

@@ -178,17 +178,15 @@
 						return new Date()
 					}
 				},	
-			onShow() {
-			},
+			// onShow() {
+			// },
 			onLoad(option) {
-				this.goods.planId=option.planId
-				this.goodsName=option.goodsName
+				this.goods.planId = option.planId
+				this.goodsName = option.goodsName
 				this.contractNo = option.contractNo
-				this.goods.goodsName=option.goodsName
+				this.goods.goodsName = option.goodsName
 				this.goods.contractNo = option.contractNo
-				this.goods.tranCarNo=option.tranCarNo
-				console.log(this.goods.tranCarNo)
-				
+				this.goods.tranCarNo = option.tranCarNo
 			},
 			methods: {
 				 DateChange(e) {

+ 37 - 2
pageB/contract/enclosures.vue

@@ -1,12 +1,47 @@
 <template>
 	<view class="center">
-		<view class="">
-			
+		<view class="c-list">
+			<view class="xinxiup">
+				<view class="c-row b-b">
+					<text class="tit">合同编号:</text>
+					<view class="con-list">
+						<text>{{goods.contractNo}}({{goods.goodsName}})</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">买方名称:</text>
+					<view class="con-list">
+						<text>{{goods.contracter}}</text>
+					</view>
+				</view>
+				<view class="c-row">
+					<text class="tit">累计收发:</text>
+					<view class="con-list">
+						<text style="font-size: 18px">{{sendout}}<text class="hair">发</text>{{collect}}<text
+								class="collect">收</text></text>
+						<!-- <text>{{goods.level}}收</text> -->
+					</view>
+				</view>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	export default {
+			name: "trust",
+			data() {
+				return {
+					list:[]
+				};
+			},
+			onLoad(addressUrl) {
+				if(addressUrl){
+					this.list = addressUrl.toString().split(',')
+					console.log(this.list)
+				}
+			},
+		}
 </script>
 
 <style>

+ 3 - 9
pageB/contract/look.vue

@@ -128,12 +128,10 @@
 				imgstatus: false,
 				reason: "",
 				price: undefined,
-
 				imgstatus:false,
 				reason:"",
 				price:undefined,
 				planId:'',
-
 			};
 		},
 		onShow() {
@@ -145,7 +143,6 @@
 			this.id = option.id
 			this.planId=option.planId
 			this.goods.contractNo = option.contractNo
-
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
@@ -182,13 +179,10 @@
 				} else if (this.carlist.length < 1000 && this.carlist.length > 99) {
 					tranCarNo = 'C' + (this.carlist.length + 1)
 				}
+				var that = this
 				uni.navigateTo({
-
-					url: `/pageB/contract/contract_detail?contractNo=` + this.goods.contractNo + '&goodsName=' +
-						this.goods.goodsName + '&tranCarNo=' + tranCarNo,
-
-					url: `/pageB/contract/contract_detail?contractNo=`+this.goods.contractNo+'&goodsName='+this.goods.goodsName+'&tranCarNo='+tranCarNo+'&palnId='+this.planId
-
+					url: `/pageB/contract/contract_detail?contractNo=`
+					+that.goods.contractNo+'&goodsName='+that.goods.goodsName+'&tranCarNo='+tranCarNo+'&planId='+that.planId
 				})
 			},
 			confirmunload(item) {

+ 0 - 5
pageD/identity/companyIdentityLook.vue

@@ -35,8 +35,6 @@
 				<image v-bind:src="idlow" class="picture"></image>
 			</view>
 			<view class="personalcss">
-				
-			
 			<view class="c-row b-b">
 				<text class="tit">姓名</text>
 				<view class="con-list">
@@ -150,9 +148,6 @@
 		methods: {
 			getList(ids) {		
 					this.$api.doRequest('get', '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo', this.parameter, 'application/json;charset=UTF-8').then(res => {
-							console.log("成功连接")
-							// this.procurementPlanInfos = res.data.data
-				
 							this.deptList = res.data.data
 					
 							if(this.deptList.businessLicenseAddressUrl != ""){

+ 10 - 7
pageD/identity/companyIdentityThree.vue

@@ -69,9 +69,9 @@
 				<input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
 			</view>
 		</view>
-		<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+		<view style='width:100%;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
 			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
-			<view  class="con-list" style='width:70%;position:relative;'>
+			<view  class="con-list" style='position:relative;'>
 				<input style='text-align:right;' v-model='verifyCode' placeholder="请输入验证码" type="number">
 			</view>
 		</view>
@@ -133,8 +133,9 @@
 		},
 		methods: {
 			obtain() {
-				if (this.sendText == "获取验证码")
+				if (this.sendText == "获取验证码"){
 					this.getcode()
+				}
 			},
 			bankUp() {
 				var that = this
@@ -336,7 +337,12 @@
 						verifyCode: this.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-							that.identityAuthenticationInfo.commonId = that.userInfo.id
+							if(that.userInfo){
+								that.identityAuthenticationInfo.commonId = that.userInfo.id
+							}
+							else{
+								that.identityAuthenticationInfo.commonId = res.data.data.id
+							}
 							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
 							that.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 							uni.showModal({
@@ -532,9 +538,6 @@
 
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;

+ 8 - 20
pageD/identity/driverIdentity.vue

@@ -39,23 +39,19 @@
 			<view class="c-row b-b">
 				<text class="tit">手机号</text>
 				<view class="con-list">
-					<input placeholder="请填写手机号" maxlength = "11"  name="input" v-model="DriverViewInfo.driverPhone"></input>
+					<input placeholder="请填写手机号" maxlength = "11" @input='phoneinput' name="input" v-model="DriverViewInfo.driverPhone"></input>
 				</view>
 			</view>
-			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+			<view style='padding:10px;' class="c-row b-b">
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
 					class='getcode'>{{sendText}}</button>
-				<view style='width:70%;position:relative;margin-left: 200px;'>
 					<view class="con-list">
-						<!-- style='width:70%;position:relative;margin-left: 200px;' -->
 						<input v-model='verifyCode' maxlength = "6"  placeholder="请输入验证码" type="text">
 					</view>
-				</view>
 			</view>
 			<view class="c-row ">
 				<text class="tit">常驻城市</text>
 				<view class="con-list">
-					<!-- <input placeholder="请填写常驻城市" name="input" v-model="DriverViewInfo.residentCityProvincial"></input> -->
 					<view @click='regionchange'>{{region}}</view>
 					<u-picker :params='params' @confirm='regionpicker' mode="region" v-model="show"></u-picker>
 				</view>
@@ -117,11 +113,11 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
-			// phoneinput(e) {
-			// 	if (e.detail.value.length == 11) {
-			// 		this.codestatus = true
-			// 	}
-			// },
+			phoneinput(e) {
+				if (e.detail.value.length == 11) {
+					this.codestatus = true
+				}
+			},
 			regionchange() {
 				this.show = true
 			},
@@ -393,14 +389,10 @@
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
-		font-size: 14px;
+		font-size: 12px;
 	}
-
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;
@@ -475,10 +467,6 @@
 
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		/*  right:0; */
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;

+ 10 - 3
pageD/myRelease/Identity_switching.vue

@@ -58,6 +58,7 @@
 				current: 1,
 				id:0,
 				checked:false,
+				status:0,
 				goodsName:'',
 				receivePrivate:'',
 				receiveCity:'',
@@ -79,7 +80,7 @@
 			};
 		},
 		onLoad(options) {
-			this.id=options.id
+			this.status=options.status
 		},
 		onShow(){
 			this.getList()
@@ -150,14 +151,20 @@
 			// },
 			navToDetailPage(item) {
 				console.log(11111)
+				var url=''
+				if(this.status==1){
+					url='/pageD/myRelease/buyGrain'
+				}else{
+					url='/pageD/myRelease/sellGrain'
+				}
 				// if (index == 1) {
 					if(item.customerTypeFlag==1){
 						uni.navigateTo({
-						url: `/pageD/myRelease/buyGrain?id=${item.id}&customerName=${item.customerName}`
+						url: url+`?id=${item.id}&customerName=${item.customerName}`
 					})
 					}else{
 						uni.navigateTo({
-							url: `/pageD/myRelease/buyGrain?id=${item.id}&customerName=${item.compName}`
+							url: url+`?id=${item.id}&customerName=${item.compName}`
 						})
 					}
 					

+ 176 - 95
pageD/myRelease/buyEdit.vue

@@ -1,11 +1,10 @@
 <template>
 	<view class="center">
-		<view class="area">
-			
+		<view class="area">		
 		<view class="c-row b-b">
 			<text class="tit">名头</text>
 			<view class="con-list">
-				<text @click="navToDetailPage">{{deptList.buyer}}</text>
+				<text @click="navToDetailPage">{{deptList.buyer}}<text class='tip_text cuIcon-right'></text></text>
 			</view>
 		</view>
 		<view class="c-row b-b">
@@ -41,7 +40,6 @@
 		<view class="c-row b-b">
 			<text class="tit">价格类型</text>
 				<view class="con-list">
-					<!-- <input placeholder="请填写价格类型" name="input"  v-model="deptList.priceType"></input> -->
 					{{deptList.priceType}}
 				</view>
 		</view>
@@ -57,13 +55,7 @@
 				<input placeholder="请输入基差" name="input" v-model="deptList.basisPrice"></input>
 			</view>
 		</view>
-		<view class="c-row b-b">
-			<text class="tit">产地</text>
-			<view class="con-list">
-				<view @click='regionchange1'>{{region1}}</view>
-				<u-picker :params='params1' @confirm='regionpicker1' mode="region" v-model="show1" ></u-picker>
-			</view>
-		</view>
+	
 		<view class="c-row b-b">
 			<text class="tit">收货地区</text>
 			<view class="con-list">
@@ -74,19 +66,20 @@
 		<view class="c-row b-b">
 			<text class="tit">买方手机号</text>
 			<view class="con-list">
-				<input placeholder="请输入买方手机号" name="input" v-model="deptList.buyerPhone"></input>
+				<input placeholder="请输入买方手机号" @input='phoneinput' name="input" v-model="deptList.buyerPhone"></input>
 			</view>
 		</view>
-		<view class="c-row ">
-			<button @click='getcode' type="default">{{sendText}}</button>
-			<view class="con-list">
-				<input placeholder="请填写6位短信验证码" name="input" v-model="deptList.title1"></input>
-			</view>
+		<view class="c-row">
+			<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
+				class='getcode'>{{sendText}}</button>
+				<view class="con-list">
+					<input v-model='verifyCode' placeholder="请输入验证码" type="text">
+				</view>
 		</view>
 		</view>
 		<view  class="area">
 		<view class="c-row b-b">
-			<checkbox style='transform: scale(0.8);'  :checked="checked" @click='checkedbox'></checkbox><text style="font-size: 14px; ">完善更多信息<text style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
+			<checkbox style='transform: scale(0.8);' :checked="checked" @click='checkedbox'></checkbox><text style="font-size: 14px; ">完善更多信息<text style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
 		</view>
 		<view v-if='checked' class="c-row b-b">
 			<text class="tit">水分(%)<= </text>
@@ -146,13 +139,20 @@
 				</view>
 			</picker>
 		</view>
+		<view v-if='checked' class="c-row b-b">
+			<text class="tit">产地</text>
+			<view class="con-list">
+				<view @click='regionchange1'>{{region1}}</view>
+				<u-picker :params='params1' @confirm='regionpicker1' mode="region" v-model="show1" ></u-picker>
+			</view>
+		</view>
 		<view  v-if='checked'  class="c-row b-b">
 			<text class="tit">产出年份</text>
-			<picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
-				<view class="con-list">
-					{{nianIndex>-1?nianType[nianIndex]:'请选择产出年份'}}
-				</view>
-			</picker>
+			<view class="con-list">
+			<view @click='yearchange'>{{deptList.outputYear == null?"请选择出厂年份":deptList.outputYear}}</view>
+			<u-picker :params='params2' @confirm='yearpicker($event)' v-model="show2" mode="time" :start-year="startData" :end-year="endData">
+			</u-picker>
+			</view>
 		</view>
 		<view  v-if='checked'  class="c-row b-b">
 			<text class="tit">包装方式</text>
@@ -162,13 +162,13 @@
 				</view>
 			</picker>
 		</view>
-		<view  v-if='checked&&baoIndex==2||!checked&&baoIndex==3'  class="c-row b-b">
+		<view  v-if='checked&&baoIndex!=0'  class="c-row b-b">
 			<text class="tit">袋装备注</text>
 				<view class="con-list">
 					<input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
 				</view>
 		</view>
-		<view  v-if='checked'  class="c-row b-b">
+		<view  v-if='checked' class="c-row">
 			<text class="tit">运费承担方</text>
 			<picker @change="chengChange" :value="chengIndex" :range="chengType" class="con-list">
 				<view class="con-list">
@@ -193,6 +193,7 @@
 				typesType: ["现货", "期货"],
 				typesIndex: 0,
 				deptList: {
+					buyer:"",
 					salePlanTypeKey:0,
 					grainKey:0,
 					gradeKey:0,
@@ -200,10 +201,10 @@
 					freightPayerKey:-1,
 					priceType: "定价采购",
 					procurementPlanType:"现货",
-					grain:"不限",
-					grade:"不限",
+					grain:"塔粮",
+					grade:"一等品",
 					outputYear:"2020",
-					packingType:"不限",
+					packingType:"散装",
 					freightPayer:"",
 				},
 				params:{
@@ -217,10 +218,10 @@
 				},
 				checked:true,
 				insertProcurementPlanInfo: {},
-				liIndex: 0,
-				liType: ['不限','塔粮', '筛粮', '中粒', '大粒'],
+				liIndex: -1,
+				liType: ['塔粮', '筛粮', '中粒', '大粒'],
 				pinIndex: -1,
-				pinType: ['不限', '一等品', '二等品', '三等品', '等外'],
+				pinType: ['一等品', '二等品', '三等品', '等外'],
 				nianIndex: 3,
 				nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
 					'2011'
@@ -229,64 +230,86 @@
 				sendText:'获取验证码',
 				show:false,
 				show1:false,
+				show2:false,
 				region:'请选择收货地区',
 				region1:'请选择产地',
-				baoIndex: 0,
-				baoType: ['不限', '散装', '大袋', '小袋'],
+				baoIndex: -1,
+				baoType: ['散装', '大袋', '小袋'],
 				chengIndex: -1,
-				chengType: ['可议', '买方承担', '卖方承担']
+				chengType: ['可议', '买方承担', '卖方承担'],
+				codestatus: true,
+				sendDisabled: false,
+				sendText: '获取验证码',
+				verifyCode:"",
+				params2: {
+					year: true,
+				},
 			}
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin','userInfo']),
+			startData(){
+					var data = new Date()
+					return data.getFullYear() - 30
+				},
+				endData(){
+					var data = new Date()
+					return data.getFullYear()
+				}
 		},
 		onLoad(options){
 			this.id=options.id
-			if(options.customerName){
-				this.deptList.buyer = options.customerName
-			}
-			
-		},
-		onShow(){
 			this.getList()
-			var that=this
-			this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
-				if(res.data.code==200){
-					if(res.data.data.customerTypeFlag==1){
-						that.$set(this.deptList,'buyer',res.data.data.customerName)
-					}else{
-						that.$set(this.deptList,'buyer',res.data.data.compName)
+		},
+		onShow() {
+			var that = this
+			this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
+				commonId: that.userInfo.id
+			}).then(res => {
+				if (res.data.code == 200) {
+					if (res.data.data.customerTypeFlag == 1) {
+						that.$set(that.deptList, 'buyer', res.data.data.customerName)
+					} else {
+						that.$set(that.deptList, 'buyer', res.data.data.compName)
 					}
-					this.goods=res.data.data
+					that.goods = res.data.data
 				}
 				uni.hideLoading()
 			})
 		},
 		methods: {
+			phoneinput(e){
+				if(e.detail.value.length==11){
+					this.codestatus=true
+				}
+			},
 			getList(){
 				this.$api.doRequest('get','/procurementPlanInfo/getProcurementPlan',{id:this.id}).then(res => {
 					if(res.data.code==200){
 						this.deptList = res.data.data
+						if (this.deptList.waterContent != null || this.deptList.bulkDensity != null || this
+							.deptList.jiaorenli != null || this.deptList.impurity != null || this.deptList
+							.mildewGrain != null || this.deptList.imperfectGrain != null || this.deptList
+							.protein != null || this.deptList.grade != null || this.deptList.outputYear != null ||
+							this.deptList.packingType != null || this.deptList.freightPayer != null) {
+							this.checked = false
+						}
 						 let number = this.deptList.basisPrice
 						this.deptList.basisPrice = Math.abs(number)
-						this.region1=this.deptList.outputPrivate+'-'+this.deptList.outputCity
+						if(this.deptList.outputPrivate&&this.deptList.outputCity){
+							this.region1=this.deptList.outputPrivate+'-'+this.deptList.outputCity
+						}
+						if(this.deptList.procurementPlanType == '期货'){
+							let number = this.deptList.basisPrice
+							this.deptList.basisPrice = Math.abs(number)
+						}
 						this.region=this.deptList.receivePrivate+'-'+this.deptList.receiveCity+'-'+this.deptList.receiveArea
 						if(this.deptList.procurementPlanTypeKey==2){
 							this.typesIndex=1
 						}else if(this.deptList.procurementPlanTypeKey==1){
 							this.typesIndex=0
 						}
-						if(this.deptList.grainKey==1){
-							this.liIndex=0
-						}else if(this.deptList.grainKey==2){
-							this.liIndex=1
-						}else if(this.deptList.grainKey==3){
-							this.liIndex=2
-						}else if(this.deptList.grainKey==4){
-							this.liIndex=3
-						}else if(this.deptList.grainKey==5){
-							this.liIndex=4
-						}
+						this.liIndex = this.deptList.grainKey
 						this.baoIndex=this.deptList.packingTypeKey
 						this.pinIndex=this.deptList.gradeKey
 						if(this.deptList.freightPayerKey==1){
@@ -296,9 +319,6 @@
 						}else if(this.deptList.freightPayerKey==3){
 							this.chengIndex=2
 						}
-						// let number = this.deptList.basisPrice
-					
-						// deptList.basisPrice
 					}
 				})
 				.catch(res => {
@@ -309,6 +329,17 @@
 					})
 				});
 			},
+			yearpicker(e) {
+				if(e!=null){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
+				this.deptList.outputYear = e.year
+			},
+			yearchange() {
+				this.show2 = true
+			},
 			getcode(){
 				var that = this
 				if(/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.deptList.buyerPhone)){
@@ -476,11 +507,14 @@
 						}
 					}
 				}
-			
 				if (!this.deptList.buyerPhone) {
 					this.$api.msg('买方手机号不能为空')
 					return
 				}
+				if(!this.verifyCode){
+					this.$api.msg('验证码不能为空')
+					return
+				}
 				if(this.checked == false){
 				if (this.deptList.waterContent&&this.deptList.waterContent<1||
 				this.deptList.waterContent&&this.deptList.waterContent>40) {
@@ -556,41 +590,75 @@
 				}
 				this.insertProcurementPlanInfo = this.deptList
 				if(this.deptList.procurementPlanType == '期货'){
-								this.insertProcurementPlanInfo.basisPrice=-this.insertProcurementPlanInfo.basisPrice
-					}
+					this.insertProcurementPlanInfo.basisPrice=-this.insertProcurementPlanInfo.basisPrice
+				}
 		         this.insertProcurementPlanInfo.commonId = this.userInfo.id
 				 this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				 uni.showModal({
 				 	content: '重新发布后交易信息将进入待审核状态,是否确定重新发布?',
 				 	success: (res) => {
 						if(res.confirm) {  
-				this.$api.doRequest('post', '/procurementPlanInfo/api/editProcurementPlan', this
-						.insertProcurementPlanInfo).then(res => {
-							if(res.data.code==200){
-								uni.showToast({
-									title: "发布成功",
-									
-									icon: 'none',
-								})
-								this.deptList={}
-								uni.navigateTo({
-									url: `/pages/release/release`
-								})
-							}else{
-								uni.showToast({
-									title: res.data.message,
-									icon: 'none',
-									duration: 2000
+							var that = this
+							this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+									phone: this.deptList.buyerPhone,
+									verifyCode: this.verifyCode
+								}).then(res => {
+									if (res.data.code == 200) {
+										this.$api.doRequest('post', '/procurementPlanInfo/api/editProcurementPlan', this
+												.insertProcurementPlanInfo).then(res => {
+													if(res.data.code==200){
+														uni.showToast({
+															title: "发布成功",
+															icon: 'none',
+															duration: 2000
+														})
+														setTimeout(function(){
+															uni.navigateBack({
+																delta:2
+															})
+														},2000)
+
+														this.deptList={}
+														uni.navigateTo({
+															url: `/pages/release/release`
+														})
+													}else{
+														uni.showToast({
+															title: res.data.message,
+															icon: 'none',
+															duration: 2000
+														})
+													}
+											})
+											.catch(res => {
+												uni.showToast({
+													title: res.errmsg,
+													icon: 'none',
+													duration: 2000
+												})
+											});
+									} 
+									else if(res.data.code=='11003'){
+										uni.showModal({
+											title: '提示',
+											content: '验证码不正确',
+											});
+									}
+									else {
+										uni.showToast({
+											title: res.data.message,
+											icon: 'none',
+											duration: 2000
+										})
+									}
 								})
-							}
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+								.catch(res => {
+									uni.showToast({
+										title: res.data.message,
+										icon: 'none',
+										duration: 2000
+									})
+								});
 					}
 					}
 				})
@@ -610,7 +678,7 @@
 			nianChange(e) {
 				this.nianIndex = e.detail.value
 				this.niantypes = this.nianType[this.nianIndex];
-				this.deptList.outputYear = this.baoType[this.baoIndex]
+				this.deptList.outputYear = this.nianType[this.niantypes]
 			},
 
 			baoChange(e) {
@@ -657,12 +725,14 @@
 		-webkit-box-direction: normal;
 		-webkit-flex-direction: column;
 		flex-direction: column;
-		color: #AFB3BF;
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
+	.con-list input{
+			font-size:14px !important;
+		}
 	.area{
 		background-color: #FFFFFF;
 		border-radius: 20px;
@@ -674,4 +744,15 @@
 		background-color: #22C572;
 		color: #FFFFFF;
 	}
+	.getcode {
+		font-size: 14px;
+		color: #AFB3BF;
+		background: #F5F6F9;
+		height: 30px;
+		line-height: 30px;
+	}
+	.getcode.active {
+		background: #22C572;
+		color: #fff;
+	}
 </style>

+ 144 - 120
pageD/myRelease/buyGrain.vue

@@ -10,8 +10,7 @@
 			<view class="c-row b-b">
 				<text class="tit">标题</text>
 				<view class="con-list">
-					<input maxlength='16' minlength='2' placeholder="请输入标题,不超过16个字" name="input"
-						v-model="deptList.title"></input>
+					<input maxlength='16' minlength='2' placeholder="请输入标题,不超过16个字" name="input" v-model="deptList.title"></input>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -68,9 +67,11 @@
 			<view class="c-row b-b">
 				<text class="tit">买方手机号</text>
 				<view class="con-list">
-					<input placeholder="请输入买方手机号" name="input" v-model="deptList.buyerPhone"></input>
+					<input placeholder="请输入买方手机号" @input='phoneinput' name="input" v-model="deptList.buyerPhone"></input>
 				</view>
 			</view>
+
+			<!-- <view style='width:100%;position:relative;padding:10px;' class="flex"> -->
 			<!-- <view class="c-row ">
 				<text class="validate">获取验证码</text>
 				<view class="con-list">
@@ -78,62 +79,61 @@
 				</view>
 			</view> -->
 			
-			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+			<view class="c-row b-b">
+
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
 					class='getcode'>{{sendText}}</button>
-				<view style='width:70%;position:relative;margin-left: 200px;'>
 					<view class="con-list">
 						<input v-model='verifyCode' placeholder="请输入验证码" type="text">
 					</view>
-				</view>
 			</view>
 		</view>
 		<view class="buylow">
 			<view class="c-row ">
-				<checkbox style='transform: scale(0.8);' :checked="checked" @click='checkedbox'></checkbox><text
+				<checkbox style='transform: scale(0.8);' :disabled="morestatus" :checked="checked" @click='checkedbox'></checkbox><text
 					style="font-size: 14px; ">完善更多信息<text
 						style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">水分(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
+							<input @input='moreinput' placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">容重(g/L)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
+							<input @input='moreinput' placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">热损伤(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
+							<input @input='moreinput' placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">杂质(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
+							<input @input='moreinput' placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">霉变粒(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
+							<input @input='moreinput' placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">不完整粒(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
+							<input @input='moreinput' placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">蛋白(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
+							<input @input='moreinput' placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
@@ -161,11 +161,11 @@
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">产出年份</text>
-				<picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
-					<view class="con-list">
-						{{nianIndex>-1?nianType[nianIndex]:'请选择产出年份'}}
-					</view>
-				</picker>
+				<view class="con-list">
+				<view @click='yearchange'>{{deptList.outputYear == null?"请选择出厂年份":deptList.outputYear}}</view>
+				<u-picker :params='params2' @confirm='yearpicker($event)' v-model="show2" mode="time" :start-year="startData" :end-year="endData">
+				</u-picker>
+				</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">包装方式</text>
@@ -178,10 +178,10 @@
 			<view v-if='checked&&baoIndex!=0' class="c-row b-b">
 				<text class="tit">袋装备注</text>
 				<view class="con-list">
-					<input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
+					<input @input='moreinput' placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
 				</view>
 			</view>
-			<view v-if='checked' class="c-row b-b">
+			<view v-if='checked' class="c-row">
 				<text class="tit">运费承担方</text>
 				<picker @change="chengChange" :value="chengIndex" :range="chengType" class="con-list">
 					<view class="con-list">
@@ -212,10 +212,10 @@
 					freightPayerKey: 0,
 					priceType: "定价采购",
 					procurementPlanType: "现货",
-					grain: "塔粮",
-					grade: "不限(默认)",
-					outputYear: "2020",
-					packingType: "不限(默认)",
+					grain: "",
+					grade: "",
+					outputYear: "",
+					packingType: "",
 					freightPayer: "",
 				},
 				params: {
@@ -227,18 +227,15 @@
 					province: true,
 					city: true,
 				},
-				checked: false,
+				checked: true,
 				insertProcurementPlanInfo: {},
 				liIndex: -1,
 				liType: ['塔粮', '筛粮', '中粒', '大粒'],
 				pinIndex: -1,
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				nianIndex: -1,
-				nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
-					'2011'
-				],
 				show: false,
 				show1: false,
+				show2: false,
 				region: '请选择收货地区',
 				region1: '请选择产地',
 				region2:"",
@@ -251,11 +248,24 @@
 				sendText: '获取验证码',
 				verifyCode:"",
 				verification:true,
+				morestatus:false,
+				params2: {
+					year: true,
+				},
 				// DriverViewInfo:{},
 			}
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo'])
+			...mapState(['hasLogin', 'userInfo']),
+			startData(){
+					var data = new Date()
+					return data.getFullYear() - 30
+				},
+				endData(){
+					var data = new Date()
+					return data.getFullYear()
+				}
+		
 		},
 		onLoad(options) {
 			if (options.customerName) {
@@ -279,33 +289,27 @@
 			})
 		},
 		methods: {
-			// async amendprice() {
-			// 	var that = this
-			// 	this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
-			// 			phone: this.deptList.buyerPhone,
-			// 			verifyCode: this.verifyCode
-			// 		}).then(res => {
-			// 			if (res.data.code == 200) {	
-			// 			} else {
-			// 				that.verification = false
-			// 				uni.showToast({
-			// 					title: res.data.message,
-			// 					icon: 'none',
-			// 					duration: 2000
-			// 				})
-			// 				return false
-			// 			}
-			// 		})
-			// 		.catch(res => {
-			// 			that.verification = false
-			// 			uni.showToast({
-			// 				title: res.data.message,
-			// 				icon: 'none',
-			// 				duration: 2000
-			// 			})
-			// 			return false
-			// 		});
-			// },
+			phoneinput(e){
+				if(e.detail.value.length==11){
+					this.codestatus=true
+				}
+			},
+			moreinput(e){
+				if(e.detail.value.length>0){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
+				
+			},
+			yearpicker(e) {
+				if(e!=null){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
+				this.deptList.outputYear = e.year
+			},
 			getcode() {
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.deptList.buyerPhone)) {
@@ -370,6 +374,9 @@
 			checkedbox(e) {
 				this.checked = !this.checked
 			},
+			yearchange() {
+				this.show2 = true
+			},
 			typeChange(e) {
 				this.typesIndex = e.detail.value
 				this.types = this.typesType[this.typesIndex];
@@ -384,7 +391,7 @@
 			},
 			navToDetailPage() {
 				uni.navigateTo({
-					url: `/pageD/myRelease/Identity_switching`
+					url: `/pageD/myRelease/Identity_switching?status=1`
 				})
 			},
 			commit() {
@@ -471,7 +478,6 @@
 						}
 					}
 				}
-				
 				if (!this.region2) {
 					this.$api.msg('收货地区不能为空')
 					return
@@ -567,83 +573,103 @@
 				this.insertProcurementPlanInfo.procurementPlanNo='CGJH'+this.getdate()+this.verifyinit()
 				this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				var that = this
-				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
-						phone: this.deptList.buyerPhone,
-						verifyCode: this.verifyCode
-					}).then(res => {
-						if (res.data.code == 200) {
-							that.$api.doRequest('post', '/procurementPlanInfo/api/insertProcurementPlanInfo', that
-									.insertProcurementPlanInfo).then(res => {
-									if (res.data.code == 200) {
-										uni.showToast({
-											title: "发布成功",
-											icon: 'none',
-										})
-										// setTimeout(() => {
-										// 	uni.navigateBack({})
-										// }, 1000)
-										that.deptList = {}
-										uni.navigateTo({
-											url: `/pages/release/release`
-										})
-									} else {
+				uni.showModal({
+					title: '提示',
+				    content: '确定发布交易信息?',
+				    success: function (res) {
+						if (res.confirm) {
+							that.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+								phone: that.deptList.buyerPhone,
+								verifyCode: that.verifyCode
+							}).then(res => {
+								if (res.data.code == 200) {
+									that.$api.doRequest('post', '/procurementPlanInfo/api/insertProcurementPlanInfo', that.insertProcurementPlanInfo).then(res => {
+										if (res.data.code == 200) {
+											uni.showToast({
+												title: "发布成功",
+												icon: 'none',
+											})
+													// setTimeout(() => {
+													// 	uni.navigateBack({})
+													// }, 1000)
+											that.deptList = {}
+											uni.navigateTo({
+												url: `/pages/release/release`
+											})
+										} else {
+											uni.showToast({
+												title: res.data.message,
+												icon: 'none',
+												duration: 2000
+											})
+										}
+									})
+									.catch(res => {
 										uni.showToast({
-											title: res.data.message,
+											title: res.errmsg,
 											icon: 'none',
 											duration: 2000
 										})
+									});
+								} 
+								else if(res.data.code=='11003'){
+									uni.showModal({
+										title: '提示',
+										content: '验证码不正确',
+										});
+								}
+								else {
 									}
-							
 								})
 								.catch(res => {
 									uni.showToast({
-										title: res.errmsg,
+										title: res.data.message,
 										icon: 'none',
 										duration: 2000
 									})
-								});
-						} 
-						else if(res.data.code=='11003'){
-							uni.showModal({
-								title: '提示',
-								content: '验证码不正确',
-								});
-						}
-						else {
-							uni.showToast({
-								title: res.data.message,
-								icon: 'none',
-								duration: 2000
 							})
+							.catch(res => {
+								uni.showToast({
+									title: res.data.message,
+									icon: 'none',
+									duration: 2000
+								})
+							});
+						} else if (res.cancel) {
+								
 						}
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.data.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+						}});
 			},
 			liChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.liIndex = e.detail.value
 				this.litypes = this.liType[this.liIndex];
-				this.deptList.grainKey = e.detail.value + 1
+				this.deptList.grainKey = e.detail.value
 				this.deptList.grain = this.liType[this.liIndex]
 			},
 			pinChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.pinIndex = e.detail.value
 				this.pintypes = this.pinType[this.pinIndex];
 				this.deptList.gradeKey = e.detail.value
 				this.deptList.grade = this.pinType[this.pinIndex]
 			},
-			nianChange(e) {
-				this.nianType = e.detail.value
-				this.niantypes = this.nianType[this.nianIndex];
-				this.deptList.outputYear = this.nianType[this.nianType]
-			},
+
 
 			baoChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.baoIndex = e.detail.value
 				this.baotypes = this.baoType[this.baoIndex];
 				this.deptList.packingTypeKey = e.detail.value
@@ -677,6 +703,11 @@
 			  return arr.join('')
 			},
 			chengChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.chengIndex = e.detail.value
 				this.chengtypes = this.chengType[this.chengIndex];
 				this.deptList.freightPayerKey = e.detail.value + 1
@@ -714,13 +745,14 @@
 		-webkit-box-direction: normal;
 		-webkit-flex-direction: column;
 		flex-direction: column;
-		color: #AFB3BF;
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
-
+.con-list input{
+		font-size:14px !important;
+	}
 	.buyup {
 		background-color: #FFFFFF;
 		border-radius: 20px;
@@ -752,19 +784,11 @@
 	}
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;
 		line-height: 30px;
 	}
-	
-	.getcode.active {
-		border: none;
-	}
-	
 	.getcode.active {
 		background: #22C572;
 		color: #fff;

+ 4 - 4
pageD/myRelease/sellDetails.vue

@@ -179,9 +179,9 @@
 					priceType: "定价采购",
 					procurementPlanType: "现货",
 					grain: "塔粮",
-					grade: "不限(默认)",
+					grade: "一等品",
 					outputYear: "2020",
-					packingType: "不限(默认)",
+					packingType: "散装",
 					freightPayer: "",
 				},
 				params: {
@@ -198,7 +198,7 @@
 				liIndex: 0,
 				liType: ['塔粮', '筛粮', '中粒', '大粒'],
 				pinIndex: 0,
-				pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
+				pinType: [ '一等品', '二等品', '三等品', '等外'],
 				nianIndex: 3,
 				nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
 					'2011'
@@ -208,7 +208,7 @@
 				region: '请选择收货地区',
 				region1: '请选择产地',
 				baoIndex: 0,
-				baoType: ['不限(默认)', '散装', '大袋', '小袋'],
+				baoType: ['散装', '大袋', '小袋'],
 				chengIndex: -1,
 				chengType: ['可议', '买方承担', '卖方承担']
 			}

+ 268 - 112
pageD/myRelease/sellEdit.vue

@@ -4,7 +4,7 @@
 			<view class="c-row b-b">
 				<text class="tit">名头</text>
 				<view class="con-list">
-					<text @click="navToDetailPage">{{deptList.seller}}</text>
+					<text @click="navToDetailPage">{{deptList.seller}}<text class='tip_text cuIcon-right'></text></text>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -34,9 +34,14 @@
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">类型</text>
-				<view class="con-list">
+				<!-- 	<view class="con-list">
 					{{deptList.salePlanType}}
-				</view>
+				</view> -->
+				<picker @change="typeChange" :value="typesIndex" :range="typesType" class="con-list">
+					<view class="picker" v-model="deptList.salePlanType">
+						{{typesIndex>-1?typesType[typesIndex]:'请选择类型'}}
+					</view>
+				</picker>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">价格类型</text>
@@ -70,12 +75,19 @@
 					<u-picker :params='params' @confirm='regionpicker' mode="region" v-model="show"></u-picker>
 				</view>
 			</view>
-			<view class="c-row ">
+			<view class="c-row b-b">
 				<text class="tit">卖方手机号</text>
 				<view class="con-list">
 					<input placeholder="请输入买方手机号" name="input" v-model="deptList.sellerPhone"></input>
 				</view>
 			</view>
+			<view  class="c-row">
+				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
+					class='getcode'>{{sendText}}</button>
+					<view class="con-list">
+						<input v-model='verifyCode' maxlength="6" placeholder="请输入验证码" type="text">
+					</view>
+			</view>
 		</view>
 		<view class="buylow">
 			<view class="c-row ">
@@ -83,49 +95,49 @@
 					style="font-size: 14px; ">完善更多信息<text
 						style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">水分(%)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">容重(g/L)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">热损伤(%)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">杂质(%)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">霉变粒(%)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">不完整粒(%)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">蛋白(%)<= </text>
 						<view class="con-list">
 							<input placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
 						</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">粒型 </text>
 				<picker @change="liChange" :value="liIndex" :range="liType" class="con-list" v-model="deptList.grain">
 					<view class="con-list">
@@ -133,7 +145,7 @@
 					</view>
 				</picker>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">品级 </text>
 				<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
 					<view class="con-list">
@@ -142,15 +154,15 @@
 				</picker>
 			</view>
 
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">产出年份</text>
-				<picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
-					<view class="con-list">
-						{{nianIndex>-1?nianType[nianIndex]:'请选择产出年份'}}
-					</view>
-				</picker>
+				<view class="con-list">
+				<view @click='yearchange'>{{deptList.outputYear == null?"请选择出厂年份":deptList.outputYear}}</view>
+				<u-picker :params='params2' @confirm='yearpicker($event)' v-model="show2" mode="time" :start-year="startData" :end-year="endData">
+				</u-picker>
+				</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">包装方式</text>
 				<picker @change="baoChange" :value="baoIndex" :range="baoType" class="con-list">
 					<view class="con-list">
@@ -158,13 +170,13 @@
 					</view>
 				</picker>
 			</view>
-			<view v-if='!checked&&baoIndex==2||!checked&&baoIndex==3' class="c-row b-b">
+			<view v-if='checked&&baoIndex!=0' class="c-row b-b">
 				<text class="tit">袋装备注</text>
 				<view class="con-list">
 					<input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
 				</view>
 			</view>
-			<view v-if='!checked' class="c-row b-b">
+			<view v-if='checked' class="c-row b-b">
 				<text class="tit">运费承担方</text>
 				<picker @change="chengChange" :value="chengIndex" :range="chengType" class="con-list">
 					<view class="con-list">
@@ -193,9 +205,9 @@
 					priceType: "定价采购",
 					procurementPlanType: "现货",
 					grain: "塔粮",
-					grade: "不限(默认)",
+					grade: "一等品",
 					outputYear: "2020",
-					packingType: "不限(默认)",
+					packingType: "可议",
 					freightPayer: "",
 				},
 				params: {
@@ -208,48 +220,73 @@
 					city: true,
 				},
 				checked: true,
+				codestatus: true,
+				sendText: '获取验证码',
+				sendDisabled: false,
+				verifyCode: "",
 				insertProcurementPlanInfo: {},
 				liIndex: 0,
 				liType: ['塔粮', '筛粮', '中粒', '大粒'],
-				pinIndex: 0,
-				pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
+				pinIndex: -1,
+				pinType: ['一等品', '二等品', '三等品', '等外'],
 				nianIndex: 3,
-				nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
-					'2011'
-				],
 				show: false,
 				show1: false,
+				show2: false,
 				region: '请选择收货地区',
 				region1: '请选择产地',
-				baoIndex: 0,
-				baoType: ['不限(默认)', '散装', '大袋', '小袋'],
+				baoIndex: -1,
+				baoType: ['散装', '大袋', '小袋'],
 				chengIndex: -1,
-				chengType: ['可议', '买方承担', '卖方承担']
+				chengType: ['可议', '买方承担', '卖方承担'],
+				params2: {
+					year: true,
+				},
 			}
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo'])
+			...mapState(['hasLogin', 'userInfo']),
+			startData(){
+					var data = new Date()
+					return data.getFullYear() - 30
+				},
+				endData(){
+					var data = new Date()
+					return data.getFullYear()
+				}
 		},
 		onLoad(options) {
 			this.getList(options)
 		},
-		// onShow() {
-		// 	var that = this
-		// 	this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
-		// 		commonId: this.userInfo.id
-		// 	}).then(res => {
-		// 		if (res.data.code == 200) {
-		// 			if (res.data.data.customerTypeFlag == 1) {
-		// 				that.$set(this.deptList, 'procurementPlanNo', res.data.data.customerName)
-		// 			} else {
-		// 				that.$set(this.deptList, 'procurementPlanNo', res.data.data.compName)
-		// 			}
-		// 			this.goods = res.data.data
-		// 		}
-		// 		uni.hideLoading()
-		// 	})
-		// },
+
+		onShow() {
+			var that = this
+			this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
+				commonId: this.userInfo.id
+			}).then(res => {
+				if (res.data.code == 200) {
+					if (res.data.data.customerTypeFlag == 1) {
+						that.$set(this.deptList, 'seller', res.data.data.customerName)
+					} else {
+						that.$set(this.deptList, 'seller', res.data.data.compName)
+					}
+					this.goods = res.data.data
+				}
+				uni.hideLoading()
+			})
+		},
 		methods: {
+			yearpicker(e) {
+				if(e!=null){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
+				this.deptList.outputYear = e.year
+			},
+			yearchange() {
+				this.show2 = true
+			},
 			getList(options) {
 				this.$api.doRequest('get', '/salePlanInfo/getSalePlanInfo', {
 						id: options.id
@@ -263,32 +300,27 @@
 								this.deptList.packingType != null || this.deptList.freightPayer != null) {
 								this.checked = false
 							}
-							this.region1=this.deptList.outputPrivate+'-'+this.deptList.outputCity
-							this.region=this.deptList.sendPrivate+'-'+this.deptList.sendCity+'-'+this.deptList.sendArea
-							if(this.deptList.salePlanTypeKey==2){
-								this.typesIndex = 1
-							}else if(this.deptList.salePlanTypeKey==1){
-								this.typesIndex =0
-							}
-							if(this.deptList.grainKey==1){
-								this.liIndex=0
-							}else if(this.deptList.grainKey==2){
-								this.liIndex=1
-							}else if(this.deptList.grainKey==3){
-								this.liIndex=2
-							}else if(this.deptList.grainKey==4){
-								this.liIndex=3
-							}else if(this.deptList.grainKey==5){
-								this.liIndex=4
+							if(this.deptList.outputPrivate&&this.deptList.outputCity){
+								this.region1 = this.deptList.outputPrivate + '-' + this.deptList.outputCity
 							}
-							this.baoIndex=this.deptList.packingTypeKey
-							  this.pinIndex=this.deptList.gradeKey
-							if(this.deptList.freightPayerKey==1){
-								this.chengIndex=0
-							}else if(this.deptList.freightPayerKey==2){
-								this.chengIndex=1
-							}else if(this.deptList.freightPayerKey==3){
-								this.chengIndex=2
+							
+							this.region = this.deptList.sendPrivate + '-' + this.deptList.sendCity + '-' + this
+								.deptList.sendArea
+							// if(this.deptList.salePlanTypeKey==2){
+							// 	this.typesIndex = 1
+							// }else if(this.deptList.salePlanTypeKey==1){
+							// 	this.typesIndex =0
+							// }
+							this.typesIndex = this.deptList.salePlanTypeKey - 1
+							this.liIndex = this.deptList.grainKey
+							this.baoIndex = this.deptList.packingTypeKey
+							this.pinIndex = this.deptList.gradeKey
+							if (this.deptList.freightPayerKey == 1) {
+								this.chengIndex = 0
+							} else if (this.deptList.freightPayerKey == 2) {
+								this.chengIndex = 1
+							} else if (this.deptList.freightPayerKey == 3) {
+								this.chengIndex = 2
 							}
 						} else {
 							uni.showToast({
@@ -307,6 +339,49 @@
 						})
 					});
 			},
+			getcode() {
+				var that = this
+				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.deptList.sellerPhone)) {
+					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
+							phone: that.deptList.sellerPhone
+						}).then(res => {
+							if (res.data.code == 200) {
+								that.sendDisabled = true
+								let sec = 60
+								let interval = setInterval(() => {
+									sec--;
+									that.sendText = sec + 's后重发'
+									if (sec <= 0) {
+										that.sendDisabled = false
+										that.sendText = "获取验证码"
+										clearInterval(interval)
+									}
+								}, 1000)
+							} else {
+								uni.showToast({
+									title: res.data.message,
+									icon: 'none',
+									duration: 2000
+								})
+								return
+							}
+						})
+						.catch(res => {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+							return
+						});
+				} else {
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon: 'none',
+						duration: 2000
+					})
+				}
+			},
 			regionpicker(e) {
 				this.deptList.sendPrivate = e.province.label
 				this.deptList.sendCity = e.city.label
@@ -330,14 +405,13 @@
 			typeChange(e) {
 				this.typesIndex = e.detail.value
 				this.types = this.typesType[this.typesIndex];
-				this.deptList.salePlanTypeKey = e.detail.value+1
+				this.deptList.salePlanTypeKey = e.detail.value
 				this.deptList.salePlanType = this.typesType[this.typesIndex];
 				if (this.typesIndex == 0) {
 					this.deptList.priceType = '定价采购'
 				} else {
 					this.deptList.priceType = '期货盘面价+基差'
 				}
-
 			},
 			navToDetailPage() {
 				// if (index == 1) {
@@ -429,12 +503,16 @@
 					// 	}
 					// }
 				}
-				
+
 				if (!this.deptList.sellerPhone) {
 					this.$api.msg('卖方手机号不能为空')
 					return
 				}
-				
+				if (!this.verifyCode) {
+					this.$api.msg('验证码不能为空')
+					return
+				}
+
 				if (this.checked == false) {
 					if (this.deptList.waterContent && this.deptList.waterContent < 1 ||
 						this.deptList.waterContent && this.deptList.waterContent > 40) {
@@ -514,53 +592,117 @@
 				}
 				this.insertProcurementPlanInfo.commonId = this.userInfo.id
 				this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				this.$api.doRequest('post', '/salePlanInfo/api/editSalePlanInfo', this
-						.insertProcurementPlanInfo).then(res => {
-						if (res.data.code == 200) {
-							uni.showToast({
-								title: "发布成功",
-								icon: 'none',
-							})
-							// setTimeout(() => {
-							// 	uni.navigateBack({})
-							// }, 1000)
-							this.deptList = {}
-							uni.navigateTo({
-								url: `/pages/release/release`
-							})
-						} else {
-							uni.showToast({
-								title: res.data.message,
-								icon: 'none',
-								duration: 2000
-							})
+				uni.showModal({
+					content: '重新发布后交易信息将进入待审核状态,是否确定重新发布?',
+					success: (res) => {
+						if (res.confirm) {
+							var that = this
+							this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+									phone: this.deptList.sellerPhone,
+									verifyCode: this.verifyCode
+								}).then(res => {
+									if (res.data.code == 200) {
+										that.$api.doRequest('post', '/salePlanInfo/api/editSalePlanInfo', that
+												.insertProcurementPlanInfo).then(res => {
+												if (res.data.code == 200) {
+													// uni.showToast({
+													// 	title: "发布成功",
+													// 	icon: 'none',
+													// })
+													that.$api.msg('重新发布成功')
+													that.deptList = {}
+													uni.navigateTo({
+														url: `/pages/release/release`
+													})
+												} else {
+													uni.showToast({
+														title: res.data.message,
+														icon: 'none',
+														duration: 2000
+													})
+												}
+											})
+											.catch(res => {
+												uni.showToast({
+													title: res.errmsg,
+													icon: 'none',
+													duration: 2000
+												})
+											});
+									} else if (res.data.code == '11003') {
+										uni.showModal({
+											title: '提示',
+											content: '验证码不正确',
+										});
+									} else {
+										uni.showToast({
+											title: res.data.message,
+											icon: 'none',
+											duration: 2000
+										})
+										return
+									}
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.data.message,
+										icon: 'none',
+										duration: 2000
+									})
+									return
+								});
+
 						}
+					}
+				})
+				
+				// this.$api.doRequest('post', '/salePlanInfo/api/editSalePlanInfo', this
+				// 		.insertProcurementPlanInfo).then(res => {
+				// 		if (res.data.code == 200) {
+				// 			uni.showToast({
+				// 				title: "发布成功",
+				// 				icon: 'none',
+				// 			})
+				// 			// setTimeout(() => {
+				// 			// 	uni.navigateBack({})
+				// 			// }, 1000)
+				// 			this.deptList = {}
+				// 			uni.navigateTo({
+				// 				url: `/pages/release/release`
+				// 			})
+				// 		} else {
+				// 			uni.showToast({
+				// 				title: res.data.message,
+				// 				icon: 'none',
+				// 				duration: 2000
+				// 			})
+				// 		}
 
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.errmsg,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
 			},
 			liChange(e) {
 				this.liIndex = e.detail.value
 				this.litypes = this.liType[this.liIndex];
-				this.deptList.grainKey = e.detail.value+1
+				this.deptList.grainKey = e.detail.value
 				this.deptList.grain = this.liType[this.liIndex]
 			},
 			pinChange(e) {
 				this.pinIndex = e.detail.value
 				this.pintypes = this.pinType[this.pinIndex];
-				this.deptList.gradeKey = e.detail.value+1
+				this.deptList.gradeKey = e.detail.value
 				this.deptList.grade = this.pinType[this.pinIndex]
 			},
 			nianChange(e) {
 				this.nianIndex = e.detail.value
 				this.niantypes = this.nianType[this.nianIndex];
-				this.deptList.outputYear = this.baoType[this.baoIndex]
+				this.deptList.outputYear = this.nianType[this.nianIndex]
 			},
 
 			baoChange(e) {
@@ -572,7 +714,7 @@
 			chengChange(e) {
 				this.chengIndex = e.detail.value
 				this.chengtypes = this.chengType[this.chengIndex];
-					this.deptList.freightPayerKey = e.detail.value+1
+				this.deptList.freightPayerKey = e.detail.value + 1
 				this.deptList.freightPayer = this.chengType[this.chengIndex];
 			}
 		}
@@ -607,13 +749,14 @@
 		-webkit-box-direction: normal;
 		-webkit-flex-direction: column;
 		flex-direction: column;
-		color: #AFB3BF;
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
-
+	.con-list input{
+			font-size:14px !important;
+		}
 	.buyup {
 		background-color: #FFFFFF;
 		border-radius: 20px;
@@ -643,4 +786,17 @@
 		text-align: center;
 		line-height: 30px;
 	}
+
+	.getcode {
+		font-size: 14px;
+		color: #AFB3BF;
+		background: #F5F6F9;
+		height: 30px;
+		line-height: 30px;
+	}
+
+	.getcode.active {
+		background: #22C572;
+		color: #fff;
+	}
 </style>

+ 151 - 105
pageD/myRelease/sellGrain.vue

@@ -76,74 +76,64 @@
 			<view class="c-row b-b">
 				<text class="tit">卖方手机号</text>
 				<view class="con-list">
-					<input placeholder="请输入卖方手机号" name="input" v-model="deptList.sellerPhone"></input>
+					<input placeholder="请输入卖方手机号" @input='phoneinput' name="input" v-model="deptList.sellerPhone"></input>
 				</view>
 			</view>
-			<!-- <view class="c-row ">
-				<text class="validate">获取验证码</text>
-				<view class="con-list">
-					<input placeholder="请填写6位短信验证码" name="input" v-model="deptList.title1"></input>
-				</view>
-			</view> -->
-			
-			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+
+			<view  class="c-row b-b">
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
 					class='getcode'>{{sendText}}</button>
-				<view style='width:70%;position:relative;margin-left: 200px;'>
 					<view class="con-list">
 						<input v-model='verifyCode' placeholder="请输入验证码" type="text">
 					</view>
-				</view>
 			</view>
 		</view>
 		<view class="buylow">
-
-
 			<view class="c-row ">
-				<checkbox style='transform: scale(0.8);' :checked="checked" @click='checkedbox'></checkbox><text
+				<checkbox style='transform: scale(0.8);' value='1' :disabled="morestatus" :checked="checked" @click='checkedbox'></checkbox><text
 					style="font-size: 14px; ">完善更多信息<text
 						style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">水分(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
+							<input @input='moreinput' placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">容重(g/L)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
+							<input @input='moreinput' placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">热损伤(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
+							<input  @input='moreinput' placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">杂质(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
+							<input @input='moreinput' placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">霉变粒(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
+							<input @input='moreinput' placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">不完整粒(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
+							<input @input='moreinput' placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">蛋白(%)<= </text>
 						<view class="con-list">
-							<input placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
+							<input @input='moreinput' placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
 						</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
@@ -165,11 +155,11 @@
 
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">产出年份</text>
-				<picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
-					<view class="con-list">
-						{{nianIndex>-1?nianType[nianIndex]:'请选择产出年份'}}
-					</view>
-				</picker>
+				<view class="con-list">
+				<view @click='yearchange'>{{deptList.outputYear == null?"请选择出厂年份":deptList.outputYear}}</view>
+				<u-picker :params='params2' @confirm='yearpicker($event)' v-model="show2" mode="time" :start-year="startData" :end-year="endData">
+				</u-picker>
+				</view>
 			</view>
 			<view v-if='checked' class="c-row b-b">
 				<text class="tit">包装方式</text>
@@ -182,7 +172,7 @@
 			<view v-if='checked&&baoIndex!=0' class="c-row b-b">
 				<text class="tit">袋装备注</text>
 				<view class="con-list">
-					<input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
+					<input @input='moreinput' placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
 				</view>
 			</view>
 			<view v-if='checked' class="c-row ">
@@ -211,17 +201,16 @@
 				typesType: ["现货", "期货"],
 				typesIndex: 0,
 				deptList: {
-					salePlanType:'现货',
-					salePlanTypeKey:0,
-					grainKey:0,
-					gradeKey:0,
-					packingTypeKey:0,
-					freightPayerKey:-1,
+					salePlanType: '现货',
+					salePlanTypeKey: 0,
+					grainKey: 0,
+					gradeKey: 0,
+					packingTypeKey: 0,
+					freightPayerKey: -1,
 					priceType: "定价销售",
-					grain: "塔粮",
-					grade: "不限(默认)",
-					outputYear: "2020",
-					packingType: "不限(默认)",
+					 grain: "",
+					grade: "一等品",
+					packingType: "散装",
 					freightPayer: "",
 				},
 				params: {
@@ -233,22 +222,19 @@
 					province: true,
 					city: true,
 				},
-				checked: false,
+				checked: true,
 				insertSalePlanInfo: {},
 				liIndex: -1,
 				liType: ['塔粮', '筛粮', '中粒', '大粒'],
 				pinIndex: -1,
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				nianIndex: -1,
-				nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
-					'2011'
-				],
 				show: false,
 				show1: false,
+				show2:false,
 				region: '请选择发货地区',
 				regions: "",
 				region1: '请选择产地',
-				region2 :"",
+				region2: "",
 				baoIndex: -1,
 				baoType: ['散装', '大袋', '小袋'],
 				chengIndex: -1,
@@ -258,10 +244,22 @@
 				sendText: '获取验证码',
 				verifyCode:"",
 				verification:true,
+				params2: {
+					year: true,
+				},
+				morestatus:false
 			}
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo'])
+			...mapState(['hasLogin', 'userInfo']),
+			startData(){
+					var data = new Date()
+					return data.getFullYear() - 30
+				},
+				endData(){
+					var data = new Date()
+					return data.getFullYear()
+				}
 		},
 		onLoad(options) {
 			if (options.customerName) {
@@ -285,6 +283,25 @@
 			})
 		},
 		methods: {
+			yearchange() {
+				this.show2 = true
+			},
+			moreinput(e){
+				if(e.detail.value.length>0){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
+				
+			},
+			yearpicker(e) {
+				if(e!=null){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
+				this.deptList.outputYear = e.year
+			},
 			// async amendprice() {
 			// 	var that = this
 			// 	this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
@@ -312,6 +329,12 @@
 			// 			return false
 			// 		});
 			// },
+			phoneinput(e){
+				if(e.detail.value.length==11){
+					this.codestatus=true
+				}
+			},
+
 			getcode() {
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.deptList.sellerPhone)) {
@@ -380,7 +403,7 @@
 			typeChange(e) {
 				this.typesIndex = e.detail.value
 				this.types = this.typesType[this.typesIndex];
-				this.deptList.salePlanTypeKey = e.detail.value+1
+				this.deptList.salePlanTypeKey = e.detail.value
 				this.deptList.salePlanType = this.typesType[this.typesIndex];
 				if (this.typesIndex == 0) {
 					this.deptList.priceType = '定价销售'
@@ -392,7 +415,7 @@
 			navToDetailPage() {
 				// if (index == 1) {
 				uni.navigateTo({
-					url: `/pageD/myRelease/Identity_switching`
+					url: `/pageD/myRelease/Identity_switching?status=2`
 				})
 			},
 			commit() {
@@ -493,11 +516,11 @@
 					this.$api.msg('卖方手机号不能为空')
 					return
 				}
-				if (this.deptList.sellerPhone.length!=11) {
+				if (this.deptList.sellerPhone.length != 11) {
 					this.$api.msg('卖方手机号输入错误')
 					return
 				}
-				if(!this.verifyCode){
+				if (!this.verifyCode) {
 					this.$api.msg('验证码不能为空')
 					return
 				}
@@ -578,26 +601,26 @@
 				// 	this.$api.msg('验证码输入有误!')
 				// 	return
 				// }
-				var that=this
+				var that = this
 				this.insertSalePlanInfo = this.deptList
 				this.insertSalePlanInfo.basisPrice = this.insertSalePlanInfo.basisPrice
 				this.insertSalePlanInfo.commonId = this.userInfo.id
-				this.insertSalePlanInfo.salePlanNo='XSJH'+this.getdate()+this.verifyinit()
+				this.insertSalePlanInfo.salePlanNo = 'XSJH' + this.getdate() + this.verifyinit()
 				this.insertSalePlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
-						phone: this.deptList.sellerPhone,
-						verifyCode: this.verifyCode
+				uni.showModal({ 
+					title: '提示',
+				    content: '确定发布交易信息?',
+				    success: function (res) {
+						if (res.confirm) {
+							that.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+						phone: that.deptList.sellerPhone,
+						verifyCode: that.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-							that.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', that.insertSalePlanInfo).then(res => {
+							that.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', that
+									.insertSalePlanInfo).then(res => {
 									if (res.data.code == 200) {
-										uni.showToast({
-											title: "发布成功",
-											icon: 'none',
-										})
-										// setTimeout(() => {
-										// 	uni.navigateBack({})
-										// }, 1000)
+										that.$api.msg('发布成功')
 										that.deptList = {}
 										uni.navigateTo({
 											url: `/pages/release/release`
@@ -609,7 +632,7 @@
 											duration: 2000
 										})
 									}
-							
+
 								})
 								.catch(res => {
 									uni.showToast({
@@ -618,14 +641,12 @@
 										duration: 2000
 									})
 								});
-						}
-						else if(res.data.code=='11003'){
-						 	uni.showModal({
-						 		title: '提示',
-						 		content: '验证码不正确',
-						 		});
-						 }
-						else {
+						} else if (res.data.code == '11003') {
+							uni.showModal({
+								title: '提示',
+								content: '验证码不正确',
+							});
+						} else {
 							uni.showToast({
 								title: res.data.message,
 								icon: 'none',
@@ -642,66 +663,86 @@
 						})
 						return
 					});
+						} else if (res.cancel) {
+						
+						}
+					}});
+				
 				// this.insertProcurementPlanInfo = this.deptList
 				// this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
 				// this.insertProcurementPlanInfo.commonId = this.userInfo.id
 				// this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 			},
 			liChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.liIndex = e.detail.value
 				this.litypes = this.liType[this.liIndex];
-				this.deptList.grainKey = e.detail.value+1
+				this.deptList.grainKey = e.detail.value
 				this.deptList.grain = this.liType[this.liIndex]
 			},
 			pinChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.pinIndex = e.detail.value
 				this.pintypes = this.pinType[this.pinIndex];
 				this.deptList.gradeKey = e.detail.value
 				this.deptList.grade = this.pinType[this.pinIndex]
 			},
-			nianChange(e) {
-				this.nianIndex = e.detail.value
-				this.niantypes = this.nianType[this.nianIndex];
-				this.deptList.outputYear = this.baoType[this.baoIndex]
-			},
 
 			baoChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.baoIndex = e.detail.value
 				this.baotypes = this.baoType[this.baoIndex];
 				this.deptList.packingTypeKey = e.detail.value
 				this.deptList.packingType = this.baoType[this.baoIndex];
 			},
 			getdate() {
-			  var date = new Date()
-			  var year = date.getFullYear() //获取完整的年份(4位)
-			  var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-			  var datetime = date.getDate() //获取当前日(1-31)
-			  if (mouth < 10) {
-				mouth = '0' + mouth
-			  }
-			  if (datetime < 10) {
-				datetime = '0' + datetime
-			  }
-			  return year + mouth + datetime
+				var date = new Date()
+				var year = date.getFullYear() //获取完整的年份(4位)
+				var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+				var datetime = date.getDate() //获取当前日(1-31)
+				if (mouth < 10) {
+					mouth = '0' + mouth
+				}
+				if (datetime < 10) {
+					datetime = '0' + datetime
+				}
+				return year + mouth + datetime
 			},
 			verifyinit() {
-			  var arr = []
-			  for (var i = 48; i < 123; i++) {
-				if (i > 57 && i < 65) continue
-				if (i > 90 && i < 97) continue
-				arr.push(String.fromCharCode(i))
-			  }
-			  arr.sort(function() {
-				return Math.random() - 0.5
-			  })
-			  arr.length = 4
-					
-			  return arr.join('')
+				var arr = []
+				for (var i = 48; i < 123; i++) {
+					if (i > 57 && i < 65) continue
+					if (i > 90 && i < 97) continue
+					arr.push(String.fromCharCode(i))
+				}
+				arr.sort(function() {
+					return Math.random() - 0.5
+				})
+				arr.length = 4
+
+				return arr.join('')
 			},
 			chengChange(e) {
+				if(e.detail.value!=-1){
+					this.morestatus=true
+				}else{
+					this.morestatus=false
+				}
 				this.chengIndex = e.detail.value
 				this.chengtypes = this.chengType[this.chengIndex];
-				this.deptList.freightPayerKey = e.detail.value+1
+				this.deptList.freightPayerKey = e.detail.value + 1
 				this.deptList.freightPayer = this.chengType[this.chengIndex];
 			}
 		}
@@ -723,6 +764,7 @@
 		align-items: center;
 		padding: 20rpx 30rpx;
 		position: relative;
+		font-size:14px;
 	}
 
 	.con-list {
@@ -736,17 +778,20 @@
 		-webkit-box-direction: normal;
 		-webkit-flex-direction: column;
 		flex-direction: column;
-		color: #AFB3BF;
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
-		font-size: 14px;
 	}
+	.con-list input{
+		font-size:14px !important;
+	}
+
 	.buyup {
 		background-color: #FFFFFF;
 		border-radius: 20px;
 		margin-top: 10px;
 	}
+
 	.buylow {
 		background-color: #FFFFFF;
 		border-radius: 20px;
@@ -759,6 +804,7 @@
 		background-color: #22C572;
 		color: #FFFFFF;
 	}
+
 	.validate {
 		width: 100px;
 		height: 32px;
@@ -769,19 +815,19 @@
 		text-align: center;
 		line-height: 30px;
 	}
+
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;
 		line-height: 30px;
 	}
+
 	.getcode.active {
 		border: none;
 	}
+
 	.getcode.active {
 		background: #22C572;
 		color: #fff;

+ 31 - 31
pageD/warehousings/ex_warehouse.vue

@@ -227,7 +227,7 @@
 				},
 				pinIndex: 0,
 				pinTypes: '',
-				pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
+				pinType: ['一等品', '二等品', '三等品', '等外'],
 				ruIndex: 0,
 				rutypes: '',
 				ruType: ['销售出库', '移库出库', '暂存出库', '贸易服务出库', '采购出库'],
@@ -235,6 +235,7 @@
 				maxSize: 5 * 1024 * 1024, //限制文件大小 5M
 				btnLoading: false, //防止重复点击
 				imgUrls: [],
+				binNumber:[],
 				warehouse: [],
 				warehouseIndex: -1,
 				warehouse1: [],
@@ -303,34 +304,27 @@
 			this.getList(this.WarehouseInOutInfo.id)
 		},
 		onShow() {	
-			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
-				compId: '2710b21efc1e4393930c5dc800010dc4',
-				warehouseType: 1,
-			}).then(res => {
-				if (res.data.code == 200) {
-					var arr = []
-					for (var i = 0; i < res.data.data.length; i++) {
-						if (res.data.data[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
-							this.warehouseIndex = i
-							this.ids = res.data.data[i].id
+			this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {contractNo:this.WarehouseInOutInfo.contractNo,warehouseType:1,}).then(res => {
+				 if(res.data.code==200){
+					this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
+						compId: res.data.data,
+						warehouseType: 1,
+					}).then(res => {
+						if (res.data.code == 200) {
+							var arr = []
+							for (var i = 0; i < res.data.data.length; i++) {
+								if (res.data.data[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
+									this.warehouseIndex = i
+									this.ids = res.data.data[i].id
+								}
+								arr.push(res.data.data[i].warehouseName)
+							}
+							this.warehouselist = res.data.data
+							this.warehouse = arr
 						}
-						arr.push(res.data.data[i].warehouseName)
-					}
-					this.warehouselist = res.data.data
-					this.warehouse = arr
-				}
-			})
-			// this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-			// 	id: this.ids,
-			// }).then(res => {
-			// 	var arr = []
-			// 	for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
-			// 		console.log(res.data.data.warehousePositionInfoList[i])
-			// 		arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
-			// 	}
-			// 	this.warehouse1 = arr
-			// 	this.warehouselist11 = res.data.data
-			// })
+					})
+				 }
+			})	
 		},
 		
 		methods: {
@@ -339,8 +333,6 @@
 				this.$api.doRequest('get', '/warehouseInOutInfo/getInfo', {
 						id: id1
 					}).then(res => {
-						
-
 						if(res.data.code == 200){
 							this.WarehouseInOutInfo = res.data.data
 							if (this.WarehouseInOutInfo.warehouseInOutDetail != null ) {
@@ -357,7 +349,6 @@
 								if(this.WarehouseInOutInfo.gradeKey != null){
 									this.pinIndex = this.WarehouseInOutInfo.gradeKey
 								}
-								
 								var positionid
 								for (var i = 0; i < this.warehouselist.length; i++) {
 									if (this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
@@ -387,6 +378,7 @@
 				id: id,
 			}).then(res => {
 				if(res.data.code == 200 ){
+					that.binNumber=res.data.data.warehousePositionInfoList
 					var arr = []
 					for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
 						arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
@@ -413,6 +405,7 @@
 				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
 					id: id,
 				}).then(res => {
+					this.binNumber=res.data.data
 					var arr = []
 					for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
 						// console.log(res.data.data.warehousePositionInfoList[i])
@@ -423,9 +416,15 @@
 			},
 			warehouseChange1(e) {
 				var id = ''
+				
 				this.warehouseIndex1 = e.detail.value
 				this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
 				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
+				for (var i = 0; i < this.binNumber.length; i++) {
+					if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
+						this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
+					}
+				}
 			},
 
 			DateChange(e) {
@@ -713,6 +712,7 @@
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
+				// this.WarehouseInOutInfo.baseId=0
 				this.WarehouseInOutInfo.taskType = "出库任务"
 				uni.showLoading({
 					title: "正在提交"

+ 74 - 33
pageD/warehousings/warehousings.vue

@@ -34,14 +34,14 @@
 					<text class="tit">毛重(吨)</text>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight" @input="grossWeightInput"></input>
+						<input placeholder-style="font-size:14px" style="font-size: 14px;" placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight" @input="grossWeightInput"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="tit">皮重(吨)</view>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"
+						<input placeholder-style="font-size:14px" style="font-size: 14px;" placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"
 							@input="tareInput"></input>
 					</view>
 				</view>
@@ -78,7 +78,7 @@
 					<text class="tit">入库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
 						<view >
-							{{ruIndex>-1?ruType[ruIndex]:'请选择入库类型'}}
+							 {{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
 						</view>
 					</picker>
 				</view>
@@ -97,7 +97,7 @@
 				<view class="c-row b-b">
 					<text class="tit">入库日期</text>
 					
-					<view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time1}}</view>
+					<view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=null?WarehouseInOutInfo.inOutDate:time1}}</view>
 					<u-picker  :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
 					
 				</view>
@@ -178,7 +178,7 @@
 					<text class="tit">品级 </text>
 					<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
 						<view >
-							{{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
+							{{pinIndex > -1 ? pinType[pinIndex]:'请选择品级'}}
 						</view>
 					</picker>
 				</view>
@@ -215,10 +215,10 @@ import upload from '@/components/upload.vue';
 					contractNo: {},
 					carNo: {},
 				},
-				pinIndex: '不限(默认)',
+				pinIndex: -1,
 				pinTypes: '',
-				pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
-				ruIndex: '采购入库',
+				pinType: ['一等品', '二等品', '三等品', '等外'],
+				ruIndex: -1,
 				rutypes: '',
 				warehouse:[],
 				warehouseIndex:-1,
@@ -237,7 +237,7 @@ import upload from '@/components/upload.vue';
 					month: true,
 					day: true,
 				},
-				show:false
+				show:false,
 			}
 		},
 		computed: {
@@ -264,19 +264,41 @@ import upload from '@/components/upload.vue';
 				}
 			},
 			onShow(){
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:'2710b21efc1e4393930c5dc800010dc4',warehouseType:1,}).then(res => {
-				 if(res.data.code==200){
-					 var arr=[]
-					 for(var i=0;i<res.data.data.length;i++){
-						 if(res.data.data[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
-							 this.warehouseIndex=i
-						 }
-						 arr.push(res.data.data[i].warehouseName)
+				this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {contractNo:this.WarehouseInOutInfo.contractNo,warehouseType:1,}).then(res => {
+					 if(res.data.code==200){
+						 this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:res.data.data,warehouseType:1,}).then(res => {
+						 	 if(res.data.code==200){
+						 		 var arr=[]
+						 		 for(var i=0;i<res.data.data.length;i++){
+						 			 if(res.data.data[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
+						 				 this.warehouseIndex=i
+						 			 }
+						 			 arr.push(res.data.data[i].warehouseName)
+						 		 }
+								 this.warehouse = arr
+						 		 this.warehouselist=res.data.data
+								 for(var i=0;i<this.warehouselist.length;i++){
+								 	if(this.warehouselist[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
+								 		var id=this.warehouselist[i].id
+										this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {id:id,}).then(res => {
+											var arr=[]
+											for(var i=0;i<res.data.data.warehousePositionInfoList.length;i++)
+											{
+												if(res.data.data.warehousePositionInfoList[i].binNumber==this.WarehouseInOutInfo.binNumber){
+													this.warehouseIndex1=i
+												}
+												arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
+											}
+											this.warehouse1=arr
+											this.warehouselist11=res.data.data
+										})
+								 	}
+								 }
+						 		 this.warehouse=arr
+						 	 }
+						 })
 					 }
-					 this.warehouselist=res.data.data
-					 this.warehouse=arr
-				 }
-			})
+				})	
 			},
 		onLoad(option) {
 			this.WarehouseInOutInfo.contractNo = option.contractNo
@@ -287,6 +309,9 @@ import upload from '@/components/upload.vue';
 			this.WarehouseInOutInfo.warehouseName = option.warehouseName
 			this.WarehouseInOutInfo.id = option.id
 			this.WarehouseInOutInfo.carNo = option.carNo
+			this.WarehouseInOutInfo.addressUrl = option.addressUrl
+			this.WarehouseInOutInfo.binNumber = option.binNumber
+			this.WarehouseInOutInfo.inOutDate = option.inOutDate
 			var date=new Date()
 			var year=date.getFullYear()
 			var month=date.getMonth()
@@ -295,6 +320,7 @@ import upload from '@/components/upload.vue';
 				month="0"+(month+1)
 			}
 			this.time = year+'-'+month+"-"+date1
+			this.getList(this.WarehouseInOutInfo.id)
 		},
 		methods: {
 			getList(id1){
@@ -302,12 +328,16 @@ import upload from '@/components/upload.vue';
 				this.$api.doRequest('get','/warehouseInOutInfo/getInfo',{id:id1}).then(res => {
 					
 					that.WarehouseInOutInfo = res.data.data
-					console.log(that.WarehouseInOutInfo.warehouseInOutDetail != null)
 					if( that.WarehouseInOutInfo.warehouseInOutDetail != null){
 						that.list = that.WarehouseInOutInfo.warehouseInOutDetail
 					} 
-					this.pinIndex = this.WarehouseInOutInfo.gradeKey
-				this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					if(this.WarehouseInOutInfo.gradeKey != null){
+						this.pinIndex = this.WarehouseInOutInfo.gradeKey
+					}
+					if(this.WarehouseInOutInfo.inOutTypeKey != null){
+						this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					}
+					
 					this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
 				})
 				.catch(res => {
@@ -330,7 +360,6 @@ import upload from '@/components/upload.vue';
 				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {id:id,}).then(res => {
 					var arr=[]
 					for(var i=0;i<res.data.data.warehousePositionInfoList.length;i++){
-						console.log(res.data.data.warehousePositionInfoList[i])
 						arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
 					}
 					this.warehouse1=arr
@@ -340,7 +369,14 @@ import upload from '@/components/upload.vue';
 			warehouseChange1(e){
 				var id=''
 				this.warehouseIndex1=e.detail.value
-				this.WarehouseInOutInfo.binNumber=this.warehouse1[this.warehouseIndex1]
+				this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
+				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
+				// for (var i = 0; i < this.WarehouseInOutInfo.binNumber.length; i++) {
+				// 	if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
+				// 		this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
+				// 	}
+				// }
+	
 			},
 			DateChange(e) {
 				this.WarehouseInOutInfo.inOutDate=e.year+'-'+e.month+'-'+e.day
@@ -418,7 +454,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.bulkDensity&&this.list.bulkDensity<1||this.list.bulkDensity&&this.list.bulkDensity>40){
+				if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
 					this.$api.msg('容重输入错误')
 					return
 				}
@@ -485,8 +521,8 @@ import upload from '@/components/upload.vue';
 							duration: 2000
 						})
 						setTimeout(() => {
-							uni.navigateBack({})
-						}, 200)
+							uni.navigateBack()
+						}, 1000)
 					}else{
 						uni.showToast({
 							title: res.data.message,
@@ -495,7 +531,6 @@ import upload from '@/components/upload.vue';
 						})
 					}
 					uni.hideLoading()
-					
 				}).catch(res => {
 					uni.showToast({
 						title: res.data.message,
@@ -576,7 +611,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.bulkDensity&&this.list.bulkDensity<1||this.list.bulkDensity&&this.list.bulkDensity>40){
+				if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
 					this.$api.msg('容重输入错误')
 					return
 				}
@@ -633,6 +668,12 @@ import upload from '@/components/upload.vue';
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
+				debugger
+				for(let i = 0 ;i < this.warehouselist.length ; i++){
+					if(this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName){
+						this.WarehouseInOutInfo.baseId = this.warehouselist[i].id
+					}
+				}
 				this.WarehouseInOutInfo.taskType = "入库任务"
 				uni.showLoading({
 					title:"正在提交"
@@ -644,8 +685,8 @@ import upload from '@/components/upload.vue';
 							icon: 'none'
 						})
 						setTimeout(() => {
-							uni.navigateBack({})
-						}, 200)
+							uni.navigateBack()
+						}, 1000)
 					}else{
 						uni.showToast({
 							title: res.data.message,

+ 9 - 1
pages.json

@@ -469,7 +469,15 @@
 				"enablePullDownRefresh": false
 			}
 
-		}
+		},{
+            "path" : "pages/user/fankui",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
 
 	],
 	"subpackages": [{

+ 39 - 81
pages/attestation/index.vue

@@ -24,7 +24,7 @@
 			<image src="../../static/img/authentication/siji@3x.png" class="portrait1"></image>
 		</view>
 		
-		<!-- <view class="homePage2">
+		 <view class="homePage2">
 			<image src="../../static/img/authentication/bg@2x.png" class="background"></image>
 			<view class="title">
 				粮农身份
@@ -33,7 +33,7 @@
 				<view style="margin-right: 30px;">{{changes}}</view>
 			</view>
 			<image src="../../static/img/authentication/farmer@2x.png" class="portrait1"></image>
-		</view> -->
+		</view> 
 	</view>
 </template>
 
@@ -88,24 +88,25 @@
 						showCancel: true,
 						confirmText: '确定',
 						success: (e) => {
-							this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this.identityAuthenticationInfo,
-									'application/json;charset=UTF-8').then(res => {
-									// this.procurementPlanInfos = res.data.data.records
-									console.log("成功!")
-									if (res.data.message == "Success") {
-										this.$api.msg('确认成功!')
-										this.changes = "取消"
-										this.getList()
-										return
-									}
-								})
-								.catch(res => {
-									uni.showToast({
-										title: res.message,
-										icon: 'none',
-										duration: 2000
-									})
-								});
+								if (e.confirm) {
+									this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this.identityAuthenticationInfo,
+											'application/json;charset=UTF-8').then(res => {
+											if (res.data.message == "Success") {
+												this.$api.msg('确认成功!')
+												this.changes = "取消"
+												this.getList()
+												return
+											}
+										})
+										.catch(res => {
+											uni.showToast({
+												title: res.message,
+												icon: 'none',
+												duration: 2000
+											})
+										});
+								}
+							
 						},
 						fail: () => {},
 						complete: () => {}
@@ -121,24 +122,25 @@
 						showCancel: true,
 						confirmText: '确定',
 						success: (e) => {
-							this.$api.doRequest('post', '/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', this.identityAuthenticationInfo,
-									'application/json;charset=UTF-8').then(res => {
-										console.log(res.data.message,"判断")
-										console.log(res)
-									if (res.data.message == "Success") {
-										this.$api.msg('取消成功!')
-										this.changes = "确认"
-										this.getList()
-										return
-									}
-								})
-								.catch(res => {
-									uni.showToast({
-										title: res.errmsg,
-										icon: 'none',
-										duration: 2000
+							if (e.confirm) {
+								this.$api.doRequest('post', '/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', this.identityAuthenticationInfo,
+										'application/json;charset=UTF-8').then(res => {
+										if (res.data.message == "Success") {
+											this.$api.msg('取消成功!')
+											this.changes = "确认"
+											this.getList()
+											return
+										}
 									})
-								});
+									.catch(res => {
+										uni.showToast({
+											title: res.errmsg,
+											icon: 'none',
+											duration: 2000
+										})
+									});
+							}
+							
 						},
 						fail: () => {},
 						complete: () => {}
@@ -147,13 +149,11 @@
 				},	
 				
 			liangShang(){
-				console.log(1111)
 				uni.navigateTo({
 					url: `/pages/attestation/indexTwo`
 				})
 			},
 			siJi(){
-				console.log(2222)
 				uni.navigateTo({
 					url: `/pages/attestation/indexThree`
 				})
@@ -163,11 +163,6 @@
 					url: `/pageD/identity/driverIdentityEdit?id=${items.id}`
 				})
 			},
-			// companyEdit(item) {
-			// 	uni.navigateTo({
-			// 		url: `/pageD/identity/companyIdentityEdit?id=${item.id}`
-			// 	})
-			// },
 			deleteLS(item) {
 				uni.showModal({
 					// title: '登录提示',
@@ -185,7 +180,6 @@
 									this.getList()
 									return
 								}
-
 							})
 							.catch(res => {
 								uni.showToast({
@@ -200,7 +194,6 @@
 				})
 			},
 			deleteSJ(item) {
-				console.log(item.driverName)
 				this.deletes = {}
 				this.deletes.id = item.id
 				uni.showModal({
@@ -232,40 +225,6 @@
 				})
 			},
 			getList() {
-				// this.identityAuthenticationInfo.commonId = this.userInfo.id
-				// this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
-				// 		pageSize: 10,
-				// 		currentPage: 1,
-				// 		commonId: this.userInfo.id
-				// 	}, 'application/json;charset=UTF-8').then(res => {
-				// 		console.log("成功连接")
-				// 		this.businessman = res.data.data.records
-				// 	})
-				// 	.catch(res => {
-				// 		uni.showToast({
-				// 			title: res.errmsg,
-				// 			icon: 'none',
-				// 			duration: 2000
-				// 		})
-				// 	});
-
-				// this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {
-				// 		pageSize: 10,
-				// 		currentPage: 1,
-				// 		commonId: this.userInfo.id,
-				// 		flag: 0
-				// 	}, 'application/json;charset=UTF-8').then(res => {
-				// 		console.log("成功连接")
-				// 		this.drivers = res.data.data.records
-				// 		console.log(this.drivers, "skalkdkk")
-				// 	})
-				// 	.catch(res => {
-				// 		uni.showToast({
-				// 			title: res.errmsg,
-				// 			icon: 'none',
-				// 			duration: 2000
-				// 		})
-				// 	});
 				this.$api.doRequest('get', '/identityAuthenticationInfo/selectCount', {
 					customerTypeFlag:3,customerType:"粮农"
 					}, 'application/json;charset=UTF-8').then(res => {
@@ -277,7 +236,6 @@
 							}	
 							this.id = res.data.data.id
 						}
-						
 					})
 					.catch(res => {
 						uni.showToast({

+ 17 - 16
pages/attestation/indexThree.vue

@@ -168,7 +168,6 @@
 											success: function(res) {										
 												if (res.confirm) {
 													that.identityAuthenticationInfo.id = item.id
-														console.log(that.identityAuthenticationInfo,"已覆盖")
 													that.$api.doRequest('post','/driverViewInfo/api/modifyPhone',that.identityAuthenticationInfo).then(
 														res => {
 															uni.showToast({
@@ -197,7 +196,6 @@
 										});
 									}else if(res.data.code == 200){
 										that.identityAuthenticationInfo.id = item.id
-										console.log(that.identityAuthenticationInfo,"未覆盖")
 										that.$api.doRequest('post','/driverViewInfo/api/modifyPhone',that.identityAuthenticationInfo).then(
 											res => {
 												uni.showToast({
@@ -335,21 +333,24 @@
 					showCancel: true,
 					confirmText: '确定',
 					success: (e) => {
-						this.$api.doRequest('post', '/driverViewInfo/api/deleteDriver', this.deletes,
-								'application/json;charset=UTF-8').then(res => {
-								if (res.data.code == 200) {
-									this.$api.msg('删除成功!')
-									this.getList()
-									return
-								}
-							})
-							.catch(res => {
-								uni.showToast({
-									title: res.errmsg,
-									icon: 'none',
-									duration: 2000
+						if(e.confirm){
+							this.$api.doRequest('post', '/driverViewInfo/api/deleteDriver', this.deletes,
+									'application/json;charset=UTF-8').then(res => {
+									if (res.data.code == 200) {
+										this.$api.msg('删除成功!')
+										this.getList()
+										return
+									}
 								})
-							});
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						}
+						
 					},
 					fail: () => {},
 					complete: () => {}

+ 3 - 1
pages/attestation/indexTwo.vue

@@ -374,7 +374,8 @@
 					showCancel: true,
 					confirmText: '确定',
 					success: (e) => {
-						this.$api.doRequest('post',
+						if (res.confirm) {
+							this.$api.doRequest('post',
 								'/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', {
 									id: item.id
 								}, 'application/json;charset=UTF-8').then(res => {
@@ -392,6 +393,7 @@
 									duration: 2000
 								})
 							});
+						}
 					},
 					fail: () => {},
 					complete: () => {}

+ 31 - 0
pages/business/business.vue

@@ -113,6 +113,37 @@
 		},
 		onShow() {
 			uni.showTabBar()
+			var userInfo = uni.getStorageSync("userInfo")
+			var that = this
+			console.log("userInfo",userInfo)
+			this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
+				if (res.data.data) {
+					let name = 'myTip';
+					let value = res.data.data.myTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if(value != 0){
+						uni.setTabBarBadge({
+							index:3,
+							text:value+""
+						})
+					}
+					name = 'taskTip';
+					value = res.data.data.taskTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					name = 'contractTip';
+					value = res.data.data.contractTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+				}
+			})
 		},
 		onLoad(options) {
 			console.log("buy onload")

+ 4 - 2
pages/public/code.vue

@@ -172,8 +172,10 @@
 					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
 					    if(res.data.code==200){
 							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
-							password: "y123456",
-							username: "13333333333"}).then(res => {})
+password: "y123456",
+username: "13333333333"}).then(res1 => {
+								uni.setStorageSync('pcUserInfo', res1.data.data)
+							})
 							uni.setStorageSync('userInfo', res.data.data)
 					        that.$store.commit('login', res.data.data)
 					        // that.liangxinLogin()

+ 15 - 3
pages/public/login_account_number.vue

@@ -20,7 +20,7 @@
 				<view style='flex:1;text-align:center;border-right:1px solid #E8E9ED;'>忘记密码</view>
 				<view @click='gocode' style='flex:1;text-align:center;'>验证码登录</view>
 			</view>
-		    <button class='register'>手机号一键注册</button>
+		    <button @click='goregister' class='register'>手机号一键注册</button>
 		</view>
 		</view>
 	</view>
@@ -101,10 +101,16 @@
 						uni.setStorageSync('userInfo', res.data.data)
 						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",
-username: "13333333333"}).then(res => {
-							
+username: "13333333333"}).then(res1 => {
+							uni.setStorageSync('pcUserInfo', res1.data.data)
 						})
 						that.$store.commit('login', res.data.data)
+						var name = 'userInfo';
+						var value = res.data.data;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
 						// that.liangxinLogin()
 						
 						uni.switchTab({
@@ -141,6 +147,11 @@ username: "13333333333"}).then(res => {
 					url:'/pages/public/reset'
 				})
 			},
+			goregister(){
+				uni.navigateTo({
+					url:'/pages/public/register'
+				})
+			},
 			appleLogin(){
 			    var that=this
 			    uni.getProvider({
@@ -332,6 +343,7 @@ username: "13333333333"}).then(res => {
 				uni.navigateBack();
 			},
 			toRegist() {
+				console.log(11)
 				uni.redirectTo({
 					url: '/pages/public/register'
 				})

+ 4 - 2
pages/public/register.vue

@@ -223,8 +223,10 @@
 							if(res.data.code==200){
 								// pc登录
 								this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
-								password: "y123456",
-								username: "13333333333"}).then(res => {})
+password: "y123456",
+username: "13333333333"}).then(res1 => {
+									uni.setStorageSync('pcUserInfo', res1.data.data)
+								})
 								uni.setStorageSync('userInfo', res.data)
 								that.$store.commit('login', res.data)
 								// that.liangxinLogin()

+ 4 - 2
pages/public/reset.vue

@@ -145,8 +145,10 @@
 						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(req => {
 						if(res.data.code==200){
 							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
-							password: "y123456",
-							username: "13333333333"}).then(res => {})
+password: "y123456",
+username: "13333333333"}).then(res1 => {
+								uni.setStorageSync('pcUserInfo', res1.data.data)
+							})
 							uni.setStorageSync('userInfo', req.data.data)
 							that.$store.commit('login', req.data.data)
 							// that.liangxinLogin()

+ 32 - 1
pages/sale/information.vue

@@ -165,6 +165,37 @@
 			this.isLoadMore = false
 			this.loadStatus = 'more'
 			this.loadData()
+			var userInfo = uni.getStorageSync("userInfo")
+			var that = this
+			console.log("userInfo",userInfo)
+			this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
+				if (res.data.data) {
+					let name = 'myTip';
+					let value = res.data.data.myTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if(value != 0){
+						uni.setTabBarBadge({
+							index:3,
+							text:value+""
+						})
+					}
+					name = 'taskTip';
+					value = res.data.data.taskTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					name = 'contractTip';
+					value = res.data.data.contractTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+				}
+			})
 		},
 		onLoad(options) {
 			var that = this
@@ -569,7 +600,7 @@
 		margin-right:10px;
 	}
 	.yesterday{
-		font-size:18px;
+		font-size:14px;
 		font-weight:600;
 		vertical-align: middle;
 	}

+ 15 - 2
pages/task/my_task.vue

@@ -38,8 +38,12 @@
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		name: "task",
+		
 		data() {
 			return {
 				PageCur: "task",
@@ -59,9 +63,17 @@
 				keyword:""
 			};
 		},
-		onLoad(options) {
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		onShow() {
 			this.getIndexBuyData()
+			// this.userInfo =  uni.getStorageSync("userInfo")
+			this.warehouseInOutInfo.phone = this.userInfo.phone
 		},
+		// onLoad(options) {
+		// 	this.getIndexBuyData()
+		// },
 		filters: {
 			formatDate (date) {
 				var date=new Date(date)
@@ -141,6 +153,7 @@
 					title:"正在加载"
 				})
 				this.warehouseInOutInfo.statusFlag = this.statusFlag
+				this.warehouseInOutInfo.phone = this.userInfo.phone
 				//this.warehouseInOutInfo.status = this.status
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectInfo', this.warehouseInOutInfo).then(res => {
 					if (res.data.code == 200) {
@@ -187,7 +200,7 @@
 				})
 				}else{
 					uni.navigateTo({
-						url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}`
+						url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}`
 					})
 				}
 			}else if(item.taskType == "出库任务"){

+ 31 - 0
pages/tran/tran.vue

@@ -122,6 +122,37 @@
 			onShow() {
 				uni.showTabBar()
 				this.loadData()
+				var userInfo = uni.getStorageSync("userInfo")
+				var that = this
+				console.log("userInfo",userInfo)
+				this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
+					if (res.data.data) {
+						let name = 'myTip';
+						let value = res.data.data.myTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						if(value != 0){
+							uni.setTabBarBadge({
+								index:3,
+								text:value+""
+							})
+						}
+						name = 'taskTip';
+						value = res.data.data.taskTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						name = 'contractTip';
+						value = res.data.data.contractTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+					}
+				})
 			},
 			//下拉刷新
 			onPullDownRefresh() {

+ 30 - 0
pages/user/fankui.vue

@@ -0,0 +1,30 @@
+<template>
+	<view>
+		<suggest @submit="submit"></suggest>
+	</view>
+</template>
+
+<script>
+	import suggest from "@/components/bert-suggest/suggest.vue"
+	export default {
+	    components: { suggest },
+	    methods: {
+	        submit(v) {
+				uni.showModal({
+					title: '提示',
+					content: "感谢您提供反馈意见,我们将立即联系您",
+					showCancel: false,
+					confirmText: '确定',
+					success: () => {
+						uni.navigateBack()
+					}
+				})
+	            console.log(v)
+	        }
+	    }
+	}
+</script>
+
+<style>
+
+</style>

+ 3 - 4
pages/user/setUp.vue

@@ -13,7 +13,7 @@
 			<view class="title">昵称</view>
 			<view class="nextStep flex">
 				<view class="username">
-					{{userInfo.userName}}
+					{{username}}
 					</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" @click="nickname"></image>
 			</view>
@@ -29,8 +29,7 @@
 		data() {
 			return {
 				headUrl:"../../static/img/myimg/YongHu@3x.png",
-				username:"",	
-				
+				username:"",
 			}
 		},
 		computed: {
@@ -43,7 +42,7 @@
 		},
 		methods:{
 			getList(){
-				this.userInfo= wx.getStorageSync('userInfo')
+				this.userInfo= uni.getStorageSync('userInfo')
 					this.headUrl = this.userInfo.avatarUrl
 				if(this.headUrl == null || this.headUrl == ""){
 					this.headUrl="../../static/img/myimg/YongHu@3x.png"

+ 22 - 16
pages/user/set_nickname.vue

@@ -28,7 +28,7 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
-			
+
 			commit() {
 				if (this.nickname == null || this.nickname == "") {
 					this.$api.msg('请输入昵称!')
@@ -47,18 +47,24 @@
 						if (res.confirm) {
 							that.deptListurl.userName = that.nickname
 							that.deptListurl.id = that.userInfo.id
-							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(res => {
-								if (res.data.code == 200) {
-								// this.$api.msg('修改成功!')
-								var _student = wx.getStorageSync('userInfo');
-								_student.userName = that.nickname;
-								wx.setStorageSync('userInfo', _student);
-								
-									uni.navigateTo({
-										url: `/pages/user/setUp`
+							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
+									res => {
+										if (res.data.code == 200) {
+											uni.showToast({
+												title: '修改成功!',
+												icon: 'success',
+												duration: 2000,
+												success() {
+													setTimeout(()=>{
+														var _student = uni.getStorageSync('userInfo');
+														_student.userName = that.nickname;
+														uni.setStorageSync('userInfo', _student);
+														uni.navigateBack()
+													},2000)
+												}
+											})
+										}
 									})
-									}
-								})
 								.catch(res => {
 									uni.showToast({
 										title: res.errmsg,
@@ -66,15 +72,15 @@
 										duration: 2000
 									})
 								});
-							
+
 						} else if (res.cancel) {
 							// console.log('用户点击取消');
 						}
 					},
 				})
-				
-				
-				
+
+
+
 			},
 		}
 	}

+ 18 - 13
pages/user/set_picture.vue

@@ -124,19 +124,24 @@
 							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
 									res => {
 										if (res.data.code == 200) {
-												// uni.showToast({
-												// 	title: '修改成功!',
-												// 	icon: 'success',
-												// 	duration: 2000
-												// })
-											that.userInfo.avatarUrl = that.identityUrl
-											var _student = wx.getStorageSync('userInfo');
-											_student.avatarUrl = that.identityUrl;
-											wx.setStorageSync('userInfo', _student);
-										    // this.$api.msg('修改成功!')
-											uni.navigateTo({
-												url: `/pages/user/setUp`
-											})
+												uni.showToast({
+													title: '修改成功!',
+													icon: 'success',
+													duration: 2000,
+													success() {
+														setTimeout(()=>{
+															that.userInfo.avatarUrl = that.identityUrl
+															var _student = uni.getStorageSync('userInfo');
+															_student.avatarUrl = that.identityUrl;
+															uni.setStorageSync('userInfo', _student);
+															// this.$api.msg('修改成功2!')
+															uni.navigateBack({
+																delta:1
+															})
+														},2000)
+													}
+												})
+											
 										}
 									})
 								.catch(res => {

+ 94 - 25
pages/user/user.vue

@@ -18,7 +18,7 @@
 		<view class="indexUp flex">
 			<image v-bind:src="headUrl" class="headPortrait"></image>
 			<view class="personal">
-				<view class="information">{{username}}</view>
+				<view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
 				<view class="information">{{userphone}}</view>
 			</view>
 
@@ -35,12 +35,19 @@
 						<text class="text-grey">{{item.name}}</text>
 					</view>
 					<view>
-						<text v-if='item.num==4&&taskTip' class='badge_user'>{{taskTip}}</text>
-						<text v-if='item.num==2&&contractTip' class='badge_user'>{{contractTip}}</text>
+						<text v-if='item.num==2&&taskTip' class='badge_user'>{{taskTip}}</text>
+						<text v-if='item.num==1&&contractTip' class='badge_user'>{{contractTip}}</text>
 						<text class='tip_text cuIcon-right'></text>
 					</view>
 					<!-- <image src="../../static/img/sign/authentication@3x.png" mode=""></image> -->
 				</view>
+				<view class='cu-item' @click='fankui'>
+					<view>
+						<image src="../../static/img/sign/authentication@2x.png" class="sign"></image>
+						<text class="text-grey">意见反馈</text>
+					</view>
+					<view class = 'tip_text cuIcon-right' ></view>
+				</view>
 				<!-- <view class='cu-item' @click='scanCode'>
 							<view>
 								<text class="cuIcon-scan icon text-grey"></text>
@@ -225,23 +232,9 @@
 				current: 4
 			}
 		},
-		onShow() {
-			uni.showTabBar()
-			this.loadData()
-		},
+		
 		onLoad() {
-			if(this.userInfo.avatarUrl == "" || this.userInfo.avatarUrl == null){
-					this.headUrl = "../../static/img/myimg/YongHu@3x.png"
-			}else if(this.userInfo.avatarUrl != "" || this.userInfo.avatarUrl != null){
-				this.headUrl = this.userInfo.avatarUrl
-			}
-			this.username = this.userInfo.userName
-			if(	this.username == null || this.username == ""){
-				this.username = "请更改昵称"
-			}
-			if(this.userInfo.phone != null || this.userInfo.phone != ""){
-				this.userphone = this.userInfo.phone
-			}
+			
 		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
@@ -266,7 +259,59 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		onShow() {
+			uni.showTabBar()
+			this.loadData()
+			console.log("hasLogin",this.hasLogin )
+			if(this.userInfo){
+				if(!this.userInfo.avatarUrl){
+					this.headUrl = "../../static/img/myimg/YongHu@3x.png"
+				}else{
+					this.headUrl = this.userInfo.avatarUrl
+				}
+				this.username = this.userInfo.userName
+				this.userphone = this.userInfo.phone
+				var that = this
+				this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:this.userInfo.phone}).then(res => {
+					if (res.data.data) {
+						let name = 'myTip';
+						let value = res.data.data.myTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						if(value != 0){
+							uni.setTabBarBadge({
+								index:3,
+								text:value+""
+							})
+						}
+						name = 'taskTip';
+						value = res.data.data.taskTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						name = 'contractTip';
+						value = res.data.data.contractTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+					}
+				})
+			}else{
+				this.headUrl = "../../static/img/myimg/YongHu@3x.png"
+				this.username = "立即登录"
+			}
+			console.log("this.userInfo",this.userInfo)
+		},
 		methods: {
+			fankui(){
+				uni.navigateTo({
+					url: `/pages/user/fankui`
+				})
+			},
 			zhibo() {
 				uni.navigateTo({
 					url: `/pageB/video/broadcast`
@@ -354,16 +399,40 @@
 
 					return;
 				}
-				if (item.url) {
-					uni.navigateTo({
-						url: item.url + `?companyId=${that.companyId}`
+				if (!this.hasLogin) {
+					uni.showModal({
+						title: '登录提示',
+						content: '您尚未登录,是否立即登录?',
+						showCancel: true,
+						confirmText: '登录',
+						success: (e) => {
+							if (e.confirm) {
+								uni.navigateTo({
+									url: '/pages/public/login'
+								})
+							}
+						},
+						fail: () => {},
+						complete: () => {}
 					})
+				}else {
+					if (item.url) {
+						uni.navigateTo({
+							url: item.url + `?companyId=${that.companyId}`
+						})
+					}
 				}
 			},
 			toLogin() {
-				if (!this.hasLogin) {
+				console.log("userInfo",this.userInfo)
+				if (!this.hasLogin || !this.userInfo || this.username == "立即登录") {
+					uni.navigateTo({
+						url: '/pages/public/login_account_number'
+					})
+				}
+				else{
 					uni.navigateTo({
-						url: '/pages/public/login'
+						url: '/pages/user/setUp'
 					})
 				}
 				// else if(!this.userInfo.nickname){
@@ -682,7 +751,7 @@
 		
 	   background-color: #F5F6FA;
 	/* 	border-radius: 20px; */
-		margin-top: 60px;
+		margin-top: 60upx;
 
 		.arc {
 			position: absolute;

+ 2 - 7
store/index.js

@@ -11,7 +11,7 @@ try {
 }
 
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
-let saveStateKeys = ['firendItem','userData','pushRes','myTip','taskTip','contractTip','liangxinTip','packet','linkItem','memberItem','memberItemIndex','chatItem','clientId','infoList'];
+let saveStateKeys = ['firendItem','userData','userInfo','pushRes','myTip','taskTip','contractTip','liangxinTip','packet','linkItem','memberItem','memberItemIndex','chatItem','clientId','infoList'];
 
 // 保存变量到本地存储中
 const saveLifeData = function(key, value) {
@@ -27,9 +27,6 @@ const saveLifeData = function(key, value) {
 			        console.log('震动成功');
 			    }
 			});
-			uni.showTabBarRedDot({
-				index: 3
-			});
 		}
 		if(key == 'taskTip' && tmp[key] < value){
 			uni.vibrateLong({
@@ -37,9 +34,6 @@ const saveLifeData = function(key, value) {
 			        console.log('震动成功');
 			    }
 			});
-			uni.showTabBarRedDot({
-				index: 3
-			});
 		}
 		tmp[key] = value;
 		// 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中
@@ -66,6 +60,7 @@ const store = new Vuex.Store({
 		// 链接
 		linkItem:lifeData.linkItem?lifeData.linkItem: [],
 		userData: lifeData.userData?lifeData.userData: {},
+		userInfo: lifeData.userInfo?lifeData.userInfo: {},
 		//群成员 有索引A~Z
 		memberItem:lifeData.memberItem?lifeData.memberItem:[],
 		//群成员 没有索引

+ 101 - 39
websocket_sdk.js

@@ -15,6 +15,7 @@ export default class Websocket {
         // 心跳检测频率
         this._timeout = 3000;
         this._timeoutObj = null;
+        this._timeoutObj1 = null;
         // 当前重连次数
         this._connectNum = 0;
         // 心跳检测和断线重连开关,true为启用,false为关闭
@@ -26,6 +27,7 @@ export default class Websocket {
     // 心跳重置
     _reset() {
         clearTimeout(this._timeoutObj);
+        clearTimeout(this._timeoutObj1);
         return this;
     }
     // 心跳开始
@@ -34,9 +36,11 @@ export default class Websocket {
         this._timeoutObj = setInterval(() => {
             //发送心跳
             _this.sendHeartbeatData(options);
-			_this.getTips()
 			_this.getInfo()
         }, this._timeout);
+		this._timeoutObj1 = setInterval(() => {
+			_this.getTips()
+		}, 1000*60);
     }
     // 监听websocket连接关闭
     onSocketClosed(options) {
@@ -251,50 +255,108 @@ export default class Websocket {
     }
 	getTips(){
 		return new Promise(resolve => {
+			let baseUrl = config.def().baseUrl
+			let baseUrlNew = config.def().baseUrlNew
 			var userInfo
 			if (!userInfo || !userInfo.accessToken) {
 				userInfo = uni.getStorageSync('userInfo')
 			}
-			let accessToken = userInfo ? userInfo.accessToken : ''
-			let baseUrl = config.def().baseUrl
-			var data = {}
-			var _mt = 'getTips'
-			var _gp = 'integral'
-			uni.request({
-				url: baseUrl + '/m.api',
-				data: {
-					...data,
-					_gp,
-					_mt
-				},
-				method: 'POST',
-				header: {
-					'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
-					'ACCESSTOKEN': accessToken
-				},
-				success: (res) => {						
-					if (res.statusCode === 200) {
-						let name = 'myTip';
-						let value = res.data.data.myTips;
-						store.commit('$uStore', {
-							name,
-							value
-						});
-						name = 'taskTip';
-						value = res.data.data.task;
-						store.commit('$uStore', {
-							name,
-							value
-						});
-						name = 'contractTip';
-						value = res.data.data.contract;
-						store.commit('$uStore', {
-							name,
-							value
-						});
+			var pcUserInfo=uni.getStorageSync('pcUserInfo')
+			if(!pcUserInfo){
+				uni.request({
+					url: baseUrlNew + '/auth/api/loginEnhanced',
+					data: {
+						// companyName: "佳屹农",
+						// password: "y123456",
+						// username: "jyn"
+						companyName: "易粮易运",
+						password: "y123456",
+						username: "13333333333"
+					},
+					method: 'POST',
+					success: (res) => {						
+						if (res.statusCode === 200) {
+							uni.setStorageSync('pcUserInfo', res.data)
+						}
 					}
-				}
+				})
+			}
+			uni.request({
+			    url: baseUrlNew + '/salePlanInfo/getTips',
+			    data: {
+			    	phone: userInfo.phone
+			    },
+			    method: 'GET',
+			    success: (res) => {			
+					console.log("websocket myTips",res)
+					if (res.data.data) {
+			    		let name = 'myTip';
+			    		let value = res.data.data.myTip;
+			    		store.commit('$uStore', {
+			    			name,
+			    			value
+			    		});
+						if(value != 0){
+							uni.setTabBarBadge({
+								index:3,
+								text:value+""
+							})
+						}
+			    		name = 'taskTip';
+			    		value = res.data.data.taskTip;
+			    		store.commit('$uStore', {
+			    			name,
+			    			value
+			    		});
+			    		name = 'contractTip';
+			    		value = res.data.data.contractTip;
+			    		store.commit('$uStore', {
+			    			name,
+			    			value
+			    		});
+			    	}
+			    }
 			})
+			
+			// let accessToken = userInfo ? userInfo.accessToken : ''
+			// var data = {}
+			// var _mt = 'getTips'
+			// var _gp = 'integral'
+			// uni.request({
+			// 	url: baseUrl + '/m.api',
+			// 	data: {
+			// 		...data,
+			// 		_gp,
+			// 		_mt
+			// 	},
+			// 	method: 'POST',
+			// 	header: {
+			// 		'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
+			// 		'ACCESSTOKEN': accessToken
+			// 	},
+			// 	success: (res) => {						
+			// 		if (res.statusCode === 200) {
+			// 			let name = 'myTip';
+			// 			let value = res.data.data.myTips;
+			// 			store.commit('$uStore', {
+			// 				name,
+			// 				value
+			// 			});
+			// 			name = 'taskTip';
+			// 			value = res.data.data.task;
+			// 			store.commit('$uStore', {
+			// 				name,
+			// 				value
+			// 			});
+			// 			name = 'contractTip';
+			// 			value = res.data.data.contract;
+			// 			store.commit('$uStore', {
+			// 				name,
+			// 				value
+			// 			});
+			// 		}
+			// 	}
+			// })
 		})
 	}
 	getInfo(){

BIN
yiliangyiyun.mobileprovision


BIN
证书.p12


Some files were not shown because too many files changed in this diff