Browse Source

Merge remote-tracking branch 'origin/feature-201844-wangcz' into feature-201844-wangcz

wangcz 7 years ago
parent
commit
346cfb7b16

+ 6 - 10
src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsHistory.java

@@ -3,15 +3,7 @@ package com.uas.platform.b2c.prod.commodity.model;
 import com.uas.platform.b2c.common.account.model.UserBaseInfo;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-import javax.persistence.Transient;
+import javax.persistence.*;
 import java.util.Date;
 import java.util.List;
 
@@ -22,7 +14,11 @@ import java.util.List;
  *
  */
 @Entity
-@Table(name = "trade$goods_history")
+@Table(name = "trade$goods_history", indexes = {
+		@Index(name = "goods_history_go_batchcode", columnList = "go_batchcode"),
+		@Index(name = "goods_history_log_operateuu", columnList = "log_operateuu")
+		}
+)
 public class GoodsHistory {
 
 	@Id

+ 348 - 0
src/main/java/com/uas/platform/b2c/prod/store/model/StoreInSimple.java

@@ -0,0 +1,348 @@
+package com.uas.platform.b2c.prod.store.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.prod.commodity.model.Goods;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 店铺信息类
+ *
+ * @author huxz
+ * @version 2017-08-02 14:39:53 创建文件
+ */
+@Entity
+@Table(name = "store$info")
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+public class StoreInSimple implements Serializable {
+
+	private static final long serialVersionUID = -2806666044917530730L;
+
+	@Id
+	@GeneratedValue
+	@Column(name = "id")
+	private Long id;
+
+	/*+************************************************************************
+	 * 店铺信息
+	 **************************************************************************/
+
+	/**
+	 * 店铺UUID
+	 */
+	@Column(name = "st_uuid", unique = true)
+	private String uuid;
+
+	/**
+	 * 店铺名称,实际为企业名称
+	 */
+	@Column(name = "st_name", unique = true)
+	private String storeName;
+
+	/**
+	 * 店铺简称,实际为店铺名称
+	 */
+	@Column(name = "st_short_name")
+	private String storeShortName;
+
+	/**
+	 * 应用领域
+	 */
+	@Column(name="st_application",length = 100)
+	private String storeApplication;
+
+	/**
+	 *	店铺LOGO URL
+	 */
+	@Column(name = "st_logo_url")
+	private String logoUrl;
+
+	/**
+	 * 店铺横幅URL
+	 */
+	@Column(name = "st_banner_url")
+	private String bannerUrl;
+
+	/**
+	 * 主营产品
+	 */
+	@Column(name = "st_description", length = 1000)
+	private String description;
+
+	/**
+	 * 店铺模板UUID
+	 */
+	@Column(name = "st_template_uuid")
+	private String templateUuid;
+
+	/**
+	 * 店铺类型
+	 */
+	@Column(name = "st_type")
+	@Enumerated(value = EnumType.STRING)
+	private StoreType type;
+
+	/**
+	 * 创建时间
+	 */
+	@Column(name = "st_create_time")
+	private Date createTime;
+
+	/**
+	 * 更新时间
+	 */
+	@Column(name = "st_update_time")
+	private Date updateTime;
+
+	/**
+	 * 上架商品总库存
+	 */
+	@Column(name = "st_total_reserve")
+	private long totalReserve;
+
+	/**
+	 * 店铺状态
+	 */
+	@Enumerated(value = EnumType.STRING)
+	@Column(name = "st_status")
+	private StoreStatus status = StoreStatus.OPENED;
+
+	/*+************************************************************************
+	 * 企业信息
+	 **************************************************************************/
+
+	/**
+	 * 店铺企业UU
+	 */
+	@Column(name = "st_enuu")
+	private Long enUU;
+
+	@OneToOne(cascade = { CascadeType.REFRESH })
+	@JoinColumn(name = "st_enuu", insertable = false, updatable = false)
+	private Enterprise enterpriseInfo;
+
+	/**
+	 * 企业信息JSON
+	 */
+	@JsonIgnore
+	@Column(name = "st_en_json", length = 2000 ,columnDefinition="TEXT")
+	private String enterpriseJson;
+
+	/**
+	 * 企业资质类型
+	 */
+	@Column(name = "st_en_type")
+	private String enType;
+
+	/**
+	 * 企业资质信息
+	 */
+	@Column(name = "st_en_qualification" ,columnDefinition="TEXT")
+	private String enQualification;
+
+	/**
+	 * 店铺标签
+	 */
+	@Column(name = "st_tags")
+	private String tags = "[]";
+
+	/**
+	 * 企业分数
+	 */
+	@Column(name = "st_score")
+	private Double score = 0d;
+
+	/*+************************************************************************
+	 * 资质信息
+	 **************************************************************************/
+
+	/**
+	 * 最低价三个批次
+	 */
+	@Transient
+	private List<Goods> goodses;
+
+	public Enterprise getEnterpriseInfo() {
+		return enterpriseInfo;
+	}
+
+	public void setEnterpriseInfo(Enterprise enterpriseInfo) {
+		this.enterpriseInfo = enterpriseInfo;
+	}
+
+	public StoreInSimple() {
+	}
+
+	public String getStoreApplication() {
+		return storeApplication;
+	}
+
+	public void setStoreApplication(String storeApplication) {
+		this.storeApplication = storeApplication;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getUuid() {
+		return uuid;
+	}
+
+	public void setUuid(String uuid) {
+		this.uuid = uuid;
+	}
+
+	public String getStoreName() {
+		return storeName;
+	}
+
+	public void setStoreName(String storeName) {
+		this.storeName = storeName;
+	}
+
+	public String getStoreShortName() {
+		return storeShortName;
+	}
+
+	public void setStoreShortName(String storeShortName) {
+		this.storeShortName = storeShortName;
+	}
+
+	public String getLogoUrl() {
+		return logoUrl;
+	}
+
+	public void setLogoUrl(String logoUrl) {
+		this.logoUrl = logoUrl;
+	}
+
+	public String getBannerUrl() {
+		return bannerUrl;
+	}
+
+	public void setBannerUrl(String bannerUrl) {
+		this.bannerUrl = bannerUrl;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public String getTemplateUuid() {
+		return templateUuid;
+	}
+
+	public void setTemplateUuid(String templateUuid) {
+		this.templateUuid = templateUuid;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public long getTotalReserve() {
+		return totalReserve;
+	}
+
+	public void setTotalReserve(long totalReserve) {
+		this.totalReserve = totalReserve;
+	}
+
+	public StoreStatus getStatus() {
+		return status;
+	}
+
+	public void setStatus(StoreStatus status) {
+		this.status = status;
+	}
+
+	public Long getEnUU() {
+		return enUU;
+	}
+
+	public void setEnUU(Long enUU) {
+		this.enUU = enUU;
+	}
+
+	public String getEnterpriseJson() {
+		return enterpriseJson;
+	}
+
+	public void setEnterpriseJson(String enterpriseJson) {
+		this.enterpriseJson = enterpriseJson;
+	}
+
+	public String getEnType() {
+		return enType;
+	}
+
+	public void setEnType(String enType) {
+		this.enType = enType;
+	}
+
+	public String getEnQualification() {
+		return enQualification;
+	}
+
+	public void setEnQualification(String enQualification) {
+		this.enQualification = enQualification;
+	}
+
+	public List<Goods> getGoodses() {
+		return goodses;
+	}
+
+	public void setGoodses(List<Goods> goodses) {
+		this.goodses = goodses;
+	}
+
+	public StoreType getType() {
+		return type;
+	}
+
+	public void setType(StoreType type) {
+		this.type = type;
+	}
+
+	public String getTags() {
+		return tags;
+	}
+
+	public void setTags(String tags) {
+		this.tags = tags;
+	}
+
+	public Double getScore() {
+		return score;
+	}
+
+	public void setScore(Double score) {
+		this.score = score;
+	}
+}

+ 4 - 4
src/main/java/com/uas/platform/b2c/trade/presale/model/Cart.java

@@ -3,7 +3,7 @@ package com.uas.platform.b2c.trade.presale.model;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.model.GoodsSimple;
-import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreInSimple;
 import com.uas.platform.b2c.prod.store.model.StoreType;
 import com.uas.platform.b2c.trade.presale.status.cartStatus;
 import com.uas.platform.core.model.Status;
@@ -166,7 +166,7 @@ public class Cart {
 	 */
 	@OneToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
 	@JoinColumn(name = "cart_store_uuid", referencedColumnName = "st_uuid" ,insertable = false, updatable = false)
-	private StoreIn storeEnterprise;
+	private StoreInSimple storeEnterprise;
 
 	/**
 	 * 店铺名称
@@ -569,11 +569,11 @@ public class Cart {
 		return this;
 	}
 
-	public StoreIn getStoreEnterprise() {
+	public StoreInSimple getStoreEnterprise() {
 		return storeEnterprise;
 	}
 
-	public void setStoreEnterprise(StoreIn storeEnterprise) {
+	public void setStoreEnterprise(StoreInSimple storeEnterprise) {
 		this.storeEnterprise = storeEnterprise;
 	}
 

+ 0 - 15
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CartServiceImpl.java

@@ -421,8 +421,6 @@ public class CartServiceImpl implements CartService {
 //		info.sorting("storeUuid", Sort.Direction.DESC);
 //		info.sorting("id", Sort.Direction.DESC);
 		info.sorting(Sort.Direction.DESC, "storeUuid", "id");
-		// 获取当前页的购物车记录信息
-		long l = System.currentTimeMillis();
 		Page<Cart> carts = cartDao.findAll(new Specification<Cart>() {
 			@Override
 			public Predicate toPredicate(Root<Cart> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
@@ -430,10 +428,6 @@ public class CartServiceImpl implements CartService {
 				return null;
 			}
 		}, info);
-		long l1 = System.currentTimeMillis();
-		System.out.println((l1 - l) + "获取时间购物车时间");
-		// 将购物车记录按店铺进行分类
-
 		if (!CollectionUtils.isEmpty(carts.getContent())) {
 			cartFillGoodsHistory(carts.getContent());
 			setCartSimilarCount(carts.getContent());
@@ -455,15 +449,9 @@ public class CartServiceImpl implements CartService {
 			batchCodes.add(cart.getBatchCode());
 		}
 		//从历史库存中获取上架信息
-		long l2 = System.currentTimeMillis();
 		List<Long> historyIds = goodsHistoryDao.findMaxIdByBatchCodes(batchCodes);
-		long l3 = System.currentTimeMillis();
-		System.out.println((l3 - l2) + "获取id最大值");
 		if (org.apache.commons.collections.CollectionUtils.isNotEmpty(historyIds)) {
-			long l = System.currentTimeMillis();
 			List<GoodsHistory> histories = goodsHistoryDao.findAll(historyIds);
-			long l1 = System.currentTimeMillis();
-			System.out.println((l1 - l) + "获取历史库存时间");
 			for (GoodsHistory history : histories) {
 				for (Cart cart : carts) {
 					if (cart.getBatchCode().equals(history.getBatchCode())) {
@@ -493,10 +481,7 @@ public class CartServiceImpl implements CartService {
 		String sql = "select cmp_code, go_batchcode from trade$goods where cmp_code in (:codes) and go_status = " + com.uas.platform.b2c.core.constant.Status.AVAILABLE.value();
 		Map<String, Object> codeMaps = new HashMap<>();
 		codeMaps.put("codes", codes);
-		long l = System.currentTimeMillis();
 		List<Map<String, Object>> maps = namedParameterJdbcTemplate.queryForList(sql, codeMaps);
-		long l1 = System.currentTimeMillis();
-		System.out.println((l1 - l) + "获取相似产品时间");
 		for (Map<String, Object> numMap : maps) {
 			Object code = numMap.get("cmp_code");
 			for (Cart cart : carts) {

BIN
src/main/webapp/resources/img/vendor/images/arrow-left-d-l.png


BIN
src/main/webapp/resources/img/vendor/images/arrow-right-d-l.png


BIN
src/main/webapp/resources/img/vendor/images/backIcon.png


+ 1 - 2
src/main/webapp/resources/js/common/b2bServices.js

@@ -2803,8 +2803,7 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
             },
             getAllByKeywords: {
               url:b2bUrl +  '/sale/apCheck/getAllByKeywords',
-              method: 'GET',
-              isArray: true
+              method: 'GET'
             },
             saveApCheck: {
               url : b2bUrl + '/sale/apCheck/operation/save',

+ 1 - 1
src/main/webapp/resources/js/usercenter/controllers/b2b/fa/arCheck_detail.js

@@ -5,7 +5,7 @@ define(['app/app'], function(app) {
     $rootScope.active = 'buyer_pay_center'
     var loadData = function () {
       FaArCheck.get({id: $stateParams.id}, function (data) {
-        $scope.order = data;
+        $scope.order = data.data;
         $scope.loading = false;
       });
     };

+ 114 - 16
src/main/webapp/resources/js/vendor/controllers/b2b/apCheck.js

@@ -46,6 +46,8 @@ define(['app/app'], function (app) {
                   $scope.tableParams.page(1);
               $scope.showNotCheck = false
           }
+          $scope.condition.$open = false
+          $scope.apCheckCondition.$open = false
       };
       $scope.changeDateZone = function (zone) {
           $scope.condition.dateZone = zone;
@@ -77,6 +79,17 @@ define(['app/app'], function (app) {
               };
               if ($scope.active === 'all') {
                   pageParams.keyword = $scope.keyword
+                  var _fromDate =  $scope.thisMouthOut + '-01 00:00:00'
+                  var _d = new Date(_fromDate)
+                  _d.setDate(1)
+                  _d.setMonth(_d.getMonth() + 1)
+                  _d.setDate(_d.getDate() - 1)
+                  var _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
+                  _endDate = new Date(_endDate).getTime()
+                  _fromDate = new Date(_fromDate).getTime()
+                  pageParams.searchFilter.fromDate =  _fromDate
+                  pageParams.searchFilter.endDate = _endDate
+
                   FaApCheck.customer(BaseService.parseParams(pageParams), function (page) {
                       $scope.loading = false;
                       if (page) {
@@ -240,6 +253,7 @@ define(['app/app'], function (app) {
           });
           modalInstance.result.then(function (customer) {
               $scope.suuorname = customer.myEnterprise.enName;
+              $scope.customerUU = customer.myEnterprise.uu;
           });
 
       }
@@ -249,6 +263,7 @@ define(['app/app'], function (app) {
           $scope.chooseItem = item;
           $scope.showNotCheck = true
           $scope.suuorname = item.myEnterprise.enName
+          $scope.customerUU = item.myEnterprise.uu
           this.searchOrder()
       }
 
@@ -257,6 +272,7 @@ define(['app/app'], function (app) {
       $scope.sdateTo = new Date();
       $scope.sdateFrom = new Date($scope.sdateTo.getFullYear(), $scope.sdateTo.getMonth(), 1);
       $scope.thisMouth = $scope.sdateTo.getFullYear() +'-'+ ($scope.sdateTo.getMonth())
+      $scope.thisMouthOut = $scope.sdateTo.getFullYear() +'-'+ ($scope.sdateTo.getMonth())
       $scope.condition.uuorname = '';
       // $scope.condition.dateFrom = '';
       // $scope.condition.dateTo = '';
@@ -267,6 +283,10 @@ define(['app/app'], function (app) {
 
       $scope.searchOrder = function (check) {
           $scope.data = [];
+          $scope.dataInfo = {
+              totalCount: [],
+              thisMonthCount: []
+          }
           $scope.checkboxes.checked = false;
           $scope.totalMoney = 0;
           $scope.condition.uuorname = $scope.suuorname;
@@ -283,8 +303,8 @@ define(['app/app'], function (app) {
           $scope.condition.venduuorname = $scope.vuuorname;
           if ($scope.condition.dateTo != null || $scope.keywordXls != null) {
 
-              // $scope.fromDate = $scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
-              // $scope.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
+              $scope.fromDate = $scope.apCheckCondition.dateFrom ? $scope.apCheckCondition.dateFrom.getTime() : null;
+              $scope.endDate = $scope.apCheckCondition.dateTo ? $scope.apCheckCondition.dateTo.getTime() : null;
               $scope.searchKeyWord = {
                   receiveName: $scope.receiveName,
                   factory: $scope.factory,
@@ -301,22 +321,53 @@ define(['app/app'], function (app) {
               //     document.getElementById('suuorname').focus();//光标默认在客户
               // } else {
               $scope.loading = true;
-              FaApCheck.getAllByKeywords({
-                  // fromDate: $scope.fromDate,
-                  // endDate: $scope.endDate,
-                  receiveName: $scope.receiveName,
-                  factory: $scope.factory,
-                  prodTitle: $scope.prodTitle,
-                  prodSpec: $scope.prodSpec,
-                  taxRate: $scope.taxRate,
-                  checkDate: $scope.thisMouth,
-                  suuorname: $scope.suuorname
-              }, function (data) {
-                  if (data.length > 0) {
-                      angular.forEach(data, function (item) {
+              var _params = {}
+              if ($scope.apCheckCondition.$open) {
+                  _params = {
+                      fromDate: $scope.fromDate,
+                      endDate: $scope.endDate,
+                      receiveName: $scope.receiveName,
+                      factory: $scope.factory,
+                      prodTitle: $scope.prodTitle,
+                      prodSpec: $scope.prodSpec,
+                      taxRate: $scope.taxRate,
+                      checkDate: $scope.thisMouth,
+                      suuorname: $scope.suuorname,
+                      customerUU: $scope.customerUU,
+                  }
+              } else {
+                  _params = {
+                      receiveName: $scope.receiveName,
+                      factory: $scope.factory,
+                      prodTitle: $scope.prodTitle,
+                      prodSpec: $scope.prodSpec,
+                      taxRate: $scope.taxRate,
+                      checkDate: $scope.thisMouth,
+                      suuorname: $scope.suuorname,
+                      customerUU: $scope.customerUU,
+                  }
+              }
+              FaApCheck.getAllByKeywords(_params, function (data) {
+                  if (data.details.length > 0) {
+                      angular.forEach(data.details, function (item) {
                           item.$selected = true;
                       });
-                      $scope.data = data;
+                      var _mouthArr = []
+                      data.thisMonthCount.forEach(function(item) {
+                          if (item.amount > 0) {
+                              _mouthArr.push(item)
+                          }
+                      })
+                      data.thisMonthCount = _mouthArr
+                      var _totalArr = []
+                      data.totalCount.forEach(function(item) {
+                          if (item.amount > 0) {
+                              _totalArr.push(item)
+                          }
+                      })
+                      data.totalCount = _totalArr
+                      $scope.dataInfo = data
+                      $scope.data = data.details;
                       $scope.checkboxes.checked = true;
                       $scope.getTotalMoney();
                   } else {
@@ -375,6 +426,7 @@ define(['app/app'], function (app) {
           $scope.filteredData = $filter('filter')($scope.data, $scope.condition.prodtitle || $scope.condition.uuorname || $scope.condition.venduuorname || $scope.condition.prodspec || $scope.condition.factory);
           // var dateFrom = $scope.condition.dateFrom;
           // var dateTo = $scope.condition.dateTo;
+
           angular.forEach($scope.filteredData, function (item) {
               // if ((item.pidate >= dateFrom || dateFrom == '') && (item.pidate < dateTo || dateTo == '')) {
               item.$selected = $scope.checkboxes.checked;
@@ -399,6 +451,7 @@ define(['app/app'], function (app) {
 
       // 点击其中一个明细的复选框
       $scope.checkOne = function (check) {
+          check.$selected = !check.$selected
           var result = true;
           angular.forEach($scope.data, function (item) {
               if (item.$selected != true) {
@@ -592,6 +645,51 @@ define(['app/app'], function (app) {
           }
       }
 
+      // 新增
+      $scope.apCheckCondition = {
+          $open: false
+      }
+      $scope.apCheckopenFilterDatePicker = function ($event, item, openParam) {
+          $event.preventDefault();
+          $event.stopPropagation();
+          item[openParam] = !item[openParam];
+          if ($scope.apCheckCondition.dateFrom && $scope.apCheckCondition.dateTo && !item[openParam]) {
+              $scope.searchOrder()
+          }
+      };
+      $scope.addMouth = function(val) {
+          var _time = new Date($scope.thisMouth)
+          _time.setMonth(_time.getMonth() + val)
+          $scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
+          $scope.apCheckCondition.$open = false
+          this.searchOrder()
+      }
+
+      $scope.addMouthOut = function(val) {
+          var _time = new Date($scope.thisMouthOut)
+          _time.setMonth(_time.getMonth() + val)
+          $scope.thisMouthOut = _time.getFullYear() + '-' + (_time.getMonth() + 1)
+          $scope.tableParams.page(1);
+          $scope.tableParams.reload();
+      }
+
+      $scope.hideshowNotCheck = function() {
+          $scope.showNotCheck = false
+      }
+
+      $scope.$watch('thisMouthOut', function(newVal, oldVal) {
+          if (newVal !== oldVal) {
+              $scope.tableParams.page(1);
+              $scope.tableParams.reload();
+          }
+      })
+      $scope.$watch('thisMouth', function(newVal, oldVal) {
+          if (newVal !== oldVal) {
+              $scope.searchOrder()
+          }
+      })
+
+
     /**
      * 将日期转化为整数日期
      */

+ 5 - 5
src/main/webapp/resources/js/vendor/controllers/forstore/single_entry.js

@@ -138,7 +138,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
         if (name === '') {
           $scope.Regul.BrandList = []
         } else {
-          $scope.Regul.pbranden = $scope.Regul.BrandList && $scope.Regul.BrandList.value && $scope.Regul.BrandList.value[0].nameEn || name
+          $scope.Regul.pbranden = $scope.Regul.BrandList && $scope.Regul.BrandList.value[0] && $scope.Regul.BrandList.value[0].nameEn || name
           $scope.Regul.BrandList = []
         }
       // }, 300)
@@ -200,10 +200,10 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       if (name === '') {
         $scope.Regul.CodeList = []
       } else {
-        $scope.Regul.pcmpcode = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pcmpcode || name
-        $scope.Regul.pbranden = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.pbranden
-        $scope.Regul.spec = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.spec
-        $scope.Regul.kind = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.kind
+        $scope.Regul.pcmpcode = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0] && $scope.Regul.CodeList.value[0].pcmpcode || name
+        $scope.Regul.pbranden = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0] && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.pbranden
+        $scope.Regul.spec = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0] && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.spec
+        $scope.Regul.kind = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0] && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.kind
         $scope.Regul.CodeList = []
       }
     }

