瀏覽代碼

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 年之前
父節點
當前提交
7e6dd44842
共有 45 個文件被更改,包括 1602 次插入902 次删除
  1. 76 0
      App.vue
  2. 347 0
      components/APPPush/app_push.js
  3. 14 0
      components/APPPush/index.js
  4. 4 4
      components/code-elf-guide/code-elf-guide.vue
  5. 1 1
      components/ossutil/crypto.js
  6. 631 546
      components/upload.vue
  7. 1 2
      config/index.js
  8. 2 1
      main.js
  9. 1 1
      pageA/freightTransport/addpaygoods.vue
  10. 1 1
      pageA/freightTransport/addsendgoods.vue
  11. 0 1
      pageA/freightTransport/confirmpaygoods.vue
  12. 149 124
      pageA/product/Identity_switching.vue
  13. 30 19
      pageA/product/business_buy.vue
  14. 12 1
      pageA/product/business_sale.vue
  15. 7 0
      pageB/contract/collectLook.vue
  16. 3 1
      pageB/contract/contract.vue
  17. 10 9
      pageB/contract/contract_detail.vue
  18. 24 12
      pageB/contract/look.vue
  19. 3 0
      pageB/news/news.vue
  20. 51 0
      pageD/identity/companyIdentity.vue
  21. 1 0
      pageD/identity/companyIdentityEdit.vue
  22. 6 12
      pageD/identity/companyIdentityThree.vue
  23. 1 0
      pageD/identity/companyIdentityTwo.vue
  24. 1 0
      pageD/identity/driverIdentity.vue
  25. 1 0
      pageD/identity/driverIdentityEdit.vue
  26. 5 29
      pageD/identity/driverIdentityThree.vue
  27. 1 2
      pageD/identity/driverIdentityTwo.vue
  28. 8 6
      pageD/myRelease/buyGrain.vue
  29. 26 9
      pageD/myRelease/sellGrain.vue
  30. 98 83
      pageD/warehousings/ex_warehouse.vue
  31. 8 5
      pageD/warehousings/warehousings.vue
  32. 3 3
      pages.json
  33. 6 3
      pages/attestation/indexThree.vue
  34. 13 3
      pages/attestation/indexTwo.vue
  35. 3 0
      pages/business/business.vue
  36. 6 6
      pages/index/index.vue
  37. 1 1
      pages/public/code.vue
  38. 6 0
      pages/public/login.vue
  39. 8 1
      pages/public/login_account_number.vue
  40. 1 1
      pages/public/register.vue
  41. 3 0
      pages/sale/information.vue
  42. 3 0
      pages/sale/newsinfo.vue
  43. 3 0
      pages/sale/plant.vue
  44. 3 0
      pages/sale/portprice.vue
  45. 20 15
      store/index.js

+ 76 - 0
App.vue

@@ -7,6 +7,8 @@
 		mapMutations
 	} from 'vuex';
 	import appUpdate from 'common/appUpdate.js'
+	import app_push from './components/APPPush/app_push.js'
+	
 	export default {
 		methods: {
 			...mapMutations(['login'])
@@ -18,6 +20,80 @@
 			if(type == "android"){
 				appUpdate()
 			}
+			var that = this
+			plus.push.getClientInfoAsync((info) => {
+				var name = 'clientId'
+				var value = info.clientid
+				that.$store.commit('$uStore', {
+					name,
+					value
+				});
+				uni.setStorageSync("clientId",info.clientid)
+				console.log("info.clientid",info.clientid)
+			   }, err => {
+			});
+			// 监听在线消息事件  
+			plus.push.addEventListener( "receive", function( msg ) {  
+				let params = {
+					inApp: true, // app内横幅提醒
+					voice: true,    // 声音提醒
+					vibration: true,    // 振动提醒
+					messageType: '',
+					messageTitle: msg.title,
+					messageContent: msg.content,
+					messageImage: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/logo.png'
+				}
+				console.log("params",params)
+				new app_push({
+					...params
+				}).show();
+				var userInfo = uni.getStorageSync("userInfo")
+				var that = this
+				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
+						});
+					}
+				})
+			//其它逻辑  
+			}, false );
+			//监听系统通知栏消息点击事件  
+			plus.push.addEventListener('click', function(msg){  
+			    //处理点击消息的业务逻辑代码  
+				if(msg.content&&msg.content.contains("任务")){
+					uni.navigateTo({
+						url: '/pages/task/my_task'
+					})
+				}
+				else if(msg.content&&(msg.content.contains("合同")||msg.content.contains("交易"))){
+					uni.navigateTo({
+						url: '/pageB/contract/contract'
+					})
+				}
+				
+			}, false);  
 			// #endif
 			this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';

+ 347 - 0
components/APPPush/app_push.js

@@ -0,0 +1,347 @@
+export class appPush{
+	constructor(option = {}) {
+		console.log("appPush",option)
+		// app内横幅提醒
+		this.inApp = option.inApp;
+		// 声音提醒
+		this.voice = option.voice;
+		// 振动提醒
+		this.vibration = option.vibration;
+		// 消息分类
+		this.messageType = option.messageType || '';
+		// 通知标题
+		this.messageTitle = option.messageTitle || '';
+		// 时间
+		this.messageTime = option.messageTime || '现在';
+		// 通知文案
+		this.messageContent = option.messageContent || '';
+		// 缩略图
+		this.messageImage = option.messageImage || '';	
+		
+		
+	    this.screenWidth = plus.screen.resolutionWidth;
+	    this.screenHeight = plus.screen.resolutionHeight;
+	    // 比例
+	    this.propotation = this.screenWidth / 750
+	    //弹窗容器宽度
+	    this.popupViewWidth = this.propotation * 710;
+	    // 弹窗容器高度
+	    this.popupViewHeight = this.propotation * 192;
+	    // 弹窗容器的Padding
+	    this.viewContentPadding = this.propotation * 30;
+		// 弹框容器的宽度
+		this.viewContentWidth = parseInt(this.popupViewWidth - (this.viewContentPadding * 2))
+		// 弹框到顶部的距离
+		this.system = uni.getSystemInfoSync()
+		// 过度时间
+		this.duration = 200
+		// 关闭时间
+		this.closeTime = 5000
+		
+		console.log(this.inApp, this.voice, this.vibration)
+		
+		this.top = (this.propotation * 20) + this.system.statusBarHeight;
+		this.initTop = -this.system.statusBarHeight
+		
+		this.body = null;
+		this.bodyBg = null;
+		this.timer = null;
+		
+		this.flag = false
+		this.cur = {
+			x: 0,
+			y: 0,
+			pageX: 0,
+			pageY: 0
+		}
+		
+	}
+	
+	// 生成弹框主体
+	createView() {
+		console.log((this.propotation * 20) + this.system.statusBarHeight+ '--------------')
+		let view = new plus.nativeObj.View('popupView', {
+			// tag: 'rect',
+			top: (this.propotation * 20) + this.system.statusBarHeight,
+			left: this.propotation * 20,
+			height: this.popupViewHeight,
+			width: this.popupViewWidth
+		})
+		// 绘制白色背景
+		view.drawRect({
+			color:"#fff",
+			radius:"10px"
+		})
+		let viewContentList = [
+			{
+				src: '/static/push/message-icon.png',
+				id: 'icon',
+				tag: 'img',
+				position: {
+					top: this.viewContentPadding + "px",
+					left: this.viewContentPadding + "px",
+					width: (this.propotation * 24) + 'px',
+					height: (this.propotation * 24) + 'px',
+				}
+			},
+			{
+				tag: 'font',
+				id: 'pop-title',
+				text: this.messageType,
+				textStyles: {
+					size: (this.propotation * 24) + 'px',
+					align: "left",
+					color: "#4F555B"
+				},
+				position: {
+					top: this.viewContentPadding + "px",
+					left: (this.propotation * 64) + 'px',
+					height: (this.propotation * 24) + 'px',
+					width: this.viewContentWidth + "px",
+				}
+			},
+			{
+				tag: 'font',
+				id: 'time',
+				text: this.messageTime,
+				textStyles: {
+					size: (this.propotation * 24) + 'px',
+					align: "right",
+					color: "#4F555B"
+				},
+				position: {
+					top: this.viewContentPadding + "px",
+					left: this.viewContentPadding + "px",
+					height: (this.propotation * 24) + 'px',
+					width: this.viewContentWidth + "px",
+				}
+			},
+			{
+				tag: 'font',
+				id: 'push-title',
+				text: this.messageTitle,
+				textStyles: {
+					size: (this.propotation * 30) + 'px',
+					align: "left",
+					color: "#202123",
+					overflow: "ellipsis"
+				},
+				position: {
+					top: (this.propotation * 82) + 'px',
+					left: (this.propotation * 30) + 'px',
+					height: (this.propotation * 30) + 'px',
+					width: (this.propotation * 505) + 'px',
+				}
+			},
+			{
+				tag: 'font',
+				id: 'push-content',
+				text: this.messageContent,
+				textStyles: {
+					size: (this.propotation * 24) + 'px',
+					align: "left",
+					color: "#4F555B",
+					overflow: "ellipsis"
+				},
+				position: {
+					top: (this.propotation * 130) + 'px',
+					left: (this.propotation * 30) + 'px',
+					height: (this.propotation * 24) + 'px',
+					width: (this.propotation * 505) + 'px',
+				}
+			},
+			{
+				src: this.messageImage,
+				id: 'image',
+				tag: 'img',
+				position: {
+					top: (this.propotation * 68) + 'px',
+					// right: "0px",
+					left: (this.propotation * 586) + 'px',
+					width: (this.propotation * 100) + 'px',
+					height: (this.propotation * 100) + 'px',
+				}
+			},
+			{
+				src: '/static/push/img-bg.png',
+				id: 'img-bg',
+				tag: 'img',
+				position: {
+					top: (this.propotation * 68) + 'px',
+					// right: "0px",
+					left: (this.propotation * 586) + 'px',
+					width: (this.propotation * 100) + 'px',
+					height: (this.propotation * 100) + 'px',
+				}
+			},
+		]
+		view.draw(viewContentList)
+		// view.addEventListener("click",(e)=>{
+		// 	console.log('---------------------')
+		// });
+		view.addEventListener("touchstart", (event) => {
+			// console.log(event)
+			this.flag = true;  
+			var touch;  
+			if (event.touches) {  
+				touch = event.touches[0];  
+			} else {  
+				touch = event;  
+			}  
+			this.cur.x = touch.clientX;  
+			this.cur.y = touch.clientY;
+			this.cur.pageX = touch.pageX;
+			this.cur.pageY = touch.pageY;  
+		})
+		view.addEventListener("touchmove", (event) => {
+			// console.log(e)
+			var touch;  
+			if (event.touches) {  
+				touch = event.touches[0];  
+			} else {  
+				touch = event;
+			}  
+			let moveX = touch.pageX - this.cur.x;   
+			let moveY = touch.pageY - this.cur.y;   
+			let x = moveX;  
+			let y = moveY;
+			// console.log(x, y)
+			// console.log(this.cur, touch)
+			if (x < 0) {  
+				// x = 0;  
+			} else if (x > (this.popupViewWidth - this.popupViewWidth)) {  
+				// x = this.screenWidth - 40;  
+			}  
+			if (y < 0) {  
+				// y = 0;  
+			} else if (y >= ((this.propotation * 20) + this.system.statusBarHeight)) {  
+				y = ((this.propotation * 20) + this.system.statusBarHeight);  
+			}  
+			this.body.setStyle({  
+				top: y + 'px',  
+				left: x + 'px'  
+			});
+		})
+		/**
+		 * 这里有一个bug暂时无法解决,当用户快速往左滑时,滑动区域超出屏幕会监听不到touchend事件😂,很难被发现我就不解决了
+		 */
+		view.addEventListener("touchend", (event) => {
+			// console.log(this.cur, event)
+			var touch;
+			if (event.touches) {  
+				touch = event.touches[0];  
+			} else {  
+				touch = event;  
+			}
+			let differX = Math.abs(this.cur.pageX) - Math.abs(touch.pageX)
+			let differY = Math.abs(this.cur.pageY) - Math.abs(touch.pageY)
+			this.flag = false
+			// console.log(differX, differY)
+			if(Math.abs(differX) > 5 || Math.abs(differY) > 5) {	// 上下移动或左右移动超过5px则关闭弹窗
+				this.hide()
+			} else {	// 否则当作单击事件
+				console.log('-------------------')
+				this.hide()
+			}
+		})
+		this.body = view;
+		
+	// 	let bodyBg = new plus.nativeObj.View('bodyBg',{
+	// 		top: (this.propotation * 20) + this.system.statusBarHeight,
+	// 		left: this.propotation * 20,
+	// 		height: this.popupViewHeight,
+	// 		width: this.popupViewWidth,
+	// 		backgroundColor:'rgba(0, 0, 0, 1)',
+	// 	});
+	// 	bodyBg.draw([
+	// 	  {tag:'font',id:'confirm',text:'关闭关闭',textStyles:{color:'red',size:'16px'}},
+	// 	]);
+	
+	// 	bodyBg.addEventListener("click",(e)=>{
+	// 		console.log('---------------------')
+	// 	});
+	// 	this.bodyBg = bodyBg
+	}
+	// 显示/关闭弹框动画
+	modelAnimationOpenOrClose(type) {
+		var options = {type:type,duration:this.duration};
+		plus.nativeObj.View.startAnimation(options,this.body, () => {
+			// 关闭原生动画
+			plus.nativeObj.View.clearAnimation();
+		});
+	}
+	bgAnimationOpenOrClose(type) {
+		var options = {type:type,duration:this.duration};
+		plus.nativeObj.View.startAnimation(options,this.bodyBg, () => {
+			// 关闭原生动画
+			plus.nativeObj.View.clearAnimation();
+		});
+	}
+	// closeAnimation() {
+	// 	// push弹框距离最顶部的距离
+	// 	let top = (this.propotation * 20) + this.system.statusBarHeight
+	// 	// 完全隐藏时的顶部距离
+	// 	let hideTop = -this.system.statusBarHeight
+	// 	this.timer = setInterval(() => {
+	// 		this.top = this.top - 2
+	// 		if(this.top < hideTop * 2) {
+	// 			clearInterval(this.timer)
+	// 			this.timer = null
+	// 		}
+	// 		this.body.setStyle({
+	// 			top:this.top
+	// 		})
+	// 	}, 1)
+	// }
+	// 显示弹框
+	show() {
+		this.tips()
+		if(this.inApp) {
+			this.createView()
+			// this.modelAnimationOpenOrClose('slide-in-right')
+			this.body.show()
+			// this.bodyBg.show()
+			setTimeout(() => {
+				if(this.body) {
+					this.hide()
+				}
+			}, this.closeTime)
+		}
+	}
+	// 关闭弹框
+	hide() {
+		this.modelAnimationOpenOrClose('slide-out-right')
+		this.body.hide()
+		setTimeout(() => {
+			plus.nativeObj.View.clearAnimation();
+			this.body = null
+		}, this.duration)
+		// this.bgAnimationOpenOrClose('slide-out-right')
+		// this.bodyBg.hide()
+	}
+	// 调用系统提示音和振动
+	tips() {
+		if(this.voice) {
+			let system = uni.getSystemInfoSync().platform
+			if(system == 'ios') {
+				let player = plus.audio.createPlayer( "/static/audio/ios.mp3" );
+				player.play()
+			} else {
+				let main = plus.android.runtimeMainActivity();
+				let RingtoneManager = plus.android.importClass("android.media.RingtoneManager");
+				let uri = RingtoneManager.getActualDefaultRingtoneUri(main, RingtoneManager.TYPE_NOTIFICATION);
+				console.log(uri)
+				let MediaPlayer = plus.android.importClass("android.media.MediaPlayer");  
+				let player = MediaPlayer.create(main, uri);  
+				player.setLooping(false);  
+				player.prepare();  
+				player.start();
+			}
+		}
+		if(this.vibration) {
+			plus.device.vibrate()
+		}
+	}
+}
+
+export default appPush

