Browse Source

Merge branch 'dev' of ssh://10.10.101.21/source/platform-b2b into dev

wangmh 8 years ago
parent
commit
839b47c136

+ 32 - 0
src/main/java/com/uas/platform/b2b/controller/DeputyDefaultValueController.java

@@ -0,0 +1,32 @@
+package com.uas.platform.b2b.controller;
+
+import com.uas.platform.b2b.service.DeputyDefaultValueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by hejq on 2017-12-06.
+ */
+@RequestMapping(value = "/deputy")
+@RestController
+public class DeputyDefaultValueController {
+
+	@Autowired
+	private DeputyDefaultValueService defaultValueService;
+
+	/**
+	 * 通过代采企业UU号查询对应字段的值
+	 *
+	 * @param enuukey
+	 * @return
+	 */
+	@RequestMapping(value = "/getKeyValue", method = RequestMethod.GET)
+	public ResponseEntity<ModelMap> getKeyValue(Long enuu, String key) {
+		return new ResponseEntity<ModelMap>(new ModelMap("content", defaultValueService.findByEnuuAndKey(enuu, key)), HttpStatus.OK);
+	}
+}

+ 25 - 0
src/main/java/com/uas/platform/b2b/dao/DeputyDefaultValueDao.java

@@ -0,0 +1,25 @@
+package com.uas.platform.b2b.dao;
+
+import com.uas.platform.b2b.model.ChangeAdmin;
+import com.uas.platform.b2b.model.DeputyDefaultValue;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * Created by hejq on 2017-12-06.
+ */
+@Repository
+public interface DeputyDefaultValueDao extends JpaSpecificationExecutor<DeputyDefaultValue>, JpaRepository<DeputyDefaultValue, Long> {
+
+	/**
+	 * 通过代采企业UU号及相关字段查询默认设置的值
+	 *
+	 * @param enuu
+	 * @param key
+	 * @return
+	 */
+	List<DeputyDefaultValue> findByEnuuAndKey(Long enuu, String key);
+}

+ 2 - 2
src/main/java/com/uas/platform/b2b/erp/model/InquiryDetail.java