+ 35 - 27
src/main/webapp/resources/view/usercenter/b2b/fa/arCheck.html

@@ -563,13 +563,15 @@
       <th width="180">对账总额</th>
       <th width="180">明细条目</th>
       <th width="100">商品总数</th>
-      <th width="100">对账结果</th>
-      <th width="100">操作</th>
+      <!--<th width="100">对账结果</th>-->
+      <!--<th width="100">操作</th>-->
     </tr>
     </thead>
+
+
     <tbody ng-if="$data.length === 0">
     <tr>
-      <td colspan="6">
+      <td colspan="5">
         <div id="empty">
           <div class="left_img">
             <a><img src="static/img/all/empty-cart.png"></a>
@@ -584,19 +586,25 @@
     </tbody>
     <tbody ng-repeat="check in $data">
     <tr class="order-bd order-hdt">
-      <td colspan="6" style="text-align: left">
-        <span class="text-num text-bold" style="font-weight:bold" title="录单时间">日期:{{::check.date | date:'MM月dd日 HH:mm'}}</span>
-        &nbsp;&nbsp;&nbsp;
-        <span>
-          <!--<i class="fa fa-star" ng-class="{'text-default':check.status==201}"></i>-->
-          <img src="static/img/user/images/shop_home.png" style="margin-right: 5px">{{::check.vendor.enName}}</span>
-        <span style="margin-left: 100px;">单据编号:</span>
-        <span class="text-num"><a style="color: #5078cb" ui-sref="fa_arCheck_detail({id:check.id})" title="点击查看详情">{{::check.code}}</a></span>
+      <td colspan="4" style="text-align: left">
+
+        <span class="text-num text-bold" title="录单时间">日期:{{::check.apDate | date:'MM月dd日 HH:mm'}}</span>&nbsp;&nbsp;&nbsp;
+        <span><img src="static/img/user/images/shop_home.png" style="margin-right: 5px">{{::check.vendorName}}</span>
+        <span  style="margin-left: 100px;">单据编号:</span>
+        <span class="text-num"><a  style="color: #5078cb" ui-sref="fa_arCheck_detail({id:check.id})" title="点击查看详情">{{::check.code}}</a></span>
+
+        <!--<span class="text-num text-bold" style="font-weight:bold" title="录单时间">日期:{{::check.apDate | date:'MM月dd日 HH:mm'}}</span>-->
+        <!--&nbsp;&nbsp;&nbsp;-->
+        <!--<span>-->
+          <!--&lt;!&ndash;<i class="fa fa-star" ng-class="{'text-default':check.status==201}"></i>&ndash;&gt;-->
+          <!--<img src="static/img/user/images/shop_home.png" style="margin-right: 5px">{{::check.vendor.enName}}</span>-->
+        <!--<span style="margin-left: 100px;">单据编号:</span>-->
+        <!--<span class="text-num"><a style="color: #5078cb" ui-sref="fa_arCheck_detail({id:check.id})" title="点击查看详情">{{::check.code}}</a></span>-->
       </td>
     </tr>
