Преглед изворни кода

修复配送商溢出的页面问题

hulh пре 8 година
родитељ
комит
48f0e02ea6

+ 11 - 6
src/main/java/com/uas/platform/b2c/logistics/service/impl/AddressServiceImpl.java

@@ -48,12 +48,17 @@ public class AddressServiceImpl implements AddressService {
 				addresses = addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(address.getEnuu(), type, (short)2);
 			}
 			if (!CollectionUtils.isEmpty(addresses) && addresses.size() > 0) {
-				int num = 0;
-				if (modifyNum == 1) {
-					num = 1;
-				}
-				for (Address add : addresses){
-					add.setNum(++num);
+				if (addresses.size() == 1){
+					Address add = addresses.get(0);
+					add.setNum(1);
+				}else {
+					int num = 0;
+					if (modifyNum == 1) {
+						num = 1;
+					}
+					for (Address add : addresses){
+						add.setNum(++num);
+					}
 				}
 			}
 			addressDao.save(addresses);

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_distributor.html

@@ -71,7 +71,7 @@
 	.distributor-content {
 		width: 100%;
 		margin: 0 auto;
-		height: 489px;
+		min-height: 489px;
 		background: #fff;
 		padding-top: 25px;
 	}
@@ -105,6 +105,7 @@
 	.send-list{
 		margin-left: 20px;
 		margin-right: 20px;
+		padding-bottom: 20px;
 	}
 	.send-item{
 		display: inline-block;
@@ -115,7 +116,6 @@
 		background: #f0f6ff;
 		margin-bottom: 2px;
 		padding-top: 10px;
-		float: left;
 	}
 	.send-item:hover {
 		cursor: pointer;