@@ -357,7 +357,7 @@ public class InquiryDetail {
 	public InquiryDetail(SaleQuotationItem item) {
 		this.id_currency = item.getQuotation().getCurrency();
 		this.id_detno = item.getNumber();
-		this.id_fromdate = item.getQuotation().getDate();
+//		this.id_fromdate = item.getQuotation().getDate();
 		this.id_minbuyqty = item.getMinOrderQty();
 		this.id_minqty = item.getMinPackQty();
 		this.id_myfromdate = item.getQuotation().getDate();
@@ -365,7 +365,7 @@ public class InquiryDetail {
 		this.id_prodcode = item.getProduct() != null ? item.getProduct().getCode(): item.getCustProductCode();
 		this.id_rate = item.getQuotation().getTaxrate();
 		this.id_remark = item.getRemark();
-		this.id_todate = item.getQuotation().getEndDate();
+//		this.id_todate = item.getQuotation().getEndDate();
 		this.ve_uu = item.getQuotation().getEnUU();
 		this.id_brand = item.getBrand();
 		this.id_leadtime = item.getLeadtime();

+ 3 - 7
src/main/java/com/uas/platform/b2b/erp/service/impl/PublicInquiryServiceImpl.java

@@ -52,9 +52,6 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
     @Autowired
     private CommonDao commonDao;
 
-    @Autowired
-    protected  JdbcTemplate jdbcTemplate;
-
     @Autowired
     private MailService mailService;
 
@@ -64,9 +61,6 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
     @Autowired
     private NoticeDao noticeDao;
 
-    @Autowired
-    private UserDao userDao;
-
     private final static ErpBufferedLogger logger = BufferedLoggerManager.getLogger(ErpBufferedLogger.class);
 
     private final static UsageBufferedLogger usageLogger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
@@ -127,8 +121,10 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
         List<PurcInquiryItem> inquiryItems = new ArrayList<>();
         if(!CollectionUtils.isEmpty(inquiries)) {
             for(PurcInquiry inquiry : inquiries) {
+                // 判断单号是否已存在
+                PurcInquiry old = inquiryDao.findByCodeAndEnUU(inquiry.getCode(), SystemSession.getUser().getEnterprise().getUu());
                 List<PurcInquiryItem> items = new ArrayList<PurcInquiryItem>();
-                if(!CollectionUtils.isEmpty(inquiry.getInquiryItems())) {
+                if(old == null && !CollectionUtils.isEmpty(inquiry.getInquiryItems())) {
                     for(PurcInquiryItem item : inquiry.getInquiryItems()) {
                         item.setInquiry(inquiry);
                         items.add(item);

+ 104 - 0
src/main/java/com/uas/platform/b2b/model/DeputyDefaultValue.java

@@ -0,0 +1,104 @@
+package com.uas.platform.b2b.model;
+
+import javax.persistence.*;
+import javax.print.attribute.standard.MediaSize;
+import java.io.Serializable;
+
+/**
+ * 关于代采订单一些默认字段的值
+ *
+ * Created by hejq on 2017-12-06.
+ */
+@Table(name = "deputy$defaultvalue")
+@Entity
+public class DeputyDefaultValue implements Serializable {
+
+	/**
+	 *
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键id
+	 */
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "deputy$defaultvalue_gen")
+	@SequenceGenerator(name = "deputy$defaultvalue_gen", sequenceName = "deputy$defaultvalue_seq", allocationSize = 1)
+	@Column(name = "de_id")
+	private Long id;
+
+	/**
+	 * 代采企业的UU号
+	 */
+	@Column(name = "de_enuu")
+	private Long enuu;
+
+	/**
+	 * 关联的字段
+	 */
+	@Column(name = "de_key")
+	private String key;
+
+	/**
+	 * 默认的值
+	 */
+	@Column(name = "de_value")
+	private String value;
+
+	/**
+	 * 权重,排序用
+	 */
+	@Column(name = "de_weight")
+	private Integer weight;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getEnuu() {
+		return enuu;
+	}
+
+	public void setEnuu(Long enuu) {
+		this.enuu = enuu;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	public Integer getWeight() {
+		return weight;
+	}
+
+	public void setWeight(Integer weight) {
+		this.weight = weight;
+	}
+
+	@Override
+	public String toString() {
+		return "DeputyDefaultValue{" +
+				"id=" + id +
+				", enuu=" + enuu +
+				", key='" + key + '\'' +
+				", value='" + value + '\'' +
+				", weight=" + weight +
+				'}';
+	}
+}

+ 20 - 0
src/main/java/com/uas/platform/b2b/service/DeputyDefaultValueService.java

@@ -0,0 +1,20 @@
+package com.uas.platform.b2b.service;
+
+import com.uas.platform.b2b.model.DeputyDefaultValue;
+
+import java.util.List;
+
+/**
+ * Created by hejq on 2017-12-06.
+ */
+public interface DeputyDefaultValueService {
+
+	/**
+	 * 通过enuu和字段查询对应的值
+	 *
+	 * @param enuu
+	 * @param key
+	 * @return
+	 */
+	List<DeputyDefaultValue> findByEnuuAndKey(Long enuu, String key);
+}

+ 24 - 0
src/main/java/com/uas/platform/b2b/service/impl/DeputyDefaultValueServiceImpl.java

@@ -0,0 +1,24 @@
+package com.uas.platform.b2b.service.impl;
+
+import com.uas.platform.b2b.dao.DeputyDefaultValueDao;
+import com.uas.platform.b2b.model.DeputyDefaultValue;
+import com.uas.platform.b2b.service.DeputyDefaultValueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * Created by hejq on 2017-12-06.
+ */
+@Service
+public class DeputyDefaultValueServiceImpl implements DeputyDefaultValueService {
+
+	@Autowired
+	private DeputyDefaultValueDao defaultValueDao;
+
+	@Override
+	public List<DeputyDefaultValue> findByEnuuAndKey(Long enuu, String key) {
+		return defaultValueDao.findByEnuuAndKey(enuu, key);
+	}
+}

+ 30 - 11
src/main/webapp/resources/js/index/app.js

@@ -1022,7 +1022,7 @@
             search = encodeURI(search);
             var reg = new RegExp(search, 'gim');
             var result = content.replace(reg, '<font color="red">$&</font>');
-            result = decodeURI(result);
+            result = decodemessageURI(result);
             return $sce.trustAsHtml(result);
         };
         $rootScope.searchKeyword = null;// 清除缓存的关键字
@@ -6229,7 +6229,6 @@
                 quotation: {
                     currency: 'RMB',
                     taxrate: 17,
-                    date: new Date()
                 },
                 product: {},
                 prices: [{lapQty: 0}],
@@ -6352,12 +6351,12 @@
                 $scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
                 $scope.item.productId = $scope.item.product.id;
                 // $scope.item.quotation.status = 100;//在录入
-                if ($scope.item.quotation.date instanceof Date) {
-                    $scope.item.quotation.date = $scope.item.quotation.date.getTime();
-                }
-                if ($scope.item.quotation.endDate instanceof Date) {
-                    $scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
-                }
+                // if ($scope.item.quotation.date instanceof Date) {
+                //     $scope.item.quotation.date = $scope.item.quotation.date.getTime();
+                // }
+                // if ($scope.item.quotation.endDate instanceof Date) {
+                //     $scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
+                // }
                 Quotation.save({}, $scope.item, function (data) {
                     $scope.loading = false;
                     $scope.item = data;
@@ -16450,10 +16449,11 @@
             $modalInstance.close(company);
         }
     }]);
+
     /**
      * 新增代采订单
      */
-    app.controller('NewDeputyOrderCtrl', ['$scope', 'toaster', '$modal', 'DeputyOrder', '$filter', 'ngTableParams', 'BaseService', 'DecimalNumber', function ($scope, toaster, $modal, DeputyOrder, $filter, ngTableParams, BaseService, DecimalNumber) {
+    app.controller('NewDeputyOrderCtrl', ['$scope', 'toaster', '$modal', 'DeputyOrder', '$filter', 'ngTableParams', 'BaseService', 'DecimalNumber', 'DekeyValue', function ($scope, toaster, $modal, DeputyOrder, $filter, ngTableParams, BaseService, DecimalNumber, DekeyValue) {
         BaseService.scrollBackToTop();
         //默认采购单号不重复
         $scope.orderCodeEnable = true;
@@ -16489,8 +16489,17 @@
             $scope.deputyEnterprises = data;
             $scope.deOrder.deputyname = $scope.deputyEnterprises[0].deputyenname;
             $scope.deOrder.deputyuu = $scope.deputyEnterprises[0].deputyenuu;
+            getPayMethod($scope.deOrder.deputyuu, 'paymentmethod');
         });
 
+
+        var getPayMethod = function(enuu, key) {
+            // 获取我方付款支付方式默认值
+            DekeyValue.getValue({enuu: enuu, key: key}, function(data) {
+                $scope.methods = data.content;
+            });
+        }
+
         // 更新名称时后台更改uu号
         $scope.change = function (deputyname) {
             DeputyOrder.deputyEnterprise({}, function (data) {
@@ -16498,6 +16507,7 @@
                 angular.forEach($scope.deputyEn, function (en) {
                     if (deputyname == en.deputyenname) {
                         $scope.deputyuu = en.deputyenuu;
+                        getPayMethod($scope.deputyuu, 'paymentmethod');
                     }
                 });
             });
@@ -16970,7 +16980,7 @@
     /**
      * 代采详情
      */
-    app.controller('DeputyOrderDetailCtrl', ['$scope', 'toaster', 'DeputyOrder', '$stateParams', 'ngTableParams', 'BaseService', '$modal', 'DecimalNumber', 'CurrentRole', function ($scope, toaster, DeputyOrder, $stateParams, ngTableParams, BaseService, $modal, DecimalNumber, CurrentRole) {
+    app.controller('DeputyOrderDetailCtrl', ['$scope', 'toaster', 'DeputyOrder', '$stateParams', 'ngTableParams', 'BaseService', '$modal', 'DecimalNumber', 'CurrentRole', 'DekeyValue', function ($scope, toaster, DeputyOrder, $stateParams, ngTableParams, BaseService, $modal, DecimalNumber, CurrentRole, DekeyValue) {
         BaseService.scrollBackToTop();
         // 获取当前用户是否为普通用户
         CurrentRole.isUser({}, {}, function (data) {
@@ -16997,8 +17007,16 @@
             $scope.deputyEnterprises = data;
             $scope.deOrder.deputyname = $scope.deputyEnterprises[0].deputyenname;
             $scope.deOrder.deputyuu = $scope.deputyEnterprises[0].deputyenuu;
+            getPayMethod($scope.deOrder.deputyuu, 'paymentmethod');
         });
 
+        var getPayMethod = function(enuu, key) {
+            // 获取我方付款支付方式默认值
+            DekeyValue.getValue({enuu: enuu, key: key}, function(data) {
+                $scope.methods = data.content;
+            });
+        }
+
         // 更新代采企业时更新费率
         $scope.change = function (deputyname) {
             DeputyOrder.deputyEnterprise({}, function (data) {
@@ -17006,6 +17024,7 @@
                 angular.forEach($scope.deputyEn, function (en) {
                     if (deputyname == en.deputyenname) {
                         $scope.deputyuu = en.deputyenuu;
+                        getPayMethod($scope.deputyuu, 'paymentmethod');
                     }
                 });
             });
@@ -19771,7 +19790,7 @@
         if (!angular.isUndefined($stateParams.id)) { // 获取招标单详情
             $scope.loading = true;
             getCurrentEn();
-            PurcTender.getOne({id: $stateParams.id}, function (data) {
+            PurcTender.getPurcTenderDetail({id: $stateParams.id}, function (data) {
                 data.$editing = false;
                 $scope.tender = data;
                 $scope.tenderProd = data.purchaseTenderProds;

+ 8 - 1
src/main/webapp/resources/js/index/services/DeputyOrder.js

@@ -155,5 +155,12 @@ define(['ngResource'], function() {
             	}
             }
 		})
-	}]);
+	}]).factory('DekeyValue', ['$resource', function($resource) {
+        return $resource('deputy', {}, {
+            getValue: {
+                url: 'deputy/getKeyValue',
+                method: 'GET',
+            },
+        })
+    }]);
 })

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/productDetail.html

@@ -264,7 +264,7 @@
                 <button class="btn01" ng-if="prodInfo.$editing" ng-click="cancel()">取消</button> -->
                 <button class="btn01" ng-click="deleteById(prodInfo.id)">删除</button>
                 <!-- <a ui-sref="sale.uploadByBatch"  class="btn02" ng-if="!prodInfo.$editing">批量导入</a> -->
-                <a class="btn02" ng-click="submit(prodInfo)" ng-disabled="productInfo.$invalid">提交</a>
+                <a class="btn02" ng-click="submit(prodInfo)" ng-disabled="productInfo.$invalid">更新</a>
             </div>
             <div id="image-box" style="display: none">
 				<div class="x-close-wrap" title="关闭">

+ 8 - 3
src/main/webapp/resources/tpl/index/purc/deputyOrder_detail.html

@@ -265,9 +265,14 @@
                                 <em><b>*</b>我方付款方式:</em>
                                 <span>
                                 	<input  ng-model="deOrder.paymentmethod" list="paymentmethod" class="select" ng-disabled="!deOrder.$editing" ng-required="">
-                                    <datalist id="paymentmethod">
-                                    	 <option value="T/T支付">T/T支付</option>
-                                    	 <option value="T/T全款">T/T全款</option>
+                                    <datalist id="paymentmethod" ng-if="methods.length == 0">
+                                        <option value="T/T支付;预付20%履约保定金,尾款提货前付清。">T/T支付;预付20%履约保定金,尾款提货前付清。</option>
+                                        <option value="T/T支付;预付15%履约保定金,尾款提货前付清。">T/T支付;预付15%履约保定金,尾款提货前付清。</option>
+                                        <option value="T/T支付;预付25%履约保定金,尾款提货前付清。">T/T支付;预付25%履约保定金,尾款提货前付清。</option>
+                                        <option value="T/T支付;预付30%履约保定金,尾款提货前付清。">T/T支付;预付30%履约保定金,尾款提货前付清。</option>
+                                    </datalist>
+                                    <datalist id="paymentmethod" ng-if="methods.length != 0">
+                                        <option ng-repeat="me in methods | orderBy:'-weightid'" value="{{me.value}}">{{me.value}}</option>
                                     </datalist>
                                 </span>
                             </div>

+ 8 - 3
src/main/webapp/resources/tpl/index/purc/deputyOrder_new.html

@@ -268,9 +268,14 @@
                                 <em><b>*</b>我方付款方式:</em>
                                 <span>
                                     <input  ng-model="deOrder.paymentmethod" list="paymentmethod" class="select" ng-required="true">
-                                    <datalist id="paymentmethod">
-                                    	 <option value="T/T支付">T/T支付</option>
-                                    	 <option value="T/T全款">T/T全款</option>
+                                    <datalist id="paymentmethod" ng-if="methods.length == 0">
+                                        <option value="T/T支付;预付20%履约保定金,尾款提货前付清。">T/T支付;预付20%履约保定金,尾款提货前付清。</option>
+                                        <option value="T/T支付;预付15%履约保定金,尾款提货前付清。">T/T支付;预付15%履约保定金,尾款提货前付清。</option>
+                                        <option value="T/T支付;预付25%履约保定金,尾款提货前付清。">T/T支付;预付25%履约保定金,尾款提货前付清。</option>
+                                        <option value="T/T支付;预付30%履约保定金,尾款提货前付清。">T/T支付;预付30%履约保定金,尾款提货前付清。</option>
+                                    </datalist>
+                                    <datalist id="paymentmethod" ng-if="methods.length != 0">
+                                        <option ng-repeat="me in methods | orderBy:'-weightid'" value="{{me.value}}">{{me.value}}</option>
                                     </datalist>
                                 </span>
                             </div>

+ 1 - 1
src/main/webapp/resources/tpl/index/purc/productDetail.html

@@ -264,7 +264,7 @@
                 <button class="btn01" ng-if="prodInfo.$editing" ng-click="cancel()">取消</button> -->
                 <button class="btn01" ng-click="deleteById(prodInfo.id)">删除</button>
                 <!-- <a ui-sref="sale.uploadByBatch"  class="btn02" ng-if="!prodInfo.$editing">批量导入</a> -->
-                <a class="btn02" ng-click="submit(prodInfo)" ng-disabled="productInfo.$invalid">提交</a>
+                <a class="btn02" ng-click="submit(prodInfo)" ng-disabled="productInfo.$invalid">更新</a>
             </div>
             <div id="image-box" style="display: none">
 				<div class="x-close-wrap" title="关闭">

+ 5 - 43
src/main/webapp/resources/tpl/index/sale/inquiry.html

@@ -407,7 +407,6 @@
 						</div>
 						<div class="text-bold text-inverse" style="margin-top:-15px" ng-show="!replylapQtys[$index]">分段数量递增!</div>
 					</div>
-					<!--<div class="text-muted" style="margin-top:-15px" >*分段数量递增!</div>-->
 					<a ng-click="addStep(inquiryItem)" class="btn btn-default btn-xs"
 					   ng-show="!inquiryItem.custLap">添加分段</a>
 				</div>
@@ -478,54 +477,17 @@
 				</div>
 			</td>
 			<td class="text-center br-l">
-				<div ng-show="!inquiryItem.$editing"
-					 ng-init="parseDate(inquiryItem)">
-					<div ng-show="inquiryItem.vendFromDate">
+				<div ng-init="parseDate(inquiryItem)">
+					<div ng-show="inquiryItem.toDate">
 						<span class="text-muted">从 </span><span
-							ng-bind="inquiryItem.vendFromDate | date:'yyyy-MM-dd'"></span> <span
+							ng-bind="inquiryItem.fromDate | date:'yyyy-MM-dd'"></span> <span
 							class="text-muted">到 </span><span
-							ng-bind="inquiryItem.vendToDate | date:'yyyy-MM-dd'"></span>
+							ng-bind="inquiryItem.toDate | date:'yyyy-MM-dd'"></span>
 					</div>
-					<div ng-show="!inquiryItem.vendFromDate">
+					<div ng-show="!inquiryItem.toDate">
 						<span class="text-muted">-</span>
 					</div>
 				</div>
-				<div ng-if="inquiryItem.$editing">
-					<div class="form-group input-group input-group-xs input-trigger">
-						<input type="text" ng-model="inquiryItem.vendFromDate"
-							   class="form-control" placeholder="开始日期"
-							   datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$fromOpened"
-							   min-date="getMinDate(inquiryItem)" ng-required="true"
-							   current-text="今天" clear-text="清除" close-text="关闭"
-							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-							   ng-focus="openDatePicker($event, inquiryItem, '$fromOpened')">
-						<span class="input-group-btn">
-								<button type="button" class="btn btn-default"
-										ng-click="openDatePicker($event, inquiryItem, '$fromOpened')">
-									<i class="fa fa-calendar"></i>
-								</button>
-							</span>
-					</div>
-					<div class="form-group input-group input-group-xs input-trigger">
-						<input type="text" ng-model="inquiryItem.vendToDate"
-							   class="form-control" placeholder="结束日期"
-							   datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$toOpened"
-							   min-date="inquiryItem.vendFromDate" ng-required="true"
-							   current-text="今天" clear-text="清除" close-text="关闭"
-							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-							   ng-focus="openDatePicker($event, inquiryItem, '$toOpened')">
-						<span class="input-group-btn">
-								<button type="button" class="btn btn-default"
-										ng-click="openDatePicker($event, inquiryItem, '$toOpened')">
-									<i class="fa fa-calendar"></i>
-								</button>
-							</span>
-					</div>
-					<div>
-						<span class="text-bold text-inverse">注意:</span>
-						<div><strong>交货周期</strong>和<strong>单价</strong>为必填项;<strong>分段</strong>是指按购买数量分成几个等级,然后在不同范围内报出对应的价格,一般量越大价格越低!</div>
-					</div>
-				</div>
 			</td>
 			<td class="text-center br-l">
 				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null && inquiryItem.invalid != 1" class="block">

+ 11 - 45
src/main/webapp/resources/tpl/index/sale/inquiry_detail.html

@@ -251,51 +251,17 @@
 						</div>
 					</td>
 					<td class="text-center">
-						<div ng-show="!inquiryItem.$editing"
-							 ng-init="parseDate(inquiryItem)">
-							<div ng-show="inquiryItem.vendFromDate">
-								<span class="text-muted">从 </span><span
-									ng-bind="inquiryItem.vendFromDate | date:'yyyy-MM-dd'"></span>
-								<span class="text-muted">到 </span><span
-									ng-bind="inquiryItem.vendToDate | date:'yyyy-MM-dd'"></span>
-							</div>
-							<div ng-show="!inquiryItem.vendFromDate">
-								<span class="text-muted">-</span>
-							</div>
-						</div>
-						<div ng-if="inquiryItem.$editing">
-							<div class="form-group input-group input-group-xs input-trigger">
-								<input type="text" ng-model="inquiryItem.vendFromDate"
-									   class="form-control" placeholder="开始日期"
-									   datepicker-popup="yyyy-MM-dd"
-									   is-open="inquiryItem.$fromOpened"
-									   min-date="getMinDate(inquiryItem)" ng-required="true"
-									   current-text="今天" clear-text="清除" close-text="关闭"
-									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-									   ng-focus="openDatePicker($event, inquiryItem, '$fromOpened')">
-								<span class="input-group-btn">
-										<button type="button" class="btn btn-default"
-												ng-click="openDatePicker($event, inquiryItem, '$fromOpened')">
-											<i class="fa fa-calendar"></i>
-										</button>
-									</span>
-							</div>
-							<div class="form-group input-group input-group-xs input-trigger">
-								<input type="text" ng-model="inquiryItem.vendToDate"
-									   class="form-control" placeholder="结束日期"
-									   datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$toOpened"
-									   min-date="inquiryItem.vendFromDate" ng-required="true"
-									   current-text="今天" clear-text="清除" close-text="关闭"
-									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-									   ng-focus="openDatePicker($event, inquiryItem, '$toOpened')">
-								<span class="input-group-btn">
-										<button type="button" class="btn btn-default"
-												ng-click="openDatePicker($event, inquiryItem, '$toOpened')">
-											<i class="fa fa-calendar"></i>
-										</button>
-									</span>
-							</div>
-						</div>
+                        <div ng-init="parseDate(inquiryItem)">
+                            <div ng-show="inquiryItem.toDate">
+                                <span class="text-muted">从 </span><span
+                                    ng-bind="inquiryItem.fromDate | date:'yyyy-MM-dd'"></span> <span
+                                    class="text-muted">到 </span><span
+                                    ng-bind="inquiryItem.toDate | date:'yyyy-MM-dd'"></span>
+                            </div>
+                            <div ng-show="!inquiryItem.toDate">
+                                <span class="text-muted">-</span>
+                            </div>
+                        </div>
 					</td>
 					<td class="text-center">
 						<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null && inquiryItem.invalid != 1" class="block">

+ 2 - 2
src/main/webapp/resources/tpl/index/sale/quotation_new.html

@@ -408,7 +408,7 @@
 					   placeholder="只可以为正整数" ng-readonly="!item.$editing" ng-required="true" ng-disabled="isDisabled()">
 				<span class="text-inverse text-bold">* </span>
 			</div>
-			<label class="col-sm-2 control-label">价格有效日期:</label>
+			<!--<label class="col-sm-2 control-label">价格有效日期:</label>
 			<div class="col-sm-4">
 				<div class="input-group">
 					<input ng-model="item.quotation.endDate" type="text" class="form-control" id="endDate"
@@ -425,7 +425,7 @@
 					</span>
 					<span class="text-inverse text-bold" style="right:-10px">* </span>
 				</div>
-			</div>
+			</div>-->
 		</div>
 		<div class="form-group form-group-sm">
 			<label for="currency" class="col-sm-2 control-label">币别:</label>