wangchao 3 gadi atpakaļ
vecāks
revīzija
83327eed3d

+ 21 - 8
pages/erp/exWarehousing/exWarehousing.vue

@@ -111,7 +111,8 @@
 				<!-- <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
 				<!-- 自运合同车牌号需下拉 -->
 				<view v-if="!carno" v-show="showCar" @click="carno = true">
-					{{detailData.carNo?detailData.carNo :"请选择车牌号"}}</view>
+					{{detailData.carNo?detailData.carNo :"请选择车牌号"}}
+				</view>
 				<u-picker :range="carList" range-key="carNo" @confirm='carPicker($event)' v-model="carno"
 					mode="selector">
 				</u-picker>
@@ -312,6 +313,7 @@
 					gradeKey: "",
 					grossWeight: "",
 					tare: "",
+					tips: ''
 				},
 				params: {
 					year: true,
@@ -338,6 +340,10 @@
 			this.cangId = options.cangId
 		},
 		onShow() {
+			uni.showLoading({
+				title:"加载中...",
+				mask:true
+			})
 			let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
@@ -446,7 +452,13 @@
 						if (res.data.code == 200) {
 							for (let i = 0; i < res.data.data.length; i++) {
 								// "MYCGYMHLJ2021102401"
-								if (res.data.data[i].contractNo == this.detailData.contractNo) { //如果查到该合同
+								if (res.data.data[i].contractNo == this.detailData.contractNo) {
+									if (this.detailData.inOutType == '销售出库') {
+										this.detailData.tips = '买方' + res.data.data[i].buyer
+									} else if (this.detailData.inOutType == '移库出库') {
+										this.detailData.tips = '入货库' + this.inOutNoList[0].warehouseName
+									}
+									//如果查到该合同
 									if (res.data.data[i].deliverType == '1') { //判断自运1,他运2合同
 										this.showCar = true
 									} else {
@@ -456,7 +468,8 @@
 										this.carList = res.data.data[i].tranCarInfoList //车牌号下拉列表
 									}
 								}
-						 }
+							}
+							uni.hideLoading()
 						}
 					})
 				})
@@ -592,7 +605,7 @@
 			},
 			calculate() {
 				if (this.detailData.grossWeight && this.detailData.tare) {
-					this.netWeight = this.detailData.grossWeight - this.detailData.tare
+					this.netWeight =(this.detailData.grossWeight - this.detailData.tare).toFixed(3) 
 				}
 			},
 			getImgUrl(res) {
@@ -735,7 +748,7 @@
 					this.$api.msg('出库类型不能为空')
 					return
 				}