-    <tr>
+    <tr style="line-height: 57px">
       <td class="first info" colspan="1">
-        <p class="f14 text-num">{{::check.fromDate | date:'yyyy/MM/dd'}} - {{::check.toDate | date:'yyyy/MM/dd'}}</p>
+        <p class="f14 text-num">{{::check.beginDate | date:'yyyy/MM/dd'}} - {{::check.endDate | date:'yyyy/MM/dd'}}</p>
       </td>
       <td class="first info" colspan="1">
         <p>
@@ -614,24 +622,24 @@
           <strong class="text-num">{{getTotalProd(check) | number}}</strong> <i class="fa fa-cubes"></i><br>
         </p>
       </td>
-      <td class="status" colspan="2">
-        <div ng-if="check.status == 200" class="text-center text-muted f14"><br>还未开始对账!</div>
-        <div ng-if="check.status == 201 && check.items.length == check.agree" class="text-center text-muted f14">
-          <br> <i class="fa fa-check-square-o"></i> 已全部确认
-        </div>
-        <div ng-if="check.status == 201 && check.items.length != check.agree" class="text-center text-muted f14">
-          已开始对账,但未全部确认
-        </div>
-        <div ng-if="check.status == 201 && check.items.length != check.agree">
-          <div class="text-success text-bold"><i class="fa fa-smile-o fa-lg fa-fw"></i>已确认: {{::check.agree}}</div>
-          <div class="text-warning text-bold"><i class="fa fa-frown-o fa-lg fa-fw"></i>不同意: {{::check.disagree}}</div>
-          <div class="text-muted text-bold"><i class="fa fa-meh-o fa-lg fa-fw"></i>未对账: {{check.items.length - check.agree - check.disagree}}</div>
-        </div>
+      <!--<td class="status" colspan="2">-->
+        <!--<div ng-if="check.status == 200" class="text-center text-muted f14"><br>还未开始对账!</div>-->
+        <!--<div ng-if="check.status == 201 && check.items.length == check.agree" class="text-center text-muted f14">-->
+          <!--<br> <i class="fa fa-check-square-o"></i> 已全部确认-->
+        <!--</div>-->
+        <!--<div ng-if="check.status == 201 && check.items.length != check.agree" class="text-center text-muted f14">-->
+          <!--已开始对账,但未全部确认-->
+        <!--</div>-->
+        <!--<div ng-if="check.status == 201 && check.items.length != check.agree">-->
+          <!--<div class="text-success text-bold"><i class="fa fa-smile-o fa-lg fa-fw"></i>已确认: {{::check.agree}}</div>-->
+          <!--<div class="text-warning text-bold"><i class="fa fa-frown-o fa-lg fa-fw"></i>不同意: {{::check.disagree}}</div>-->
+          <!--<div class="text-muted text-bold"><i class="fa fa-meh-o fa-lg fa-fw"></i>未对账: {{check.items.length - check.agree - check.disagree}}</div>-->
+        <!--</div>-->
         <!-- <a ng-if="check.status == 200 || check.items.length != check.agree" class="operate operate-undo text-center"
           ui-sref="fa.arCheck_detail({id:check.id})" target="_blank">立即开始对账</a>
         <a ng-if="check.status == 201 && check.items.length == check.agree" class="operate operate-done text-center"
           ui-sref="fa.arCheck_detail({id:check.id})" target="_blank">查看详情</a> -->
