Browse Source

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

zhongtianhaoyuan 3 years ago
parent
commit
f1600d6900

+ 1 - 1
config/index.js

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

+ 4 - 3
pageA/product/business_buy.vue

@@ -230,6 +230,7 @@
 				this.purchaseOrder.settlementPrice = options.basisPrice
 				this.purchaseOrder.procurementPlanType = options.procurementPlanType
 				this.purchaseOrder.procurementPlan=options.procurementPlan
+				this.purchaseOrder.compId=options.compId
 			},
 			computed: {
 				...mapState(['hasLogin','userInfo']),
@@ -269,15 +270,15 @@
 						this.$api.msg('出售数量输入错误')
 						return
 					}
-					if(!this.purchaseOrder.pointPrice){
+					if(this.purchaseOrder.procurementPlanType=='期货'&&!this.purchaseOrder.pointPrice){
 						this.$api.msg('点价不能为空')
 						return
 					}
-					if(this.purchaseOrder.pointPrice>10000){
+					if(this.purchaseOrder.procurementPlanType=='期货'&&this.purchaseOrder.pointPrice>10000){
 						this.$api.msg('点价输入错误')
 						return
 					}
-					if(this.purchaseOrder.pointPrice.indexOf('.')!=-1){
+					if(this.purchaseOrder.procurementPlanType=='期货'&&this.purchaseOrder.pointPrice.indexOf('.')!=-1){
 						if(this.purchaseOrder.pointPrice.split(".")[1].length>2){
 							this.$api.msg('点价输入错误')
 							return

+ 2 - 1
pageA/product/detail.vue

@@ -257,6 +257,7 @@
 		onShow() {
 		},
 		onLoad(options) {
+			this.goods.compId=options.compId
 			const that = this
 			uni.showLoading({
 				title: '正在加载',
@@ -399,7 +400,7 @@
 								url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}
 										&goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}
 										&basisPrice=${this.goods.basisPrice}&unitPrice=${this.goods.unitPrice}&receiveWarehouse=${this.goods.receiveWarehouse}
-										&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}`
+										&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}&compId=${this.goods.compId}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
 							// 	&companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}

+ 21 - 41
pageD/warehousings/ex_warehouse.vue

@@ -9,15 +9,15 @@
 				</view>
 			</view>
 			<view class="c-row ">
-				<text class="tit">货名</text>
+				<text class="tit">收货方</text>
 				<view class="con-list">
-					<text>{{WarehouseInOutInfo.goodsName}}</text>
+					<text>{{WarehouseInOutInfo.consignee}}</text>
 				</view>
 			</view>
 			<view class="c-row ">
-				<text class="tit">发车净重(吨)</text>
+				<text class="tit">货名</text>
 				<view class="con-list">
-					<text>{{WarehouseInOutInfo.startWeight}}</text>
+					<text>{{WarehouseInOutInfo.goodsName}}</text>
 				</view>
 			</view>
 			<view class="c-row ">
@@ -26,6 +26,18 @@
 					<text>{{WarehouseInOutInfo1.carNo}}</text>
 				</view>
 			</view>
+			<view class="c-row ">
+				<text class="tit">箱号</text>
+				<view class="con-list">
+					<text>{{WarehouseInOutInfo1.boxNo}}</text>
+				</view>
+			</view>
+			<view class="c-row ">
+				<text class="tit">封号</text>
+				<view class="con-list">
+					<text>{{WarehouseInOutInfo1.titleNo}}</text>
+				</view>
+			</view>
 		</view>
 		<view class="center">
 			<view class="title_c ">出库信息</view>
@@ -67,27 +79,15 @@
 				</view>
 			
 				<view class="c-row b-b">
-					<text class="tit">库类型 </text>
+					<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>
 				<view class="c-row b-b">
-					<view class="title">扣款金额</view>
-					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入扣款金额" name="input" v-model="WarehouseInOutInfo.deductionAmount"></input>
-					</view>
-				</view>
-				<view class="c-row b-b">
-					<view class="title">扣款项</view>
-					<view class="con-list">
-						<input maxlength='16' placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
-					</view>
-				</view>
-				<view class="c-row b-b">
-					<text class="tit">入库日期</text>
+					<text class="tit">出库日期</text>
 					
 					<view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time}}</view>
 					<u-picker  :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
@@ -208,9 +208,9 @@ import upload from '@/components/upload.vue';
 				pinIndex: '不限(默认)',
 				pinTypes: '',
 				pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
-				ruIndex: '采购入库',
+				ruIndex: '销售出库',
 				rutypes: '',
-				ruType: ['采购入库', '移库入库', '暂存入库', '贸易服务入库', '退库'],
+				ruType: ['销售出库', '移库出库', '暂存出库', '贸易服务出库', '采购出库'],
 				action: this.$uploadUrl,
 				maxSize: 5 * 1024 * 1024,//限制文件大小 5M
 				btnLoading: false, //防止重复点击
@@ -316,16 +316,6 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount>10000||this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount<0){
-					this.$api.msg('扣款金额输入错误')
-					return
-				}
-				if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount.indexOf('.')!=-1){
-					if(this.WarehouseInOutInfo.deductionAmount.split('.')[1].length>2){
-						this.$api.msg('扣款金额输入错误')
-						return
-					}
-				}
 				if(this.list.qualityInspector&&this.list.qualityInspector<2||this.list.qualityInspector&&this.list.qualityInspector>10){
 					this.$api.msg('质检员姓名输入错误')
 					return
@@ -472,16 +462,6 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount>10000||this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount<0){
-					this.$api.msg('扣款金额输入错误')
-					return
-				}
-				if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount.indexOf('.')!=-1){
-					if(this.WarehouseInOutInfo.deductionAmount.split('.')[1].length>2){
-						this.$api.msg('扣款金额输入错误')
-						return
-					}
-				}
 				if(this.list.qualityInspector&&this.list.qualityInspector<2||this.list.qualityInspector&&this.list.qualityInspector>10){
 					this.$api.msg('质检员姓名输入错误')
 					return

+ 53 - 9
pageD/warehousings/warehousings.vue

@@ -55,14 +55,22 @@
 					<text class="tit">仓库</text>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<text @click=''>{{WarehouseInOutInfo.warehouseName}}</text>
+						<picker @change="warehouseChange" :value="warehouseIndex" :range="warehouse" class="con-list">
+							<view >
+								{{warehouseIndex>-1?warehouse[warehouseIndex]:'请选择仓库'}}
+							</view>
+						</picker>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">仓位号</view>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入仓位号" name="input" v-model="WarehouseInOutInfo.binNumber"></input>
+						<picker @change="warehouseChange1" :value="warehouseIndex1" :range="warehouse1" class="con-list">
+							<view >
+								{{warehouseIndex1>-1?warehouse1[warehouseIndex1]:'请选择仓位号'}}
+							</view>
+						</picker>
 					</view>
 				</view>
 			
@@ -89,7 +97,7 @@
 				<view class="c-row b-b">
 					<text class="tit">入库日期</text>
 					
-					<view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time}}</view>
+					<view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time1}}</view>
 					<u-picker  :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
 					
 				</view>
@@ -210,12 +218,18 @@ import upload from '@/components/upload.vue';
 				pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
 				ruIndex: '采购入库',
 				rutypes: '',
+				warehouse:[],
+				warehouseIndex:-1,
+				warehouse1:[],
+				warehouseIndex1:-1,
 				ruType: ['采购入库', '移库入库', '暂存入库', '贸易服务入库', '退库'],
 				action: this.$uploadUrl,
 				maxSize: 5 * 1024 * 1024,//限制文件大小 5M
 				btnLoading: false, //防止重复点击
 				imgUrls: [],
 				isAdd: true,
+				warehouselist:[],
+				warehouselist1:[],
 				params:{
 					year: true,
 					month: true,
@@ -225,7 +239,7 @@ import upload from '@/components/upload.vue';
 			}
 		},
 		computed: {
-				time() {
+				time1() {
 					var date=new Date()
 					var year=date.getFullYear()
 					var month=date.getMonth()
@@ -249,10 +263,17 @@ import upload from '@/components/upload.vue';
 			},
 			onShow(){
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:'2710b21efc1e4393930c5dc800010dc4',warehouseType:1,}).then(res => {
-			console.log(res)
-			})
-			this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {compId:'',warehouseType:1,}).then(res => {
-			console.log(res)
+				 if(res.data.code==200){
+					 var arr=[]
+					 for(var i=0;i<res.data.data.length;i++){
+						 if(res.data.data[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
+							 this.warehouseIndex=i
+						 }
+						 arr.push(res.data.data[i].warehouseName)
+					 }
+					 this.warehouselist=res.data.data
+					 this.warehouse=arr
+				 }
 			})
 			},
 		onLoad(option) {
@@ -273,7 +294,30 @@ import upload from '@/components/upload.vue';
 			this.time = year+'-'+month+"-"+date1
 		},
 		methods: {
-			
+			warehouseChange(e){
+				var id=''
+				this.warehouseIndex=e.detail.value
+				this.WarehouseInOutInfo.warehouseName=this.warehouse[this.warehouseIndex]
+				for(var i=0;i<this.warehouselist.length;i++){
+					if(this.warehouselist[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
+						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++){
+						console.log(res.data.data.warehousePositionInfoList[i])
+						arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
+					}
+					this.warehouse1=arr
+					this.warehouselist11=res.data.data
+				})
+			},
+			warehouseChange1(e){
+				var id=''
+				this.warehouseIndex1=e.detail.value
+				this.WarehouseInOutInfo.binNumber=this.warehouse1[this.warehouseIndex1]
+			},
 			DateChange(e) {
 				this.WarehouseInOutInfo.inOutDate=e.year+'-'+e.month+'-'+e.day
 			},

+ 2 - 2
pages/business/business.vue

@@ -260,11 +260,11 @@
 				} else {
 					if (this.TabCur == 0) {
 						uni.navigateTo({
-							url: `/pageA/product/detail?id=${id}`
+							url: `/pageA/product/detail?id=${id}&compId=${item.compId}`
 						})
 					} else {
 						uni.navigateTo({
-							url: `/pageA/product/sales_detail?id=${id}`
+							url: `/pageA/product/detail_buy?id=${id}&compId=${item.compId}`
 						})
 					}