+ 14 - 0
components/APPPush/index.js

@@ -0,0 +1,14 @@
+import app_push from './app_push.js'
+
+const appPush = {
+	install: function(Vue) {
+		Vue.prototype.$appPush = function(op = {}) {
+			console.log("进入appPush")
+			new app_push({
+				...op
+			}).show();
+		}
+	}
+}
+
+export default appPush

+ 4 - 4
components/code-elf-guide/code-elf-guide.vue

@@ -49,20 +49,20 @@
 			}
 		},
 		methods: {
-			launchFlag: function(){
+			launchFlag(){
 				/**
 				 * 向本地存储中设置launchFlag的值,即启动标识;
 				 */
 				uni.setStorage({
-						key: 'launchFlag',
-						data: true,
+					key: 'launchFlag',
+					data: true,
 				});
 				uni.switchTab({
 					url: '/pages/sale/information'
 				});
 				
 			},
-			swiperChange:function(e){
+			swiperChange(e){
 				this.currentSwiper=e.detail.current
 				if(e.detail.current==2){
 					this.show=true

+ 1 - 1
components/ossutil/crypto.js

@@ -103,7 +103,7 @@ var util = Crypto.util = {
 	bytesToBase64: function (bytes) {
 
 		// Use browser-native function if it exists
-		if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
+		// if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
 
 		var base64 = [],
 		    overflow;

+ 631 - 546
components/upload.vue

@@ -1,397 +1,402 @@
 <template>
 	<view class="u-upload" v-if="!disabled">
-		<view
-			v-if="showUploadList"
-			class="u-list-item u-preview-wrap"
-			v-for="(item, index) in lists"
-			:key="index"
-			:style="{
+		<view v-if="showUploadList" class="u-list-item u-preview-wrap" :class="{'customPreviewStyle':custom}"
+			v-for="(item, index) in lists" :key="index" :style="{
 				width: width + 'rpx',
 				height: width + 'rpx'
-			}"
-		>
-			<view
-				v-if="deletable"
-				class="u-delete-icon"
-				@tap.stop="deleteItem(index)"
-				:style="{
+			}">
+			<view v-if="deletable" class="u-delete-icon" @tap.stop="deleteItem(index)" :style="{
 					background: delBgColor
-				}"
-			>
+				}">
 				<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
 			</view>
-			<u-line-progress
-				v-if="showProgress && item.progress > 0 && !item.error"
-				:show-percent="false"
-				height="16"
-				class="u-progress"
-				:percent="item.progress"
-			></u-line-progress>
+			<u-line-progress v-if="showProgress && item.progress > 0 && !item.error" :show-percent="false" height="16"
+				class="u-progress" :percent="item.progress"></u-line-progress>
 			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点击重试</view>
-			<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image" v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image>
+			<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image" v-if="!item.isImage"
+				:src="item.url || item.path" :mode="imageMode"></image>
 		</view>
 		<slot name="file" :file="lists"></slot>
-		<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length">
+		<view style="display: inline-block;" :class="{'customStyle':custom}" @tap="selectFile"
+			v-if="maxCount > lists.length">
 			<slot name="addBtn"></slot>
-			<view
-				v-if="!customBtn"
-				class="u-list-item u-add-wrap"
-				hover-class="u-add-wrap__hover"
-				hover-stay-time="150"
-				:style="{
+			<img v-if="custom" :src="options.bgc" alt="" class="imgstyle">
+			<view class="u-list-item u-add-wrap" hover-class="u-add-wrap__hover" hover-stay-time="150" :style="{
 					width: width + 'rpx',
 					height: width + 'rpx'
-				}"
-			>
-				<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
-				<view class="u-add-tips">{{ uploadText }}</view>
+				}">
+				<u-icon v-if="custom" name="camera-fill" class="" size="100" color="#617E8B"></u-icon>
+				<u-icon v-if="!custom" name="plus" class="u-add-btn" size="40"></u-icon>
+				<view v-if="!custom" class="u-add-tips">{{ uploadText }}</view>
+				<view v-if="custom" class="u-add-tips">{{ options.text }}</view>
 			</view>
 		</view>
+		<!-- <view class="custom-style" v-if="custom"
+					:style="{backgroundImage: 'url(' + options.bgc + ')', backgroundSize:'100% 100%'}">
+
+		</view> -->
 	</view>
 </template>
 
 <script>
-/**
- * upload 图片上传
- * @description 该组件用于上传图片场景
- * @tutorial https://www.uviewui.com/components/upload.html
- * @property {String} action 服务器上传地址
- * @property {String Number} max-count 最大选择图片的数量(默认99)
- * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
- * @property {Boolean} show-progress 是否显示进度条(默认true)
- * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
- * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
- * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标
- * @property {String} del-bg-color 右上角关闭按钮的背景颜色
- * @property {String} del-color 右上角关闭按钮图标的颜色
- * @property {Object} header 上传携带的头信息,对象形式
- * @property {Object} form-data 上传额外携带的参数
- * @property {String} name 上传文件的字段名,供后端获取使用(默认file)
- * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
- * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
- * @property {Boolean} preview-full-image	是否可以通过uni.previewImage预览已选择的图片(默认true)
- * @property {Boolean} multiple	是否开启图片多选,部分安卓机型不支持(默认true)
- * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
- * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
- * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
- * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
- * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
- * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
- * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
- * @event {Function} on-oversize 图片大小超出最大允许大小
- * @event {Function} on-preview 全屏预览图片时触发
- * @event {Function} on-remove 移除图片时触发
- * @event {Function} on-success 图片上传成功时触发
- * @event {Function} on-change 图片上传后,无论成功或者失败都会触发
- * @event {Function} on-error 图片上传失败时触发
- * @event {Function} on-progress 图片上传过程中的进度变化过程触发
- * @event {Function} on-uploaded 所有图片上传完毕触发
- * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
- * @example <u-upload :action="action" :file-list="fileList" ></u-upload>
- */
+	/**
+	 * upload 图片上传
+	 * @description 该组件用于上传图片场景
+	 * @tutorial https://www.uviewui.com/components/upload.html
+	 * @property {String} action 服务器上传地址
+	 * @property {String Number} max-count 最大选择图片的数量(默认99)
+	 * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
+	 * @property {Boolean} show-progress 是否显示进度条(默认true)
+	 * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
+	 * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
+	 * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标
+	 * @property {String} del-bg-color 右上角关闭按钮的背景颜色
+	 * @property {String} del-color 右上角关闭按钮图标的颜色
+	 * @property {Object} header 上传携带的头信息,对象形式
+	 * @property {Object} form-data 上传额外携带的参数
+	 * @property {String} name 上传文件的字段名,供后端获取使用(默认file)
+	 * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
+	 * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
+	 * @property {Boolean} preview-full-image	是否可以通过uni.previewImage预览已选择的图片(默认true)
+	 * @property {Boolean} multiple	是否开启图片多选,部分安卓机型不支持(默认true)
+	 * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
+	 * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
+	 * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
+	 * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
+	 * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
+	 * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
+	 * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
+	 * @event {Function} on-oversize 图片大小超出最大允许大小
+	 * @event {Function} on-preview 全屏预览图片时触发
+	 * @event {Function} on-remove 移除图片时触发
+	 * @event {Function} on-success 图片上传成功时触发
+	 * @event {Function} on-change 图片上传后,无论成功或者失败都会触发
+	 * @event {Function} on-error 图片上传失败时触发
+	 * @event {Function} on-progress 图片上传过程中的进度变化过程触发
+	 * @event {Function} on-uploaded 所有图片上传完毕触发
+	 * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
+	 * @example <u-upload :action="action" :file-list="fileList" ></u-upload>
+	 */
 
-import uploadImage from '@/components/ossutil/uploadFile.js';
-export default {
-	name: 'upload',
-	props: {
-		//是否显示组件自带的图片预览功能
-		showUploadList: {
-			type: Boolean,
-			default: true
-		},
-		// 后端地址
-		action: {
-			type: String,
-			default: ''
-		},
-		// 最大上传数量
-		maxCount: {
-			type: [String, Number],
-			default: 52
-		},
-		//  是否显示进度条
-		showProgress: {
-			type: Boolean,
-			default: true
-		},
-		// 是否启用
-		disabled: {
-			type: Boolean,
-			default: false
-		},
-		// 预览上传的图片时的裁剪模式,和image组件mode属性一致
-		imageMode: {
-			type: String,
-			default: 'aspectFill'
-		},
-		// 头部信息
-		header: {
-			type: Object,
-			default() {
-				return {};
-			}
-		},
-		// 额外携带的参数
-		formData: {
-			type: Object,
-			default() {
-				return {};
-			}
-		},
-		// 上传的文件字段名
-		name: {
-			type: String,
-			default: 'file'
-		},
-		// 所选的图片的尺寸, 可选值为original compressed
-		sizeType: {
-			type: Array,
-			default() {
-				return ['original', 'compressed'];
-			}
-		},
-		sourceType: {
-			type: Array,
-			default() {
-				return ['album', 'camera'];
-			}
-		},
-		// 是否在点击预览图后展示全屏图片预览
-		previewFullImage: {
-			type: Boolean,
-			default: true
-		},
-		// 是否开启图片多选,部分安卓机型不支持
-		multiple: {
-			type: Boolean,
-			default: true
-		},
-		// 是否展示删除按钮
-		deletable: {
-			type: Boolean,
-			default: true
-		},
-		// 文件大小限制,单位为byte
-		maxSize: {
-			type: [String, Number],
-			default: Number.MAX_VALUE
-		},
-		// 显示已上传的文件列表
-		fileList: {
-			type: Array,
-			default() {
-				return [];
+	import uploadImage from '@/components/ossutil/uploadFile.js';
+	export default {
+		name: 'upload',
+		props: {
+			//是否显示组件自带的图片预览功能
+			showUploadList: {
+				type: Boolean,
+				default: true
+			},
+			// 后端地址
+			action: {
+				type: String,
+				default: ''
+			},
+			// 最大上传数量
+			maxCount: {
+				type: [String, Number],
+				default: 52
+			},
+			//  是否显示进度条
+			showProgress: {
+				type: Boolean,
+				default: true
+			},
+			// 是否启用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// 预览上传的图片时的裁剪模式,和image组件mode属性一致
+			imageMode: {
+				type: String,
+				default: 'aspectFill'
+			},
+			// 头部信息
+			header: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			// 额外携带的参数
+			formData: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			// 上传的文件字段名
+			name: {
+				type: String,
+				default: 'file'
+			},
+			// 所选的图片的尺寸, 可选值为original compressed
+			sizeType: {
+				type: Array,
+				default () {
+					return ['original', 'compressed'];
+				}
+			},
+			sourceType: {
+				type: Array,
+				default () {
+					return ['album', 'camera'];
+				}
+			},
+			// 是否在点击预览图后展示全屏图片预览
+			previewFullImage: {
+				type: Boolean,
+				default: true
+			},
+			// 是否开启图片多选,部分安卓机型不支持
+			multiple: {
+				type: Boolean,
+				default: true
+			},
+			// 是否展示删除按钮
+			deletable: {
+				type: Boolean,
+				default: true
+			},
+			// 文件大小限制,单位为byte
+			maxSize: {
+				type: [String, Number],
+				default: Number.MAX_VALUE
+			},
+			// 显示已上传的文件列表
+			fileList: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 上传区域的提示文字
+			uploadText: {
+				type: String,
+				default: '选择图片'
+			},
+			// 是否自动上传
+			autoUpload: {
+				type: Boolean,
+				default: true
+			},
+			// 是否显示toast消息提示
+			showTips: {
+				type: Boolean,
+				default: true
+			},
+			// 是否通过slot自定义传入选择图标的按钮
+			customBtn: {
+				type: Boolean,
+				default: false
+			},
+			// 内部预览图片区域和选择图片按钮的区域宽度,高等于宽
+			width: {
+				type: [String, Number],
+				default: 200
+			},
+			// 右上角关闭按钮的背景颜色
+			delBgColor: {
+				type: String,
+				default: '#fa3534'
+			},
+			// 右上角关闭按钮的叉号图标的颜色
+			delColor: {
+				type: String,
+				default: '#ffffff'
+			},
+			// 右上角删除图标名称,只能为uView内置图标
+			delIcon: {
+				type: String,
+				default: 'close'
+			},
+			// 如果上传后的返回值为json字符串,是否自动转json
+			toJson: {
+				type: Boolean,
+				default: true
+			},
+			// 上传前的钩子,每个文件上传前都会执行
+			beforeUpload: {
+				type: Function,
+				default: null
+			},
+			options: {
+				type: Object,
+				default: null
+			},
+			custom: {
+				type: Boolean,
+				default: false
 			}
+
 		},
-		// 上传区域的提示文字
-		uploadText: {
-			type: String,
-			default: '选择图片'
-		},
-		// 是否自动上传
-		autoUpload: {
-			type: Boolean,
-			default: true
-		},
-		// 是否显示toast消息提示
-		showTips: {
-			type: Boolean,
-			default: true
-		},
-		// 是否通过slot自定义传入选择图标的按钮
-		customBtn: {
-			type: Boolean,
-			default: false
-		},
-		// 内部预览图片区域和选择图片按钮的区域宽度,高等于宽
-		width: {
-			type: [String, Number],
-			default: 200
-		},
-		// 右上角关闭按钮的背景颜色
-		delBgColor: {
-			type: String,
-			default: '#fa3534'
-		},
-		// 右上角关闭按钮的叉号图标的颜色
-		delColor: {
-			type: String,
-			default: '#ffffff'
-		},
-		// 右上角删除图标名称,只能为uView内置图标
-		delIcon: {
-			type: String,
-			default: 'close'
-		},
-		// 如果上传后的返回值为json字符串,是否自动转json
-		toJson: {
-			type: Boolean,
-			default: true
-		},
-		// 上传前的钩子,每个文件上传前都会执行
-		beforeUpload: {
-			type: Function,
-			default: null
-		}
-	},
-	mounted() {},
-	data() {
-		return {
-			lists: [],
-			isInCount: true,
-			uploading: false
-		};
-	},
-	watch: {
-		fileList: {
-			immediate: true,
-			handler(val) {
-				val.map(value => {
-					this.lists.push({ url: value.url, error: false, progress: 100 });
-				});
+		mounted() {},
+		data() {
+			return {
+				lists: [],
+				isInCount: true,
+				uploading: false,
+				isSelectFile: false
+			};
+		},
+		watch: {
+			fileList: {
+				immediate: true,
+				handler(val) {
+					val.map(value => {
+						this.lists.push({
+							url: value.url,
+							error: false,
+							progress: 100
+						});
+					});
+				}
 			}
-		}
-	},
-	methods: {
-		// 清除列表
-		clear() {
-			this.lists = [];
-			// 如果是清空形式的话,发出"on-list-change"事件
-			this.$emit('on-list-change', this.lists);
-		},
-		// 重新上传队列中上传失败的所有文件
-		reUpload() {
-			this.uploadFile();
 		},
-		// 选择图片
-		selectFile() {
-			if (this.disabled) return;
-			const { name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType } = this;
-			let chooseFile = null;
-			const newMaxCount = maxCount - lists.length;
-			// 设置为只选择图片的时候使用 chooseImage 来实现
-			chooseFile = new Promise((resolve, reject) => {
-				uni.chooseImage({
-					count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
-					sourceType: sourceType,
-					sizeType,
-					success: resolve,
-					fail: reject
+		methods: {
+			// 清除列表
+			clear() {
+				this.lists = [];
+				// 如果是清空形式的话,发出"on-list-change"事件
+				this.$emit('on-list-change', this.lists);
+			},
+			// 重新上传队列中上传失败的所有文件
+			reUpload() {
+				this.uploadFile();
+			},
+			// 选择图片
+			selectFile() {
+				if (this.disabled) return;
+				const {
+					name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType
+				} = this;
+				let chooseFile = null;
+				const newMaxCount = maxCount - lists.length;
+				// 设置为只选择图片的时候使用 chooseImage 来实现
+				chooseFile = new Promise((resolve, reject) => {
+					uni.chooseImage({
+						count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
+						sourceType: sourceType,
+						sizeType,
+						success: resolve,
+						fail: reject
+					});
 				});
-			});
-			chooseFile
-				.then(res => {
-					let file = null;
-					let listOldLength = this.lists.length;
-					res.tempFiles.map((val, index) => {
-						// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理
-						if (!multiple && index >= 1) return;
-						if (val.size > maxSize) {
-							this.$emit('on-oversize', val, this.lists);
-							this.showToast('超出允许的文件大小');
-						} else {
-							if (maxCount <= lists.length) {
-								this.$emit('on-exceed', val, this.lists);
-								this.showToast('超出最大允许的文件个数');
-								return;
-							}
-							let fileName = '';
-							let fileNameLength='';
-							let fileFormat = '';
-							//#ifdef H5
+				chooseFile
+					.then(res => {
+						let file = null;
+						let listOldLength = this.lists.length;
+						res.tempFiles.map((val, index) => {
+							// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理
+							if (!multiple && index >= 1) return;
+							if (val.size > maxSize) {
+								this.$emit('on-oversize', val, this.lists);
+								this.showToast('超出允许的文件大小');
+							} else {
+								if (maxCount <= lists.length) {
+									this.$emit('on-exceed', val, this.lists);
+									this.showToast('超出最大允许的文件个数');
+									return;
+								}
+								let fileName = '';
+								let fileNameLength = '';
+								let fileFormat = '';
+								//#ifdef H5
 								fileName = val.name.lastIndexOf(".");
 								fileNameLength = val.name.length;
 								fileFormat = val.name.substring(fileName + 1, fileNameLength).toLowerCase();
-							//#endif
-							//#ifndef H5
+								//#endif
+								//#ifndef H5
 								fileName = val.path.lastIndexOf(".");
 								fileNameLength = val.path.length;
 								fileFormat = val.path.substring(fileName + 1, fileNameLength).toLowerCase();
-							//#endif
-							lists.push({
-								url: val.path,
-								fileType: fileFormat,
-								progress: 0,
-								error: false
-							});
-							// 列表发生改变,发出事件,第二个参数为当前发生变化的项的索引
-							this.$emit('on-list-change', this.lists);
-						}
+								//#endif
+								lists.push({
+									url: val.path,
+									fileType: fileFormat,
+									progress: 0,
+									error: false
+								});
+								// 列表发生改变,发出事件,第二个参数为当前发生变化的项的索引
+								this.$emit('on-list-change', this.lists);
+							}
+						});
+						// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去
+						this.$emit('on-choose-complete', this.lists);
+						if (this.autoUpload) this.uploadFile(listOldLength);
+					})
+					.catch(error => {
+						this.$emit('on-error', error);
 					});
-					// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去
-					this.$emit('on-choose-complete', this.lists);
-					if (this.autoUpload) this.uploadFile(listOldLength);
-				})
-				.catch(error => {
-					// this.$emit('on-error', error);
-				});
-		},
-		// 提示用户消息
-		showToast(message, force = false) {
-			if (this.showTips || force) {
-				uni.showToast({
-					title: message,
-					icon: 'none'
+			},
+			// 提示用户消息
+			showToast(message, force = false) {
+				if (this.showTips || force) {
+					uni.showToast({
+						title: message,
+						icon: 'none'
+					});
+				}
+			},
+			// 该方法供用户通过ref调用,手动上传
+			upload() {
+				this.uploadFile();
+			},
+			// 对失败的图片重新上传
+			retry(index) {
+				this.lists[index].progress = 0;
+				this.lists[index].error = false;
+				this.lists[index].response = null;
+				uni.showLoading({
+					title: '重新上传'
 				});
-			}
-		},
-		// 该方法供用户通过ref调用,手动上传
-		upload() {
-			this.uploadFile();
-		},
-		// 对失败的图片重新上传
-		retry(index) {
-			this.lists[index].progress = 0;
-			this.lists[index].error = false;
-			this.lists[index].response = null;
-			uni.showLoading({
-				title: '重新上传'
-			});
-			this.uploadFile(index);
-		},
-		// 上传图片
-		async uploadFile(index = 0) {
-			if (this.disabled) return;
-			if (this.uploading) return;
-			// 全部上传完成
-			if (index >= this.lists.length) {
-				this.$emit('on-uploaded', this.lists);
-				return;
-			}
-			// 检查上传地址
-			if (!this.action) {
-				this.showToast('请配置上传地址', true);
-				return;
-			}
-			// 检查是否是已上传或者正在上传中
-			if (this.lists[index].progress == 100) {
-				if (this.autoUpload == false) this.uploadFile(index + 1);
-				return;
-			}
-			// 执行before-upload钩子
-			if(this.beforeUpload && typeof(this.beforeUpload) === 'function') {
-				// 执行回调,同时传入索引和文件列表当作参数
-				let beforeResponse = this.beforeUpload(index, this.lists);
-				// 判断是否返回了promise
-				if (!!beforeResponse && typeof beforeResponse.then === 'function') {
-					await beforeResponse.then(res => {
-						// promise返回成功,不进行动作,继续上传
-					}).catch(err => {
-						// 进入catch回调的话,继续下一张
+				this.uploadFile(index);
+			},
+			// 上传图片
+			async uploadFile(index = 0) {
+				if (this.disabled) return;
+				if (this.uploading) return;
+				// 全部上传完成
+				if (index >= this.lists.length) {
+					this.isSelectFile = true
+					this.$emit('on-uploaded', this.lists);
+					return;
+				}
+				// 检查上传地址
+				if (!this.action) {
+					this.showToast('请配置上传地址', true);
+					return;
+				}
+				// 检查是否是已上传或者正在上传中
+				if (this.lists[index].progress == 100) {
+					if (this.autoUpload == false) this.uploadFile(index + 1);
+					return;
+				}
+				// 执行before-upload钩子
+				if (this.beforeUpload && typeof(this.beforeUpload) === 'function') {
+					// 执行回调,同时传入索引和文件列表当作参数
+					let beforeResponse = this.beforeUpload(index, this.lists);
+					// 判断是否返回了promise
+					if (!!beforeResponse && typeof beforeResponse.then === 'function') {
+						await beforeResponse.then(res => {
+							// promise返回成功,不进行动作,继续上传
+						}).catch(err => {
+							// 进入catch回调的话,继续下一张
+							return this.uploadFile(index + 1);
+						})
+					} else if (beforeResponse === false) {
+						// 如果返回false,继续下一张图片的上传
 						return this.uploadFile(index + 1);
-					})
-				} else if(beforeResponse === false) {
-					 // 如果返回false,继续下一张图片的上传
-					return this.uploadFile(index + 1);
+					}
 				}
-			}
-			this.lists[index].error = false;
-			this.uploading = true;
-			uploadImage(this.lists[index].url, 'appData/',
+				this.lists[index].error = false;
+				this.uploading = true;
+				uploadImage(this.lists[index].url, 'appData/',
 					result => {
 						// 上传成功
 						this.lists[index].response = result;
-						this.lists[index].progress = 0;
+						this.lists[index].progress = 100;
 						this.lists[index].error = false;
 						let data = result
 						this.$emit('on-success', data, index, this.lists);
@@ -401,216 +406,296 @@ export default {
 						this.$emit('on-change', data, index, this.lists);
 					}
 				)
-			// // 创建上传对象
-			// const task = uni.uploadFile({
-			// 	url: this.action,
-			// 	filePath: this.lists[index].url,
-			// 	name: this.name,
-			// 	formData: this.formData,
-			// 	header: this.header,
-			// 	success: res => {
-			// 		// 判断是否json字符串,将其转为json格式
-			// 		let data = this.toJson && this.checkIsJSON(res.data) ? JSON.parse(res.data) : res.data;
-			// 		if (![200, 201].includes(res.statusCode)) {
-			// 			this.uploadError(index, data);
-			// 		} else {
-			// 			// 上传成功
-			// 			this.lists[index].response = data;
-			// 			this.lists[index].progress = 0;
-			// 			this.lists[index].error = false;
-			// 			this.$emit('on-success', data, index, this.lists);
-			// 		}
-			// 	},
-			// 	fail: e => {
-			// 		this.uploadError(index, e);
-			// 	},
-			// 	complete: res => {
-			// 		uni.hideLoading();
-			// 		this.uploading = false;
-			// 		this.uploadFile(index + 1);
-			// 		this.$emit('on-change', res, index, this.lists);
-			// 	}
-			// });
-			// task.onProgressUpdate(res => {
-			// 	if (res.progress > 0) {
-			// 		this.lists[index].progress = res.progress;
-			// 		this.$emit('on-progress', res, index, this.lists);
-			// 	}
-			// });
-		},
-		// 上传失败
-		uploadError(index, err) {
-			this.lists[index].progress = 0;
-			this.lists[index].error = true;
-			this.lists[index].response = null;
-			this.$emit('on-error', err, index, this.lists);
-			this.showToast('上传失败,请重试');
-		},
-		// 删除一个图片
-		deleteItem(index) {
-			uni.showModal({
-				title: '提示',
-				content: '您确定要删除此项吗?',
-				success: res => {
-					if (res.confirm) {
-						if (this.lists[index].process < 100 && this.lists[index].process > 0) {
-							typeof this.lists[index].uploadTask != 'undefined' && this.lists[index].uploadTask.abort();
+				// 创建上传对象
+				const task = uni.uploadFile({
+					url: this.action,
+					filePath: this.lists[index].url,
+					name: this.name,
+					formData: this.formData,
+					header: this.header,
+					success: res => {
+						// 判断是否json字符串,将其转为json格式
+						let data = this.toJson && this.checkIsJSON(res.data) ? JSON.parse(res.data) : res
+							.data;
+						if (![200, 201].includes(res.statusCode)) {
+							this.uploadError(index, data);
+						} else {
+							// 上传成功
+							this.lists[index].response = data;
+							this.lists[index].progress = 100;
+							this.lists[index].error = false;
+							this.$emit('on-success', data, index, this.lists);
 						}
-						this.lists.splice(index, 1);
-						this.$forceUpdate();
-						this.$emit('on-remove', index, this.lists);
-						this.showToast('移除成功');
-						// 列表发生改变,发出事件
-						this.$emit('on-list-change', this.lists);
+					},
+					fail: e => {
+						this.uploadError(index, e);
+					},
+					complete: res => {
+						uni.hideLoading();
+						this.uploading = false;
+						this.uploadFile(index + 1);
+						this.$emit('on-change', res, index, this.lists);
 					}
+				});
+				task.onProgressUpdate(res => {
+					if (res.progress > 0) {
+						this.lists[index].progress = res.progress;
+						this.$emit('on-progress', res, index, this.lists);
+					}
+				});
+			},
+			// 上传失败
+			uploadError(index, err) {
+				this.lists[index].progress = 0;
+				this.lists[index].error = true;
+				this.lists[index].response = null;
+				this.$emit('on-error', err, index, this.lists);
+				this.showToast('上传失败,请重试');
+			},
+			// 删除一个图片
+			deleteItem(index) {
+				uni.showModal({
+					title: '提示',
+					content: '您确定要删除此项吗?',
+					success: res => {
+						if (res.confirm) {
+							this.isSelectFile = false
+							if (this.lists[index].process < 100 && this.lists[index].process > 0) {
+								typeof this.lists[index].uploadTask != 'undefined' && this.lists[index]
+									.uploadTask.abort();
+							}
+							this.lists.splice(index, 1);
+							this.$forceUpdate();
+							this.$emit('on-remove', index, this.lists);
+							this.showToast('移除成功');
+							// 列表发生改变,发出事件
+							this.$emit('on-list-change', this.lists);
+						}
+					}
+				});
+			},
+			// 用户通过ref手动的形式,移除一张图片
+			remove(index) {
+				// 判断索引的合法范围
+				if (index >= 0 && index < this.lists.length) {
+					this.lists.splice(index, 1);
+					this.$emit('on-list-change', this.lists);
 				}
-			});
-		},
-		// 用户通过ref手动的形式,移除一张图片
-		remove(index) {
-			// 判断索引的合法范围
-			if (index >= 0 && index < this.lists.length) {
-				this.lists.splice(index, 1);
-				this.$emit('on-list-change', this.lists);
-			}
-		},
-		// 预览图片
-		doPreviewImage(url, index) {
-			if (!this.previewFullImage) return;
-			const images = this.lists.map(item => item.url || item.path);
-			uni.previewImage({
-				urls: images,
-				current: url,
-				success: () => {
-					this.$emit('on-preview', url, this.lists);
-				},
-				fail: () => {
-					uni.showToast({
-						title: '预览图片失败',
-						icon: 'none'
-					});
-				}
-			});
-		},
-		// 判断是否json字符串
-		checkIsJSON(str) {
-			if (typeof str == 'string') {
-				try {
-					var obj = JSON.parse(str);
-					if (typeof obj == 'object' && obj) {
-						return true;
-					} else {
+			},
+			// 预览图片
+			doPreviewImage(url, index) {
+				if (!this.previewFullImage) return;
+				const images = this.lists.map(item => item.url || item.path);
+				uni.previewImage({
+					urls: images,
+					current: url,
+					success: () => {
+						this.$emit('on-preview', url, this.lists);
+					},
+					fail: () => {
+						uni.showToast({
+							title: '预览图片失败',
+							icon: 'none'
+						});
+					}
+				});
+			},
+			// 判断是否json字符串
+			checkIsJSON(str) {
+				if (typeof str == 'string') {
+					try {
+						var obj = JSON.parse(str);
+						if (typeof obj == 'object' && obj) {
+							return true;
+						} else {
+							return false;
+						}
+					} catch (e) {
 						return false;
 					}
-				} catch (e) {
-					return false;
 				}
+				return false;
 			}
-			return false;
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-// nvue不能用标签命名样式
-/* #ifndef APP-NVUE */
-image {
-	display: inline-block;
-	// 解决图片加载时可能会瞬间变形的问题
-	will-change: transform;
-}
+	// nvue不能用标签命名样式
+	/* #ifndef APP-NVUE */
+	image {
+		display: inline-block;
+		// 解决图片加载时可能会瞬间变形的问题
+		will-change: transform;
+	}
 
-view,
-text {
-	box-sizing: border-box;
-	flex-direction: row;
-}
-/* #endif */
-.u-upload {
-	display: flex;
-	flex-wrap: wrap;
-	align-items: center;
-}
+	view,
+	text {
+		box-sizing: border-box;
+		flex-direction: row;
+	}
+
+	/* #endif */
+	.u-upload {
+		display: flex;
+		flex-wrap: wrap;
+		align-items: center;
+	}
 
-.u-list-item {
-	width: 200rpx;
-	height: 200rpx;
-	overflow: hidden;
-	margin: 10rpx;
-	background: rgb(244, 245, 246);
-	position: relative;
-	border-radius: 10rpx;
-	display: inline-flex;
-	align-items: center;
-	justify-content: center;
-}
+	.u-list-item {
+		width: 200rpx;
+		height: 200rpx;
+		overflow: hidden;
+		margin: 10rpx;
+		background: rgb(244, 245, 246);
+		position: relative;
+		border-radius: 10rpx;
+		display: inline-flex;
+		align-items: center;
+		justify-content: center;
+	}
 
-.u-preview-wrap {
-	border: 1px solid rgb(235, 236, 238);
-}
+	.u-preview-wrap {
+		border: 1px solid rgb(235, 236, 238);
+	}
 
-.u-add-wrap {
-	flex-direction: column;
-	color: $u-content-color;
-	font-size: 28rpx;
-}
+	.u-add-wrap {
+		flex-direction: column;
+		color: $u-content-color;
+		font-size: 28rpx;
+	}
 
-.u-add-tips {
-	margin-top: 20rpx;
-}
+	.u-add-tips {
+		margin-top: 20rpx;
+	}
 
-.u-add-wrap__hover {
-	background-color: rgb(235, 236, 238);
-}
+	.u-add-wrap__hover {
+		background-color: rgb(235, 236, 238);
+	}
 
-.u-preview-image {
-	display: block;
-	width: 100%;
-	height: 100%;
-	border-radius: 10rpx;
-}
+	.u-preview-image {
+		display: block;
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+	}
 
-.u-delete-icon {
-	position: absolute;
-	top: 10rpx;
-	right: 10rpx;
-	z-index: 10;
-	background-color: $u-type-error;
-	border-radius: 100rpx;
-	width: 44rpx;
-	height: 44rpx;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
+	.u-delete-icon {
+		position: absolute;
+		top: 10rpx;
+		right: 10rpx;
+		z-index: 10;
+		background-color: $u-type-error;
+		border-radius: 100rpx;
+		width: 44rpx;
+		height: 44rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
 
-.u-icon {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
+	.u-icon {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
 
-.u-progress {
-	position: absolute;
-	bottom: 10rpx;
-	left: 8rpx;
-	right: 8rpx;
-	z-index: 9;
-	width: auto;
-}
+	.u-progress {
+		position: absolute;
+		bottom: 10rpx;
+		left: 8rpx;
+		right: 8rpx;
+		z-index: 9;
+		width: auto;
+	}
 
-.u-error-btn {
-	color: #ffffff;
-	background-color: $u-type-error;
-	font-size: 20rpx;
-	padding: 4px 0;
-	text-align: center;
-	position: absolute;
-	bottom: 0;
-	left: 0;
-	right: 0;
-	z-index: 9;
-	line-height: 1;
-}
+	.u-error-btn {
+		color: #ffffff;
+		background-color: $u-type-error;
+		font-size: 20rpx;
+		padding: 4px 0;
+		text-align: center;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 9;
+		line-height: 1;
+	}
+
+	// .custom-style {
+	// 	background: #F5F6FA;
+	// 	width: 100%;
+	// 	height: 480rpx;
+	// 	display: flex;
+	// 	justify-content: center;
+	// 	align-items: center;
+	// 	background: #F2F5FA;
+	// 	border-radius: 20rpx;
+	// 	border: 2px dashed #C6CBCE;
+	// }
+
+	// .custom-img {
+	// 	width: 120rpx;
+	// 	height: 100rpx;
+	// }
+
+	// .text {
+	// 	font-size: 18px;
+	// 	font-weight: 600;
+	// 	color: #617E8B;
+	// }
+
+	// .content {
+	// 	display: flex;
+	// 	justify-content: center;
+	// 	flex-direction: column;
+	// 	align-items: center;
+	// }
+
+	// .u-preview {
+	// 	width: 100%;
+	// 	height: 100%;
+	// 	// position: absolute;
+	// 	background: #F5F6FA;
+	// }
+
+	// .u-list-item-custom {
+	// 	margin: 0 !important;
+	// 	width: 100% !important;
+	// 	height: 100% !important;
+	// }
+	.customStyle {
+		width: 100% !important;
+		height: 440rpx !important;
+		// background: #F5F6FA;
+		// border-radius: 20rpx;
+		// border: 2px dashed #C6CBCE;
+		display: flex !important;
+		justify-content: center;
+		align-items: center;
+		position: relative;
+
+		.u-add-wrap {
+			width: 100% !important;
+			height: 100% !important;
+			background: transparent;
+		}
+
+		.u-add-tips {
+			font-size: 18px;
+			font-weight: 600;
+			color: #617E8B;
+		}
+	}
+
+	.customPreviewStyle {
+		width: 100% !important;
+		height: 440rpx !important;
+	}
+	.imgstyle{
+		width: 100% !important;
+		height: 440rpx !important;
+		position: absolute;
+	}
 </style>

+ 1 - 2
config/index.js

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

+ 2 - 1
main.js

@@ -14,7 +14,8 @@ import tarBar from './components/tarbar.vue'
 Vue.component('tar-bar', tarBar)
 import tran from './pages/tran/tran.vue'
 Vue.component('tran',tran)
-
+import appPush from './components/APPPush/index.js'
+Vue.use(appPush)
 import my from './pages/user/user.vue'
 Vue.component('my',my)
 // main.js

+ 1 - 1
pageA/freightTransport/addpaygoods.vue

@@ -192,7 +192,7 @@
 										title: '删除成功',
 										icon: 'none',
 										duration: 2000,
-										success: function() {debugger
+										success: function() {
 											that.getDetail(that.userInfo.infoId)
 										}
 									})

+ 1 - 1
pageA/freightTransport/addsendgoods.vue

@@ -150,7 +150,7 @@
 			},
 			commit() {
 				this.purchaseOrder.accountNumber= this.phone
-				this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {debugger
+				this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {
 					// if(res.data.code=='200'){
 					// 	uni.showModal({
 					// 		title: '提示',

+ 0 - 1
pageA/freightTransport/confirmpaygoods.vue

@@ -267,7 +267,6 @@
 									that.goods).then(
 									res => {
 										if (res.data.code == 200) {
-											debugger
 											console.log(that.goods)
 											uni.showModal({
 												content: '提交成功!',

+ 149 - 124
pageA/product/Identity_switching.vue

@@ -1,35 +1,46 @@
 <template>
-	
+
 	<view class="center">
 		<view v-for="(item , index) in lists" :Key="index">
-			<view class="forList">
+			<view class="forList" @click="definition(item)">
 				<view class="flex">
 					<view class="company" v-if="item.customerType == '企业'">{{item.customerType}}</view>
 					<view class="company1" v-if="item.customerType == '个人'">{{item.customerType}}</view>
 					<view class="guess-item" @click="navToDetailPage(item)">
-				</view>
-				
+					</view>
+
 					<view class="infos">
-	
-						<view class="info1">{{item.customerName}}
-							<view class='but but1' v-if="item.authenticationStatus == '已认证'">{{item.authenticationStatus}}</view>
-							<view class='but but2' v-if="item.authenticationStatus == '审核中'">{{item.authenticationStatus}}</view>
-							<view class='but but3' v-if="item.authenticationStatus == '未通过'">{{item.authenticationStatus}}</view>
-							<view class='but but4' v-if="item.authenticationStatus == '已覆盖'">{{item.authenticationStatus}}</view>
+
+						<view class="info1">
+							<view v-if="item.customerType == '企业'">{{item.compName}}</view>
+							<view v-if="item.customerType == '个人'">{{item.customerName}}</view>
+							<view class='but but1' v-if="item.authenticationStatus == '已认证'">
+								{{item.authenticationStatus}}
+							</view>
+							<view class='but but2' v-if="item.authenticationStatus == '审核中'">
+								{{item.authenticationStatus}}
+							</view>
+							<view class='but but3' v-if="item.authenticationStatus == '未通过'">
+								{{item.authenticationStatus}}
+							</view>
+							<view class='but but4' v-if="item.authenticationStatus == '已覆盖'">
+								{{item.authenticationStatus}}
+							</view>
 						</view>
-						<view class="info2">{{item.customerPhone}}</view>	
+						<view class="info2">{{item.customerPhone}}</view>
 					</view>
-	
+
 				</view>
-					<hr style="margin: 10px 0px;">
+				<hr style="margin: 10px 0px;">
 				<label>
-					<checkbox style='transform: scale(0.8);' :value='item.id' :checked="item.checked" @click.stop="checkBox($event,item)" ></checkbox>
+					<checkbox style='transform: scale(0.8);' :value='item.id' :checked="item.checked"
+						@click.stop="checkBox($event,item)"></checkbox>
 					<text>设置默认</text>
 				</label>
 			</view>
 		</view>
 	</view>
-	
+
 	</view>
 	</view>
 </template>
@@ -42,7 +53,7 @@
 		name: "buy",
 		data() {
 			return {
-				lists:[],
+				lists: [],
 				PageCur: "buy",
 				buyInfo: [],
 				pages: 1, //页数
@@ -53,28 +64,28 @@
 				scrollTop: 0,
 				TabCur: 0,
 				current: 1,
-				checked:false,
-				goodsName:'',
-				receivePrivate:'',
-				receiveCity:'',
-				receiveArea:'',
-				minimumVolume:'',
-				basis:'',
-				buyer:'',
-				unitPrice:'',
-				receiveWarehouse:'',
-				procurementPlanType:'',
-				procurementPlan:'',
+				checked: false,
+				goodsName: '',
+				receivePrivate: '',
+				receiveCity: '',
+				receiveArea: '',
+				minimumVolume: '',
+				basis: '',
+				buyer: '',
+				unitPrice: '',
+				receiveWarehouse: '',
+				procurementPlanType: '',
+				procurementPlan: '',
 				identityAuthenticationInfo: {
 					pageSize: 10,
 					currentPage: 1,
 					commonId: "",
-					
-					
+
+
 				},
 			};
 		},
-		onShow(){
+		onShow() {
 			this.getList()
 		},
 		onLoad(options) {
@@ -88,40 +99,47 @@
 			this.unitPrice = options.unitPrice
 			this.receiveWarehouse = options.receiveWarehouse
 			this.procurementPlanType = options.procurementPlanType
-			this.procurementPlan=options.procurementPlanNo
+			this.procurementPlan = options.procurementPlanNo
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			definition(item){
+				if (item.customerType == "企业") {
+					this.$store.commit('configfreightChoice', item.compName)
+				} else if (item.customerType == "个人") {
+					this.$store.commit('configfreightChoice', item.customerName)
+				}
+				uni.navigateBack(1)
+			},
 			getList() {
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
 				this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
 						pageSize: 10,
 						currentPage: 1,
 						commonId: this.userInfo.id,
-						flag:1
+						flag: 1
 					}, 'application/json;charset=UTF-8').then(res => {
-						if(res.data.code==200){
-							for(var i=0;i<res.data.data.records.length;i++){
-								if(res.data.data.records[i].defaultFlag!=1){
-									res.data.data.records[i].checked=false
-								}else{
-									res.data.data.records[i].checked=true
+						if (res.data.code == 200) {
+							for (var i = 0; i < res.data.data.records.length; i++) {
+								if (res.data.data.records[i].defaultFlag != 1) {
+									res.data.data.records[i].checked = false
+								} else {
+									res.data.data.records[i].checked = true
 								}
 							}
 							this.lists = res.data.data.records
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -130,35 +148,34 @@
 						}
 					});
 			},
-			checkBox(e,item){
-				for(var i=0;i<this.lists.length;i++){
-					this.lists[i].checked=true
+			checkBox(e, item) {
+				for (var i = 0; i < this.lists.length; i++) {
+					this.lists[i].checked = true
 				}
-				item.checked=true
+				item.checked = true
 				this.$api.doRequest('post', '/identityAuthenticationInfo/api/setDefault', {
-						id:item.id,
-						defaultFlag:1,
+						id: item.id,
+						defaultFlag: 1,
 						commonId: this.userInfo.id
 					}).then(res => {
-						if(res.data.code==200){
+						if (res.data.code == 200) {
 							// this.lists = res.data.data.records
-							
+
 							uni.navigateBack({
-							 
-							  delta: 1
-							 
-})
+
+								delta: 1
+
+							})
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -180,17 +197,17 @@
 			// },
 			navToDetailPage(item) {
 				// if (index == 1) {
-					uni.navigateTo({
-						url: `/pageA/product/business_buy?id=${item.id}&customerName=${item.customerName}&goodsName=${this.goodsName}
+				uni.navigateTo({
+					url: `/pageA/product/business_buy?id=${item.id}&customerName=${item.customerName}&goodsName=${this.goodsName}
 						&receivePrivate=${this.receivePrivate}&receiveCity=${this.receiveCity}&receiveArea=${this.receiveArea}&minimumVolume=${this.minimumVolume}&buyer=${this.buyer}&basisPrice=${this.basis}&unitPrice=${this.unitPrice}
 						&receiveWarehouse=${this.receiveWarehouse}&procurementPlanType=${this.procurementPlanType}&procurementPlanNo=${this.procurementPlan}`
-					})
-					},
-				// } else {
-				// 	uni.navigateTo({
-				// 		url: `/pageD/identity/driverIdentityLook`
-				// 	})
-				
+				})
+			},
+			// } else {
+			// 	uni.navigateTo({
+			// 		url: `/pageD/identity/driverIdentityLook`
+			// 	})
+
 
 			// }
 		}
@@ -220,68 +237,76 @@
 		line-height: 35px;
 		color: #22C572;
 		font-size: 12px;
-		
+
 	}
-	.company1{
-			width: 35px;
-			height: 35px;
-			background-color: #FEECE6;
-			font-size: 16px;
-			margin-top: 10px;
-			border-radius: 5px;
-			text-align: center;
-			line-height: 35px;
-			color:#FE6430;
-			font-size: 12px;
-		}
-	
-		.infos {
-			/* margin: 10px 20px; */
-			width: 100%;
-			display: inline-table;
-		}
-	
-		.info {
-			line-height: 20px;
-		}
-	
-		.but {
-			margin-right: 30px;
-			float: right;
-			font-size: 14px;
-			
-			background-color: #FFFFFF;
-		}
-		.but1{
-			color: #22C572 ;
-		}
-		.but2{
-			color:#FE6430;
-		}
-		.but3{
-			color:#FB1E1E;
-		}
-		.but4{
-			color:#AFB3BF;
-		}
-		.forList{
-			background-color: #FFFFFF;
-			padding: 10px 10px;
-			border-radius: 10px;
-			margin-top: 10px;
-		}
+
+	.company1 {
+		width: 35px;
+		height: 35px;
+		background-color: #FEECE6;
+		font-size: 16px;
+		margin-top: 10px;
+		border-radius: 5px;
+		text-align: center;
+		line-height: 35px;
+		color: #FE6430;
+		font-size: 12px;
+	}
+
+	.infos {
+		/* margin: 10px 20px; */
+		width: 100%;
+		display: inline-table;
+	}
+
+	.info {
+		line-height: 20px;
+	}
+
+	.but {
+		margin-right: 30px;
+		float: right;
+		font-size: 14px;
+
+		background-color: #FFFFFF;
+	}
+
+	.but1 {
+		color: #22C572;
+	}
+
+	.but2 {
+		color: #FE6430;
+	}
+
+	.but3 {
+		color: #FB1E1E;
+	}
+
+	.but4 {
+		color: #AFB3BF;
+	}
+
+	.forList {
+		background-color: #FFFFFF;
+		padding: 10px 10px;
+		border-radius: 10px;
+		margin-top: 10px;
+	}
+
 	/* 	.guess-item{
 			font-size: 18px;
 			margin-left: 20px;
 			font-weight: 700;
 		} */
-		.info1{
-			font-size: 18px;
-			margin-left: 20px;
-			font-weight: 700;
-		}
-		.info2{
-			margin-left: 20px;
-			color: #AFB3BF;
-		}
+	.info1 {
+		font-size: 18px;
+		margin-left: 20px;
+		font-weight: 700;
+	}
+
+	.info2 {
+		margin-left: 20px;
+		color: #AFB3BF;
+	}
 </style>

+ 30 - 19
pageA/product/business_buy.vue

@@ -216,7 +216,8 @@
 				unloadingFee: 0,
 				packingMoney: 0,
 				packing: '散装',
-				packingFee: 0
+				packingFee: 0,
+				// choice : false,
 			};
 		},
 		onLoad(options) {
@@ -240,25 +241,34 @@
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
+			
 		},
 		onShow() {
-			this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
-				commonId: this.userInfo.id
-			}).then(res => {
-				if (res.data.code == 200) {
-					this.goods = res.data.data
-					if (this.goods.customerTypeFlag == 1) {
-						this.purchaseOrder.invoiceFee = -20
-						this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) - Number(this
-							.purchaseOrder.invoiceFee)
-					} else {
-						this.purchaseOrder.invoiceFee = 0
-						this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) - Number(this
-							.purchaseOrder.invoiceFee)
-					}
+			if( this.$store.state.choice != "" ){
+				if(this.goods.customerTypeFlag==1){
+					this.goods.customerName = this.$store.state.choice
+				}else if(this.goods.customerTypeFlag==2){
+					this.goods.compName = this.$store.state.choice
 				}
-				uni.hideLoading()
-			})
+			}else{
+				this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
+					commonId: this.userInfo.id
+				}).then(res => {
+					if (res.data.code == 200) {
+						this.goods = res.data.data
+						if (this.goods.customerTypeFlag == 1) {
+							this.purchaseOrder.invoiceFee = -20
+							this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) - Number(this
+								.purchaseOrder.invoiceFee)
+						} else {
+							this.purchaseOrder.invoiceFee = 0
+							this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) - Number(this
+								.purchaseOrder.invoiceFee)
+						}
+					}
+					uni.hideLoading()
+				})
+			}	
 		},
 		methods: {
 			liang() {
@@ -343,7 +353,9 @@
 												icon: 'none',
 												duration: 2000,
 												success() {
-													uni.navigateBack(1)
+													setTimeout(()=>{
+														uni.navigateBack(1)
+													},2000)
 												}
 											})
 										} else {
@@ -388,7 +400,6 @@
 				})
 			},
 			someprice(e) {
-
 				if (this.purchaseOrder.pointPrice && this.purchaseOrder.invoiceFee && this.packingFee) {
 					this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) + Number(this.purchaseOrder
 						.pointPrice) + Number(this.purchaseOrder.invoiceFee) + Number(-this.packingFee)

+ 12 - 1
pageA/product/business_sale.vue

@@ -235,6 +235,13 @@
 				...mapState(['hasLogin','userInfo']),
 			},
 			onShow() {
+				if( this.$store.state.choice != "" ){
+					if(this.goods.customerTypeFlag==1){
+						this.goods.customerName = this.$store.state.choice
+					}else if(this.goods.customerTypeFlag==2){
+						this.goods.compName = this.$store.state.choice
+					}
+				}else{
 				this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
 					if(res.data.code==200){
 						this.goods=res.data.data
@@ -248,6 +255,7 @@
 					}
 					uni.hideLoading()
 				})
+				}
 			},
 			methods: {
 				liang(){
@@ -328,7 +336,10 @@
 													icon: 'none',
 													duration: 2000,
 													success() {
-														uni.navigateBack(1)
+														setTimeout(()=>{
+														uni.navigateBack(1)	
+														},2000)
+														
 													}
 												})
 											}

+ 7 - 0
pageB/contract/collectLook.vue

@@ -115,6 +115,13 @@
 		onShow() {
 			this.loaddata()
 		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.loaddata()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
 		onLoad(option) {
 			this.goods.goodsName = option.goodsName
 			this.goods.customer = option.contracter

+ 3 - 1
pageB/contract/contract.vue

@@ -175,7 +175,9 @@
 		},
 		onPullDownRefresh() {
 			this.getList()
-			uni.stopPullDownRefresh()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		methods: {
 			amendprice() {

+ 10 - 9
pageB/contract/contract_detail.vue

@@ -194,7 +194,6 @@
 		methods: {
 			DateChange(e) {
 				this.goods.sendDateStart = e.year + '-' + e.month + '-' + e.day
-				// this.goods.sendDateStart = e.detail.value
 			},
 			commit1(item) {
 				uni.navigateTo({
@@ -264,10 +263,10 @@
 							that.$api.doRequest('post', '/tranCarInfo/api/addTranTask', that.goods).then(
 								res => {
 									if (res.data.code == 200) {
-										uni.showToast({
-											title: '提交成功!',
-											icon: 'success',
-											duration: 2000,
+										uni.showModal({
+											content: '提交成功!',
+											cancelText: "返回",
+											confirmText: "继续添加",
 											success: function(res) {
 												setTimeout(() => {
 													var result = that.goods.tranCarNo
@@ -290,8 +289,7 @@
 														tare: '',
 														loadNetWeight: '',
 														loadPoundImg: '',
-														contractNo: that
-															.contractNo,
+														contractNo: that.contractNo,
 														goodsName: that.goodsName,
 														sendDateStart: ''
 													}
@@ -299,7 +297,8 @@
 														delta: 1
 													});
 												}, 2000)
-											}
+											},
+											
 										})
 									} else if (res.data.code == 11015) {
 										uni.showToast({
@@ -316,7 +315,9 @@
 										duration: 2000
 									})
 								});
-						} else if (res.cancel) {}
+						} else if (res.cancel) {
+							// setTimeout(()=>{uni.navigateBack({})},1000);
+						}
 					}
 				});
 			},

+ 24 - 12
pageB/contract/look.vue

@@ -71,12 +71,15 @@
 					@click="confirmunload(item)" >确认卸货</button>
 			</view>
 		</view>
-		<view class="addcarwrap">
+		<view class='footer'>
+			<button class="btn" @click="commit1(goods)">添加发车信息</button>
+		</view>
+		<!-- <view class="addcarwrap">
 				<view class="addcar" style="background-color: #FFFFFF;"
 					@click="commit1(goods)">
 					+
 					添加发车信息</view>
-		</view>
+		</view> -->
 		<view v-if='imgstatus' class='shade'>
 			<view class='shade-content'>
 				<image v-if='img' style='width:100px;height:100px;' :src='img'></image>
@@ -137,6 +140,13 @@
 		onShow() {
 			this.loaddata()
 		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.loaddata()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
 		onLoad(option) {
 			this.goods.goodsName = option.goodsName
 			this.goods.contracter = option.contracter
@@ -1039,15 +1049,17 @@
 		color: #FE6430;
 		background-color: #FEECE6;
 	}
-	.btn {
-		margin-top: 10px;
-		background-color: #FFFFFF;
-		border-radius: 25px;
-		border: none;
+	.footer {
+		position: fixed;
+		bottom: 0;
+		width: 90%;
+		padding: 20px 0;
 	}
-	
-	.btns {
-		background-color: #22C572;
+	.btn {
+		width: 90%;
+		background: #22C572;
+		color: #fff;
+		border-radius: 30px;
 	}
 	.poundlist{
 		width: 62px;
@@ -1065,7 +1077,7 @@
 	.unload{
 		
 	}
-	.addcarwrap{
+	/* .addcarwrap{
 		position:fixed;bottom:0;
 		width:100%;
 		left:0;
@@ -1077,5 +1089,5 @@
 		height:46px;
 		line-height:46px;
 		color:#00C265;
-	}
+	} */
 </style>

+ 3 - 0
pageB/news/news.vue

@@ -63,6 +63,9 @@
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadData()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		onReachBottom(){  //上拉触底函数
 		  if(!this.isLoadMore){  //此处判断,上锁,防止重复请求

+ 51 - 0
pageD/identity/companyIdentity.vue

@@ -6,6 +6,22 @@
 		</view>
 		<view v-if="consentStatus == true">
 			<view>
+				<upload
+					class="upload"
+					ref="upload"
+					:action="action"
+					:max-size="maxSize"
+					:max-count="1"
+					:size-type="['compressed']"
+					@on-success="getImgUrl"
+					@on-remove="onRemove"
+					@on-uploaded="isAdd = true"
+					:before-upload="filterFileType"
+					:options="uploadOptions"
+					:custom="uploadCustom"
+					@on-progress="onProgress"
+				></upload>
+				
 				<view style="margin: 0 auto;height: 240px;" v-if="license1 != ''" @click="license">
 					<image v-bind:src="license1" class="picture"></image>
 					<view class="floats" v-if="certificates == true">
@@ -62,13 +78,25 @@
 </template>
 
 <script>
+	import upload from '@/components/upload.vue';
 	import {
 		mapState
 	} from 'vuex';
 	export default {
+		components:{upload},
 		name: "buy",
 		data() {
 			return {
+				action: this.$uploadUrl,
+				maxSize: 20 * 1024 * 1024, //限制文件大小 2M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				imgUrls:[],
+				uploadCustom:true,
+				uploadOptions:{
+					"text":"上传营业执照",
+					"bgc":"../../static/img/authentication/business@3x.png"
+				},
 				tupian: "",
 				inputContent: null,
 				customerPhone: '',
@@ -99,6 +127,29 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+			getImgUrl(res) {
+				console.log(res)
+				this.imgUrls.push(res);
+			},
+			onProgress(e){
+				console.log('-----------------------')
+				console.log(e)
+			},
+			onRemove(index) {
+				this.imgUrls.splice(index, 1);
+			},
 			jumpUrl() {
 				if (this.consentStatus) {
 					if (!this.identityAuthenticationInfo.compName) {

+ 1 - 0
pageD/identity/companyIdentityEdit.vue

@@ -484,6 +484,7 @@
 	
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 	.switchs1{
 		font-size: 20px;

+ 6 - 12
pageD/identity/companyIdentityThree.vue

@@ -371,18 +371,12 @@
 																				icon: 'none',
 																				duration: 2000
 																			})
-																			uni.navigateTo({
-																				url: `/pages/attestation/indexTwo`,
+																			uni.navigateBack({
+																				delta:3
 																			})
 																		}
 																	})
-															} else if (res.cancel) {
-																uni.showToast({
-																	title: '提交失败',
-																	icon: 'none',
-																	duration: 2000
-																})
-															}
+															} 
 														}
 													});
 												} else if (res.data.code == 200) {
@@ -396,9 +390,8 @@
 																	icon: 'none',
 																	duration: 2000
 																})
-																uni.navigateTo({
-																	url: `/pages/attestation/indexTwo`,
-
+																uni.navigateBack({
+																	delta:3
 																})
 															}
 														})
@@ -527,6 +520,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 
 	.picture {

+ 1 - 0
pageD/identity/companyIdentityTwo.vue

@@ -217,6 +217,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 	.picture{
 		width: 100%;

+ 1 - 0
pageD/identity/driverIdentity.vue

@@ -528,6 +528,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 	.words{
 		font-size: 18px;

+ 1 - 0
pageD/identity/driverIdentityEdit.vue

@@ -812,6 +812,7 @@
 	}
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 .btn.commit{
 		color:#fff;

+ 5 - 29
pageD/identity/driverIdentityThree.vue

@@ -123,8 +123,8 @@
 																		icon: 'none',
 																		duration: 2000
 																	})
-																	uni.navigateTo({
-																		url: `/pages/attestation/indexThree`
+																	uni.navigateBack({
+																		delta:3
 																	})
 																} else if (res.data.code ==
 																	'ERROR002') {
@@ -132,25 +132,14 @@
 																		title: '提示',
 																		content: '司机身份证号重复,添加失败',
 																	});
-																	uni.navigateTo({
-																		url: `/pages/attestation/indexThree`
-																	})
 																} else if (res.data.code == 'ERROR003') {
 																	uni.showModal({
 																		title: '提示',
 																		content: '收款人身份证号重复,添加失败',
 																	});
-																	uni.navigateTo({
-																		url: `/pages/attestation/indexThree`
-																	})
+																	
 																}
 															})
-														} else if (res.cancel) {
-															uni.showToast({
-																title: '提交失败',
-																icon: 'none',
-																duration: 2000
-															})
 														}
 													}
 												});
@@ -162,34 +151,21 @@
 																icon: 'none',
 																duration: 2000
 															})
-															uni.navigateTo({
-																url: `/pages/attestation/indexThree`
+															uni.navigateBack({
+																delta:3
 															})
 														} else if (res.data.code =='ERROR002') {
 															uni.showModal({
 																title: '提示',
 																content: '司机身份证号重复,添加失败',
 															});
-															uni.navigateTo({
-																url: `/pages/attestation/indexThree`
-															})
 														} else if (res.data.code == 'ERROR003') {
 															uni.showModal({
 																title: '提示',
 																content: '收款人身份证号重复,添加失败',
 															});
-															uni.navigateTo({
-																url: `/pages/attestation/indexThree`
-															})
 														}
 													})
-												// } else if (res.cancel) {
-												// 	uni.showToast({
-												// 		title: '提交失败',
-												// 		icon: 'none',
-												// 		duration: 2000
-												// 	})
-												// }
 											}
 										}).catch(res => {
 											uni.showToast({

+ 1 - 2
pageD/identity/driverIdentityTwo.vue

@@ -530,13 +530,12 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 
 	.add {
 		width: 26px;
 		height: 26px;
-
-		/* background-image: url(../../static/img/jiaoyi/ic_fabu@3x.png); */
 	}
 
 	/* 清除 */

+ 8 - 6
pageD/myRelease/buyGrain.vue

@@ -205,16 +205,18 @@
 				typesType: ["现货", "期货"],
 				typesIndex: 0,
 				deptList: {
-					salePlanTypeKey: 0,
-					grainKey: 0,
-					gradeKey: 0,
-					packingTypeKey: 0,
-					freightPayerKey: 0,
+					// salePlanTypeKey: 0,
+					// grainKey: 0,
+					// gradeKey: 0,
+					// packingTypeKey: 0,
+					// freightPayerKey: 0,
 					priceType: "定价采购",
+					priceTypeKey: 2,
 					procurementPlanType: "现货",
+					procurementPlanTypeKey: 1,
 					grain: "",
 					grade: "",
-					outputYear: "",
+					// outputYear: "",
 					packingType: "",
 					freightPayer: "",
 				},

+ 26 - 9
pageD/myRelease/sellGrain.vue

@@ -202,12 +202,13 @@
 				typesIndex: 0,
 				deptList: {
 					salePlanType: '现货',
-					salePlanTypeKey: 0,
-					grainKey: 0,
-					gradeKey: 0,
-					packingTypeKey: 0,
-					freightPayerKey: -1,
+					salePlanTypeKey: 1,
+					// grainKey: 0,
+					// gradeKey: 0,
+					// packingTypeKey: 0,
+					// freightPayerKey: -1,
 					priceType: "定价销售",
+					priceTypeKey: 2,
 					 grain: "",
 					grade: "一等品",
 					packingType: "散装",
@@ -267,6 +268,13 @@
 			}
 		},
 		onShow() {
+			if( this.$store.state.choice != "" ){
+				if(this.goods.customerTypeFlag==1){
+					this.goods.customerName = this.$store.state.choice
+				}else if(this.goods.customerTypeFlag==2){
+					this.goods.compName = this.$store.state.choice
+				}
+			}else{
 			var that = this
 			this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
 				commonId: this.userInfo.id
@@ -281,6 +289,7 @@
 				}
 				uni.hideLoading()
 			})
+			}
 		},
 		methods: {
 			yearchange() {
@@ -620,11 +629,19 @@
 							that.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', that
 									.insertSalePlanInfo).then(res => {
 									if (res.data.code == 200) {
-										that.$api.msg('发布成功')
-										that.deptList = {}
-										uni.navigateTo({
-											url: `/pages/release/release`
+										uni.showToast({
+											title:'发布成功',
+											icon: 'none',
+											duration: 2000,
+											success() {
+												setTimeout(()=>{
+													uni.navigateTo({
+														url: `/pages/release/release`
+													})
+												},2000)
+											}
 										})
+										that.deptList = {}
 									} else {
 										uni.showToast({
 											title: res.data.message,

+ 98 - 83
pageD/warehousings/ex_warehouse.vue

@@ -219,7 +219,7 @@
 					pcFlag: 0,
 					contractNo: {},
 					carNo: {},
-					warehouseName:{},
+					warehouseName: {},
 				},
 				WarehouseInOutInfo1: {
 					contractNo: {},
@@ -235,7 +235,7 @@
 				maxSize: 5 * 1024 * 1024, //限制文件大小 5M
 				btnLoading: false, //防止重复点击
 				imgUrls: [],
-				binNumber:[],
+				binNumber: [],
 				warehouse: [],
 				warehouseIndex: -1,
 				warehouse1: [],
@@ -249,7 +249,7 @@
 				},
 				show: false,
 				license1: "",
-				ids:"",
+				ids: "",
 
 			}
 		},
@@ -267,23 +267,6 @@
 				}
 				return year + '-' + month + "-" + date1
 			},
-			// time:{
-			// 	var date = new Date()
-			// 	var year = date.getFullYear()
-			// 	var month = date.getMonth()
-			// 	var date1 = date.getDate()
-			// 	set() {
-			// 			if (month + 1 < 10) {
-			// 				month = "0" + (month + 1)
-			// 			}
-			// 			if (date1 + 1 < 10) {
-			// 				date1 = "0" + date1
-			// 			}
-			// 		},
-			// 		get() {
-			// 			return year + '-' + month + "-" + date1
-			// 		},
-			// },
 			startDate() {
 				return new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
 			},
@@ -303,9 +286,12 @@
 			this.WarehouseInOutInfo.warehouseName = option.warehouseName
 			this.getList(this.WarehouseInOutInfo.id)
 		},
-		onShow() {	
-			this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {contractNo:this.WarehouseInOutInfo.contractNo,warehouseType:1,}).then(res => {
-				 if(res.data.code==200){
+		onShow() {
+			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,
@@ -313,66 +299,88 @@
 						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) {
+								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
+							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
+									})
+								}
+							}
 						}
 					})
-				 }
-			})	
+				}
+			})
 		},
-		
+
 		methods: {
 			getList(id1) {
 				var that = this
 				this.$api.doRequest('get', '/warehouseInOutInfo/getInfo', {
 						id: id1
 					}).then(res => {
-						if(res.data.code == 200){
+						if (res.data.code == 200) {
 							this.WarehouseInOutInfo = res.data.data
-							if (this.WarehouseInOutInfo.warehouseInOutDetail != null ) {
-									this.list = this.WarehouseInOutInfo.warehouseInOutDetail
-								}
-								if(this.WarehouseInOutInfo.inOutTypeKey != null){
-										this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey
-								}
-							    if(this.WarehouseInOutInfo.warehouseNameKey != null){
-									this.warehouseIndex = this.WarehouseInOutInfo.warehouseNameKey
-								}
-								this.warehouseIndex1 = this.WarehouseInOutInfo.binNumberKey
-								
-								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) {
-										this.warehouseIndex = i
-										positionid = this.warehouselist[i].id
-									}
+							if (this.WarehouseInOutInfo.warehouseInOutDetail != null) {
+								this.list = this.WarehouseInOutInfo.warehouseInOutDetail
+							}
+							if (this.WarehouseInOutInfo.inOutTypeKey != null) {
+								this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey
+							}
+							if (this.WarehouseInOutInfo.warehouseNameKey != null) {
+								this.warehouseIndex = this.WarehouseInOutInfo.warehouseNameKey
+							}
+							this.warehouseIndex1 = this.WarehouseInOutInfo.binNumberKey
+
+							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) {
+									this.warehouseIndex = i
+									positionid = this.warehouselist[i].id
 								}
+							}
 							this.warehouseChange3(positionid)
-								for (var i = 0; i < this.warehouse1.length; i++) {
-									if (this.warehouse1[i] == this.WarehouseInOutInfo.binNumber) {
-										this.warehouseIndex1 = i
-									}
+							for (var i = 0; i < this.warehouse1.length; i++) {
+								if (this.warehouse1[i] == this.WarehouseInOutInfo.binNumber) {
+									this.warehouseIndex1 = i
 								}
+							}
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -381,27 +389,27 @@
 						}
 					});
 			},
-	 async warehouseChange3(id){
-			var that = this
-			this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-				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)
-					}
-					that.warehouse1 = arr
-					for(var i = 0 ; i < that.warehouse1.length ; i++){
-						if(that.warehouse1[i] == that.WarehouseInOutInfo.binNumber){
-							that.warehouseIndex1 = i
+			async warehouseChange3(id) {
+				var that = this
+				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+					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)
+						}
+						that.warehouse1 = arr
+						for (var i = 0; i < that.warehouse1.length; i++) {
+							if (that.warehouse1[i] == that.WarehouseInOutInfo.binNumber) {
+								that.warehouseIndex1 = i
+							}
 						}
 					}
-				}			
-			})
-			return 	that.warehouse1
-		},
+				})
+				return that.warehouse1
+			},
 			warehouseChange(e) {
 				var id = ''
 				this.warehouseIndex = e.detail.value
@@ -414,7 +422,7 @@
 				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
 					id: id,
 				}).then(res => {
-					this.binNumber=res.data.data
+					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])
@@ -429,8 +437,8 @@
 				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
+					if (this.binNumber[i].binNumber == this.warehouse1[this.warehouseIndex1]) {
+						this.WarehouseInOutInfo.baseId = this.binNumber[i].baseId
 					}
 				}
 			},
@@ -503,8 +511,8 @@
 						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
 				}
@@ -565,6 +573,9 @@
 				if (this.imgUrls.length > 0) {
 					this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
 				}
+				console.log(this.WarehouseInOutInfo)
+				return
+				
 				this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
 					if (res.data.code == 200) {
 						uni.showToast({
@@ -660,8 +671,8 @@
 						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
 				}
@@ -720,12 +731,16 @@
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
-				// this.WarehouseInOutInfo.baseId=0
+				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: "正在提交"
 				})
-
+			
 				this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
 					if (res.data.code == 200) {
 						uni.showToast({

+ 8 - 5
pageD/warehousings/warehousings.vue

@@ -78,7 +78,7 @@
 				<view class="c-row b-b">
 					<text class="tit">入库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
-						<view >
+						<view v-model="WarehouseInOutInfo.inOutType">
 							 {{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
 						</view>
 					</picker>
@@ -211,6 +211,8 @@ import upload from '@/components/upload.vue';
 					pcFlag: 0,
 					contractNo: {},
 					carNo: {},
+					inOutType:'采购入库',
+					inOutTypeKey:1,
 				},
 				WarehouseInOutInfo1: {
 					contractNo: {},
@@ -219,7 +221,7 @@ import upload from '@/components/upload.vue';
 				pinIndex: -1,
 				pinTypes: '',
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				ruIndex: -1,
+				ruIndex: 0,
 				rutypes: '',
 				warehouse:[],
 				warehouseIndex:-1,
@@ -295,7 +297,7 @@ import upload from '@/components/upload.vue';
 										})
 								 	}
 								 }
-						 		 this.warehouse=arr
+						 		 // this.warehouse=arr
 						 	 }
 						 })
 					 }
@@ -338,8 +340,9 @@ import upload from '@/components/upload.vue';
 					if(this.WarehouseInOutInfo.inOutTypeKey != null){
 						this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
 					}
-					
-					this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
+					if(this.WarehouseInOutInfo.deductionAmount!=null){
+						this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
+					}
 				})
 				.catch(res => {
 					if(res.errmsg){

+ 3 - 3
pages.json

@@ -351,7 +351,7 @@
 			"path": "pages/business/business",
 			"style": {
 				"navigationBarTitleText": "交易",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": true
 			}
 
 		}, {
@@ -797,7 +797,7 @@
 					"path": "news/news_detail",
 					"style": {
 						"navigationBarTitleText": "新闻",
-						"enablePullDownRefresh": true
+						"enablePullDownRefresh": false
 					}
 				},
 				{
@@ -1064,7 +1064,7 @@
 			"pages": [{
 					"path": "search/search",
 					"style": {
-						"enablePullDownRefresh": true,
+						"enablePullDownRefresh": false,
 						"navigationBarTitleText": "",
 						"navigationStyle": "custom",
 						"app-plus": {

+ 6 - 3
pages/attestation/indexThree.vue

@@ -82,8 +82,8 @@
 
 
 		</view>
-		<view>
-			<button class="btn btns" @click="Add">新增</button>
+		<view v-if="drivers.length==0">
+			<button class="btn btns"  @click="Add">新增</button>
 		</view>
 	</view>
 </template>
@@ -115,7 +115,9 @@
 		},
 		onPullDownRefresh() {
 			this.getList()
-			uni.stopPullDownRefresh()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		methods: {
 			resend() {
@@ -463,6 +465,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 
 	.but {

+ 13 - 3
pages/attestation/indexTwo.vue

@@ -81,7 +81,7 @@
 				</view>
 			</view>
 		</view>
-		<button class="btn btns" @click="Add">新增</button>
+		<button class="btns btn" @click="Add">新增</button>
 	</view>
 </template>
 
@@ -111,12 +111,14 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
-		onLoad() {
+		onShow() {
 			this.getList()
 		},
 		onPullDownRefresh() {
 			this.getList()
-			uni.stopPullDownRefresh()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		methods: {
 			resend() {
@@ -186,6 +188,7 @@
 				})
 			},
 			getList() {
+				console.log(this.userInfo)
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
 				this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
 						pageSize: 10,
@@ -199,6 +202,12 @@
 								res.data.data.records[i].basis = "true"
 							}
 						}
+						var data = res.data.data.records
+						for(var i=0;i<data.length;i++){
+							if(data[i].compName.length > 10){
+								data[i].compName = data[i].compName.substring(0,10) + "..."
+							}
+						}
 						this.businessman = res.data.data.records
 
 					})
@@ -556,6 +565,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 
 	.shade-content {

+ 3 - 0
pages/business/business.vue

@@ -175,6 +175,9 @@
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadData()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		onReachBottom() { //上拉触底函数
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求

+ 6 - 6
pages/index/index.vue

@@ -19,7 +19,7 @@
 			this.loadExecution()
 		},
 		methods: {
-			loadExecution: function(){
+			loadExecution(){
 				/**
 				 * 获取本地存储中launchFlag的值
 				 * 若存在,说明不是首次启动,直接进入首页;
@@ -29,9 +29,13 @@
 					// 获取本地存储中launchFlag标识
 				    const value = uni.getStorageSync('launchFlag');
 				    if (value) {
+						uni.setStorage({
+							key: 'launchFlag',
+							data: true,
+						});
 						// launchFlag=true直接跳转到首页
 						uni.switchTab({
-							url: '/pages/tabBar/component/component'
+							url: '/pages/sale/information'
 						});
 				    } else {
 						// launchFlag!=true显示引导页
@@ -48,10 +52,6 @@
 					}); 
 					this.guidePages = true
 				}
-				return;
-				uni.switchTab({
-				    url: '/pages/tabBar/component/component'
-				});
 			}
 		}
 	}

+ 1 - 1
pages/public/code.vue

@@ -169,7 +169,7 @@
 						title: '登录中',
 						mask:true
 					})
-					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
+					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList,cid:this.clientId}).then(res => {
 					    if(res.data.code==200){
 							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",

+ 6 - 0
pages/public/login.vue

@@ -27,6 +27,9 @@
 	} from 'vuex';
 	import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
 	import { queryData, upData, initData } from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -61,6 +64,9 @@
 				codestatus:false
 			}
 		},
+		computed: {
+			...mapState(['clientId'])
+		},
 		onShow() {
 			// this.loginType = "wechat"
 			this.$api.logout()

+ 8 - 1
pages/public/login_account_number.vue

@@ -32,6 +32,9 @@
 	} from 'vuex';
 	import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
 	import { queryData, upData, initData } from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -65,6 +68,9 @@
 				canIUseProfile:false
 			}
 		},
+		computed: {
+			...mapState(['clientId'])
+		},
 		onShow() {
 			// this.loginType = "wechat"
 			this.$api.logout()
@@ -96,7 +102,8 @@
 					title: '登录中',
 					mask:true
 				})
-				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
+				console.log("clinetId",this.clientId)
+				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 					if(res.data.code==200){
 						uni.setStorageSync('userInfo', res.data.data)
 						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",

+ 1 - 1
pages/public/register.vue

@@ -218,7 +218,7 @@
 							title: '登录中',
 							mask:true
 						})
-						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
+						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 							
 							if(res.data.code==200){
 								// pc登录

+ 3 - 0
pages/sale/information.vue

@@ -249,6 +249,9 @@
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadData()
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])

+ 3 - 0
pages/sale/newsinfo.vue

@@ -120,6 +120,9 @@
 				this.isLoadMore = false
 				this.loadStatus = 'loading'
 				this.loadData()
+				setTimeout(function () {
+					uni.stopPullDownRefresh();
+				}, 1000);
 			},
 			computed: {
 				...mapState(['hasLogin', 'userInfo'])

+ 3 - 0
pages/sale/plant.vue

@@ -133,6 +133,9 @@
 				this.isLoadMore = false
 				this.loadStatus = 'loading'
 				this.loadData()
+				setTimeout(function () {
+					uni.stopPullDownRefresh();
+				}, 1000);
 			},
 			computed: {
 				...mapState(['hasLogin', 'userInfo'])

+ 3 - 0
pages/sale/portprice.vue

@@ -137,6 +137,9 @@
 				this.isLoadMore = false
 				this.loadStatus = 'loading'
 				this.loadData()
+				setTimeout(function () {
+					uni.stopPullDownRefresh();
+				}, 1000);
 			},
 			computed: {
 				...mapState(['hasLogin', 'userInfo'])

+ 20 - 15
store/index.js

@@ -21,20 +21,20 @@ const saveLifeData = function(key, value) {
 		let tmp = uni.getStorageSync('lifeData');
 		// 第一次打开APP,不存在lifeData变量,故放一个{}空对象
 		tmp = tmp ? tmp : {};
-		if(key == 'contractTip' && tmp[key] < value){
-			uni.vibrateLong({
-			    success: function () {
-			        console.log('震动成功');
-			    }
-			});
-		}
-		if(key == 'taskTip' && tmp[key] < value){
-			uni.vibrateLong({
-			    success: function () {
-			        console.log('震动成功');
-			    }
-			});
-		}
+		// if(key == 'contractTip' && tmp[key] < value){
+		// 	uni.vibrateLong({
+		// 	    success: function () {
+		// 	        console.log('震动成功');
+		// 	    }
+		// 	});
+		// }
+		// if(key == 'taskTip' && tmp[key] < value){
+		// 	uni.vibrateLong({
+		// 	    success: function () {
+		// 	        console.log('震动成功');
+		// 	    }
+		// 	});
+		// }
 		tmp[key] = value;
 		// 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中
 		uni.setStorageSync('lifeData', tmp);
@@ -86,7 +86,8 @@ const store = new Vuex.Store({
 		],
 		clientId: lifeData.clientId?lifeData.clientId: "",
 		// 确定收货
-		isConfigfreightTransport:false
+		isConfigfreightTransport:false,
+		choice:""
 	},
 	mutations: {
 		$uStore(state, payload) {
@@ -121,8 +122,12 @@ const store = new Vuex.Store({
 		},
 		configfreightTransport(state,flag){
 			state.isConfigfreightTransport = flag
+		},
+		configfreightChoice(state,val){
+			state.choice = val
 		}
 		
+		
 	},
 	actions: {