浏览代码

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

ccjgmwz 3 年之前
父节点
当前提交
0f754bd01c
共有 4 个文件被更改,包括 60 次插入37 次删除
  1. 16 8
      pageD/warehousings/warehousings.vue
  2. 3 4
      pages/user/setUp.vue
  3. 23 14
      pages/user/set_nickname.vue
  4. 18 11
      pages/user/set_picture.vue

+ 16 - 8
pageD/warehousings/warehousings.vue

@@ -78,7 +78,8 @@
 					<text class="tit">入库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
 						<view >
-							{{ruIndex>-1?ruType[ruIndex]:'请选择入库类型'}}
+							{{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
+							
 						</view>
 					</picker>
 				</view>
@@ -218,7 +219,7 @@ import upload from '@/components/upload.vue';
 				pinIndex: 0,
 				pinTypes: '',
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				ruIndex: '采购入库',
+				ruIndex: -2,
 				rutypes: '',
 				warehouse:[],
 				warehouseIndex:-1,
@@ -297,6 +298,7 @@ import upload from '@/components/upload.vue';
 										})
 								 	}
 								 }
+						 		 this.warehouse=arr
 						 	 }
 						 })
 					 }
@@ -314,7 +316,6 @@ import upload from '@/components/upload.vue';
 			this.WarehouseInOutInfo.addressUrl = option.addressUrl
 			this.WarehouseInOutInfo.binNumber = option.binNumber
 			this.WarehouseInOutInfo.inOutDate = option.inOutDate
-			debugger
 			var date=new Date()
 			var year=date.getFullYear()
 			var month=date.getMonth()
@@ -369,11 +370,12 @@ import upload from '@/components/upload.vue';
 				this.warehouseIndex1=e.detail.value
 				this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
 				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
-				for (var i = 0; i < this.binNumber.length; i++) {
-					if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
-						this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
-					}
-				}
+				// for (var i = 0; i < this.WarehouseInOutInfo.binNumber.length; i++) {
+				// 	if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
+				// 		this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
+				// 	}
+				// }
+	
 			},
 			DateChange(e) {
 				this.WarehouseInOutInfo.inOutDate=e.year+'-'+e.month+'-'+e.day
@@ -665,6 +667,12 @@ import upload from '@/components/upload.vue';
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
+				debugger
+				for(let i = 0 ;i < this.warehouselist.length ; i++){
+					if(this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName){
+						this.WarehouseInOutInfo.baseId = this.warehouselist[i].id
+					}
+				}
 				this.WarehouseInOutInfo.taskType = "入库任务"
 				uni.showLoading({
 					title:"正在提交"

+ 3 - 4
pages/user/setUp.vue

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

+ 23 - 14
pages/user/set_nickname.vue

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

+ 18 - 11
pages/user/set_picture.vue

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