소스 검색

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

ccjgmwz 3 년 전
부모
커밋
0eedcbca2f

+ 3 - 1
common/helper.js

@@ -1,5 +1,6 @@
 const selectContractNo = {}
 const selectContractNo = {}
 const detailData = {}
 const detailData = {}
+const erpWarehouse={}
 const now = Date.now || function () {  
 const now = Date.now || function () {  
     return new Date().getTime();  
     return new Date().getTime();  
 };  
 };  
@@ -11,5 +12,6 @@ export default {
 	detailData,
 	detailData,
 	selectContractNo,
 	selectContractNo,
     now,  
     now,  
-    isArray  
+    isArray,
+	erpWarehouse
 }
 }

+ 68 - 32
pages/erp/index.vue

@@ -2,20 +2,20 @@
 	<view class="wrap">
 	<view class="wrap">
 		<view class='title'>仓库管理</view>
 		<view class='title'>仓库管理</view>
 		<view class="dropdown">
 		<view class="dropdown">
-			<view class="left"  @click='show1=true'>
+			<view class="left" @click='show1=true'>
 				<view>{{warehouseName}}</view>
 				<view>{{warehouseName}}</view>
 				<u-icon name="arrow-right" color=""></u-icon>
 				<u-icon name="arrow-right" color=""></u-icon>
-				<u-select v-model="show1" :default-value='[0]' :list="warehouseList" @confirm="confirmWarehouse">
-				</u-select>
+				<u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
+					:range="warehouseList"></u-picker>
 			</view>
 			</view>
-			<view class="right"  @click='show2=true'>
-				<view>{{positionName}}</view>
+			<view class="right" @click='show2=true'>
+				<view>{{binNumber}}</view>
 				<u-icon name="arrow-right" color=""></u-icon>
 				<u-icon name="arrow-right" color=""></u-icon>
-				<u-select v-model="show2" :default-value='[0]' :list="positionList" @confirm="confirmPositon">
-				</u-select>
+				<u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
+					:range="warehouseCWList"></u-picker>
 			</view>
 			</view>
 		</view>
 		</view>
-		
+
 		<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
 		<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
 			<view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
 			<view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
 				v-if="index<gridCol*2">
 				v-if="index<gridCol*2">
@@ -26,35 +26,30 @@
 				<text>{{item.name}}</text>
 				<text>{{item.name}}</text>
 			</view>
 			</view>
 		</view>
 		</view>
+		<u-modal v-model="isShowAlert" confirm-color='#22C572' confirm-text='立即开通' title='您尚未开通ERP业务'
+			:content="content"></u-modal>
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
 	import {
 	import {
 		mapState
 		mapState
 	} from 'vuex';
 	} from 'vuex';
-
+import helper from '@/common/helper.js'; 
 	export default {
 	export default {
 		components: {
 		components: {
 
 
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				show1:false,
-				show2:false,
-				warehouseName: '鲅鱼圈一号库',
-				positionName: '102仓位',
-					warehouseList: [
-						{
-						"label": '1',
-						"value": '1'
-						}
-					],
-					positionList: [
-						{
-						"label": '102仓位',
-						"value": '1'
-						}
-					],
+				show1: false,
+				show2: false,
+				isShowAlert: false,
+				content: '易粮易运ERP系统包含合同管理、仓库管理、运输管理、结算管理等多个模块,可为粮企提供粮食贸易的全流程服务,平台诚邀您的加入。',
+				warehouseName: '',
+				binNumber: '',
+				compId:'',
+				warehouseList: [],
+				warehouseCWList:[],
 				gridCol: 4,
 				gridCol: 4,
 				gridBorder: false,
 				gridBorder: false,
 				gridList: [{
 				gridList: [{
@@ -116,7 +111,7 @@
 		},
 		},
 
 
 		onLoad() {
 		onLoad() {
-
+			this.init()
 		},
 		},
 		// #ifndef MP
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
 		onNavigationBarButtonTap(e) {
@@ -162,7 +157,6 @@
 					})
 					})
 				}
 				}
 			})
 			})