-      </td>
+      <!--</td>-->
     </tr>
     </tbody>
   </table>

+ 10 - 68
src/main/webapp/resources/view/usercenter/b2b/fa/arCheck_detail.html

@@ -226,11 +226,11 @@
       <div class="row row-sm item">
         <div class="col-xs-6">
           <span class="title">供应商:</span>
-          <div class="content" ng-bind="::order.vendor.enName"></div>
+          <div class="content" ng-bind="::order.vendorName"></div>
         </div>
         <div class="col-xs-6">
           <span class="title">对账期间:</span>
-          <div class="content text-num">{{::order.fromDate | date:'yyyy/MM/dd'}} - {{::order.toDate | date:'yyyy/MM/dd'}}</div>
+          <div class="content text-num">{{::order.beginDate | date:'yyyy/MM/dd'}} - {{::order.endDate | date:'yyyy/MM/dd'}}</div>
         </div>
       </div>
       <div class="row row-sm item">
@@ -240,7 +240,7 @@
         </div>
         <div class="col-xs-6">
           <span class="title">录单日期:</span>
-          <div class="content" ng-bind="::order.date | date:'MM月dd日 HH:mm'"></div>
+          <div class="content" ng-bind="::order.recordDate | date:'MM月dd日 HH:mm'"></div>
         </div>
       </div>
       <div class="row row-sm item">
