Browse Source

Merge branch 'dev-mysql' into feature_release-tomysql

yangc 7 years ago
parent
commit
2a6a2a039a

+ 15 - 0
src/main/java/com/uas/platform/b2c/trade/seek/model/SeekPurchaseByBatch.java

@@ -85,6 +85,12 @@ public class SeekPurchaseByBatch {
     @Column(name = "sp_kind")
     private String kind;
 
+    /**
+     * 规格
+     */
+    @Column(name = "sp_spec")
+    private String spec;
+
     /**
      * 求购发布时间
      */
@@ -109,6 +115,15 @@ public class SeekPurchaseByBatch {
     @Transient
     private List<Map<String, Object>> brandWord;
 
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
     public Long getId() {
         return id;
     }

+ 123 - 68
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java

@@ -8,18 +8,8 @@ import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
-import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseBomDao;
-import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseBomListDao;
-import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseByBatchDao;
-import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseDao;
-import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseGoodsDao;
-import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseOfferDao;
-import com.uas.platform.b2c.trade.seek.model.PurcInquiry;
-import com.uas.platform.b2c.trade.seek.model.PurcInquiryItem;
-import com.uas.platform.b2c.trade.seek.model.SeekPurchase;
-import com.uas.platform.b2c.trade.seek.model.SeekPurchaseBom;
-import com.uas.platform.b2c.trade.seek.model.SeekPurchaseBomList;
-import com.uas.platform.b2c.trade.seek.model.SeekPurchaseByBatch;
+import com.uas.platform.b2c.trade.seek.dao.*;
+import com.uas.platform.b2c.trade.seek.model.*;
 import com.uas.platform.b2c.trade.seek.service.SeekPurchaseBomService;
 import com.uas.platform.b2c.trade.seek.utils.DateUtils;
 import com.uas.platform.b2c.trade.support.CodeType;
@@ -30,25 +20,6 @@ import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.util.HttpUtil;
 import com.uas.platform.core.util.serializer.FlexJsonUtils;
-import java.io.UnsupportedEncodingException;
-import java.math.BigDecimal;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.ss.usermodel.Cell;
@@ -64,9 +35,24 @@ import org.springframework.data.jpa.domain.Specification;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
+ * bom求购实现类
+ *
  * @author liusw
  * @version 2018/1/19 15:06
  */
@@ -111,9 +97,24 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
 
-    private int mallColNum = 8;
+    private int mallColNum = 10;
     private int mallRowNum = 500;
 
+    /**
+     * excel列名
+     */
+    public static final int CODENUM = 0;
+    public static final int BRANDNUM = 1;
+    public static final int DEADLINENUM = 2;
+    public static final int AMOUNTNUM = 3;
+    public static final int CURRENCYNUM = 4;
+    public static final int UNITPRICENUM = 5;
+    public static final int ENCAPSULATIONNUM = 8;
+    public static final int PRODUCEDATENUM = 9;
+    public static final int KINDNUM = 6;
+    public static final int SPECNUM = 7;
+
+
     /**
      * 导入bom
      * @param workbook
@@ -142,7 +143,6 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         seekPurchaseBom = seekPurchaseBomDao.save(seekPurchaseBom);
         // 获取第一行的信息
         Row headerRow = sheet.getRow(0);
-        int total = 0;
         int blankNum = 0;
         if (headerRow != null) {
             // 验证是否为商城模板
@@ -168,7 +168,12 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                     seekPurchaseByBatchList.add(seekPurchaseByBatch);
                 }
             }
-            seekPurchaseByBatchDao.save(seekPurchaseByBatchList);
+            if (CollectionUtils.isEmpty(seekPurchaseByBatchList)) {
+                seekPurchaseBomDao.delete(seekPurchaseBom.getId());
+                return new ResultMap(CodeType.PARAMETER_ERROR, "上传的excel内容为空,请填写完整后上传");
+            } else {
+                seekPurchaseByBatchDao.save(seekPurchaseByBatchList);
+            }
         }
         return ResultMap.success(seekPurchaseBom.getId());
     }
@@ -179,16 +184,16 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
      * @return
      */
     private boolean vaidSample(Row row) {
-        Object codeCellObj = readWorkBookCell(row.getCell(0), Cell.CELL_TYPE_STRING,
-                0, 0);
+        Object codeCellObj = readWorkBookCell(row.getCell(CODENUM), Cell.CELL_TYPE_STRING,
+                0, CODENUM);
         String codeString = StringUtilB2C.getStr(codeCellObj);
-        Object brandCellObj = readWorkBookCell(row.getCell(1), Cell.CELL_TYPE_STRING,
-                0, 1);
+        Object brandCellObj = readWorkBookCell(row.getCell(BRANDNUM), Cell.CELL_TYPE_STRING,
+                0, BRANDNUM);
         String brandString = StringUtilB2C.getStr(brandCellObj);
-        Object produceDateCellObj = readWorkBookCell(row.getCell(7), Cell.CELL_TYPE_STRING,
-                0, 7);
+        Object produceDateCellObj = readWorkBookCell(row.getCell(PRODUCEDATENUM), Cell.CELL_TYPE_STRING,
+                0, PRODUCEDATENUM);
         String produceDateString = StringUtilB2C.getStr(produceDateCellObj);
-        if ("只能填数字、英文、英文特殊符号".equals(codeString) || "请勿用中文特殊符号".equals(brandCellObj) || "不超过6个汉字或12个字符".equals(produceDateString)) {
+        if ("只能填数字、英文、英文特殊符号".equals(codeString) || "请勿用中文特殊符号".equals(brandString) || "不超过6个汉字或12个字符".equals(produceDateString)) {
             return true;
         }
         return false;
@@ -200,23 +205,23 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
      * @return
      */
     private boolean vaildTemplete(Row headerRow) {
-        Object codeCellObj = readWorkBookCell(headerRow.getCell(0), Cell.CELL_TYPE_STRING,
-                0, 0);
+        Object codeCellObj = readWorkBookCell(headerRow.getCell(CODENUM), Cell.CELL_TYPE_STRING,
+                0, CODENUM);
         if (!"产品型号".equals(StringUtilB2C.getStr(codeCellObj))) {
             return false;
         }
-        Object brandCellObj = readWorkBookCell(headerRow.getCell(1), Cell.CELL_TYPE_STRING,
-                0, 1);
+        Object brandCellObj = readWorkBookCell(headerRow.getCell(BRANDNUM), Cell.CELL_TYPE_STRING,
+                0, BRANDNUM);
         if (!"品牌名称".equals(StringUtilB2C.getStr(brandCellObj))) {
             return false;
         }
-        Object deadlineCellObj = readWorkBookCell(headerRow.getCell(2), Cell.CELL_TYPE_STRING,
-                0, 2);
+        Object deadlineCellObj = readWorkBookCell(headerRow.getCell(DEADLINENUM), Cell.CELL_TYPE_STRING,
+                0, DEADLINENUM);
         if (!"截止时间".equals(StringUtilB2C.getStr(deadlineCellObj))) {
             return false;
         }
-        Object produceDateCellObj = readWorkBookCell(headerRow.getCell(7), Cell.CELL_TYPE_STRING,
-                0, 7);
+        Object produceDateCellObj = readWorkBookCell(headerRow.getCell(PRODUCEDATENUM), Cell.CELL_TYPE_STRING,
+                0, PRODUCEDATENUM);
         if (!"生产日期".equals(StringUtilB2C.getStr(produceDateCellObj))) {
             return false;
         }
@@ -234,14 +239,17 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         // 统计为空的个数
         int result = 0;
         // 型号
-        Object codeValue = readWorkBookCell(row.getCell(0), Cell.CELL_TYPE_STRING,
-                rowNum, 0);
+        Object codeValue = readWorkBookCell(row.getCell(CODENUM), Cell.CELL_TYPE_STRING,
+                rowNum, CODENUM);
         if (StringUtils.isEmpty(codeValue)) {
             result += 1;
         } else {
             String code = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(codeValue));
             try {
                 code = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(code, 100);
+                if (!match(code)) {
+                    code = null;
+                }
             } catch (UnsupportedEncodingException e) {
                 e.printStackTrace();
             }
@@ -249,23 +257,26 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         }
 
         // 品牌
-        Object brandValue = readWorkBookCell(row.getCell(1), Cell.CELL_TYPE_STRING,
-                rowNum, 1);
+        Object brandValue = readWorkBookCell(row.getCell(BRANDNUM), Cell.CELL_TYPE_STRING,
+                rowNum, BRANDNUM);
         if (StringUtils.isEmpty(brandValue)) {
             result += 1;
         } else {
             String brand = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(brandValue));
             try {
                 brand = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(brand, 50);
+                if (!match(brand)) {
+                    brand = null;
+                }
             } catch (UnsupportedEncodingException e) {
                 e.printStackTrace();
             }
-            seekPurchaseByBatch.setBrand(StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(brandValue)));
+            seekPurchaseByBatch.setBrand(brand);
         }
 
         // 截止日期
-        Object deadlineValue = readWorkBookCell(row.getCell(2), Cell.CELL_TYPE_STRING,
-                rowNum, 2);
+        Object deadlineValue = readWorkBookCell(row.getCell(DEADLINENUM), Cell.CELL_TYPE_STRING,
+                rowNum, DEADLINENUM);
         if (StringUtils.isEmpty(deadlineValue)) {
             result += 1;
         } else {
@@ -293,8 +304,8 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         }
 
         // 求购数量
-        Object amountValue = readWorkBookCell(row.getCell(3), Cell.CELL_TYPE_STRING,
-                rowNum, 3);
+        Object amountValue = readWorkBookCell(row.getCell(AMOUNTNUM), Cell.CELL_TYPE_STRING,
+                rowNum, AMOUNTNUM);
         if (!StringUtils.isEmpty(amountValue)) {
             try {
                 Double amount = Double.valueOf(StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(amountValue)));
@@ -309,8 +320,8 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         }
 
         // 币别
-        Object currencyValue = readWorkBookCell(row.getCell(4), Cell.CELL_TYPE_STRING,
-                rowNum, 4);
+        Object currencyValue = readWorkBookCell(row.getCell(CURRENCYNUM), Cell.CELL_TYPE_STRING,
+                rowNum, CURRENCYNUM);
         if (!StringUtils.isEmpty(currencyValue)) {
             try {
                 String currency = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(currencyValue));
@@ -321,8 +332,8 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         }
 
         // 单价
-        Object unitPriceValue = readWorkBookCell(row.getCell(5), Cell.CELL_TYPE_STRING,
-                rowNum, 5);
+        Object unitPriceValue = readWorkBookCell(row.getCell(UNITPRICENUM), Cell.CELL_TYPE_STRING,
+                rowNum, UNITPRICENUM);
         if (!StringUtils.isEmpty(unitPriceValue)) {
             try {
                 Double unitPrice = Double.valueOf(StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(unitPriceValue)));
@@ -340,8 +351,8 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         }
 
         // 封装
-        Object encapsulationValue = readWorkBookCell(row.getCell(6), Cell.CELL_TYPE_STRING,
-                rowNum, 6);
+        Object encapsulationValue = readWorkBookCell(row.getCell(ENCAPSULATIONNUM), Cell.CELL_TYPE_STRING,
+                rowNum, ENCAPSULATIONNUM);
         if (!StringUtils.isEmpty(encapsulationValue)) {
             try {
                 String encapsulation = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(encapsulationValue));
@@ -354,8 +365,8 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
 
         // 生产日期
-        Object produceDateValue = readWorkBookCell(row.getCell(7), Cell.CELL_TYPE_STRING,
-                rowNum, 7);
+        Object produceDateValue = readWorkBookCell(row.getCell(PRODUCEDATENUM), Cell.CELL_TYPE_STRING,
+                rowNum, PRODUCEDATENUM);
         if (!StringUtils.isEmpty(produceDateValue)) {
             try {
                 String produceDate = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(produceDateValue));
@@ -365,9 +376,53 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                 seekPurchaseByBatch.setProduceDate(null);
             }
         }
+
+        // 规格
+        Object specValue = readWorkBookCell(row.getCell(SPECNUM), Cell.CELL_TYPE_STRING,
+                rowNum, SPECNUM);
+        if (!StringUtils.isEmpty(specValue)) {
+            try {
+                String spec = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(specValue));
+                spec = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(spec, 50);
+                if (!match(spec)) {
+                    spec = null;
+                }
+                seekPurchaseByBatch.setSpec(spec);
+            } catch (Exception e) {
+                seekPurchaseByBatch.setSpec(null);
+            }
+        }
+
+        // 类目
+        Object kindValue = readWorkBookCell(row.getCell(KINDNUM), Cell.CELL_TYPE_STRING,
+                rowNum, KINDNUM);
+        if (!StringUtils.isEmpty(kindValue)) {
+            try {
+                String kind = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(kindValue));
+                kind = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(kind, 20);
+                seekPurchaseByBatch.setKind(kind);
+            } catch (Exception e) {
+                seekPurchaseByBatch.setKind(null);
+            }
+        }
         return result;
     }
 