-				if(this.detailData.outType=="集装箱船"||this.detailData.outType=="汽运"){
+				if (this.detailData.outType == "集装箱船" || this.detailData.outType == "汽运") {
 					if (!this.detailData.carNo && num == 2) {
 						this.$api.msg('车牌号不能为空')
 						return
@@ -745,7 +758,7 @@
 						return
 					}
 				}
-				
+
 				if (!this.detailData.addressUrl && num == 2) {
 					this.$api.msg('请上传磅单')
 					return
@@ -898,8 +911,8 @@
 									var date = new Date()
 									that.weightbills.updateDate = date.getFullYear() + '-' + (date
 											.getMonth() + 1) + '-' + date.getDate() + ' ' + date
-									.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
-									
+										.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
+
 									that.$api.msg(title)
 									that.isShowPrint = true
 									uni.setStorageSync("exWarehousing_print", that.weightbills)

+ 1 - 0
pages/erp/index.vue

@@ -245,6 +245,7 @@
 				if (res.data.code == 200) {
 					if (res.data.data.length == 0) {
 						this.isShowAlert = true
+						uni.hideLoading()
 					} else {
 						this.isShowAlert = false
 					}

+ 93 - 82
pages/erp/warehousing/warehousing.vue

@@ -34,16 +34,18 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">毛重(吨)</view>
-				<input type="digit" @input='calculate' name="grossWeight" v-model='detailData.grossWeight' class="right-bottom" 
-					placeholder="输入毛重"></input>
+				<input type="digit" @input='calculate' name="grossWeight" v-model='detailData.grossWeight'
+					class="right-bottom" placeholder="输入毛重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">皮重(吨)</view>
-				<input type="digit" @input='calculate' name="tare" v-model='detailData.tare' class="right-bottom" placeholder="输入皮重"></input>
+				<input type="digit" @input='calculate' name="tare" v-model='detailData.tare' class="right-bottom"
+					placeholder="输入皮重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">扣重(吨)</view>
-				<input type="digit" @input='calculate' v-model='detailData.deductionWeight' class="right-bottom" placeholder="输入扣重"></input>
+				<input type="digit" @input='calculate' v-model='detailData.deductionWeight' class="right-bottom"
+					placeholder="输入扣重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">净重(吨)</view>
@@ -112,20 +114,21 @@
 			<view class="row row-bottom" v-if="detailData.outType!='火运'&&detailData.outType!='散船'">
 				<view class="left">车牌号</view>
 				<!-- 他运合同车牌号输入 -->
-				<input  v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
 				<!-- <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
-			    <!-- 自运合同车牌号需下拉 -->
-				<view v-if="!carno" v-show="showCar" @click="carno = true">{{detailData.carNo? detailData.carNo:"请选择车牌号"}}</view>
-				<u-picker :range="carList" range-key="carNo" @confirm='carPicker($event)' v-model="carno" mode="selector">
+				<!-- 自运合同车牌号需下拉 -->
+				<view v-show="showCar" @click="carno = true">{{detailData.carNo? detailData.carNo:"请选择车牌号"}}</view>
+				<u-picker :range="carList" range-key="carNo" @confirm='carPicker($event)' v-model="carno"
+					mode="selector">
 				</u-picker>
 			</view>
 			<view class="row row-bottom" v-if="detailData.outType=='火运'">
 				<view class="left">车号</view>
-				<input  v-model='detailData.carNo' class="right-bottom" placeholder="请输入车号" ></input>
+				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车号"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.outType=='散船'">
 				<view class="left">船名</view>
-				<input  v-model='detailData.carNo' class="right-bottom" placeholder="请输入船名" ></input>
+				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入船名"></input>
 			</view>
 			<view v-if='detailData.outType=="集装箱船"||!detailData.outType||detailData.outType=="汽运"'
 				class="row row-bottom">
@@ -133,17 +136,16 @@
 				<input v-model='detailData.boxNo' class="right-bottom" placeholder="请输入箱号" type="digit"></input>
 				<input v-model='detailData.boxNoOther' class="right-bottom" placeholder="请输入箱号" type="digit"></input>
 			</view>
-			<view v-if='!detailData.outType||detailData.outType=="汽运" || detailData.outType=="集装箱船"' class="row row-bottom">
+			<view v-if='!detailData.outType||detailData.outType=="汽运" || detailData.outType=="集装箱船"'
+				class="row row-bottom">
 				<view class="left">封号</view>
-				<input v-model='detailData.titleNo'  class="right-bottom"
-					placeholder="请输入封号" type="digit"></input>
-				<input v-model='detailData.titleNoOther' class="right-bottom"
-					placeholder="请输入封号" type="digit"></input>
+				<input v-model='detailData.titleNo' class="right-bottom" placeholder="请输入封号" type="digit"></input>
+				<input v-model='detailData.titleNoOther' class="right-bottom" placeholder="请输入封号" type="digit"></input>
 			</view>
 			<view v-if='detailData.outType=="火运"' class="row row-bottom">
 				<view class="left">车厢号</view>
-				<input v-model='detailData.wingNumber' @input="toUpperCase2" class="right-bottom"
-					placeholder="请输入车厢号" type="digit"></input>
+				<input v-model='detailData.wingNumber' @input="toUpperCase2" class="right-bottom" placeholder="请输入车厢号"
+					type="digit"></input>
 				<input v-model='detailData.wingNumberOther' @input="toUpperCase3" class="right-bottom"
 					placeholder="请输入车厢号" type="digit"></input>
 			</view>
@@ -183,8 +185,8 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">水分(%)</view>
-				<input type="digit" v-model='detailData.warehouseInOutDetail.waterContent'
-					class="right-bottom" placeholder="输入水分占比"></input>
+				<input type="digit" v-model='detailData.warehouseInOutDetail.waterContent' class="right-bottom"
+					placeholder="输入水分占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">容重(克/升)</view>
@@ -203,8 +205,8 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">霉变粒(%)</view>
-				<input type="digit" v-model='detailData.warehouseInOutDetail.mildewGrain'
-					class="right-bottom" placeholder="输入霉变粒占比"></input>
+				<input type="digit" v-model='detailData.warehouseInOutDetail.mildewGrain' class="right-bottom"
+					placeholder="输入霉变粒占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">不完善粒(%)</view>
@@ -240,7 +242,7 @@
 				show5: false,
 				show6: false,
 				isPC: true,
-				carno:false,
+				carno: false,
 				isSelectType: true,
 				inOutShow: false,
 				params: {
@@ -320,10 +322,11 @@
 					deductionAmount: '',
 					netWeight: 0,
 					cost: 0,
-					warehouseInOutDetail: {}
+					warehouseInOutDetail: {},
+					tips: ''
 				},
-				carList:[],//车牌号下拉
-				showCar:false,
+				carList: [], //车牌号下拉
+				showCar: false,
 			}
 		},
 		onLoad(options) {
@@ -338,6 +341,10 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onShow() {
+			uni.showLoading({
+				title: "加载中...",
+				mask: true
+			})
 			let _data = uni.getStorageSync('erpContractNo') == '' ? {} : uni.getStorageSync('erpContractNo')
 			if (helper.erpWarehouse.personCharge)
 				this.detailData.agent = helper.erpWarehouse.personCharge
@@ -413,77 +420,79 @@
 			},
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo']),
+			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
 			inOutNo() {
-				let  that  = this
+				let that = this
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
 					flag: 2,
-					warehouseName:this.warehouseName,
-					agentKey : this.userInfo.id
+					warehouseName: this.warehouseName,
+					agentKey: this.userInfo.id
 				}).then(res => {
 					this.inOutNoList = res.data.data
-					if(this.inOutNoList.length > 0){
+					if (this.inOutNoList.length > 0) {
 						this.detailData.inOutTaskNo = this.inOutNoList[0].inOutTaskNo
-					this.detailData.agent = this.inOutNoList[0].agent
-					if (this.inOutNoList[0].contractNo) {
-						this.detailData.contractNo = this.inOutNoList[0].contractNo
-					} else {
-						this.detailData.contractNo = this.inOutNoList[0].moveTaskNo
-					}
-					this.detailData.goodsName = this.inOutNoList[0].goodsName
-					this.detailData.goodsNameKey = this.inOutNoList[0].goodsNameKey;
-					this.detailData.grade = this.inOutNoList[0].grade
-					this.detailData.inOutType = this.inOutNoList[0].inOutType
-					if (this.detailData.inOutType == '采购入库') {
-						this.detailData.inOutTypeKey = 1
-					} else if (this.detailData.inOutType == '移库入库') {
-						this.detailData.inOutTypeKey = 3
-					} else if (this.detailData.inOutType == '暂存入库') {
-						this.detailData.inOutTypeKey = 4
-					} else if (this.detailData.inOutType == '贸易服务入库') {
-						this.detailData.inOutTypeKey = 5
-					} else if (this.detailData.inOutType == '退库') {
-						this.detailData.inOutTypeKey = 6
-					}
-					//查询所有的合同  进行获取车牌号
-					this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-						flag: 7,
-						compId: helper.erpWarehouse.compId,
-					}).then(res => {
-						if (res.data.code == 200) {
-							for(let i = 0 ; i < res.data.data.length ; i++){
+						this.detailData.agent = this.inOutNoList[0].agent
+						if (this.inOutNoList[0].contractNo) {
+							this.detailData.contractNo = this.inOutNoList[0].contractNo
+						} else {
+							this.detailData.contractNo = this.inOutNoList[0].moveTaskNo
+						}
+						this.detailData.goodsName = this.inOutNoList[0].goodsName
+						this.detailData.goodsNameKey = this.inOutNoList[0].goodsNameKey;
+						this.detailData.grade = this.inOutNoList[0].grade
+						this.detailData.inOutType = this.inOutNoList[0].inOutType
+						if (this.detailData.inOutType == '采购入库') {
+							this.detailData.inOutTypeKey = 1
+						} else if (this.detailData.inOutType == '移库入库') {
+							this.detailData.inOutTypeKey = 3
+						} else if (this.detailData.inOutType == '暂存入库') {
+							this.detailData.inOutTypeKey = 4
+						} else if (this.detailData.inOutType == '贸易服务入库') {
+							this.detailData.inOutTypeKey = 5
+						} else if (this.detailData.inOutType == '退库') {
+							this.detailData.inOutTypeKey = 6
+						}
+						//查询所有的合同  进行获取车牌号
+						this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+							flag: 7,
+							compId: helper.erpWarehouse.compId,
+						}).then(res => {
+							if (res.data.code == 200) {
+								for (let i = 0; i < res.data.data.length; i++) {
 								 // "MYCGYMHLJ2021102401"
-								if(res.data.data[i].contractNo == this.detailData.contractNo){//如果查到该合同
-								if(res.data.data[i].deliverType == "1"){//判断自运1,他运2合同
-									this.showCar = true
-								}else{
-									this.showCar = false
+									if (res.data.data[i].contractNo == this.detailData
+										.contractNo) { //如果查到该合同
+										if (res.data.data[i].deliverType == "1") { //判断自运1,他运2合同
+											this.showCar = true
+										} else {
+											this.showCar = false
+										}
+										if (res.data.data[i].tranCarInfoList) {
+											this.carList = res.data.data[i].tranCarInfoList //车牌号下拉列表
+										}
+									}
 								}
-								if(res.data.data[i].tranCarInfoList){
-									this.carList = res.data.data[i].tranCarInfoList   //车牌号下拉列表
-								}
-							 }
+								uni.hideLoading()
 							}
-						}
-					})
-				  }
+						})
+					}
 				})
 				this.$api.doRequest('get', 'warehouseBaseInfo/selectContractNoList', ).then(res => {
 					this.contractNoList = res.data.data
 					for (var i = 0; i < this.contractNoList.length; i++) {
 						if (this.contractNoList[i].contractNo == this.detailData.contractNo) {
 							if (this.detailData.inOutType == '采购入库') {
-								if(this.contractNoList[i].unitContractPrice){
-									this.detailData.tips = '卖方' + this.contractNoList[i].seller+
-              '( ' +
-              this.contractNoList[i].unitContractPrice +
-              '元/吨)'
-								}else{
+								if (this.contractNoList[i].unitContractPrice) {
+									this.detailData.tips = '卖方' + this.contractNoList[i].seller +
+										'( ' +
+										this.contractNoList[i].unitContractPrice +
+										'元/吨)'
+								} else {
 									this.detailData.tips = '卖方' + this.contractNoList[i].seller
 								}
-								
+
 							} else if (this.detailData.inOutType == '移库入库') {
 								this.detailData.tips = '出货库' + this.inOutNoList[0].warehouseName
 							} else if (this.detailData.inOutType == '退库') {
@@ -508,14 +517,16 @@
 				for (var i = 0; i < this.contractNoList.length; i++) {
 					if (this.contractNoList[i].contractNo == this.detailData.contractNo) {
 						if (this.detailData.inOutType == '采购入库') {
-							this.detailData.tips = '卖方' + this.contractNoList[i].seller+'('+this.contractNoList[i].unitContractPrice+'元/吨)'
+							this.detailData.tips = '卖方' + this.contractNoList[i].seller + '(' + this.contractNoList[i]
+								.unitContractPrice + '元/吨)'
 						} else if (this.detailData.inOutType == '移库入库') {
-							if(this.contractNoList[i].unitContractPrice){
-								this.detailData.tips = '出货库' + this.inOutNoList[e[0]].sendWarehouse+'('+this.contractNoList[i].unitContractPrice+'元/吨)'
-							}else{
+							if (this.contractNoList[i].unitContractPrice) {
+								this.detailData.tips = '出货库' + this.inOutNoList[e[0]].sendWarehouse + '(' + this
+									.contractNoList[i].unitContractPrice + '元/吨)'
+							} else {
 								this.detailData.tips = '出货库' + this.inOutNoList[e[0]].sendWarehouse
 							}
-							
+
 						} else if (this.detailData.inOutType == '退库') {
 							if (this.contractNoList[i].contractNo) {
 								this.deptBudgetList.tips = '买方' + this.contractNoList[i].buyer

+ 2 - 2
pages/grain_pulse/my_grain_pulse.vue

@@ -181,11 +181,11 @@
 				})
 			},
 			edit(item){
-				if(item.status=='已驳回'||item.status=='待审核'){
+				// if(item.status=='已驳回'||item.status=='待审核'){
 					uni.navigateTo({
 						url:'/pages/grain_pulse/editcompany?id='+item.id
 					})
-				}
+				// }
 				
 			},
 			showHidden(item){