@@ -256,17 +256,17 @@
       <div class="row row-sm item">
         <div class="col-xs-6">
           <span class="title">应收日期:</span>
-          <div class="content" ng-bind="::order.arDate | date:'MM月dd日'"></div>
+          <div class="content" ng-bind="::order.apDate | date:'MM月dd日'"></div>
         </div>
         <div class="col-xs-6">
           <span class="title">对方业务员:</span>
           <div class="content" ng-bind="::order.sellerName"></div>
         </div>
       </div>
-      <div class="row row-sm item" ng-if="order.remark">
+      <div class="row row-sm item" ng-if="order.reason">
         <div class="col-xs-12">
-          <span class="title">供应商备注:</span>
-          <div class="content" ng-bind="::order.remark"></div>
+          <span class="title">备注:</span>
+          <div class="content" ng-bind="::order.reason"></div>
         </div>
       </div>
     </div>
@@ -324,7 +324,6 @@
           <th width="80">单价</th>
           <th width="120">对账数量</th>
           <th width="120">对账金额</th>
-          <th width="140">操作</th>
         </tr>
         </thead>
         <tbody>
@@ -340,12 +339,8 @@
           </td>
           <td class="text-muted text-num">
             <div>
-              <i class="fa fa-file-text-o fa-fw" title="采购订单编号"></i>
-              <span ng-bind="::item.poCode"></span>
-            </div>
-            <div>
-              <i class="fa fa-share-square-o fa-fw" title="供应商出库单号"></i>
-              <span ng-bind="::item.inoutCode"></span> 第<span ng-bind="item.sourceNumber"></span>行
+              <i class="fa fa-share-square-o fa-fw" title="出库单号"></i>
+              <span ng-bind="::item.orderCode"></span> 第<span ng-bind="item.orderDetno"></span>行
             </div>
           </td>
           <td class="text-center">
@@ -355,64 +350,11 @@
           <td class="text-center">
             <div>
               <span class="badge" ng-if="item.status==201 && !item.agreed">供</span>
-              <span class="text-num text-bold" ng-bind="::item.qty | number"></span>
-            </div>
-            <div ng-if="item.status==201 && !item.agreed">
-              <span class="badge badge-info">我</span>
-              <span class="text-num text-bold" ng-bind="::item.replyQty | number"></span>
-            </div>
-            <div ng-if="item.$editing">
-              <input ng-model="item.$replyQty" class="form-control input-xs" type="number" placeholder="确认数量">
+              <span class="text-num text-bold" ng-bind="::item.checkQty | number"></span>
             </div>
           </td>
           <td>
             <div class="text-num text-inverse text-bold" ng-bind="::item.amount | number:6"></div>