+    /**
+     * 判断输入是否合法
+     * @param code
+     * @return
+     */
+    private boolean match(String code) {
+        List<String> filterList = Arrays.asList("空", "没", "无", "—", "-", "null", "#N/A");
+        for (String s : filterList) {
+            if (s.equals(code)){
+                return false;
+            }
+        }
+        return true;
+    }
+
     /**
      * 读取excel
      * @return
@@ -464,9 +519,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
             SeekPurchase seekPurchase = new SeekPurchase();
             Calendar now = Calendar.getInstance();
             now.add(Calendar.DAY_OF_MONTH, 91);
-            //Date deadlineMax = DateUtils.addTime(new Date(System.currentTimeMillis()), 90, 23, 59 ,59);
             if (!StringUtils.isEmpty(batch.getCode()) && !StringUtils.isEmpty(batch.getBrand()) && !StringUtils.isEmpty(batch.getDeadline()) && batch.getDeadline().compareTo(now.getTime()) != 1) {
-                //seekPurchase = (SeekPurchase) batch;
                 PurcInquiryItem inquiryItem = new PurcInquiryItem();
                 inquiryItem.setProdTitle(batch.getCode());
                 inquiryItem.setUserUU(user.getUserUU());
@@ -481,6 +534,8 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                 inquiryItem.setProduceDate(batch.getProduceDate());
                 inquiryItem.setDate(new Date());
                 inquiryItem.setEndDate(batch.getDeadline());
+                inquiryItem.setProdTitle(batch.getKind());
+                inquiryItem.setSpec(batch.getSpec());
                 if (StringUtils.isEmpty(endDate)) {
                     endDate = batch.getDeadline();
                 } else {

BIN
src/main/resources/jxls-tpl/trade/seekPurchaseByBatch.xls


+ 68 - 0
src/main/webapp/resources/css/common.css

@@ -966,4 +966,72 @@ input[type="number"]{
 }
 select {
 	-moz-appearance: none;
+}
+
+
+/*买卖家求购*/
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap {
+	height: 100%;
+	padding-top: 15px;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	width: 100%;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap .date-bottom-item {
+	margin-top: 33px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content {
+	text-align: left;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box {
+	display: inline-block;
+	float: left;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box .item span {
+	color: #999;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large {
+	width: 520px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large .fl {
+	width: 183px;
+	line-height: 19px;
+	word-break: break-all;
+	white-space: pre-line;
+	margin-right: 75px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large .fl.bottom {
+	margin-top: 11px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large .fl .content {
+	display: inline-block;
+	width: 119px;
+	overflow: hidden;
+	vertical-align: middle;
+	height: 38px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large .fl span {
+	float: left;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-small {
+	width: 128px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-small .item {
+	color: #020202;
+	width: 128px;
+	margin-bottom: 8px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap .remain {
+	margin-top: 24px;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap .en-name {
+	width: 190px;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+.seek-purchase .seek-purchase-content >table >tbody >tr.default-row .operate-seek .row-wrap >span {
+	color: #4290f7;
+	cursor: pointer;
 }

+ 32 - 12
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -1755,18 +1755,37 @@ define([ 'app/app' ], function(app) {
 	/**
 	 * 左侧导航栏控制器
 	 */
-	app.controller('leftNavCtrl', ["$scope", "toaster", '$modal', '$rootScope', function($scope, toaster, $modal, $rootScope){
-		//安全设置提醒框
-		$scope.openHomeCenterModel = function() {
-			var modalInstance = $modal.open({
-				animation: true,
-				templateUrl: $rootScope.rootPath + '/static/view/usercenter/modal/homeCenter_modal.html',
-				controller:'homeModalCtrl'
-			});
-			modalInstance.result.then(function(){
-			}, function(){
-			});
-		};
+	app.controller('leftNavCtrl', ["$scope", "toaster", '$modal', '$rootScope', function($scope, toaster, $modal, $rootScope) {
+        //安全设置提醒框
+        $scope.openHomeCenterModel = function () {
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl: $rootScope.rootPath + '/static/view/usercenter/modal/homeCenter_modal.html',
+                controller: 'homeModalCtrl'
+            });
+            modalInstance.result.then(function () {
+            }, function () {
+            });
+        };
+    }]);
+
+    function checkNullStr (str) {
+        const NULL_ARR = ['空', '没', '无', '-', '—', 'null', '#N/A'];
+        var flag = true;
+        NULL_ARR.map(function (s) {  flag = str === s ? false : flag; });
+        return flag;
+    }
+
+    app.filter('nullStrFilter', function () {
+        return function (str) {
+            return checkNullStr(str) ? str : '-'
+        }
+    });
+
+  /**
+   * 左侧导航栏控制器
+   */
+	app.controller('leftNavCtrl', ["$scope", "toaster", function($scope, toaster){
 		$scope.promptUpdate = function() {
             if (!$scope.userInfo.pwdEnable || !$scope.userInfo.haveUserQuestion||!$scope.userInfo.emailValidCode || $scope.userInfo.emailValidCode != 2) {
                 $scope.openHomeCenterModel();
@@ -1812,4 +1831,5 @@ define([ 'app/app' ], function(app) {
 		}
 		return arr;
 	};
+
 });

+ 49 - 3
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -111,7 +111,8 @@ define(['app/app'], function (app) {
             brand: true,
             unitPrice: true,
             amount: true,
-            deadline: true
+            deadline: true,
+            spec: true
           };
 
           // 买家求购列表
@@ -179,12 +180,41 @@ define(['app/app'], function (app) {
           $scope.deadDate.setMonth($scope.deadDate.getMonth() + 3);
           $scope.deadDate.setDate($scope.deadDate.getDate() + 1);
 
+
+          $scope.checkNull = function (code) {
+            var str = code;
+            var filterStr = new Array("空", "没", "无", "-", "—", "null", "#N/A");
+            var flag = true;
+            angular.forEach (filterStr, function(item) {
+              if (str == item){
+                  flag = false;
+                  return;
+              }
+            })
+            return flag;
+          }
+
+          $scope.checkSpec = function () {
+            if (!$scope.checkNull($scope.applyObj.spec)){
+              toaster.pop('error', '规格输入不合法');
+                $scope.validObj.spec = false;
+            } else {
+                $scope.validObj.spec = true;
+            }
+            return $scope.validObj.spec;
+
+          }
+
           $scope.checkCode = function () {
             $scope.setShowSimilarCodeList($scope.isInCodeList);
             $scope.validObj.code = $scope.applyObj.code && $scope.applyObj.code !== '';
             if (!$scope.validObj.code) {
               toaster.pop('error', '型号不能为空');
             }
+            if (!$scope.checkNull($scope.applyObj.code)){
+              toaster.pop('error', '型号输入不合法');
+              $scope.validObj.code = false;
+            }
             return this.validObj.code;
           }
           $scope.checkBrand = function () {
@@ -194,6 +224,10 @@ define(['app/app'], function (app) {
             if (!$scope.validObj.brand) {
               toaster.pop('error', '品牌不能为空');
             }
+            if (!$scope.checkNull($scope.applyObj.brand)){
+              toaster.pop('error', '品牌输入不合法');
+              $scope.validObj.brand = false;
+            }
             return $scope.validObj.brand;
           }
           $scope.checkUnitPrice = function () {
@@ -239,6 +273,16 @@ define(['app/app'], function (app) {
               $scope.applyObj.encapsulation = cutOutString($scope.applyObj.encapsulation, 20);
             }
           }
+            $scope.onProdTitleInput = function () {
+              if ($scope.applyObj.prodTitle && getRealLen($scope.applyObj.prodTitle) > 40) {
+                $scope.applyObj.prodTitle = cutOutString($scope.applyObj.prodTitle, 40);
+              }
+            };
+            $scope.onSpecInput = function () {
+              if ($scope.applyObj.spec && getRealLen($scope.applyObj.spec) > 100) {
+                $scope.applyObj.spec = cutOutString($scope.applyObj.spec, 100);
+              }
+            };
           $scope.onCodeChange = function () {
             // $scope.applyObj.code = $scope.applyObj.code.trim();
             if ((/[^\x00-\xff]/g).test($scope.applyObj.code)) {
@@ -296,7 +340,7 @@ define(['app/app'], function (app) {
           }
           $scope.checkAll = function () {
             return $scope.checkCode() && $scope.checkBrand() && $scope.checkDeadline()
-                && $scope.checkUnitPrice() && $scope.checkAmount();
+                && $scope.checkUnitPrice() && $scope.checkAmount() && $scope.checkSpec();
           }
           $scope.checkDeadline = function () {
             $scope.validObj.deadline = $scope.applyObj.deadline
@@ -336,13 +380,15 @@ define(['app/app'], function (app) {
               inquiryItem.userTel = $scope.userInfo.userTel;
               inquiryItem.needquantity = $scope.applyObj.amount;
               inquiryItem.inbrand = $scope.applyObj.brand;
-              inquiryItem.currency = $scope.applyObj.currency;
+              inquiryItem.currency = $scope.applyObj.unitPrice ? $scope.applyObj.currency : null;
               inquiryItem.cmpCode = ($scope.applyObj.code).toUpperCase();
               inquiryItem.unitPrice = $scope.applyObj.unitPrice;
               inquiryItem.produceDate = $scope.applyObj.produceDate;
               inquiryItem.date = new Date();
               inquiryItem.endDate = $scope.applyObj.deadline;
               inquiryItem.encapsulation = $scope.applyObj.encapsulation;
+              inquiryItem.spec = $scope.applyObj.spec;
+              inquiryItem.prodTitle = $scope.applyObj.prodTitle;
               var inquiryItems = [];
               inquiryItems.push(inquiryItem);
               inquiry.inquiryItems = inquiryItems;

+ 31 - 20
src/main/webapp/resources/view/usercenter/forstore/bomDetail.html

@@ -120,10 +120,12 @@
         left: 10px;
     }
     .seek-purchase .seek-purchase-content >table >tbody {
-        border-right: 1px solid #dae5fd;
         border-left: 1px solid #dae5fd;
         border-bottom: 1px solid #dae5fd;
     }
+    .seek-purchase .seek-purchase-content >table >tbody tr.default-row td:last-child {
+        border-right: 1px solid #dae5fd;
+    }
     .seek-purchase .seek-purchase-content >table >tbody >tr.default-row {
         border-bottom: 1px solid #dae5fd;
     }
@@ -322,6 +324,9 @@
         margin: 0 0 18px 0;
     }
     /*提示框样式 end*/
+    .seek-purchase .seek-purchase-content >table >tbody.pager-tbody {
+        border: none;
+    }
     .seek-purchase .seek-purchase-content >table >tbody tr.pager-row td div {
         text-align: right;
         padding-right: 15px;
@@ -508,15 +513,10 @@
         <table ng-table="seekPurchaseTableParams">
             <thead>
             <tr>
-                <th width="165">发布时间</th>
-                <th width="125">型号</th>
-                <th width="169">品牌</th>
-                <th width="93">采购数量</th>
-                <th width="78">单价预算</th>
-                <th width="70">封装</th>
-                <th width="105">生产日期</th>
-                <th width="123">截止时间</th>
-                <th width="81">
+                <th width="102">发布时间</th>
+                <th width="670">产品信息</th>
+                <th width="132">截止时间</th>
+                <th width="96">状态</th>
                     <!--
                     <select class="select-adder form-control" ng-model="searchStatus" ng-change="onSearch(searchStatus)">
                         <option value="0">全部</option>
@@ -525,8 +525,6 @@
                         <option value="202">已采纳</option>
                     </select>
                     -->
-                    状态
-                </th>
                 <!--
                 <th width="92">操作</th>
                 -->
@@ -534,15 +532,28 @@
             </thead>
             <tbody ng-repeat="seek in bomInfo.inquiryItems">
             <tr class="default-row">
-                <td ng-bind="seek.date | date:'yyyy-MM-dd HH:mm:ss'"></td>
-                <td ng-bind="seek.cmpCode || '-'" title="{{seek.cmpCode}}"></td>
-                <td ng-bind="seek.inbrand || '-'" title="{{seek.inbrand}}"></td>
-                <td ng-bind="seek.needquantity || '-'"></td>
                 <td>
-                    <span>{{seek.currency + seek.unitPrice | currencyStr}}</span>
+                    <div class="row-wrap">
+                        <div ng-bind="seek.date | date:'yyyy-MM-dd'"></div>
+                        <div class="date-bottom-item" ng-bind="seek.date | date:'HH:mm:ss'"></div>
+                    </div>
+                </td>
+                <td>
+                    <div class="row-wrap il-content">
+                        <div class="il-box-large il-box">
+                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl item"><span>类目:</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.cmpCode}}" class="fl item"><span>型号:</span><div class="content">{{seek.cmpCode || '-'}}</div></div>
+                            <div title="{{seek.inbrand}}" class="fl item bottom"><span>品牌:</span><div class="content">{{seek.inbrand || '-'}}</div></div>
+                            <div title="{{seek.spec}}" class="fl item bottom"><span>规格:</span><div class="content">{{seek.spec || '-'}}</div></div>
+                        </div>
+                        <div class="il-box-small il-box">
+                            <div title="{{seek.encapsulation}}" class="item"><span>封装:</span>{{seek.encapsulation || '-'}}</div>
+                            <div title="{{seek.produceDate}}" class="item"><span>生产日期:</span>{{seek.produceDate || '-'}}</div>
+                            <div title="{{seek.needquantity}}" class="item"><span>采购数量:</span>{{seek.needquantity || '-'}}</div>
+                            <div title="{{seek.currency + seek.unitPrice | currencyStr}}" class="item"><span>单价预算:</span>{{seek.currency + seek.unitPrice | currencyStr}}</div>
+                        </div>
+                    </div>
                 </td>
-                <td ng-bind="seek.encapsulation || '-'" title="{{seek.encapsulation}}">盘装</td>
-                <td ng-bind="seek.produceDate || '-'" title="{{seek.produceDate}}">2012-12-12</td>
                 <td class="left-time" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></td>
                 <td class="left-time" ng-if="seek.remainingTime <= 0"><span style="color: red;">已截止</span></td>
                 <td>
@@ -653,7 +664,7 @@
                 </td>
             </tr>
             </tbody>
-            <tbody>
+            <tbody class="pager-tbody">
             <tr class="pager-row">
                 <td colspan="10">
                     <div>

+ 68 - 48
src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html

@@ -232,17 +232,26 @@
     .seek-purchase .seek-purchase-content >table >tbody >tr.default-row {
         border-bottom: 1px solid #dae5fd;
     }
+    .seek-purchase .seek-purchase-content >table >tbody.active {
+        border: 2px solid #f7a986;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody .operate-seek {
+        border-right: 1px solid #dae5fd;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody.active .operate-seek,
+    .seek-purchase .seek-purchase-content >table >tbody.active .expand-row > td {
+        border-right: 2px solid #f7a986;
+    }
     .seek-purchase .seek-purchase-content >table >tbody >tr.default-row:hover {
         background: #f1f5ff;
     }
     .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td {
         font-size: 14px;
         text-align: center;
-        height: 70px;
+        height: 117px;
     }
-    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td.operate-seek >span {
-        color: #4290f7;
-        cursor: pointer;
+    .seek-purchase .seek-purchase-content >table >tbody >tr .row-wrap {
+        height: 117px;
     }
     .seek-purchase .red-text {
         color: #f62d37;
@@ -286,9 +295,10 @@
         top: 0;
     }
     .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number input {
-        width: 80px;
+        width: 105px;
         height: 26px;
         text-align: center;
+        padding: 0 20px;
     }
     .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number span {
         width: 17px;
@@ -311,7 +321,7 @@
     }
     .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.input-number span:last-child {
         top: 12px;
-        right: 10px;
+        right: -5px;
     }
     .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.operate a {
         color: #5078cb;
@@ -453,6 +463,9 @@
         margin: 0 0 18px 0;
     }
     /*提示框样式 end*/
+    .seek-purchase .seek-purchase-content >table >tbody.pager-tbody {
+        border: none;
+    }
     .seek-purchase .seek-purchase-content >table >tbody tr.pager-row td div {
         text-align: right;
         padding-right: 15px;
@@ -478,7 +491,7 @@
     .seek-purchase .bom-manage {
         margin: 10px 0 0 0;
         background: #fff;
-        padding-bottom: 30px;
+        padding-bottom: 60px;
     }
     .seek-purchase .bom-manage .bom-manage-header {
         height: 83px;
@@ -725,6 +738,14 @@
                     <span>生产日期</span>
                     <input type="text" class="form-group" ng-model="applyObj.produceDate" ng-change="onProduceDateChange()">
                 </div>
+                <div class="form-block">
+                    <span>类目</span>
+                    <input type="text" class="form-group" ng-model="applyObj.prodTitle" ng-change="onProdTitleInput()">
+                </div>
+                <div class="form-block">
+                    <span>规格</span>
+                    <input type="text" class="form-group" ng-model="applyObj.spec" ng-blur="checkSpec()" ng-change="onSpecInput()">
+                </div>
                 <a href="javascript:void(0)" ng-click="release()">发布求购</a>
             </div>
         </div>
@@ -785,57 +806,56 @@
         <table ng-table="seekPurchaseTableParams">
             <thead>
             <tr>
-                <th width="165">发布时间</th>
-                <th width="202">型号 / 品牌</th>
-                <th width="93">采购数量</th>
-                <th width="78">单价预算</th>
-                <th width="70">封装</th>
-                <th width="105">生产日期</th>
-                <th width="123">截止时间</th>
-                <th width="81">
-                    <!--
-                    <select class="select-adder form-control" ng-model="searchStatus" ng-change="onSearch(searchStatus)">
-                        <option value="0">全部</option>
-                        <option value="">待报价</option>
-                        <option value="done">已报价</option>
-                        <option value="202">已采纳</option>
-                    </select>-->
-                    状态
-                </th>
-                <th width="92">操作</th>
+                <th width="102">发布时间</th>
+                <th width="670">产品信息</th>
+                <th width="132">状态/截止时间</th>
+                <th width="96">操作</th>
             </tr>
             </thead>
-            <tbody ng-repeat="seek in seekListData.content">
+            <tbody ng-repeat="seek in seekListData.content" ng-class="{'active': seek.$status && (seek.$status == 1 || seek.$status == 2)}">
             <tr class="default-row">
-                <td ng-bind="seek.date | date:'yyyy-MM-dd HH:mm'"></td>
-                <td style="text-align: left;">
-                    <p title="{{seek.cmpCode}}" class="text-bold" style="width: 205px;">
-                        <span ng-bind="seek.cmpCode || '-'"></span>
-                    </p>
-                    <p title="{{seek.inbrand}}" ng-bind="seek.inbrand || '-'" style="width: 205px;"></p>
+                <td>
+                    <div class="row-wrap">
+                        <div ng-bind="seek.date | date:'yyyy-MM-dd'"></div>
+                        <div class="date-bottom-item" ng-bind="seek.date | date:'HH:mm:ss'"></div>
+                    </div>
                 </td>
-                <td ng-bind="seek.needquantity || '-'"></td>
                 <td>
-                    <span title="{{seek.currency + seek.unitPrice | currencyStr}}">{{seek.currency + seek.unitPrice | currencyStr}}</span>
+                    <div class="row-wrap il-content">
+                        <div class="il-box-large il-box">
+                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl item"><span>类目:</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.cmpCode}}" class="fl item"><span>型号:</span><div class="content">{{seek.cmpCode || '-'}}</div></div>
+                            <div title="{{seek.inbrand}}" class="fl item bottom"><span>品牌:</span><div class="content">{{seek.inbrand || '-'}}</div></div>
+                            <div title="{{seek.spec}}" class="fl item bottom"><span>规格:</span><div class="content">{{seek.spec || '-'}}</div></div>
+                        </div>
+                        <div class="il-box-small il-box">
+                            <div title="{{seek.encapsulation}}" class="item"><span>封装:</span>{{seek.encapsulation || '-'}}</div>
+                            <div title="{{seek.produceDate}}" class="item"><span>生产日期:</span>{{seek.produceDate || '-'}}</div>
+                            <div title="{{seek.needquantity}}" class="item"><span>采购数量:</span>{{seek.needquantity || '-'}}</div>
+                            <div title="{{seek.currency + seek.unitPrice | currencyStr}}" class="item"><span>单价预算:</span>{{seek.currency + seek.unitPrice | currencyStr}}</div>
+                        </div>
+                    </div>
                 </td>
-                <td ng-bind="seek.encapsulation || '-'" title="{{seek.encapsulation}}">盘装</td>
-                <td ng-bind="seek.produceDate || '-'" title="{{seek.produceDate}}">2012-12-12</td>
-                <td class="left-time" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></td>
-                <td class="left-time" ng-if="seek.remainingTime <= 0"><span style="color: red;">已截止</span></td>
-                <td class="left-time" ng-if="seek.remainingTime == null"><span style="color: red;">-</span></td>
                 <td>
-                    <span ng-if="seek.offerAmount == 0" style="color:red;">待报价</span>
-                    <span ng-if="seek.agreed == 0 && seek.offerAmount > 0">已报价</span>
-                    <span ng-if="seek.agreed == 1" style="color:green;">已采纳</span>
+                    <div class="row-wrap">
+                        <span ng-if="seek.offerAmount == 0" style="color:red;">待报价</span>
+                        <span ng-if="seek.agreed == 0 && seek.offerAmount > 0">已报价</span>
+                        <span ng-if="seek.agreed == 1" style="color:green;">已采纳</span>
+                        <div class="remain" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></div>
+                        <div class="remain" ng-if="seek.remainingTime <= 0"><span>已截止</span></div>
+                        <div class="remain" ng-if="seek.remainingTime == null"><span>-</span></div>
+                    </div>
                 </td>
                 <td class="operate-seek">
-                    <span ng-if="seek.offerAmount > 0" ng-show="!seek.$status || seek.$status == 0" ng-click="setSeekStatus(seek, 2)">查看报价&nbsp;<i class="fa fa-angle-double-down"></i></span>
-                    <span ng-if="seek.goodsAmount > 0" ng-show="!seek.$status || seek.$status == 0" ng-click="setSeekStatus(seek, 1)">查看现货&nbsp;<i class="fa fa-angle-double-down"></i></span>
-                    <span ng-show="seek.$status && (seek.$status == 1 || seek.$status == 2)" ng-click="setSeekStatus(seek, 0)">收起&nbsp;<i class="fa fa-angle-double-up"></i></span>
+                    <div class="row-wrap">
+                        <span ng-if="seek.offerAmount > 0" ng-show="!seek.$status || seek.$status == 0" ng-click="setSeekStatus(seek, 2)">查看报价&nbsp;<i class="fa fa-angle-double-down"></i></span>
+                        <span ng-if="seek.goodsAmount > 0" ng-show="!seek.$status || seek.$status == 0" ng-click="setSeekStatus(seek, 1)">商城现货&nbsp;<i class="fa fa-angle-double-down"></i></span>
+                        <span ng-show="seek.$status && (seek.$status == 1 || seek.$status == 2)" ng-click="setSeekStatus(seek, 0)">收起&nbsp;<i class="fa fa-angle-double-up"></i></span>
+                    </div>
                 </td>
             </tr>
             <tr class="expand-row" ng-if="seek.$status == 1 || seek.$status == 2">
-                <td colspan="10">
+                <td colspan="4">
                     <div>
                         <div class="switch-line">
                             <a ng-disabled="goodsCount == 0" ng-class="{'active': seek.$status == 1}" ng-click="setSeekStatus(seek, 1)">商城现货(<span ng-bind="goodsCount"></span>)</a>
@@ -942,8 +962,8 @@
                 </td>
             </tr>
             </tbody>
-            <tbody>
-            <tr class="pager-row" ng-if="seekListData.totalElements > 0">
+            <tbody class="pager-tbody">
+                <tr class="pager-row" ng-if="seekListData.totalElements > 0">
                 <td colspan="10">
                     <div>
                         显示&nbsp;{{(seekListData.number - 1 ) * seekListData.size + 1}}-{{seekListData.number * seekListData.size}}&nbsp;条,共&nbsp;{{seekListData.totalElements}}&nbsp;条

+ 41 - 30
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -156,7 +156,20 @@
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td {
         font-size: 14px;
         text-align: center;
-        height: 80px;
+        height: 136px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap {
+        padding-top: 33px;
+        height: 136px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content {
+        padding-left: 30px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large .fl {
+        margin-right: 37px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large {
+        width: 440px;
     }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.release-time {
         position: relative;
@@ -268,21 +281,19 @@
         border-radius: 2px;
     }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price {
-        margin: 17px 0 0 0;
         color: #39ae05;
         background: transparent;
         width: 100%;
     }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history {
         position: absolute;
-        top: 64px;
+        top: 91px;
         right: 11px;
         line-height: normal;
         width: 198px;
         height: 0;
         background: #fff;
         border: 1px solid #fab89a;
-        z-index: 2;
         overflow: hidden;
         transition: height 1s;
         -moz-transition: height 1s; /* Firefox 4 */
@@ -628,38 +639,38 @@
         <table ng-table="seekPurchaseTableParams">
             <thead>
             <tr>
-                <th width="212">买家 / 发布时间</th>
-                <th width="211">型号 / 品牌</th>
-                <th width="84">封装</th>
-                <th width="95">生产日期</th>
-                <th width="86">采购数量</th>
-                <th width="94">单价预算</th>
-                <th width="115">剩余时间</th>
-                <th width="92">操作</th>
+                <th width="178">买家/发布时间</th>
+                <th width="658">产品信息</th>
+                <th width="134">剩余时间</th>
+                <th width="88">操作</th>
             </tr>
             </thead>
             <tbody ng-repeat="seek in $data track by $index" ng-class="{'active': seek.$active, 'hover': seek.$hover && (seek.status == 201 || seek.status == 202)}">
             <tr class="default-row" ng-mouseenter="seek.$hover = true;" ng-mouseleave="seek.$hover = false;" >
                 <td class="user-name">
-                    <p>
-                        <span ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></span>
-                        <span ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></span>
-                    </p>
-                    <p class="text-light">
-                        <span ng-bind="seek.date | date:'yyyy-MM-dd HH:mm'"></span>
-                    </p>
-                </td>
-                <td style="text-align: left;">
-                    <p title="{{seek.cmpCode}}" class="text-bold" style="width: 205px;">
-                        <span ng-bind="seek.cmpCode || '-'"></span>
-                    </p>
-                    <p title="{{seek.inbrand}}" ng-bind="seek.inbrand || '-'" style="width: 205px;"></p>
+                    <div class="row-wrap">
+                        <div class="en-name">
+                            <span ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></span>
+                            <span ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></span>
+                        </div>
+                        <div class="date-bottom-item" ng-bind="seek.date | date:'yyyy-MM-dd HH:mm'"></div>
+                    </div>
                 </td>
-                <td><div title="{{seek.encapsulation}}" ng-bind="seek.encapsulation || '--'"></div></td>
-                <td><div title="{{seek.produceDate}}" ng-bind="seek.produceDate || '--'"></div></td>
-                <td><div title="{{seek.needquantity}}" ng-bind="seek.needquantity || '--'"></div></td>
-                <td class="unit-price">
-                    <span>{{seek.currency + seek.unitPrice | currencyStr}}</span>
+                <td>
+                    <div class="row-wrap il-content">
+                        <div class="il-box-large il-box">
+                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl item"><span>类目:</span><div class="content">{{(seek.prodTitle || '-')  | nullStrFilter}}</div></div>
+                            <div title="{{seek.cmpCode}}" class="fl item"><span>型号:</span><div class="content">{{seek.cmpCode || '-'}}</div></div>
+                            <div title="{{seek.inbrand}}" class="fl item bottom"><span>品牌:</span><div class="content">{{seek.inbrand || '-'}}</div></div>
+                            <div title="{{seek.spec}}" class="fl item bottom"><span>规格:</span><div class="content">{{seek.spec || '-'}}</div></div>
+                        </div>
+                        <div class="il-box-small il-box">
+                            <div title="{{seek.encapsulation}}" class="item"><span>封装:</span>{{seek.encapsulation || '-'}}</div>
+                            <div title="{{seek.produceDate}}" class="item"><span>生产日期:</span>{{seek.produceDate || '-'}}</div>
+                            <div title="{{seek.needquantity}}" class="item"><span>采购数量:</span>{{seek.needquantity || '-'}}</div>
+                            <div title="{{seek.currency + seek.unitPrice | currencyStr}}" class="item"><span>单价预算:</span>{{seek.currency + seek.unitPrice | currencyStr}}</div>
+                        </div>
+                    </div>
                 </td>
                 <td class="left-time" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></td>
                 <td class="left-time" ng-if="seek.remainingTime <= 0"><span>已截止</span></td>

+ 41 - 29
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -110,7 +110,20 @@
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td {
         font-size: 14px;
         text-align: center;
-        height: 80px;
+        height: 136px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap {
+        padding-top: 33px;
+        height: 136px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content {
+        padding-left: 30px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large .fl {
+        margin-right: 37px;
+    }
+    .seek-purchase .seek-purchase-content >table >tbody >tr.default-row td .row-wrap.il-content .il-box.il-box-large {
+        width: 440px;
     }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.release-time {
         position: relative;
@@ -211,7 +224,6 @@
         background: #cccbcb;
     }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate span {
-        margin: 17px 0 0 0;
         color: #39ae05;
         display: block;
     }
@@ -652,42 +664,42 @@
         <table ng-table="seekPurchaseTableParams">
             <thead>
                 <tr>
-                    <th width="212">买家 / 发布时间</th>
-                    <th width="211">型号 / 品牌</th>
-                    <th width="84">封装</th>
-                    <th width="95">生产日期</th>
-                    <th width="86">采购数量</th>
-                    <th width="94">单价预算</th>
-                    <th width="115">剩余时间</th>
-                    <th width="92">操作</th>
+                    <th width="178">买家/发布时间</th>
+                    <th width="658">产品信息</th>
+                    <th width="134">剩余时间</th>
+                    <th width="88">操作</th>
                 </tr>
             </thead>
             <tbody ng-repeat="seek in seekListData track by $index" ng-class="{'active': seek.$active}">
                 <tr class="default-row">
                     <td class="user-name">
-                        <p>
-                            <span ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></span>
-                            <span ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></span>
-                        </p>
-                        <p class="text-light">
-                            <span ng-bind="seek.date | date:'yyyy-MM-dd HH:mm'"></span>
-                        </p>
-                    </td>
-                    <td style="text-align: left;">
-                        <p title="{{seek.cmpCode}}" class="text-bold" style="width: 205px;">
-                            <span ng-bind="seek.cmpCode || '-'"></span>
-                        </p>
-                        <p title="{{seek.inbrand}}" ng-bind="seek.inbrand || '-'" style="width: 205px;"></p>
+                        <div class="row-wrap">
+                            <div class="en-name">
+                                <span ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></span>
+                                <span ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></span>
+                            </div>
+                            <div class="date-bottom-item" ng-bind="seek.date | date:'yyyy-MM-dd HH:mm'"></div>
+                        </div>
                     </td>
-                    <td><div title="{{seek.encapsulation}}" ng-bind="seek.encapsulation || '-'"></div></td>
-                    <td><div title="{{seek.produceDate}}" ng-bind="seek.produceDate || '-'"></div></td>
-                    <td><div title="{{seek.needquantity}}" ng-bind="seek.needquantity || '-'"></div></td>
-                    <td class="unit-price">
-                        <span>{{seek.currency + seek.unitPrice | currencyStr}}</span>
+                    <td>
+                        <div class="row-wrap il-content">
+                            <div class="il-box-large il-box">
+                                <div title="{{seek.prodTitle | nullStrFilter}}" class="fl item"><span>类目:</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                                <div title="{{seek.cmpCode}}" class="fl item"><span>型号:</span><div class="content">{{seek.cmpCode || '-'}}</div></div>
+                                <div title="{{seek.inbrand}}" class="fl item bottom"><span>品牌:</span><div class="content">{{seek.inbrand || '-'}}</div></div>
+                                <div title="{{seek.spec}}" class="fl item bottom"><span>规格:</span><div class="content">{{seek.spec || '-'}}</div></div>
+                            </div>
+                            <div class="il-box-small il-box">
+                                <div title="{{seek.encapsulation}}" class="item"><span>封装:</span>{{seek.encapsulation || '-'}}</div>
+                                <div title="{{seek.produceDate}}" class="item"><span>生产日期:</span>{{seek.produceDate || '-'}}</div>
+                                <div title="{{seek.needquantity}}" class="item"><span>采购数量:</span>{{seek.needquantity || '-'}}</div>
+                                <div title="{{seek.currency + seek.unitPrice | currencyStr}}" class="item"><span>单价预算:</span>{{seek.currency + seek.unitPrice | currencyStr}}</div>
+                            </div>
+                        </div>
                     </td>
                     <td class="left-time" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></td>
                     <td class="left-time" ng-if="seek.remainingTime <= 0"><span>已截止</span></td>
-                    <td class="left-time" ng-if="seek.remainingTime == null"><span style="color: red;">-</span></td>
+                    <td class="left-time" ng-if="seek.remainingTime == null"><span>-</span></td>
                     <td class="operate">
                         <!--<a ng-click="setLinkBoxIndex($index)">联系买家 <img src="static/img/seekPurchase/link-buyer.png" alt=""></a>-->
                         <div ng-if="userInfo.enterprise.uu != seek.inquiry.enUU && seek.quoted != 1 && seek.remainingTime > 0" ng-click="setSeekActive(seek, true, index)">我要报价</div>