wangc 5 tuntia sitten
vanhempi
commit
7c852d45af
3 muutettua tiedostoa jossa 45 lisäystä ja 93 poistoa
  1. 2 2
      pages/sample/group.vue
  2. 4 4
      pages/sample/sorting_out.vue
  3. 39 87
      pages/sample/stocktaking.vue

+ 2 - 2
pages/sample/group.vue

@@ -53,8 +53,8 @@
 					<button type="primary" @click="SelectProduct()">选择货物</button>
 					<button type="primary" @click="SelectHanderProduct()">选择线下货物</button>
 				</view>
-				<!-- 优博讯:260px   新大陆:132px-->
-				<view style="min-height:132px;overflow-y:auto;max-height:132px">
+				<!-- 优博讯:260px   新大陆:132px--> 
+				<view style="min-height:260px;overflow-y:auto;max-height:260px">
 					<view class="cart-list">
 						<!-- 滑动操作分区 -->
 						<uni-swipe-action>

+ 4 - 4
pages/sample/sorting_out.vue

@@ -47,7 +47,7 @@
 					<button type="primary" @click="SelectProduct()">选择货物</button>
 				</view> -->
 				<!-- 优博讯:295px   新大陆:166px-->
-				<view style="min-height:166px;overflow-y:auto;max-height:166px">
+				<view style="min-height:295px;overflow-y:auto;max-height:295px">
 					<view class="cart-list">
 						<!-- 滑动操作分区 -->
 						<uni-swipe-action>
@@ -611,10 +611,10 @@
 			},
 
 			dialogReturnWarehouse() {
-				if (_this.isEmpty(_this.port_sn)) {
+				/* if (_this.isEmpty(_this.port_sn)) {
 					_this.alertInfo("操作失败!请选择入库口")
 					return
-				}
+				} */
 				
 				setTimeout(() => {
 					uni.hideLoading()
@@ -626,7 +626,7 @@
 						},
 						data: JSON.stringify({
 							"warehouse_id": _this.warehouse_id,
-							"srcAddr": JSON.parse(_this.port_sn),
+							"srcAddr": _this.port_sn == ""? null :JSON.parse(_this.port_sn),
 							"container_code": _this.container_code,
 							"dstAddrSn": _this.dstAddrSn,
 							"floor": _this.floor

+ 39 - 87
pages/sample/stocktaking.vue

@@ -38,7 +38,7 @@
 					</select-lay>
 				</view>
 				<!-- 优博讯:385px   新大陆:255px-->
-				<view style="min-height:255px;overflow-y:auto;max-height:255px">
+				<view style="min-height:385px;overflow-y:auto;max-height:385px">
 					<view class="cart-list">
 						<!-- 滑动操作分区 -->
 						<uni-swipe-action>
@@ -610,101 +610,53 @@
 				// 	srcaddr =JSON.parse(_this.port_sn)
 				// }
 				// console.log(srcaddr);
-				console.log(_this.port_sn);
-				if (_this.isEmpty(_this.port_sn)){
-					setTimeout(() => {
-						uni.hideLoading()
-						uni.request({
-							url: reqRootUrl + '/ReturnStockWarehouse',
-							method: 'POST',
-							headers: {
-								'Content-Type': 'application/json'
-							},
-							data: JSON.stringify({
-								"container_code": _this.container_code,
-								"floor": _this.floor
-							}),
-							success: (ret) => {
-								this.$refs.dialogReturnWarehouse.close();
-								if (ret.statusCode === 200) {
-									if(ret.data.ret =="failed"){
-										_this.alertInfo(ret.data.msg);
-									}else{
-										_this.alertInfo("盘点回库操作成功!");
-										_this.sn = "";
-										_this.detail_sn = "";
-										_this.port_sn = "";
-										_this.container_code = "";
-										_this.tableData = [];
-										uni.setStorageSync("container_code", "")
-									}
-									_this.getList();
-								}else{
-									_this.alertInfo("盘点回库操作失败!");
-									_this.sn = "";
-									_this.detail_sn = "";
-									_this.port_sn = "";
-									_this.container_code = "";
-									_this.floor = "";
-									uni.setStorageSync("container_code", "")
-								}
-								_this.getList();
-							},
-							fail: (err) => {
-								// console.log('request fail', err);
-							},
-							complete: () => {
-								// console.log('complete');
-							}
-						})
-					}, 30)
-				}else{
-					setTimeout(() => {
-						uni.hideLoading()
-						uni.request({
-							url: reqRootUrl + '/ReturnStockWarehouse',
-							method: 'POST',
-							headers: {
-								'Content-Type': 'application/json'
-							},
-							data: JSON.stringify({
-								"srcAddr": JSON.parse(_this.port_sn),
-								"container_code": _this.container_code,
-							}),
-							success: (ret) => {
-								this.$refs.dialogReturnWarehouse.close();
-								if (ret.statusCode === 200) {
-									if(ret.data.ret =="failed"){
-										_this.alertInfo(ret.data.msg);
-									}else{
-										_this.alertInfo("盘点回库操作成功!");
-										_this.sn = "";
-										_this.detail_sn = "";
-										_this.port_sn = "";
-										_this.container_code = "";
-										_this.tableData = [];
-										uni.setStorageSync("container_code", "")
-									}
-									_this.getList();
+				setTimeout(() => {
+					uni.hideLoading()
+					uni.request({
+						url: reqRootUrl + '/ReturnStockWarehouse',
+						method: 'POST',
+						headers: {
+							'Content-Type': 'application/json'
+						},
+						data: JSON.stringify({
+							"container_code": _this.container_code,
+							"srcAddr":  _this.port_sn == ""? null :JSON.parse(_this.port_sn),
+							"floor": _this.floor
+						}),
+						success: (ret) => {
+							this.$refs.dialogReturnWarehouse.close();
+							if (ret.statusCode === 200) {
+								if(ret.data.ret =="failed"){
+									_this.alertInfo(ret.data.msg);
 								}else{
-									_this.alertInfo("盘点回库操作失败!");
+									_this.alertInfo("盘点回库操作成功!");
 									_this.sn = "";
 									_this.detail_sn = "";
 									_this.port_sn = "";
 									_this.container_code = "";
+									_this.tableData = [];
 									uni.setStorageSync("container_code", "")
 								}
 								_this.getList();
-							},
-							fail: (err) => {
-								// console.log('request fail', err);
-							},
-							complete: () => {
-								// console.log('complete');
+							}else{
+								_this.alertInfo("盘点回库操作失败!");
+								_this.sn = "";
+								_this.detail_sn = "";
+								_this.port_sn = "";
+								_this.container_code = "";
+								_this.floor = "";
+								uni.setStorageSync("container_code", "")
 							}
-						})
-					}, 30)
-				}
+							_this.getList();
+						},
+						fail: (err) => {
+							// console.log('request fail', err);
+						},
+						complete: () => {
+							// console.log('complete');
+						}
+					})
+				}, 30)
 				
 			},