Ver código fonte

修改app入库类型新需求

wangchao 3 anos atrás
pai
commit
b84b106668

+ 1 - 1
config/index.js

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

+ 13 - 7
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -83,9 +83,9 @@
 				<u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
 				</u-picker>
 			</view>
-			<view class="row">
+			<view class="row row-bottom">
 				<view class="left">入库类型</view>
-				<view @click='show5=true'>{{detailData.inOutType}}</view>
+				<input v-model='detailData.inOutType' class="right-bottom" @click="show5=true" :disabled="isSelectType"></input>
 				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
 					v-model="show5" mode="selector">
 				</u-picker>
@@ -175,6 +175,7 @@
 		},
 		data() {
 			return {
+				isSelectType:true,
 				imgUrl: [],
 				show: false,
 				show1: false,
@@ -215,7 +216,7 @@
 					}
 				],
 				handlerList: [],
-				warehousingTypeList: [],
+				warehousingTypeList: [{constValue:'移库入库'},{constValue:'退库'}],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -236,12 +237,12 @@
 					tare: 0,
 					deductionAmount: 0,
 					netWeight: 0,
-					warehouseInOutDetail: {}
+					warehouseInOutDetail: {},
 				},
 				
 			}
 		},
-		onLoad(options) {
+		onLoad(options) {debugger
 			this.detailData =JSON.parse(options.data)
 			this.netWeight = this.detailData.netWeight
 			this.binNumber = this.detailData.binNumber
@@ -259,8 +260,11 @@
 		onShow() {
 			this.getContractNoList();
 			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
-				this.detailData.freight = 0
+				// this.detailData.freight = 0
+			}else if(this.detailData.inOutType == '移库入库'){
+				this.isSelectType = true
 			}
+			
 			// if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
 			// if (!this.detailData.contractNo) {
 			// 	this.detailData.contractNo = '请选择合同编号'
@@ -273,6 +277,8 @@
 			// 	this.detailData.goodsName = '货名'
 			// }
 			let _data = uni.getStorageSync('erpContractNo').contractNo
+			
+			console.log("当前合同",uni.getStorageSync('erpContractNo'))
 			if(_data){
 				 this.detailData.contractNo = _data
 			}
@@ -292,7 +298,7 @@
 				}
 			
 			// 获取入库类型
-			this.getrkType()
+			// this.getrkType()
 			//获取经办人
 			this.getPerson()
 		},

+ 20 - 8
pages/erp/warehousing/warehousing.vue

@@ -82,9 +82,9 @@
 				<u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
 				</u-picker>
 			</view>
-			<view class="row">
+			<view class="row row-bottom">
 				<view class="left">入库类型</view>
-				<view @click='show5=true'>{{detailData.inOutType}}</view>
+				<input v-model='detailData.inOutType' class="right-bottom" @click="show5=true" :disabled="isSelectType"></input>
 				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
 					v-model="show5" mode="selector">
 				</u-picker>
@@ -184,6 +184,7 @@
 				show5: false,
 				show6: false,
 				isPC: true,
+				isSelectType:true,
 				params: {
 					year: true,
 					month: true,
@@ -215,7 +216,7 @@
 					}
 				],
 				handlerList: [],
-				warehousingTypeList: [],
+				warehousingTypeList: [{constValue:'移库入库'},{constValue:'退库'}],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -241,7 +242,7 @@
 				}
 			}
 		},
-		onLoad(options) {debugger
+		onLoad(options) {
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.compId = helper.erpWarehouse.compId
@@ -249,13 +250,15 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
-		onShow() {debugger
+		onShow() {
+		console.log("当前合同",uni.getStorageSync('erpContractNo'))
 			let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
 			if(helper.erpWarehouse.personCharge)
 			this.detailData.agent = helper.erpWarehouse.personCharge
 			this.detailData.goodsName = _data.goodsName;
 			this.detailData.contractNo = _data.contractNo;
 			this.detailData.goodsNameKey = _data.goodsNameKey;
+			this.detailData.inOutType = _data.inOutType;
 			if(_data.unitContractPrice) {
 				this.detailData.cost = _data.unitContractPrice
 			}
@@ -264,8 +267,13 @@
 			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			if (_data.inOutType == '采购入库') {
 				this.detailData.freight = 0
-			}else{this.detailData.freight = uni.getStorageSync('CarFreight')}
-				
+			}else if(_data.inOutType == '移库入库'){
+				this.isSelectType = true
+			}
+			
+			else{this.detailData.freight = uni.getStorageSync('CarFreight')
+			}
+			this.changeType()
 			if (!_data.tranCarInfoList){
 				this.isPC = false
 				this.detailData.carNo = ""
@@ -305,7 +313,7 @@
 				this.detailData.goodsName = '货名'
 			}
 			// 获取入库类型
-			this.getrkType()
+			// this.getrkType()
 			//获取经办人
 			this.getPerson()
 
@@ -316,6 +324,10 @@
 			},
 		},
 		methods: {
+			changeType(){
+				this.inOutType
+				
+			},
 			//计算纯重
 			pureWeightCount() {
 				if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this