浏览代码

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

wangchao 3 年之前
父节点
当前提交
ff4636e89f

+ 1 - 1
config/index.js

@@ -1,7 +1,7 @@
 const dev = {
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	baseUrl: 'https://www.zthymaoyi.com',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
-	baseUrlNew: 'http://192.168.1.121:8090/',
+	baseUrlNew: 'http://192.168.1.117:8090/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 	debug: false

+ 1 - 0
pages/erp/exWarehousing/exWarehousing.vue

@@ -564,6 +564,7 @@
 			carPicker(e) {
 			carPicker(e) {
 				// this.detailData.gradeKey = e[0] + 1
 				// this.detailData.gradeKey = e[0] + 1
 				this.detailData.carNo = this.carList[e].carNo
 				this.detailData.carNo = this.carList[e].carNo
+				this.detailData.carId=this.carList[e].id
 			},
 			},
 			onProgress(e) {},
 			onProgress(e) {},
 			onRemove() {
 			onRemove() {

+ 5 - 0
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -485,6 +485,11 @@
 					this.netWeight = this.detailData.grossWeight - this.detailData.tare
 					this.netWeight = this.detailData.grossWeight - this.detailData.tare
 				}
 				}
 			},
 			},
+			carPicker(e) {
+				// this.detailData.gradeKey = e[0] + 1
+				this.detailData.carNo = this.carList[e].carNo
+				this.detailData.carId=this.carList[e].id
+			},
 			getImgUrl(res) {
 			getImgUrl(res) {
 				this.detailData.addressUrl = res
 				this.detailData.addressUrl = res
 				console.log(res)
 				console.log(res)

+ 14 - 13
pages/user/contractLook/purchaseContract.vue

@@ -1,5 +1,9 @@
 <template>
 <template>
 	<view>
 	<view>
+		<view style='background:#fff;padding:15px 10px;border-radius:0 0 10px 10px;'>
+			<u-search bgColor='#F5F6F9' @change='keyWordChange' :show-action="false" placeholder="请输入合同编号或客户名称" v-model="searchKeyWord"></u-search>
+		</view>
+		
 		<view class='content'>
 		<view class='content'>
 			<view class='content-item' v-for='item in contractList'>
 			<view class='content-item' v-for='item in contractList'>
 				<view style='padding:10px 0;' class="flex justify-between">
 				<view style='padding:10px 0;' class="flex justify-between">
@@ -54,7 +58,8 @@
 				contractType:2,
 				contractType:2,
 				contractList:[],
 				contractList:[],
 				currentPage:1,
 				currentPage:1,
-				pageSize:10
+				pageSize:10,
+				searchKeyWord:''
 			}
 			}
 		},
 		},
 		onLoad: function(option) {
 		onLoad: function(option) {
@@ -65,22 +70,18 @@
 			this.init()
 			this.init()
 		},
 		},
 		methods: {
 		methods: {
-			skipContent(index){
-				console.log(index)
-				if(index<2){
-					uni.navigateTo({
-						url:'/pages/user/contractLook/purchaseContract'
-					})
-				}else if(index>2&&index<6){
-					uni.navigateTo({
-						url:'/pages/user/contractLook/salesContract'
-					})
-				}
+			keyWordChange(e){
+				this.searchKeyWord=e
+				uni.showLoading({
+					title: "加载中",
+					mask: true
+				})
+				this.init()
 			},
 			},
 			init() {
 			init() {
 				this.$api.doRequest('get', '/contractManagementInfo/selectInfo',
 				this.$api.doRequest('get', '/contractManagementInfo/selectInfo',
 				{compId:uni.getStorageSync('pcUserInfo').compId,
 				{compId:uni.getStorageSync('pcUserInfo').compId,
-				contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize}).then(res => {
+				contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize,searchKeyWord:this.searchKeyWord}).then(res => {
 					uni.hideLoading()
 					uni.hideLoading()
 					this.contractList=res.data.data.records
 					this.contractList=res.data.data.records
 				})
 				})

+ 58 - 64
pages/user/contractLook/salesContract.vue

@@ -1,33 +1,39 @@
 <template>
 <template>
-	<view class='content'>
-		<view v-for='item in contractList'>
-			<view class="flex justify-between">
-				<view>合同编号</view>
-				<view>{{item.contractNo}}</view>
-			</view>
-			<view class="flex justify-between">
-				<view>客户</view>
-				<view>{{item.seller}}</view>
-			</view>
-			<view class="flex justify-between">
-				<view>合同重量(吨)</view>
-				<view>{{item.weight}}</view>
-			</view>
-			<view class="flex justify-between">
-				<view>合同单价(元)</view>
-				<view>{{item.unitContractPrice}}</view>
-			</view>
-			<view class="flex justify-between">
-				<view>合同总价(元)</view>
-				<view>{{item.totalContractPrice}}</view>
-			</view>
-			<view class="flex justify-between">
-				<view>已付款(元)</view>
-				<view>{{item.mildewGrain}}</view>
-			</view>
-			<view class="flex justify-between">
-				<view>已开发票 (元)</view>
-				<view>{{item.goodsNames}}</view>
+	<view>
+		<view style='background:#fff;padding:15px 10px;border-radius:0 0 10px 10px;'>
+			<u-search bgColor='#F5F6F9' @change='keyWordChange' :show-action="false" placeholder="请输入合同编号或客户名称" v-model="searchKeyWord"></u-search>
+		</view>
+		
+		<view class='content'>
+			<view class='content-item' v-for='item in contractList'>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">合同编号</view>
+					<view>{{item.contractNo}}</view>
+				</view>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">客户</view>
+					<view>{{item.buyer}}</view>
+				</view>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">合同重量(吨)</view>
+					<view>{{item.weight}}</view>
+				</view>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">合同单价(元)</view>
+					<view>{{item.unitContractPrice}}</view>
+				</view>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">合同总价(元)</view>
+					<view>{{item.totalContractPrice}}</view>
+				</view>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">已付款(元)</view>
+					<view>{{item.mildewGrain}}</view>
+				</view>
+				<view style='padding:10px 0;' class="flex justify-between">
+					<view class="title">已开发票 (元)</view>
+					<view>{{item.goodsNames}}</view>
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -49,10 +55,11 @@
 				flag: true,
 				flag: true,
 				chartData: {},
 				chartData: {},
 				ringoptions: {},
 				ringoptions: {},
-				contractType:2,
+				contractType:1,
 				contractList:[],
 				contractList:[],
 				currentPage:1,
 				currentPage:1,
-				pageSize:10
+				pageSize:10,
+				searchKeyWord:''
 			}
 			}
 		},
 		},
 		onLoad: function(option) {
 		onLoad: function(option) {
@@ -63,22 +70,18 @@
 			this.init()
 			this.init()
 		},
 		},
 		methods: {
 		methods: {
-			skipContent(index){
-				console.log(index)
-				if(index<2){
-					uni.navigateTo({
-						url:'/pages/user/contractLook/purchaseContract'
-					})
-				}else if(index>2&&index<6){
-					uni.navigateTo({
-						url:'/pages/user/contractLook/salesContract'
-					})
-				}
+			keyWordChange(e){
+				this.searchKeyWord=e
+				uni.showLoading({
+					title: "加载中",
+					mask: true
+				})
+				this.init()
 			},
 			},
 			init() {
 			init() {
 				this.$api.doRequest('get', '/contractManagementInfo/selectInfo',
 				this.$api.doRequest('get', '/contractManagementInfo/selectInfo',
 				{compId:uni.getStorageSync('pcUserInfo').compId,
 				{compId:uni.getStorageSync('pcUserInfo').compId,
-				contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize}).then(res => {
+				contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize,searchKeyWord:this.searchKeyWord}).then(res => {
 					uni.hideLoading()
 					uni.hideLoading()
 					this.contractList=res.data.data.records
 					this.contractList=res.data.data.records
 				})
 				})
@@ -94,29 +97,20 @@
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
 	.content{
 	.content{
-		
-	}
-	.map {
-		top: 90rpx;
-		height: 60vh;
-		width: 100%;
-		border: 0;
-	}
-
-	.title {
-		background: black;
-		color: white;
-		text-align: center;
-		font-size: 1.25rem;
-		padding: 0.625rem;
+		background:#F5F6FA;
 	}
 	}
-
-	.content {
-		background: #fff;
-		padding-bottom: 100rpx;
+	.content-item{
+		background:#fff;
+		margin:10px;
+		padding:10px;
+		border-radius:6px;
+		font-size:14px;
+		.title {
+			color:#9698A2;
+			font-size:26rpx;
+		}
 	}
 	}
-
-	.charts-box {
+	charts-box {
 		// background: black;
 		// background: black;
 		position: relative;
 		position: relative;
 		// top: 70vh;
 		// top: 70vh;

+ 223 - 1
pages/user/contractLook/warehouseReserves.vue

@@ -1,8 +1,230 @@
 <template>
 <template>
+	<view>
+		<view style='background:#fff;padding:15px 10px 10px;border-radius:0 0 10px 10px;'>
+			<u-search bgColor='#F5F6F9' @change='keyWordChange' :show-action="false" placeholder="请输入仓库名" v-model="warehouseName"></u-search>
+		</view>
+		
+		<view class='content'>
+			<view class='content-item' v-for='item in dataList'>
+				<view style='padding:10px 0;font-weight:600;' class="flex justify-between">
+					<view class="big-title">{{item.name}}</view>
+					<view class="big-price">¥{{item.value}}</view>
+				</view>
+				<view v-for='(item2,index) in item.content'>
+					<view style='margin:10px 0;padding:0 10px 10px;' :style='{"border-bottom":index!=item.content.length-1?"1px solid #eee":""}'>
+						<view style='width:100%;height:30px;' v-if='item2.status==1'>
+							<view class="orange-title">{{item2.goodsName}}</view>
+						</view>
+						<view v-else>
+							<view class="green-title">{{item2.goodsName}}</view>
+						</view>
+						<view style='color:#878C9C;' class="flex justify-between">
+							<view>{{item2.storage}}吨</view>
+							<view>{{item2.cost}}元/吨</view>
+							<view>{{item2.value}}元</view>
+						</view>
+					</view>
+					
+					
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	export default {
+		data() {
+			return {
+				chartlist: [],
+				carCount1: '',
+				carCount2: '',
+				carCount3: '',
+				inventoryCost: '',
+				inventoryValue: '',
+				ZChart: {},
+				// url:"https://datav.aliyuncs.com/share/235518097ffd673bc1eb05011b9a02b6",
+				url: '',
+				flag: true,
+				chartData: {},
+				ringoptions: {},
+				dataList:[],
+				currentPage:1,
+				pageSize:10,
+				warehouseId:'',
+				warehouseName:''
+			}
+		},
+		onLoad: function(option) {
+			uni.showLoading({
+				title: "加载中",
+				mask: true
+			})
+			this.init()
+		},
+		methods: {
+			keyWordChange(e){
+				this.warehouseName=e
+				uni.showLoading({
+					title: "加载中",
+					mask: true
+				})
+				this.init()
+			},
+			init() {
+				this.dataList=[]
+				this.$api.doRequest('get', '/costManagementInfo/selectCostManagementInfo',
+				{compId:uni.getStorageSync('pcUserInfo').compId,
+				warehouseId: this.warehouseId,
+				warehouseName: this.warehouseName,
+				warehouseType: 1,currentPage: this.currentPage,pageSize: this.pageSize,searchKeyWord:this.searchKeyWord}).then(res => {
+					uni.hideLoading()
+					var data={
+						name:'',
+						content:[]
+					}
+					var id=''
+					let index = 1;
+					let i = 0;
+					if(res.data.data.length>0){
+						for(let k in res.data.data){
+							data.name=res.data.data[k].warehouseName
+							let {warehouseId} = res.data.data[i];
+							let {warehouseId:warehouseId2} = res.data.data[i+1]||{}
+							if(warehouseId==warehouseId2 ){
+								index++;
+								data.content.push({...res.data.data[k]})
+								if(this.dataList.length>0){
+									if(this.dataList.every( function( item, index, array ){ 
+										return item.name!=data.name })){
+										this.dataList.push(JSON.parse(JSON.stringify(data)))
+									}else{
+										for (var q = 0; q < this.dataList.length; q++) {
+											if(this.dataList[q].name==data.name){
+												this.dataList[q]=JSON.parse(JSON.stringify(data))
+											}
+										}
+									}
+								}else{
+									this.dataList.push(JSON.parse(JSON.stringify(data)))
+								}
+							}else{
+								data.name=res.data.data[k].warehouseName
+								data.content.push({...res.data.data[k]})
+								if(this.dataList.length>0){
+									if(this.dataList.every( function( item, index, array ){ return item.name!=data.name })){
+										this.dataList.push(JSON.parse(JSON.stringify(data)))
+									}else{
+										for (var q = 0; q < this.dataList.length; q++) {
+											if(this.dataList[q].name==data.name){
+												this.dataList[q]=JSON.parse(JSON.stringify(data))
+											}
+										}
+									}
+								}else{
+									this.dataList.push(JSON.parse(JSON.stringify(data)))
+								}
+								data.content=[]
+								index = 1;
+							}
+							i++
+						}
+					}else{
+						this.dataList=[]
+					}
+					if(this.dataList.length>0){
+						for (var q = 0; q < this.dataList.length; q++) {
+							var num=0
+							for (var k = 0; k < this.dataList[q].content.length; k++) {
+								if(this.dataList[q].content[k].goodsName.indexOf('玉米')==-1){
+									this.dataList[q].content[k].status=0
+								}else{
+									this.dataList[q].content[k].status=1
+								}
+								this.dataList[q].content[k].value=(this.dataList[q].content[k].cost*this.dataList[q].content[k].storage).toFixed(4)
+								num+=Number(this.dataList[q].content[k].value)
+							}
+							this.dataList[q].value=Number(num).toFixed(2)
+						}
+					}
+					console.log(this.dataList)
+				})
+			
+				
+			},
+			getdata(e) {
+				console.log(e)
+			}
+		}
+	}
 </script>
 </script>
 
 
-<style>
+
+
+<style scoped lang="scss">
+	.content{
+		background:#F5F6FA;
+	}
+	.content-item{
+		background:#fff;
+		margin:10px;
+		padding:10px;
+		border-radius:6px;
+		font-size:14px;
+		.big-title,.big-price{
+			font-size:16px;
+		}
+		.big-price{
+			color:#22C572;
+		}
+		.orange-title {
+			color:#FE6430;
+			font-size:24rpx;
+			background:#FEECE6;
+			position:absolute;
+			padding:3px;
+			border-radius:3px;
+			text-align:center;
+		}
+		.green-title {
+			color:#22C572;
+			font-size:24rpx;
+		}
+	}
+	charts-box {
+		// background: black;
+		position: relative;
+		// top: 70vh;
+	}
+
+	.content2 .row,
+	.content4 .row {
+		display: flex;
+		justify-content: space-around;
+		background: #24262d;
+		padding: 40rpx 20rpx;
+
+		.item-top,
+		.item-bottom {
+			color: #d5d5d5;
+		}
+
+		.item-bottom {
+			display: flex;
+			align-items: center;
+		}
+	}
+
+	.bottom-tip {
+		position: absolute;
+		z-index: 11;
+		color: #8c8c8d;
+		right: 10px;
+		bottom: 10px;
+	}
+
+	.title-margin {
+		bottom: 120rpx;
+	}
 </style>
 </style>
+