ccjgmwz 3 年之前
父节点
当前提交
21bd525618

+ 1 - 1
config/index.js

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

+ 13 - 1
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -164,12 +164,14 @@
 						that.warehouseId =  that.warehouseList[0].value
 						that.warehouseId =  that.warehouseList[0].value
 						that.cangid =  that.warehouseList[0].value
 						that.cangid =  that.warehouseList[0].value
 					}
 					}
-					
 					this.getList(true)
 					this.getList(true)
 				})
 				})
 			},
 			},
 			//获取列表
 			//获取列表
 			getList(flag) {
 			getList(flag) {
+				uni.showLoading({
+					title:"正在加载"
+				})
 				this.$api.doRequest('get', '/weighingManagement/selectWeighingManagement', {
 				this.$api.doRequest('get', '/weighingManagement/selectWeighingManagement', {
 					compId: '',
 					compId: '',
 					currentPage: this.currentPage,
 					currentPage: this.currentPage,
@@ -190,6 +192,16 @@
 					}
 					}
 					console.log("--------------------------------")
 					console.log("--------------------------------")
 					console.log("this.dataList",this.dataList)
 					console.log("this.dataList",this.dataList)
+					
+					uni.hideLoading()
+				})
+				.catch(res => {
+					uni.showToast({
+						title: '系统异常,请联系管理员',
+						icon: 'none',
+						duration: 2000
+					})
+					uni.hideLoading()
 				})
 				})
 			},
 			},
 			selectWarehouse() {
 			selectWarehouse() {

+ 1 - 1
pages/erpbusiness/acquisitionInspection/add_check_the_weight.vue

@@ -43,7 +43,7 @@
 			</view>
 			</view>
 			<view class="row row-bottom">
 			<view class="row row-bottom">
 				<view class="left">皮重(公斤)</view>
 				<view class="left">皮重(公斤)</view>
-				<input class="right-bottom" placeholder="输入皮重"></input>
+				<input class="right-bottom" v-model="detailData.tare" placeholder="输入皮重"></input>
 			</view>
 			</view>
 		</div>
 		</div>
 		<!-- <u-select v-model="isShowContractNo" :list="contractNoList" @confirm="confirmContractNo"></u-select> -->
 		<!-- <u-select v-model="isShowContractNo" :list="contractNoList" @confirm="confirmContractNo"></u-select> -->

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

@@ -40,9 +40,9 @@
 				<view class="left">皮重(公斤)</view>
 				<view class="left">皮重(公斤)</view>
 				<input class="right-bottom" placeholder="输入皮重" @input="changeInput" v-model="detailData.tare"></input>
 				<input class="right-bottom" placeholder="输入皮重" @input="changeInput" v-model="detailData.tare"></input>
 			</view>
 			</view>
-			<view class="row row-bottom">
-				<view class="left">扣(公斤)</view>
-				<input class="right-bottom" placeholder="输入扣" @input="changeInput" v-model="detailData.buckleMiscellaneous"></input>
+			<view v-if="detailData.qualityInspectionManagement.paramType == '2'" class="row row-bottom">
+				<view class="left">扣(公斤)</view>
+				<input class="right-bottom" placeholder="输入扣" @input="changeInput" v-model="detailData.buckleMiscellaneous"></input>
 			</view>
 			</view>
 			<view class="row row-bottom" style="border: 0;">
 			<view class="row row-bottom" style="border: 0;">
 				<view class="left">净重(公斤)</view>
 				<view class="left">净重(公斤)</view>

+ 12 - 0
pages/erpbusiness/add_quality_testing.vue

@@ -325,6 +325,15 @@
 		methods: {
 		methods: {
 			waterContentChange() {
 			waterContentChange() {
 				var that = this
 				var that = this
+				if(this.gridList.goodsName && this.cangid){
+					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
+						warehouseId:this.cangid,
+						goodsName:this.gridList.goodsName
+					}).then(res => {
+						that.gridList.dryGrainPrice = res.data.data
+					})
+				}
+				
 				if (this.gridList.goodsName) {
 				if (this.gridList.goodsName) {
 				  for (var i = 0; i < this.purchasePriceList.length; i++) {
 				  for (var i = 0; i < this.purchasePriceList.length; i++) {
 					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
 					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
@@ -350,6 +359,9 @@
 					}).then(res => {
 					}).then(res => {
 						if(that.gridList.paramType == '1'){
 						if(that.gridList.paramType == '1'){
 							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
 							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
+							if(!that.gridList.tidalGrainPrice){
+								that.gridList.tidalGrainPrice = ''
+							}
 						}else{
 						}else{
 							that.gridList.tidalGrainPrice = res.data.data
 							that.gridList.tidalGrainPrice = res.data.data
 						}
 						}

+ 7 - 8
pages/erpbusiness/customer.vue

@@ -161,7 +161,6 @@
 				
 				
 				var that = this
 				var that = this
 				var count=''
 				var count=''
-				
 				if(item.authenticationStatus=='已认证'){
 				if(item.authenticationStatus=='已认证'){
 					uni.showLoading({title: '加载中'})
 					uni.showLoading({title: '加载中'})
 					that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
 					that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
@@ -217,27 +216,27 @@
 				var count=''
 				var count=''
 				var that = this
 				var that = this
 				var name=item.searchContent.split('(')[0]
 				var name=item.searchContent.split('(')[0]
-				
 				for(var i=0;i<this.customerList.length;i++){
 				for(var i=0;i<this.customerList.length;i++){
 					// console.log(name,this.customerList[i].customerName,name==this.customerList[i].customerName)
 					// console.log(name,this.customerList[i].customerName,name==this.customerList[i].customerName)
 					if(this.customerList[i].customerName==name){
 					if(this.customerList[i].customerName==name){
+						var tmpName = this.customerList[i].customerName
 						uni.showLoading({title: '加载中'})
 						uni.showLoading({title: '加载中'})
 						that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
 						that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
 							commonId:that.userInfo.id,
 							commonId:that.userInfo.id,
 							searchContent:this.customerList[i].customerName+'('+this.customerList[i].customerPhone+')',
 							searchContent:this.customerList[i].customerName+'('+this.customerList[i].customerPhone+')',
 							functionType:3
 							functionType:3
 						}).then(res => {
 						}).then(res => {
-							uni.setStorageSync('checkcustomer',this.customerList[i])
+							uni.setStorageSync('checkcustomer',tmpName)
 							that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 							that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 								compId:'',
 								compId:'',
-								customerName: that.customerList[i].customerName,
+								customerName: tmpName,
 								goodsName: uni.getStorageSync('goodsName'),
 								goodsName: uni.getStorageSync('goodsName'),
 							}).then(res => {
 							}).then(res => {
 								if(res.data.code==200){
 								if(res.data.code==200){
 									count=res.data.data
 									count=res.data.data
 									that.$api.doRequest('get', '/paymentManagement/cumulant',{
 									that.$api.doRequest('get', '/paymentManagement/cumulant',{
 										compId:'',
 										compId:'',
-										customerName: that.customerList[i].customerName,
+										customerName: tmpName,
 										goodsName: uni.getStorageSync('goodsName'),
 										goodsName: uni.getStorageSync('goodsName'),
 									}).then(res => {
 									}).then(res => {
 										for (let i = 0; i < that.purchasePriceList.length; i++) {
 										for (let i = 0; i < that.purchasePriceList.length; i++) {
@@ -251,9 +250,9 @@
 									})
 									})
 								}
 								}
 							})
 							})
-							that.show=false
-							uni.navigateBack()							
-							uni.hideLoading()
+							that.show=false					
+							uni.hideLoading()								
+							uni.navigateBack()
 						})
 						})
 						.catch(res => {
 						.catch(res => {
 							uni.showToast({
 							uni.showToast({

+ 33 - 2
pages/erpbusiness/edit_quality_testing.vue

@@ -27,13 +27,20 @@
 						 name="input"></input>
 						 name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="c-row ">
+			<view v-if="gridList.paramType != '1'" class="c-row ">
 				<view class="title">扣重比</view>
 				<view class="title">扣重比</view>
 				<view class="con-list">
 				<view class="con-list">
 					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
 					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
 						 name="input"></input>
 						 name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view v-else class="c-row ">
+				<view class="title">扣杂</view>
+				<view class="con-list">
+					<input v-model='gridList.buckleMiscellaneous' placeholder="请输入扣杂" @input="waterContentChange"
+						 name="input"></input>
+				</view>
+			</view>
 			<view class="c-row ">
 			<view class="c-row ">
 				<view class="title">购粮性质</view>
 				<view class="title">购粮性质</view>
 				<view class="con-list">
 				<view class="con-list">
@@ -253,6 +260,23 @@
 		methods: {
 		methods: {
 			waterContentChange() {
 			waterContentChange() {
 				var that = this
 				var that = this
+				if(this.gridList.goodsName && this.cangid){
+					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
+						warehouseId:this.cangid,
+						goodsName:this.gridList.goodsName
+					}).then(res => {
+						that.gridList.dryGrainPrice = res.data.data
+					})
+				}
+				
+				if (this.gridList.goodsName) {
+				  for (var i = 0; i < this.purchasePriceList.length; i++) {
+					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
+					  this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+					  this.gridList.paramType = this.purchasePriceList[i].paramType
+					}
+				  }
+				}
 				var numReg = /^[0-9]*$/
 				var numReg = /^[0-9]*$/
 				var numRe = new RegExp(numReg)
 				var numRe = new RegExp(numReg)
 				//潮粮单价改变事件
 				//潮粮单价改变事件
@@ -268,7 +292,14 @@
 						waterContent: this.gridList.waterContent,
 						waterContent: this.gridList.waterContent,
 						grade: this.gridList.grade,
 						grade: this.gridList.grade,
 					}).then(res => {
 					}).then(res => {
-						that.gridList.tidalGrainPrice = res.data.data
+						if(that.gridList.paramType == '1'){
+							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
+							if(!that.gridList.tidalGrainPrice){
+								that.gridList.tidalGrainPrice = ''
+							}
+						}else{
+							that.gridList.tidalGrainPrice = res.data.data
+						}
 					})
 					})
 				}
 				}
 			},
 			},

+ 12 - 0
pages/erpbusiness/quality_testing.vue

@@ -262,6 +262,9 @@
 			},
 			},
 			getList(flag){
 			getList(flag){
 				var that = this
 				var that = this
+				uni.showLoading({
+					title:"正在加载"
+				})
 				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
 				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
 					pageSize: this.pageSize,
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
 					currentPage: this.currentPage,
@@ -272,6 +275,7 @@
 					compId:'',
 					compId:'',
 					// pcFlag:1
 					// pcFlag:1
 				}).then(res => {
 				}).then(res => {
+					uni.hideLoading()
 					if(res.data.data){
 					if(res.data.data){
 						let data = res.data.data.records
 						let data = res.data.data.records
 						//采购信息
 						//采购信息
@@ -291,6 +295,14 @@
 					}
 					}
 					// console.log(that.gridList)
 					// console.log(that.gridList)
 				})
 				})
+				.catch(res => {
+					uni.showToast({
+						title: '系统异常,请联系管理员',
+						icon: 'none',
+						duration: 2000
+					})
+					uni.hideLoading()
+				})
 			},
 			},
 			edit(item){
 			edit(item){
 				uni.navigateTo({
 				uni.navigateTo({