-            <div ng-if="item.$editing">
-              <input ng-model="item.$replyRemark" class="form-control input-xs" type="text" placeholder="确认备注">
-            </div>
-            <div ng-if="item.replyQty > 0" class="dropdown text-center">
-              <a href="javascript:void(0);" class="dropdown-toggle text-default"
-                 ng-mouseover="getReplies(item)">对账记录<i class="fa fa-fw fa-angle-down"></i></a>
-              <div class="dropdown-menu dropdown-menu-right pane" style="width: 270px;">
-                <div class="pane-body">
-                  <ul class="list-unstyled list-menu">
-                    <li ng-repeat="reply in ::item.replies">
-                      <div ng-if="reply.type=='v'" class="text-left">
-                        <div ng-class="{'text-inverse': $last}">
-                          <span class="pull-right text-muted" ng-bind="reply.date | date:'MM-dd HH:mm'"></span>
-                          <span class="badge">供</span> 数量:{{::reply.qty}}
-                        </div>
-                        <div class="text-muted">{{reply.remark}}</div>
-                      </div>
-                      <div ng-if="reply.type=='c'" class="text-right"
-                           ng-class="{'text-inverse': $last}">
-                        <div>
-                          <span class="pull-left text-muted" ng-bind="reply.date | date:'MM-dd HH:mm'"></span>
-                          {{::reply.qty}}:<span ng-bind="reply.recorder"></span>  <span class="badge badge-info">我</span>
-                        </div>
-                        <div class="text-muted">{{reply.remark}}</div>
-                      </div>
-                    </li>
-                  </ul>
-                </div>
-              </div>
-            </div>
-          </td>
-          <td class="text-center">
-            <div ng-if="item.status == 200 && !item.$editing">
-              <a ng-click="onReplyClick(item, true)" style="display:inline-block;width: 40px;height: 24px;line-height: 24px;color:#3c7cf5;border:1px solid #3c7cf5">确认</a>
-              <a ng-click="item.$editing = true"  style="display:inline-block;width: 48px;height: 24px;line-height: 24px;color:#3c7cf5;border:1px solid #3c7cf5">不同意</a>
-            </div>
-            <div ng-if="item.$editing">
-              <a ng-click="item.$editing = false" style="display:inline-block;width: 40px;height: 24px;line-height: 24px;color:#3c7cf5;border:1px solid #3c7cf5">取消</a>
-              <a ng-click="onReplyClick(item, false)" class="" style="display:inline-block;width: 62px;height: 24px;line-height: 24px;color:#3c7cf5;border:1px solid #3c7cf5">确认对账</a>
-            </div>
-            <div ng-if="item.status == 201 && item.agreed">
-              <span class="label label-success">已确认</span>
-            </div>
-            <div ng-if="item.waiting">
-              <span class="text-muted f12">您确认的数量正在等待供应商确认...</span>
-            </div>
           </td>
         </tr>
         <tr>

+ 191 - 77
src/main/webapp/resources/view/vendor/b2b/apCheck.html

@@ -520,13 +520,14 @@
   <div class="com_tab tab_top" style="margin-bottom: 0px">
     <ul>
       <li ng-class="{'active': active=='all'}" ng-click="setActive('all')"><a> 未对账</a></li>
-      <li ng-class="{'active': active=='todo'}" ng-click="setActive('todo')"><a>待确认(<em ng-class="{'color-black': !unread.replied }" ng-bind="unread.replied || 0"></em>)</a></li>
-      <li ng-class="{'active': active=='done'}" ng-click="setActive('done')"><a>已确认</a></li>
+      <!--<li ng-class="{'active': active=='todo'}" ng-click="setActive('todo')"><a>待确认(<em ng-class="{'color-black': !unread.replied }" ng-bind="unread.replied || 0"></em>)</a></li>-->
+      <li ng-class="{'active': active=='done'}" ng-click="setActive('done')"><a>已对账</a></li>
       <li ng-class="{'active': active=='end'}" ng-click="setActive('end')"><a>已作废(<em ng-class="{'color-black': !unread.cancelled }" ng-bind="unread.cancelled || 0"></em>)</a></li>
+        <li style="float: right;font-size: 14px;cursor: pointer;" ng-hide="!showNotCheck" ng-click="hideshowNotCheck()"><img src="/static/img/vendor/images/backIcon.png" width="20"/>返回</li>
     </ul>
   </div>
-  <div class="screen check-filter">
-    <div class="radio-block date-radio" ng-if="active !== 'all'" style="width: 33%">
+  <div class="screen check-filter" ng-show="!showNotCheck">
+    <div class="radio-block date-radio" ng-show="active !== 'all'" style="width: 33%">
       时间:
       <label class="com-check-radio">
         <input type="radio" id="oneMonth" name="date" ng-click="changeDateZone(1);condition.$open=false" checked>
@@ -549,6 +550,37 @@
         自定义
       </label>
     </div>
+     <div class="fl" ng-show="active === 'all'" >
+          <label class="control-label">请选择月份:</label>
+          <span ng-click="addMouthOut(-1)" style="    display: inline-block;
+                width: 30px;
+                height: 30px;
+                border: 1px solid #ddd;
+                text-align: center;
+                line-height: 30px;
+                cursor: pointer;
+                vertical-align: middle;">
+                <img src="/static/img/vendor/images/arrow-left-d-l.png" width="24"/>
+            </span>
+          <span class="inputsIcon control-label" style="padding-right: 5px;display: inline-block">
+              <wui-date
+                      format="yyyy-mm"
+                      placeholder="请选择或输入日期"
+                      id="date3"
+                      btns="{'ok':'确定','now':'此刻'}"
+                      ng-model="thisMouthOut"
+              >
+              </wui-date>
+            </span>
+         <span  ng-click="addMouthOut(1)" style="display: inline-block;
+                width: 30px;
+                height: 30px;
+                border: 1px solid #ddd;
+                text-align: center;
+                line-height: 30px;
+                cursor: pointer;
+                vertical-align: middle;"><img src="/static/img/vendor/images/arrow-right-d-l.png" width="24"/></span>
+      </div>
     <div class="sreach fr">
       <div ng-show="condition.$open" class="date fl">
         <div class="data-input">
@@ -580,18 +612,14 @@
       </div>
       <div class="sreach-input fr">
         <input type="search" placeholder="单据编号/客户名称/物料名称" class="form-control" ng-model="keyword" ng-search="onSearch(keyword)" ng-show="active !== 'all'"/>
-        <input type="search" placeholder="客户名称" class="form-control" ng-model="keyword" ng-search="onSearch(keyword)" ng-show="active === 'all'"/>
-        <a class="seek" href="javascript:void(0)" ng-click="onSearch(keyword)">搜索</a>
+          <a class="seek" href="javascript:void(0)" ng-click="onSearch(keyword)" ng-show="active !== 'all'">搜索</a>
+          <input type="search" placeholder="客户名称" class="form-control" ng-model="keyword" ng-search="onSearch(keyword)" ng-show="active === 'all' && !showNotCheck"/>
+          <a class="seek" href="javascript:void(0)" ng-click="onSearch(keyword)" ng-show="active === 'all' && !showNotCheck">搜索</a>
       </div>
     </div>
   </div>
   <div ng-hide="showNotCheck">
 
-    <!--<div ng-show="active === 'all'">-->
-      <!--<table class="order-table block order-table2" ng-table="tableParams" width="100%" style="table-layout:fixed">-->
-
-      <!--</table>-->
-    <!--</div>-->
     <div >
       <table class="order-table block" ng-class="{'order-table2': active === 'all'}" ng-table="tableParams" ng-table="tableParams" width="100%" style="table-layout:fixed">
         <thead ng-show="active !== 'all'">
@@ -676,17 +704,27 @@
         <thead ng-show="active === 'all'">
           <tr class="header">
             <th width="313">客户名称</th>