-			console.log("hasLogin", this.hasLogin)
 		},
 		},
 		methods: {
 		methods: {
 			/**
 			/**
@@ -197,14 +191,53 @@
 					})
 					})
 				} else {
 				} else {
 					if (item.url) {
 					if (item.url) {
+						helper.erpWarehouse = {
+							warehouseName:this.warehouseName,
+							binNumber:this.binNumber,
+							compId:this.compId
+							
+						}
 						uni.navigateTo({
 						uni.navigateTo({
 							url: item.url
 							url: item.url
 						})
 						})
 					}
 					}
 				}
 				}
 			},
 			},
-			confirmWarehouse(){},
-			confirmPositon(){}
+			confirmWarehouse() {},
+			confirmPositon() {},
+			init() {
+				console.log(this.userInfo)
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
+					compId: '',
+				}).then(res => {
+					if (res.data.data) {
+						console.log('res',res.data.data)
+						if (res.data.data.length == 0) {
+							this.isShowAlert = true
+						} else {
+							this.warehouseName = res.data.data[0].warehouseName
+							this.warehouseList = res.data.data;
+							this.compId = res.data.data[0].compId
+							this.binNumber = res.data.data[0].positionInfos[0].binNumber
+							this.warehouseCWList = res.data.data[0].positionInfos
+							console.log('this.warehouseCWList',this.warehouseCWList)
+							// this.makeBinNumber()
+						}
+					}
+				})
+			},
+			makeBinNumber(){
+			
+			},
+			warehousechange(e) {
+				this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.compId = this.warehouseList[e[0]].compId
+				this.warehouseCWList = this.warehouseList[e[0]].positionInfos
+				console.log(e)
+			},
+			warehouseCWchange(e){
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+			}
 
 
 		}
 		}
 	}
 	}
@@ -300,11 +333,14 @@
 		top: 4px;
 		top: 4px;
 		margin-right: 6px;
 		margin-right: 6px;
 	}
 	}
-	.dropdown{
+
+	.dropdown {
 		display: flex;
 		display: flex;
-		margin:20rpx 0;
+		margin: 20rpx 0;
 		justify-content: space-between;
 		justify-content: space-between;
-		.left,.right{
+
+		.left,
+		.right {
 			display: flex;
 			display: flex;
 		}
 		}
 	}
 	}

+ 10 - 5
pages/erp/warehousing/warehousing.vue

@@ -1,8 +1,8 @@
 <template>
 <template>
 	<view class="warp">
 	<view class="warp">
 		<view class="top">
 		<view class="top">
-			<view class="top-left">鲅鱼圈一号库</view>
-			<view>102仓位</view>
+			<view class="top-left">{{warehouseName}}</view>
+			<view>{{binNumber}}仓位</view>
 		</view>
 		</view>
 		<view class="content">
 		<view class="content">
 			<view class="row">
 			<view class="row">
@@ -155,6 +155,7 @@
 
 
 <script>
 <script>
 	import upload from '@/components/upload.vue';
 	import upload from '@/components/upload.vue';
+	import helper from '@/common/helper.js'; 
 	export default {
 	export default {
 		components: {
 		components: {
 			upload
 			upload
@@ -168,6 +169,8 @@
 				show4: false,
 				show4: false,
 				show5: false,
 				show5: false,
 				show6: false,
 				show6: false,
+				warehouseName:'',
+				binNumber:'',
 				contractNoList: [{
 				contractNoList: [{
 					contractNo: "123"
 					contractNo: "123"
 				}],
 				}],
@@ -222,7 +225,7 @@
 				btnLoading: false, //防止重复点击
 				btnLoading: false, //防止重复点击
 				isAdd: true,
 				isAdd: true,
 				detailData: {
 				detailData: {
-					contractNo: "123",
+					contractNo: "请选择合同编号",
 					carNo:'辽H12345',
 					carNo:'辽H12345',
 					name: "",
 					name: "",
 					goodsName: "123",
 					goodsName: "123",
@@ -231,8 +234,10 @@
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
-			this.id = options.id
-			this.cangId = options.cangId
+			this.binNumber = helper.erpWarehouse.binNumber
+			this.warehouseName = helper.erpWarehouse.warehouseName
+			this.compId = helper.erpWarehouse.compId
+			console.log(helper.erpWarehouse)
 		},
 		},
 		onShow() {
 		onShow() {
 			// this.getWeighingManagement()
 			// this.getWeighingManagement()

+ 6 - 3
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -262,18 +262,21 @@
 			background: #F9F9FA;
 			background: #F9F9FA;
 			border-radius: 10rpx;
 			border-radius: 10rpx;
 			padding: 10rpx 0;
 			padding: 10rpx 0;
-			justify-content: space-evenly;
-			margin: 20rpx;
+			justify-content: space-around;
+			margin: 20rpx 0;
 			color: #878C9C;
 			color: #878C9C;
+			padding-left: 24rpx;
+			align-items: center;
 		}
 		}
 
 
 		.row3 {
 		.row3 {
 			display: flex;
 			display: flex;
 			margin-top: 30rpx;
 			margin-top: 30rpx;
+			padding-left: 14rpx;
 			.row3-item {
 			.row3-item {
 				display: flex;
 				display: flex;
 				margin-right: 40rpx;
 				margin-right: 40rpx;
-
+				align-items: center;
 				.left {
 				.left {
 					background: #22C572;
 					background: #22C572;
 					border-radius: 10rpx;
 					border-radius: 10rpx;

+ 2 - 2
pages/erpbusiness/acquisitionInspection/warehouseWeighing.vue

@@ -188,7 +188,7 @@
 				})
 				})
 			},
 			},
 			tareClick(item) {
 			tareClick(item) {
-				// debugger
+				// 
 				uni.navigateTo({
 				uni.navigateTo({
 					url: './tareDetail1?id=' + item.id+'&cangId='+this.cangId
 					url: './tareDetail1?id=' + item.id+'&cangId='+this.cangId
 				})
 				})
@@ -220,7 +220,7 @@
 						} else if (res.cancel) {
 						} else if (res.cancel) {
 							console.log('用户点击取消');
 							console.log('用户点击取消');
 						}
 						}
-						// debugger
+						// 
 
 
 					}
 					}
 				})
 				})

+ 1 - 1
pages/erpbusiness/customer.vue

@@ -145,7 +145,7 @@
 				
 				
 			},
 			},
 			checkcustomer(item){
 			checkcustomer(item){
-				debugger
+				
 				var that = this
 				var that = this
 				var count=''
 				var count=''
 				
 				

+ 2 - 1
pages/erpbusiness/quality_testing.vue

@@ -468,9 +468,10 @@
 			background: #F9F9FA;
 			background: #F9F9FA;
 			border-radius: 10rpx;
 			border-radius: 10rpx;
 			padding: 10rpx 0;
 			padding: 10rpx 0;
-			justify-content: space-evenly;
+			justify-content: space-around;
 			margin: 20rpx;
 			margin: 20rpx;
 			color: #878C9C;
 			color: #878C9C;
+			align-items: center;
 		}
 		}
 	
 	
 		.row3 {
 		.row3 {

+ 1 - 1
pages/public/login.vue

@@ -666,7 +666,7 @@
 				// wx.getSetting({
 				// wx.getSetting({
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//    success(res){
 				//    success(res){
-				// 	debugger
+				// 	
 				//    if(res.subscriptionsSetting.mainSwitch){
 				//    if(res.subscriptionsSetting.mainSwitch){
 				    
 				    
 				//    }else{
 				//    }else{

+ 1 - 1
pages/public/login_account_number.vue

@@ -671,7 +671,7 @@
 				// wx.getSetting({
 				// wx.getSetting({
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//    success(res){
 				//    success(res){
-				// 	debugger
+				// 	
 				//    if(res.subscriptionsSetting.mainSwitch){
 				//    if(res.subscriptionsSetting.mainSwitch){
 				    
 				    
 				//    }else{
 				//    }else{

+ 1 - 1
pages/public/register.vue

@@ -805,7 +805,7 @@
 				// wx.getSetting({
 				// wx.getSetting({
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//    success(res){
 				//    success(res){
-				// 	debugger
+				// 	
 				//    if(res.subscriptionsSetting.mainSwitch){
 				//    if(res.subscriptionsSetting.mainSwitch){
 				    
 				    
 				//    }else{
 				//    }else{

+ 1 - 1
pages/public/reset.vue

@@ -524,7 +524,7 @@
 				// wx.getSetting({
 				// wx.getSetting({
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//  	 withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
 				//    success(res){
 				//    success(res){
-				// 	debugger
+				// 	
 				//    if(res.subscriptionsSetting.mainSwitch){
 				//    if(res.subscriptionsSetting.mainSwitch){
 				    
 				    
 				//    }else{
 				//    }else{