-            <th width="250">上次对账时间</th>
-            <th width="250">未对账总额</th>
+            <th width="250">本月应收</th>
+            <th width="250">应收总额</th>
             <th width="160">操作</th>
           </tr>
         </thead>
         <tbody ng-show="active === 'all'" ng-repeat="check in ALLList">
           <tr >
             <td style="color: #3f84f6">{{::check.myEnterprise.enName}}</td>
-            <td ng-if="check.lastCheckDate">{{::check.lastCheckDate | date : 'MM月dd日 HH:mm'}}</td>
-            <td ng-if="!check.lastCheckDate">-</td>
-            <td>{{::check.uncheckedCount || '-'}}</td>
+            <td ng-if="check.thisMonthCount && check.thisMonthCount.length > 0">
+              <div ng-repeat="count in check.thisMonthCount">
+                <span>{{count.currency}}:{{count.amount | number:2}}</span>
+              </div>
+
+            </td>
+            <td ng-if="!check.thisMonthCount">-</td>
+            <td ng-if="check.totalCount && check.totalCount.length > 0">
+              <div ng-repeat="count in check.totalCount">
+                <span>{{count.currency}}:{{count.amount | number:2}}</span>
+              </div>
+            </td>
+            <td ng-if="!check.totalCount">-</td>
             <td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">立即对账</td>
           </tr>
         </tbody>
@@ -732,20 +770,100 @@
     <form class="form-horizontal"
           style="padding-top: 10px; padding-bottom: 20px;">
       <div class="form-group form-group-sm form-group-inline">
-        <label class="col-sm-1 control-label">客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户:</label>
-        <div class="col-sm-7 control-label" style="text-align:left">
-          {{suuorname}}
+        <div  class="col-sm-7 control-label">
+          <div style="text-align: left">
+            <label>应收客户:</label>
+            <label style="text-align:left">
+              {{suuorname}}
+            </label>
+          </div>
+        <div style="text-align: left;margin-top: 20px">
+            <label>本期间应收:</label>
+            <label style="text-align:left;vertical-align: top;">
+               <div ng-if="dataInfo.thisMonthCount.length > 0" ng-repeat="count in dataInfo.thisMonthCount">
+                   <span>{{count.currency}}:{{count.amount | number:2}}</span>
+               </div>
+                <div ng-if="dataInfo.thisMonthCount.length === 0">
+                    0
+                </div>
+            </label>
+        </div>
+        <div style="text-align: left;margin-top: 20px">
+            <label>应收总额:</label>
+            <label style="text-align:left;vertical-align: top;">
+                <div ng-if="dataInfo.totalCount.length > 0" ng-repeat="count in dataInfo.totalCount">
+                    <span>{{count.currency}}:{{count.amount | number:2}}</span>
+                </div>
+                <div ng-if="dataInfo.totalCount.length === 0">
+                    0
+                </div>
+            </label>
         </div>
-        <label class="col-sm-2 control-label">请选择月份:</label>
-        <div class="col-sm-2" style="padding-right: 5px">
-          <wui-date
-                  format="yyyy-mm"
-                  placeholder="请选择或输入日期"
-                  id="date4"
-                  btns="{'ok':'确定','now':'此刻'}"
-                  ng-model="thisMouth"
-          >
-          </wui-date>
+        </div>
+        <div  class="col-sm-5 control-label">
+          <div>
+            <label class="control-label">请选择月份:</label>
+            <span ng-click="addMouth(-1)" style="    display: inline-block;
+                width: 30px;
+                height: 30px;
+                border: 1px solid #ddd;
+                text-align: center;
+                line-height: 30px;
+                cursor: pointer;
+                vertical-align: middle;">
+                <img src="/static/img/vendor/images/arrow-left-d-l.png" width="24"/>
+            </span>
+            <span class="control-label" style="padding-right: 5px;display: inline-block" ng-click="apCheckCondition.$open = false">
+              <wui-date
+                      format="yyyy-mm"
+                      placeholder="请选择或输入日期"
+                      id="date4"
+                      btns="{'ok':'确定','now':'此刻'}"
+                      ng-model="thisMouth"
+              >
+              </wui-date>
+            </span><span  ng-click="addMouth(1)" style="display: inline-block;
+                width: 30px;
+                height: 30px;
+                border: 1px solid #ddd;
+                text-align: center;
+                line-height: 30px;
+                cursor: pointer;
+                vertical-align: middle;"><img src="/static/img/vendor/images/arrow-right-d-l.png" width="24"/></span>
+            <label class="control-label com-check-radio" ng-click="apCheckCondition.$open = true">
+              <input type="radio" name="psa" ng-checked="apCheckCondition.$open === true"  ng-model="apCheckCondition.$open">
+              <label for="autoMonth"></label>
+              自定义
+            </label>
+          </div>
+          <div ng-hide="!apCheckCondition.$open" class="date fr" style="margin-top: 14px;">
+            <div class="data-input">
+              <input type="text" ng-model="apCheckCondition.dateFrom"
+                     class="form-control select-adder" placeholder="起始时间"
+                     datepicker-popup="yyyy-MM-dd"
+                     is-open="apCheckCondition.$fromOpened"
+                     max-date="apCheckCondition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+                     ng-focus="apCheckopenFilterDatePicker($event, apCheckCondition, '$fromOpened')"
+                     datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                     style="width: 130px;height: 32px"
+              />
+              <button class="open" ng-click="apCheckopenFilterDatePicker($event, apCheckCondition, '$fromOpened')"></button>
+            </div>
+
+            <em style="float:left;margin: 0 10px">–</em>
+            <div class="data-input">
+              <input type="text" ng-model="apCheckCondition.dateTo"
+                     class="form-control select-adder" placeholder="结束时间"
+                     datepicker-popup="yyyy-MM-dd"
+                     is-open="apCheckCondition.$toOpened"
+                     min-date="apCheckCondition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+                     ng-focus="apCheckopenFilterDatePicker($event, apCheckCondition, '$toOpened')"
+                     datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                     style="width: 130px;height: 32px"
+              />
+              <button class="open" ng-click="apCheckopenFilterDatePicker($event, apCheckCondition, '$toOpened')"></button>
+            </div>
+          </div>
         </div>
       </div>
       <div class="form-group form-group-sm form-group-inline">
@@ -822,68 +940,60 @@
       <div class="table-header-wrap">
         <table class="table table-bordered">
           <tr>
-            <th width="36" style="vertical-align: middle;">
-              <input type="checkbox" name="checkbox" ng-model="checkboxes.checked" ng-click="checkAll()"></th>
-            <th width="100">本次<br>对账数</th>
+            <th width="36" style="vertical-align: middle;"><input type="checkbox" name="checkbox" ng-model="checkboxes.checked" ng-click="checkAll()"></th>
             <!--<th width="70">客户<br>名称</th>-->
-            <th width="60">单据<br>编号</th>
-            <th width="60">发货<br>单号</th>
-            <th width="35">序号</th>
-            <th width="60">类型</th>
-            <th width="60">单据<br>日期</th>
-            <th width="90">应付<br>供应商</th>
-            <th width="70">客户<br>采购单</th>
-            <th width="65">客户<br>料号</th>
-            <th width="70">客户物<br>料名称</th>
-            <th width="70">客户规<br>格型号</th>
-            <th width="65">送货<br>工厂</th>
-            <th width="55">数量</th>
+            <th width="70">采购单</th>
+            <th width="70">物料名称</th>
+            <th width="70">规格型号</th>
+            <th width="60">发货单</th>
+            <th width="55">发货数量</th>
+            <th width="60">验收单</th>
+            <th width="100">验收数量</th>
             <th width="40">单价</th>
-            <th width="30">币别</th>
             <th width="40">税率</th>
-            <th width="60">金额</th>
-            <th width="70">本次对<br>账金额</th>
+            <th width="70">小计</th>
+            <!--<th width="35">序号</th>-->
+            <!--<th width="60">类型</th>-->
+            <!--<th width="60">单据<br>日期</th>-->
+            <!--<th width="90">应付<br>供应商</th>-->
+            <!--<th width="65">客户<br>料号</th>-->
+            <!--<th width="65">送货<br>工厂</th>-->
+            <!--<th width="30">币别</th>-->
+            <!--<th width="60">金额</th>-->
           </tr>
         </table>
       </div>
       <div class="table-body-wrap">
         <table class="table table-bordered">
-          <tr ng-repeat="check in data"
-              class="thAlign" style="height: 40px;">
-            <td width="36" style="text-align: center;vertical-align: middle;"><input
-                    ng-model="check.$selected" name="checkbox"
-                    ng-click="checkOne(check)" ng-change="getTotalMoney()"
-                    type="checkbox"></td>
-            <td width="100"><input ng-model="check.thischeckqty"
-                                   type="number" max="data.maxThisCheckQty"
-                                   min="data.minThisCheckQty" ng-change="getTotalMoney()"
-                                   style="width: 75px;" class=" input-sm text-center"></td>
-            <!--<td width="70" title="{{check.custname}}"><div-->
-                    <!--style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.custname}}</div></td>-->
-            <td width="60">{{::check.inoutno}}</td>
-            <td width="60">{{::check.sendcode}}</td>
-            <td width="35" align="center">{{::check.detno}}</td>
-            <td width="60">{{::check.piclass}}</td>
-            <td width="60">{{::check.pidate | date:'yyyy-MM-dd' }}</td>
-            <td width="90" title="{{check.receivename}}">
-              <div
-                      style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.receivename}}</div>
-            </td>
+          <tr ng-repeat="check in data" ng-click="checkOne(check);getTotalMoney()" class="thAlign" style="height: 40px;">
+            <td width="36" style="text-align: center;vertical-align: middle;">
+              <input ng-model="check.$selected" name="checkbox" type="checkbox" ng-checked="check.$selected"></td>
             <td width="70">{{::check.ordercode}}</td>
-            <td width="65">{{::check.prodcode}}</td>
             <td width="70" title="{{check.prodtitle}}">
-              <div
-                      style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodtitle}}</div>
+              <div style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodtitle}}</div>
             </td>
-            <td width="70" title="{{check.prodspec}}"><div
-                    style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodspec}}</div></td>
-            <td width="65">{{::check.factory}}</td>
+            <td width="70" title="{{check.prodspec}}">
+              <div style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodspec}}</div></td>
+            <td width="60">{{::check.sendcode}}</td>
             <td width="55">{{::check.qty}}</td>
+            <td width="60">{{::check.inoutno}}</td>
+            <td width="100">{{::check.thischeckqty}}</td>
             <td width="40">{{::check.orderprice}}</td>
-            <td width="30">{{::check.currency}}</td>
             <td width="40" align="center">{{::check.taxrate}}</td>
-            <td width="60">{{::(check.qty || 0)*(check.orderprice || 0) | number:2}}</td>
-            <td width="60">{{::(check.orderprice || 0)*(check.thischeckqty || 0) | number:2}}</td>
+            <td width="70">{{::(check.orderprice || 0)*(check.thischeckqty || 0) | number:2}}</td>
+            <!--<td width="70" title="{{check.custname}}"><div-->
+                    <!--style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.custname}}</div></td>-->
+            <!--<td width="35" align="center">{{::check.detno}}</td>-->
+            <!--<td width="60">{{::check.piclass}}</td>-->
+            <!--<td width="60">{{::check.pidate | date:'yyyy-MM-dd' }}</td>-->
+            <!--<td width="90" title="{{check.receivename}}">-->
+              <!--<div style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.receivename}}</div>-->
+            <!--</td>-->
+            <!--<td width="65">{{::check.prodcode}}</td>-->
+            <!--<td width="65">{{::check.factory}}</td>-->
+            <!--<td width="30">{{::check.currency}}</td>-->
+            <!--<td width="60">{{::(check.qty || 0)*(check.orderprice || 0) | number:2}}</td>-->
+
           </tr>
           <tr ng-if="!data || data.length==0">
             <td colspan="19">
@@ -1006,4 +1116,8 @@
     font-size: 14px;
     color: #666;
   }
+
+  .inputsIcon .wui-date-editor .icon1{
+      top: 11px !important;
+  }
 </style>

+ 6 - 6
src/main/webapp/resources/view/vendor/b2b/apCheck_detail.html

@@ -278,21 +278,22 @@
         <thead>
         <tr class="header">
           <th width="30" style="padding:8px 0;">行号</th>
+          <th>序号</th>
+          <th>采购单</th>
           <th width="120">商品</th>
-          <th width="100">单据编号</th>
+          <th width="100">验收单</th>
           <th width="80">单据类型</th>
-          <th>序号</th>
           <th>单价</th>
           <th>税率</th>
-          <th  width="80">对账数量</th>
-          <th  width="80">对账金额</th>
-          <th>采购单号</th>
+          <th width="80">验收数量</th>
+          <th width="80">小计</th>
           <th>采购序号</th>
         </tr>
         </thead>
         <tbody ng-repeat="item in data.items" style="text-align: center;">
         <tr>
           <td ng-bind="item.number" style="padding:8px 0;"></td>
+          <td ng-bind="item.orderCode"></td>
           <td style="max-width: 250px;" class="text-left">
             <div>编号: <span ng-bind="item.prodCode"></span></div>
             <div>规格: <span ng-bind="item.prodSpec"></span></div>
@@ -304,7 +305,6 @@
           <td ng-bind="item.taxrate"></td>
           <td ng-bind="item.checkQty"></td>
           <td ng-bind="isUser?'-':(item.amount | number:2)"></td>
-          <td ng-bind="item.orderCode"></td>
           <td ng-bind="item.orderDetno"></td>
         </tr>
         </tbody>