瀏覽代碼

平台新增询价单

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7857 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 年之前
父節點
當前提交
3fac615844

+ 236 - 0
src/main/java/com/uas/platform/b2b/controller/PurcInquiryController.java

@@ -0,0 +1,236 @@
+package com.uas.platform.b2b.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.alibaba.fastjson.JSONObject;
+import com.uas.platform.b2b.model.PurcInquiry;
+import com.uas.platform.b2b.model.PurchaseInquiryItem;
+import com.uas.platform.b2b.search.SearchService;
+import com.uas.platform.b2b.service.PurcInquiryService;
+import com.uas.platform.b2b.support.SystemSession;
+import com.uas.platform.b2b.support.UsageBufferedLogger;
+import com.uas.platform.b2b.temporary.model.PurcInquiryInfo;
+import com.uas.platform.b2b.temporary.model.VendorAndContact;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.model.Constant;
+import com.uas.platform.core.model.PageParams;
+import com.uas.platform.core.model.Status;
+import com.uas.platform.core.util.serializer.FlexJsonUtils;
+import com.uas.platform.core.web.bind.RequestState;
+import com.uas.search.b2b.model.SPage;
+import com.uas.search.b2b.model.Sort;
+import com.uas.search.b2b.model.Sort.Type;
+import com.uas.search.b2b.util.SearchConstants;
+
+/**
+ * 平台新增的询价单
+ * 
+ * @author hejq
+ * @time 创建时间:2017年4月17日
+ */
+@RestController
+@RequestMapping("/purc/inquiry")
+public class PurcInquiryController {
+
+	private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+	private final String SOURCERAPP = "B2B";
+
+	@Autowired
+	private PurcInquiryService purcInquiryService;
+
+	@Autowired
+	private SearchService searchService;
+
+	/**
+	 * 保存(或修改)
+	 * 
+	 * @param formStore
+	 * @return
+	 */
+	@RequestMapping(value = "/save", method = RequestMethod.POST)
+	private ModelMap save(String inquiry, @RequestBody String contacts) {
+		PurcInquiryInfo purcInquiry = JSONObject.parseObject(inquiry, PurcInquiryInfo.class);
+		List<VendorAndContact> vendors = FlexJsonUtils.fromJsonArray(contacts, VendorAndContact.class);
+		return purcInquiryService.save(purcInquiry, vendors);
+	}
+
+	/**
+	 * 查询详情
+	 * 
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+	private PurcInquiry getDetail(@PathVariable Long id) {
+		return null;
+	}
+
+	/**
+	 * 保存并提交
+	 * 
+	 * @param formStore
+	 * @return
+	 */
+	@RequestMapping(value = "/saveAndSubmit", method = RequestMethod.POST)
+	private ModelMap saveAndSubmit(String inquiry, @RequestBody String contacts) {
+		PurcInquiryInfo purcInquiry = JSONObject.parseObject(inquiry, PurcInquiryInfo.class);
+		List<VendorAndContact> vendors = FlexJsonUtils.fromJsonArray(contacts, VendorAndContact.class);
+		return purcInquiryService.saveAndSubmit(purcInquiry, vendors);
+	}
+
+	/**
+	 * 提交
+	 * 
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/sumbit/{id}", method = RequestMethod.POST)
+	private ModelMap sumbit(@PathVariable Long id) {
+		return purcInquiryService.sumbit(id);
+	}
+
+	/**
+	 * 删除明细一条数据
+	 * 
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	@RequestMapping(value = "deleteById/{id}", method = RequestMethod.DELETE)
+	private ModelMap deleteById(@PathVariable Long id) throws Exception {
+		return purcInquiryService.deleteById(id);
+	}
+
+	/**
+	 * 清空主表数据
+	 * 
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	@RequestMapping(value = "clearOrder/{id}", method = RequestMethod.DELETE)
+	private ModelMap clearOrder(@PathVariable Long id) throws Exception {
+		return purcInquiryService.clearOrder(id);
+
+	}
+	
+	/**
+	 * 得到全部
+	 * 
+	 * @return
+	 */
+	@RequestMapping(method = RequestMethod.GET)
+	public SPage<PurchaseInquiryItem> getReceivedPurchaseInquiries(PageParams params, String keyword) {
+		logger.log("采购询价单", "查看发出的采购询价单列表(全部)");
+		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
+		// 当前登录企业作为供应商
+		pageParams.getFilters().put("id_inid", SystemSession.getUser().getEnterprise().getUu());
+		// pageParams.getFilters().put("id_sourceapp", SOURCERAPP);
+		List<Sort> sortList = new ArrayList<>();
+		sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
+		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
+		return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
+	}
+	
+	/**
+	 * 待回复
+	 * 
+	 * @return
+	 */
+	@RequestMapping(params = RequestState.TODO, method = RequestMethod.GET)
+	public SPage<PurchaseInquiryItem> getTodoInquiries(PageParams params, String keyword) {
+		logger.log("客户询价单", "查看收到的客户询价单列表(待回复)");
+		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
+		// 当前登录企业作为供应商
+		pageParams.getFilters().put("id_inid", SystemSession.getUser().getEnterprise().getUu());
+		pageParams.getFilters().put("id_status", Status.NOT_REPLY.value());
+		pageParams.getFilters().put("id_overdue", Constant.NO);
+		// pageParams.getFilters().put("id_sourceapp", SOURCERAPP);
+		List<Sort> sortList = new ArrayList<>();
+		sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
+		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
+		return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
+	}
+
+	/**
+	 * 已过期
+	 * 
+	 * @return
+	 */
+	@RequestMapping(params = RequestState.END, method = RequestMethod.GET)
+	public SPage<PurchaseInquiryItem> getEndInquiries(PageParams params, String keyword) {
+		logger.log("客户询价单", "查看收到的客户询价单列表(待回复)");
+		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
+		// 当前登录企业作为供应商
+		pageParams.getFilters().put("id_inid", SystemSession.getUser().getEnterprise().getUu());
+		pageParams.getFilters().put("id_status", Status.NOT_REPLY.value());
+		// pageParams.getFilters().put("id_sourceapp", SOURCERAPP);
+		pageParams.getFilters().put("id_overdue", Constant.YES);
+		List<Sort> sortList = new ArrayList<>();
+		sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
+		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
+		return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
+	}
+	
+	/**
+	 * 已回复
+	 * 
+	 * @return
+	 */
+	@RequestMapping(params = RequestState.DONE, method = RequestMethod.GET)
+	public SPage<PurchaseInquiryItem> getDoneInquiries(PageParams params, String keyword) {
+		logger.log("客户询价单", "查看收到的客户询价单列表(待回复)");
+		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
+		// 当前登录企业作为供应商
+		pageParams.getFilters().put("id_inid", SystemSession.getUser().getEnterprise().getUu());
+		pageParams.getFilters().put("id_status", Status.REPLIED.value());
+		// pageParams.getFilters().put("id_sourceapp", SOURCERAPP);
+		List<Sort> sortList = new ArrayList<>();
+		sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
+		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
+		return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
+	}
+
+	/**
+	 * 未提交(主表查询,不建索引)
+	 * 
+	 * @return
+	 */
+	@RequestMapping(value = "/unapply", method = RequestMethod.GET)
+	private Page<PurcInquiry> getUnapply(PageParams params) {
+		return purcInquiryService.getUnapply(params);
+	}
+
+	/**
+	 * 采纳
+	 * 
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/accept/{id}", method = RequestMethod.POST)
+	private ModelMap acceptInquiry(@PathVariable Long id) {
+		return purcInquiryService.acceptInquiry(id);
+	}
+
+	/**
+	 * 拒绝
+	 * 
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/refuse/{id}", method = RequestMethod.POST)
+	private ModelMap refuseInquiry(@PathVariable Long id) {
+		return purcInquiryService.refuseInquiry(id);
+	}
+	
+}

+ 21 - 0
src/main/java/com/uas/platform/b2b/dao/InvitationRecordDao.java

@@ -0,0 +1,21 @@
+package com.uas.platform.b2b.dao;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+import com.uas.platform.b2b.model.InvitationRecord;
+
+@Repository
+public interface InvitationRecordDao
+		extends JpaRepository<InvitationRecord, Long>, JpaSpecificationExecutor<InvitationRecord> {
+
+	/**
+	 * 邀请人和客户企业名称记录邀请次数
+	 * 
+	 * @param useruu
+	 * @param vendname
+	 * @return
+	 */
+	public InvitationRecord findByUseruuAndVendname(Long useruu, String vendname);
+}

+ 278 - 0
src/main/java/com/uas/platform/b2b/model/PurcInquiry.java

@@ -0,0 +1,278 @@
+package com.uas.platform.b2b.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.OrderBy;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * 平台新增询价单中间表
+ * 
+ * @author hejq
+ * @time 创建时间:2017年4月17日
+ */
+@Entity
+@Table(name = "purc$puinquiry")
+public class PurcInquiry implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "purc$puinquiry_gen")
+	@SequenceGenerator(name = "purc$puinquiry_gen", sequenceName = "purc$puinquiry_seq", allocationSize = 1)
+	@Column(name = "in_id")
+	private Long id;
+
+	/**
+	 * 询价单所属企业UU
+	 */
+	@Column(name = "in_enuu")
+	private Long enUU;
+
+	/**
+	 * 询价单所属用户UU
+	 */
+	@Column(name = "in_recorderuu")
+	private Long recorderUU;
+
+	/**
+	 * 询价企业
+	 */
+	@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
+	@JoinColumn(name = "in_enuu", insertable = false, updatable = false)
+	private EnterpriseInfo enterprise;
+
+	/**
+	 * 流水号
+	 */
+	@Column(name = "in_code")
+	private String code;
+
+	/**
+	 * 单据归属日期
+	 */
+	@Column(name = "in_date")
+	private Date date;
+
+	/**
+	 * 录入人
+	 */
+	@Column(name = "in_recorder")
+	private String recorder;
+
+	/**
+	 * 审核人
+	 */
+	@Column(name = "in_auditor")
+	private String auditor;
+
+	/**
+	 * 报价截止日期
+	 */
+	@Column(name = "in_enddate")
+	private Date endDate;
+
+	/**
+	 * 备注
+	 */
+	@Column(name = "in_remark")
+	private String remark;
+
+	/**
+	 * 环保要求
+	 */
+	@Column(name = "in_environment")
+	private String environment;
+
+	/**
+	 * 价格类型
+	 */
+	@Column(name = "in_pricetype")
+	private String priceType;
+
+	/**
+	 * 询价明细
+	 */
+	@OneToMany(mappedBy = "inquiry", cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
+	@OrderBy("number")
+	private Set<PurcInquiryItem> inquiryItems;
+
+	/**
+	 * 附件
+	 */
+	@OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
+	@JoinTable(name = "purc$puinquiryattach", joinColumns = @JoinColumn(name = "in_id", referencedColumnName = "in_id") , inverseJoinColumns = @JoinColumn(name = "at_id", referencedColumnName = "at_id") )
+	private Set<Attach> attachs;
+
+	/**
+	 * 采纳结果
+	 */
+	@Column(name = "in_checked")
+	private Short check;
+
+	/**
+	 * 单据状态(已提交、在录入)
+	 */
+	@Column(name = "in_enterystatus")
+	private Integer enteryStatus;
+
+	/**
+	 * 是否过期
+	 */
+	@Column(name = "in_overdue", insertable = false, updatable = false)
+	private Short overdue;
+
+	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 Long getRecorderUU() {
+		return recorderUU;
+	}
+
+	public void setRecorderUU(Long recorderUU) {
+		this.recorderUU = recorderUU;
+	}
+
+	public EnterpriseInfo getEnterprise() {
+		return enterprise;
+	}
+
+	public void setEnterprise(EnterpriseInfo enterprise) {
+		this.enterprise = enterprise;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public Date getDate() {
+		return date;
+	}
+
+	public void setDate(Date date) {
+		this.date = date;
+	}
+
+	public String getRecorder() {
+		return recorder;
+	}
+
+	public void setRecorder(String recorder) {
+		this.recorder = recorder;
+	}
+
+	public String getAuditor() {
+		return auditor;
+	}
+
+	public void setAuditor(String auditor) {
+		this.auditor = auditor;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getEnvironment() {
+		return environment;
+	}
+
+	public void setEnvironment(String environment) {
+		this.environment = environment;
+	}
+
+	public String getPriceType() {
+		return priceType;
+	}
+
+	public void setPriceType(String priceType) {
+		this.priceType = priceType;
+	}
+
+	public Set<PurcInquiryItem> getInquiryItems() {
+		return inquiryItems;
+	}
+
+	public void setInquiryItems(Set<PurcInquiryItem> inquiryItems) {
+		this.inquiryItems = inquiryItems;
+	}
+
+	public Set<Attach> getAttachs() {
+		return attachs;
+	}
+
+	public void setAttachs(Set<Attach> attachs) {
+		this.attachs = attachs;
+	}
+
+	public Short getCheck() {
+		return check;
+	}
+
+	public void setCheck(Short check) {
+		this.check = check;
+	}
+
+	public Integer getEnteryStatus() {
+		return enteryStatus;
+	}
+
+	public void setEnteryStatus(Integer enteryStatus) {
+		this.enteryStatus = enteryStatus;
+	}
+
+	public Short getOverdue() {
+		return overdue;
+	}
+
+	public void setOverdue(Short overdue) {
+		this.overdue = overdue;
+	}
+
+}

+ 420 - 0
src/main/java/com/uas/platform/b2b/model/PurcInquiryItem.java

@@ -0,0 +1,420 @@
+package com.uas.platform.b2b.model;
+
+import java.util.Date;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.OrderBy;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+import com.alibaba.fastjson.annotation.JSONField;
+
+/**
+ * 平台新增询价单明细
+ * 
+ * @author hejq
+ * @time 创建时间:2017年4月17日
+ */
+@Entity
+@Table(name = "purc$puinquirytimes")
+public class PurcInquiryItem {
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "purc$puinquirytimes_gen")
+	@SequenceGenerator(name = "purc$puinquirytimes_gen", sequenceName = "purc$puinquirytimes_seq", allocationSize = 1)
+	@Column(name = "id_id")
+	private Long id;
+
+	/**
+	 * 序号
+	 */
+	@Column(name = "id_number")
+	private Short number;
+
+	/**
+	 * 询价单
+	 */
+	@ManyToOne(cascade = CascadeType.ALL, optional = true)
+	@JoinColumn(name = "id_inid", nullable = false)
+	private PurcInquiry inquiry;
+
+	/**
+	 * 买家采购员UU
+	 */
+	@Column(name = "id_useruu")
+	private Long userUU;
+
+	/**
+	 * 产品
+	 */
+	@OneToOne(cascade = { CascadeType.REFRESH })
+	@JoinColumn(name = "id_prid", insertable = false, updatable = false)
+	private Product product;
+
+	@Column(name = "id_prid")
+	private Long productId;
+
+	/**
+	 * 币种
+	 */
+	@Column(name = "id_currency")
+	private String currency;
+
+	/**
+	 * 税率
+	 */
+	@Column(name = "id_taxrate")
+	private Float taxrate;
+
+	/**
+	 * 备注
+	 */
+	@Column(name = "id_remark")
+	private String remark;
+
+	/**
+	 * 供应商UU
+	 */
+	@Column(name = "id_venduu")
+	private Long vendUU;
+
+	/**
+	 * 供应商
+	 */
+	@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
+	@JoinColumn(name = "id_venduu", insertable = false, updatable = false)
+	private EnterpriseInfo enterprise;
+
+	/**
+	 * 供应商联系人UU
+	 */
+	@Column(name = "id_venduseruu")
+	private Long vendUserUU;
+
+	/**
+	 * (买家预先提供的)有效期始
+	 */
+	@Column(name = "id_fromdate")
+	private Date fromDate;
+
+	/**
+	 * (买家预先提供的)有效期止
+	 */
+	@Column(name = "id_todate")
+	private Date toDate;
+
+	/**
+	 * (卖家报的)有效期始
+	 */
+	@Column(name = "id_vendfromdate")
+	private Date vendFromDate;
+
+	/**
+	 * (卖家报的)有效期止
+	 */
+	@Column(name = "id_vendtodate")
+	private Date vendToDate;
+
+	/**
+	 * (卖家报的)最小订购量
+	 */
+	@Column(name = "id_minorderqty")
+	private Double minOrderQty;
+
+	/**
+	 * (卖家报的)最小包装量
+	 */
+	@Column(name = "id_minpackqty")
+	private Double minPackQty;
+
+	/**
+	 * (卖家报的)物料品牌
+	 */
+	@Column(name = "id_brand")
+	private String brand;
+
+	/**
+	 * (卖家报的)供应商物料编号
+	 */
+	@Column(name = "id_vendorprodcode")
+	private String vendorprodcode;
+
+	/**
+	 * (卖家报的)交货周期(天数)
+	 */
+	@Column(name = "id_leadtime")
+	private Long leadtime;
+
+	/**
+	 * 分段报价明细
+	 */
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+	@JoinColumn(name = "ir_idid")
+	@OrderBy("lapQty")
+	private Set<PurchaseInquiryReply> replies;
+
+	/**
+	 * {未回复、已回复}
+	 */
+	@Column(name = "id_status")
+	private Short status;
+
+	/**
+	 * 是否采纳
+	 */
+	@Column(name = "id_agreed")
+	private Short agreed;
+
+	/**
+	 * 是否买家已设置分段数
+	 */
+	@Column(name = "id_custlap")
+	private Short custLap;
+
+	/**
+	 * search项目进行是否已过期时实际根据主表中enddate与当前时间的比较获取,但是数据库无字段会报“标识符无效”的错误
+	 * 所以建立此字段,但是此字段不会赋值。
+	 * 
+	 * @return
+	 */
+	@Column(name = "id_overdue")
+	private Short overdue;
+
+	/**
+	 * 来源ERP或B2B
+	 */
+	@Column(name = "id_source")
+	private String source;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Short getNumber() {
+		return number;
+	}
+
+	public void setNumber(Short number) {
+		this.number = number;
+	}
+
+	@JsonIgnore
+	@JSONField(serialize = false)
+	public PurcInquiry getInquiry() {
+		return inquiry;
+	}
+
+	public void setInquiry(PurcInquiry inquiry) {
+		this.inquiry = inquiry;
+	}
+
+	public Long getUserUU() {
+		return userUU;
+	}
+
+	public void setUserUU(Long userUU) {
+		this.userUU = userUU;
+	}
+
+	public Product getProduct() {
+		return product;
+	}
+
+	public void setProduct(Product product) {
+		this.product = product;
+	}
+
+	public Long getProductId() {
+		return productId;
+	}
+
+	public void setProductId(Long productId) {
+		this.productId = productId;
+	}
+
+	public String getCurrency() {
+		return currency;
+	}
+
+	public void setCurrency(String currency) {
+		this.currency = currency;
+	}
+
+	public Float getTaxrate() {
+		return taxrate;
+	}
+
+	public void setTaxrate(Float taxrate) {
+		this.taxrate = taxrate;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Long getVendUU() {
+		return vendUU;
+	}
+
+	public void setVendUU(Long vendUU) {
+		this.vendUU = vendUU;
+	}
+
+	public Long getVendUserUU() {
+		return vendUserUU;
+	}
+
+	public void setVendUserUU(Long vendUserUU) {
+		this.vendUserUU = vendUserUU;
+	}
+
+	public Date getFromDate() {
+		return fromDate;
+	}
+
+	public void setFromDate(Date fromDate) {
+		this.fromDate = fromDate;
+	}
+
+	public Date getToDate() {
+		return toDate;
+	}
+
+	public void setToDate(Date toDate) {
+		this.toDate = toDate;
+	}
+
+	public Date getVendFromDate() {
+		return vendFromDate;
+	}
+
+	public void setVendFromDate(Date vendFromDate) {
+		this.vendFromDate = vendFromDate;
+	}
+
+	public Date getVendToDate() {
+		return vendToDate;
+	}
+
+	public void setVendToDate(Date vendToDate) {
+		this.vendToDate = vendToDate;
+	}
+
+	public Double getMinOrderQty() {
+		return minOrderQty;
+	}
+
+	public void setMinOrderQty(Double minOrderQty) {
+		this.minOrderQty = minOrderQty;
+	}
+
+	public Double getMinPackQty() {
+		return minPackQty;
+	}
+
+	public void setMinPackQty(Double minPackQty) {
+		this.minPackQty = minPackQty;
+	}
+
+	public String getBrand() {
+		return brand;
+	}
+
+	public void setBrand(String brand) {
+		this.brand = brand;
+	}
+
+	public String getVendorprodcode() {
+		return vendorprodcode;
+	}
+
+	public void setVendorprodcode(String vendorprodcode) {
+		this.vendorprodcode = vendorprodcode;
+	}
+
+	public Long getLeadtime() {
+		return leadtime;
+	}
+
+	public void setLeadtime(Long leadtime) {
+		this.leadtime = leadtime;
+	}
+
+	public Set<PurchaseInquiryReply> getReplies() {
+		return replies;
+	}
+
+	public void setReplies(Set<PurchaseInquiryReply> replies) {
+		this.replies = replies;
+	}
+
+	public Short getStatus() {
+		return status;
+	}
+
+	public void setStatus(Short status) {
+		this.status = status;
+	}
+
+	public Short getAgreed() {
+		return agreed;
+	}
+
+	public void setAgreed(Short agreed) {
+		this.agreed = agreed;
+	}
+
+	public Short getCustLap() {
+		return custLap;
+	}
+
+	public void setCustLap(Short custLap) {
+		this.custLap = custLap;
+	}
+
+	public Short getOverdue() {
+		return overdue;
+	}
+
+	public void setOverdue(Short overdue) {
+		this.overdue = overdue;
+	}
+
+	public String getSource() {
+		return source;
+	}
+
+	public void setSource(String source) {
+		this.source = source;
+	}
+
+	public EnterpriseInfo getEnterprise() {
+		return enterprise;
+	}
+
+	public void setEnterprise(EnterpriseInfo enterprise) {
+		this.enterprise = enterprise;
+	}
+
+}

+ 29 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseInquiryItem.java

@@ -101,6 +101,13 @@ public class PurchaseInquiryItem {
 	@Column(name = "id_venduu")
 	private Long vendUU;
 
+	/**
+	 * 询价企业
+	 */
+	@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
+	@JoinColumn(name = "id_venduu", insertable = false, updatable = false)
+	private EnterpriseInfo enterprise;
+
 	/**
 	 * 供应商联系人UU
 	 */
@@ -228,6 +235,12 @@ public class PurchaseInquiryItem {
 	@Column(name = "id_overdue")
 	private Short overdue;
 
+	/**
+	 * 应用来源ERP、B2B
+	 */
+	@Column(name = "id_sourceapp")
+	private String soruceApp;
+
 	public Long getId() {
 		return id;
 	}
@@ -470,6 +483,22 @@ public class PurchaseInquiryItem {
 		this.erpDate = erpDate;
 	}
 
+	public String getSoruceApp() {
+		return soruceApp;
+	}
+
+	public void setSoruceApp(String soruceApp) {
+		this.soruceApp = soruceApp;
+	}
+
+	public EnterpriseInfo getEnterprise() {
+		return enterprise;
+	}
+
+	public void setEnterprise(EnterpriseInfo enterprise) {
+		this.enterprise = enterprise;
+	}
+
 	/**
 	 * 回复记录的描述
 	 * 

+ 79 - 0
src/main/java/com/uas/platform/b2b/service/PurcInquiryService.java

@@ -0,0 +1,79 @@
+package com.uas.platform.b2b.service;
+
+import java.util.List;
+
+import org.springframework.data.domain.Page;
+import org.springframework.ui.ModelMap;
+
+import com.uas.platform.b2b.model.PurcInquiry;
+import com.uas.platform.b2b.temporary.model.PurcInquiryInfo;
+import com.uas.platform.b2b.temporary.model.VendorAndContact;
+import com.uas.platform.core.model.PageParams;
+
+public interface PurcInquiryService {
+
+	/**
+	 * 保存或更新
+	 * 
+	 * @param inquiry
+	 * @return
+	 */
+	public ModelMap save(PurcInquiryInfo inquiry, List<VendorAndContact> contacts);
+
+	/**
+	 * 保存提交
+	 * 
+	 * @param inquiry
+	 * @param contacts
+	 * @return
+	 */
+	public ModelMap saveAndSubmit(PurcInquiryInfo inquiry, List<VendorAndContact> contacts);
+
+	/**
+	 * 提交单据
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public ModelMap sumbit(Long id);
+
+	/**
+	 * 清空主表
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public ModelMap clearOrder(Long id) throws Exception;
+
+	/**
+	 * 删除明细
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public ModelMap deleteById(Long id) throws Exception;
+
+	/**
+	 * 未提交的单据
+	 * 
+	 * @return
+	 */
+	public Page<PurcInquiry> getUnapply(PageParams params);
+
+	/**
+	 * 拒绝报价
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public ModelMap refuseInquiry(Long id);
+
+	/**
+	 * 采纳报价
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public ModelMap acceptInquiry(Long id);
+
+}

+ 324 - 0
src/main/java/com/uas/platform/b2b/service/impl/PurcInquiryServiceImpl.java

@@ -0,0 +1,324 @@
+package com.uas.platform.b2b.service.impl;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+import org.springframework.ui.ModelMap;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.platform.b2b.dao.EnterpriseDao;
+import com.uas.platform.b2b.dao.ProductDao;
+import com.uas.platform.b2b.dao.PurcInquiryDao;
+import com.uas.platform.b2b.dao.PurcInquiryItemDao;
+import com.uas.platform.b2b.dao.PurchaseInquiryItemDao;
+import com.uas.platform.b2b.model.Enterprise;
+import com.uas.platform.b2b.model.Product;
+import com.uas.platform.b2b.model.PurcInquiry;
+import com.uas.platform.b2b.model.PurcInquiryItem;
+import com.uas.platform.b2b.model.PurchaseInquiry;
+import com.uas.platform.b2b.model.PurchaseInquiryItem;
+import com.uas.platform.b2b.service.PurcInquiryService;
+import com.uas.platform.b2b.support.SystemSession;
+import com.uas.platform.b2b.support.UsageBufferedLogger;
+import com.uas.platform.b2b.temporary.model.PurcInquiryInfo;
+import com.uas.platform.b2b.temporary.model.VendorAndContact;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.model.Constant;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import com.uas.platform.core.model.Status;
+
+@Service
+public class PurcInquiryServiceImpl implements PurcInquiryService {
+
+	private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+	private final String SOURCERAPP = "B2B";
+
+	@Autowired
+	private EnterpriseDao enterpriseDao;
+
+	@Autowired
+	private PurcInquiryItemDao purcInquiryItemDao;
+
+	@Autowired
+	private PurcInquiryDao inquiryDao;
+
+	@Autowired
+	private ProductDao productDao;
+
+	@Autowired
+	private PurchaseInquiryItemDao purchaseInquiryItemDao;
+
+	@Override
+	public ModelMap save(PurcInquiryInfo inquiryInfo, List<VendorAndContact> contacts) {
+		System.out.println(JSON.toJSON(inquiryInfo));
+		ModelMap map = new ModelMap();
+		Long enuu = SystemSession.getUser().getEnterprise().getUu();
+		Long useruu = SystemSession.getUser().getUserUU();
+		// 先判断供应商是否存在
+		PurcInquiry inquiry = new PurcInquiry();
+		if (!CollectionUtils.isEmpty(contacts)) {
+			if (inquiry.getId() == null) {// 新增
+				inquiry.setDate(new Date());
+				inquiry.setCode(inquiry.getCode());
+				inquiry.setEnUU(enuu);
+				inquiry.setCode(inquiryInfo.getCode());
+				inquiry.setEndDate(inquiryInfo.getEndDate());
+				inquiry.setRemark(inquiryInfo.getRemark());
+				inquiry.setEnvironment(inquiryInfo.getEnvironment());
+				inquiry.setEnterprise(enterpriseDao.findEnterpriseInfoByUu(enuu));
+				inquiry.setRecorder(SystemSession.getUser().getUserName());
+				inquiry.setRecorderUU(SystemSession.getUser().getUserUU());
+				inquiry.setEnteryStatus(Status.UNAPPLY.value());
+				inquiry.setPriceType(inquiryInfo.getPriceType());
+				Set<PurcInquiryItem> items = new HashSet<PurcInquiryItem>();
+				Short i = 0;
+				for (VendorAndContact contact : contacts) {
+					if (!CollectionUtils.isEmpty(inquiryInfo.getInquiryItems())) {
+						for (PurcInquiryItem purcitem : inquiryInfo.getInquiryItems()) {
+							PurcInquiryItem item = new PurcInquiryItem();
+							Enterprise vendorEn = enterpriseDao.findEnterpriseByUu(contact.getEnuu());
+							Product product = productDao.findOne(purcitem.getProductId());
+							item.setInquiry(inquiry);
+							item.setProduct(product);
+							item.setNumber(i);
+							item.setCurrency(purcitem.getCurrency());
+							item.setFromDate(new Date());
+							item.setToDate(purcitem.getToDate());
+							item.setTaxrate(purcitem.getTaxrate());
+							item.setRemark(purcitem.getRemark());
+							item.setProductId(purcitem.getProductId());
+							item.setVendUU(contact.getEnuu());
+							item.setStatus((short) Status.NOT_REPLY.value());
+							item.setVendUserUU(vendorEn.getEnAdminuu());
+							items.add(item);
+							i++;
+						}
+					}
+				}
+				List<PurcInquiryItem> purcitems = purcInquiryItemDao.save(items);
+				if (purcitems.get(0).getId() != null) {
+					map.put("success", "询价单保存成功");
+					map.put("id", purcitems.get(0).getInquiry().getId());
+					logger.log("询价单", "平台新增询价单", useruu, SystemSession.getUser().getIp());
+				} else {
+					map.put("error", "询价单保存失败");
+				}
+			} // TODO 暂未设想更新逻辑
+				// else {// 更新
+				// PurcInquiry purcInquiry =
+				// inquiryDao.findOne(inquiry.getId());
+				// purcInquiry.setAttachs(inquiry.getAttachs());
+				// purcInquiry.setDate(new Date());
+				// purcInquiry.setEndDate(inquiry.getEndDate());
+				// purcInquiry.setEnvironment(inquiry.getEnvironment());
+				// purcInquiry.setRemark(inquiry.getRemark());
+				// if (!CollectionUtils.isEmpty(contacts)) {
+				// if (!CollectionUtils.isEmpty(inquiry.getInquiryItems())) {
+				// for (PurcInquiryItem item : inquiry.getInquiryItems()) {
+				// PurcInquiryItem purcItem =
+				// purcInquiryItemDao.findOne(item.getId());
+				// purcItem.setCurrency(item.getCurrency());
+				// purcItem.setInquiry(purcInquiry);
+				// }
+				// }
+				// }
+				//
+				// }
+		}
+		return map;
+	}
+
+	@Override
+	public ModelMap saveAndSubmit(PurcInquiryInfo inquiryInfo, List<VendorAndContact> contacts) {
+		ModelMap map = new ModelMap();
+		// 先进行保存
+		Object inquiryId = save(inquiryInfo, contacts).get("id");// 取出id进行更新状态
+		// 再保存到询价单
+		Long enuu = SystemSession.getUser().getEnterprise().getUu();
+		Long useruu = SystemSession.getUser().getUserUU();
+		// 先判断供应商是否存在
+		if (!CollectionUtils.isEmpty(contacts)) {
+			if (inquiryInfo.getId() == null) {// 新增
+				PurchaseInquiry saleInquiry = new PurchaseInquiry();
+				saleInquiry.setDate(new Date());
+				saleInquiry.setCode(inquiryInfo.getCode());
+				saleInquiry.setRemark(inquiryInfo.getRemark());
+				saleInquiry.setEndDate(inquiryInfo.getEndDate());
+				saleInquiry.setEnvironment(inquiryInfo.getEnvironment());
+				saleInquiry.setEnUU(enuu);
+				saleInquiry.setEnterprise(enterpriseDao.findEnterpriseInfoByUu(enuu));
+				saleInquiry.setRecorder(SystemSession.getUser().getUserName());
+				saleInquiry.setRecorderUU(useruu);
+				saleInquiry.setPriceType(inquiryInfo.getPriceType());
+				saleInquiry.setAuditor(SystemSession.getUser().getUserName());
+				Set<PurchaseInquiryItem> items = new HashSet<PurchaseInquiryItem>();
+				Short i = 0;
+				for (VendorAndContact contact : contacts) {
+					if (!CollectionUtils.isEmpty(inquiryInfo.getInquiryItems())) {
+						for (PurcInquiryItem item : inquiryInfo.getInquiryItems()) {
+							PurchaseInquiryItem saleItem = new PurchaseInquiryItem();
+							Enterprise vendorEn = enterpriseDao.findEnterpriseByUu(contact.getEnuu());
+							Product product = productDao.findOne(item.getProductId());
+							saleItem.setInquiry(saleInquiry);
+							saleItem.setNumber(i);
+							saleItem.setCurrency(item.getCurrency());
+							saleItem.setVendUU(contact.getEnuu());
+							saleItem.setVendUserUU(vendorEn.getEnAdminuu());
+							saleItem.setProductId(item.getProductId());
+							saleItem.setProduct(product);
+							saleItem.setRemark(item.getRemark());
+							saleItem.setFromDate(item.getFromDate());
+							saleItem.setTaxrate(item.getTaxrate());
+							saleItem.setUserUU(useruu);
+							saleItem.setToDate(item.getToDate());
+							saleItem.setFromDate(new Date());
+							saleItem.setStatus((short) Status.NOT_REPLY.value());
+							saleItem.setSendStatus((short) Status.REPLIED.value());
+							saleItem.setCustLap((short) 0);
+							saleItem.setSoruceApp(SOURCERAPP);
+							items.add(saleItem);
+							i++;
+						}
+					}
+				}
+				List<PurchaseInquiryItem> purcitems = purchaseInquiryItemDao.save(items);
+				if (purcitems.get(0).getId() != null) {
+					logger.log("询价单", "平台新增询价单", useruu, SystemSession.getUser().getIp());
+					PurcInquiry inquiry = inquiryDao.findOne(Long.valueOf(inquiryId.toString()));
+					inquiry.setEnteryStatus(Status.ENABLED.value());
+					inquiryDao.save(inquiry);
+					map.put("success", "询价单保存成功");
+				} else {
+					map.put("error", "询价单保存失败");
+				}
+			}
+		}
+		return map;
+	}
+
+	@Override
+	public ModelMap sumbit(Long id) {
+		ModelMap map = new ModelMap();
+		Long enuu = SystemSession.getUser().getEnterprise().getUu();
+		Long useruu = SystemSession.getUser().getUserUU();
+		PurcInquiry inquiry = inquiryDao.findOne(id);
+		PurchaseInquiry saleInquiry = new PurchaseInquiry();
+		saleInquiry.setDate(new Date());
+		saleInquiry.setCode(inquiry.getCode());
+		saleInquiry.setEnUU(enuu);
+		saleInquiry.setEnterprise(enterpriseDao.findEnterpriseInfoByUu(enuu));
+		saleInquiry.setRecorder(SystemSession.getUser().getUserName());
+		saleInquiry.setRecorderUU(useruu);
+		saleInquiry.setAuditor(SystemSession.getUser().getUserName());
+		Set<PurchaseInquiryItem> items = new HashSet<PurchaseInquiryItem>();
+		if (!CollectionUtils.isEmpty(inquiry.getInquiryItems())) {
+			for (PurcInquiryItem item : inquiry.getInquiryItems()) {
+				PurchaseInquiryItem saleItem = new PurchaseInquiryItem();
+				saleItem.setFromDate(item.getFromDate());
+				Product product = productDao.findOne(Long.valueOf(id));
+				saleItem.setInquiry(saleInquiry);
+				saleItem.setNumber(item.getNumber());
+				saleItem.setVendUU(item.getVendUU());
+				saleItem.setVendUserUU(item.getVendUserUU());
+				saleItem.setProductId(item.getProductId());
+				saleItem.setProduct(product);
+				saleItem.setRemark(item.getRemark());
+				saleItem.setFromDate(item.getFromDate());
+				saleItem.setTaxrate(item.getTaxrate());
+				saleItem.setToDate(item.getToDate());
+				saleItem.setStatus((short) Status.NOT_REPLY.value());
+				saleItem.setSendStatus((short) Status.REPLIED.value());
+				saleItem.setSoruceApp(SOURCERAPP);
+				items.add(saleItem);
+			}
+		}
+		List<PurchaseInquiryItem> purcitems = purchaseInquiryItemDao.save(items);
+		if (purcitems.get(0).getId() != null) {
+			inquiry = inquiryDao.findOne(id);
+			inquiry.setEnteryStatus(Status.ENABLED.value());
+			inquiryDao.save(inquiry);
+			logger.log("询价单", "平台提交询价价单", useruu, SystemSession.getUser().getIp());
+			map.put("success", "询价单提交成功");
+		} else {
+			map.put("error", "询价单提交失败");
+		}
+		return map;
+	}
+
+	@Override
+	public ModelMap clearOrder(Long id) {
+		try {
+			inquiryDao.delete(id);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	@Override
+	public ModelMap deleteById(Long id) {
+		try {
+			purcInquiryItemDao.delete(id);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	@Override
+	public Page<PurcInquiry> getUnapply(PageParams params) {
+		final PageInfo pageInfo = new PageInfo();
+		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
+		pageInfo.filter("enteryStatus", Status.UNAPPLY.value());
+		return inquiryDao.findAll(new Specification<PurcInquiry>() {
+			public Predicate toPredicate(Root<PurcInquiry> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+				return query.where(pageInfo.getPredicates(root, query, builder)).getRestriction();
+			}
+		}, pageInfo);
+	}
+
+	@Override
+	public ModelMap refuseInquiry(Long id) {
+		ModelMap map = new ModelMap();
+		PurchaseInquiryItem item = purchaseInquiryItemDao.findOne(id);
+		item.setAgreed(Constant.NO);
+		item.setStatus((short) Status.REPLIED.value());
+		item = purchaseInquiryItemDao.save(item);
+		if (item.getAgreed().equals(Constant.NO) && item.getStatus().equals(Status.REPLIED.value())) {
+			map.put("success", "拒绝操作成功");
+		} else {
+			map.put("error", "操作失败");
+		}
+		return map;
+	}
+
+	@Override
+	public ModelMap acceptInquiry(Long id) {
+		ModelMap map = new ModelMap();
+		PurchaseInquiryItem item = purchaseInquiryItemDao.findOne(id);
+		item.setAgreed(Constant.YES);
+		item.setStatus((short) Status.REPLIED.value());
+		item = purchaseInquiryItemDao.save(item);
+		if (item.getAgreed().equals(Constant.YES) && item.getStatus().equals(Status.REPLIED.value())) {
+			map.put("success", "采纳成功");
+		} else {
+			map.put("error", "采纳失败");
+		}
+		return map;
+	}
+
+
+}

+ 116 - 0
src/main/java/com/uas/platform/b2b/temporary/model/PurcInquiryInfo.java

@@ -0,0 +1,116 @@
+package com.uas.platform.b2b.temporary.model;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.Id;
+
+import com.uas.platform.b2b.model.Attach;
+import com.uas.platform.b2b.model.PurcInquiryItem;
+
+public class PurcInquiryInfo {
+
+	@Id
+	private Long id;
+
+	/**
+	 * 流水号
+	 */
+	private String code;
+
+
+	/**
+	 * 报价截止日期
+	 */
+	private Date endDate;
+
+	/**
+	 * 备注
+	 */
+	private String remark;
+
+	/**
+	 * 环保要求
+	 */
+	private String environment;
+
+	/**
+	 * 价格类型
+	 */
+	private String priceType;
+
+	/**
+	 * 询价明细
+	 */
+	private List<PurcInquiryItem> inquiryItems;
+
+	/**
+	 * 附件
+	 */
+	private List<Attach> attachs;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getEnvironment() {
+		return environment;
+	}
+
+	public void setEnvironment(String environment) {
+		this.environment = environment;
+	}
+
+	public String getPriceType() {
+		return priceType;
+	}
+
+	public void setPriceType(String priceType) {
+		this.priceType = priceType;
+	}
+
+	public List<PurcInquiryItem> getInquiryItems() {
+		return inquiryItems;
+	}
+
+	public void setInquiryItems(List<PurcInquiryItem> inquiryItems) {
+		this.inquiryItems = inquiryItems;
+	}
+
+	public List<Attach> getAttachs() {
+		return attachs;
+	}
+
+	public void setAttachs(List<Attach> attachs) {
+		this.attachs = attachs;
+	}
+
+}

+ 42 - 0
src/main/java/com/uas/platform/b2b/temporary/model/VendorAndContact.java

@@ -0,0 +1,42 @@
+package com.uas.platform.b2b.temporary.model;
+
+public class VendorAndContact {
+
+	private Long id;
+	private Long enuu;
+	private String userTel;
+	private String enName;
+
+	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 getUserTel() {
+		return userTel;
+	}
+
+	public void setUserTel(String userTel) {
+		this.userTel = userTel;
+	}
+
+	public String getEnName() {
+		return enName;
+	}
+
+	public void setEnName(String enName) {
+		this.enName = enName;
+	}
+
+}

+ 20 - 3
src/main/webapp/resources/js/index/services/Purc.js

@@ -795,7 +795,7 @@ define([ 'ngResource'], function() {
 			getAll: {
 				method: 'GET'
 			},
-			getWaiting: {
+			getUnapply: {
                url: 'purc/inquiry/unapply',
                method: 'GET'
 			},
@@ -808,7 +808,7 @@ define([ 'ngResource'], function() {
 				method: 'DELETE'
 			},
 			save: {
-				url: 'purc/inqiury/save',
+				url: 'purc/inquiry/save',
 				method: 'POST'
 			},
 			detail: {
@@ -816,7 +816,24 @@ define([ 'ngResource'], function() {
 				method: 'GET'
 			},
 			submit: {
-				url: 'purc/inqiury/saveAndSubmit',
+				url: 'purc/inquiry/saveAndSubmit',
+				method: 'POST'
+			},
+			accept: {
+				url: 'purc/inquiry/accept/:id',
+				method: 'POST'
+			},
+			refuse: {
+				url: 'purc/inquiry/refuse/:id',
+				method: 'POST'
+			},
+			getAllDetail: {
+				url: 'purc/inquiry/getAllDetail/:id',
+				method: 'GET',
+				isArray: true
+			},
+			submitUnapply: {
+				url: 'purc/inquiry/submit/:id',
 				method: 'POST'
 			}
 		});

+ 21 - 0
src/main/webapp/resources/tpl/index/purc/enMenu.html

@@ -0,0 +1,21 @@
+<div class="group-container condition block">
+	<div class="row">
+		<div class="col-xs-6">
+			<div class="btn-group btn-group-sm btn-group-justified">
+				<div class="btn-group btn-group-sm">
+					<a type="button" class="btn btn-default btn-line" ui-sref="purc.inquiry"
+						ng-class="{'btn-info':status=='enList'}" >已提交</a>
+				</div>
+				<div class="btn-group btn-group-sm">
+					<a type="button" class="btn btn-default btn-line" ui-sref="purc.inquiry_unapply"
+						ng-class="{'btn-info':status=='send'}" >未提交<!-- (<em>5</em>) --></a>
+				</div>
+				<div class="btn-group btn-group-sm">
+					<a type="button" class="btn btn-default btn-line" ui-sref="purc.inquiry_new"
+						ng-class="{'btn-info':status=='news'}" >新增</a>
+				</div>
+			</div>
+		</div>
+	</div>
+	
+</div>

+ 543 - 0
src/main/webapp/resources/tpl/index/purc/inquiry.html

@@ -0,0 +1,543 @@
+<style>
+	.order-table .header>th {
+		height: 38px;
+		text-align: center;
+		background: #f5f5f5;
+		border-top: 1px solid #e8e8e8;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.order-table .sep-row {
+		height: 10px;
+	}
+
+	.order-table .selector {
+		vertical-align: middle;
+		margin: 0 0 2px 0;
+	}
+
+	.toolbar label {
+		margin-right: 10px;
+		margin-bottom: 0;
+	}
+
+	.toolbar .select_all {
+		margin: 0 6px 0 10px;
+		line-height: 20px;
+	}
+
+	.toolbar .btn {
+		-moz-border-radius: 2px;
+		margin-right: 5px;
+		border: 1px solid #dcdcdc;
+		border-radius: 2px;
+		-webkit-border-radius: 2px;
+	}
+
+	.order-table .order-hd {
+		background: #f5f5f5;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.order-table .order-hd td.first {
+		padding-left: 20px;
+	}
+
+	.order-table .order-hd .order-main span {
+		margin-right: 8px;
+	}
+
+	.order-table .order-hd .order-code {
+		font-style: normal;
+		font-family: verdana;
+	}
+
+	.order-table .order-hd .order-sum {
+		padding: 0 5px;
+	}
+
+	.order-table>tbody {
+		border: 1px solid transparent;
+	}
+
+	.order-table>tbody:hover {
+		border-color: #d32526;
+		border-width: 2px;
+	}
+
+	.order-table .operates {
+		display: none;
+	}
+
+	.order-table>tbody:hover .operates {
+		display: block;
+	}
+
+	.order-table .order-bd {
+		border-bottom: 1px solid #e6e6e6;
+	}
+
+	.order-table .order-bd>td {
+		padding: 10px 5px;
+		vertical-align: top;
+		position: relative;
+	}
+
+	.order-table .order-bd .product {
+		padding-left: 20px;
+	}
+
+	.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+		height: 26px;
+		padding: 0 5px;
+		font-size: 12px;
+		line-height: 1.5;
+		border-radius: 3px;
+	}
+
+	.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+		border-top-left-radius: 0;
+		border-bottom-left-radius: 0;
+	}
+
+	@media ( min-width : 768px) {
+		.form-horizontal .form-group-xs .control-label {
+			padding-top: 5px;
+		}
+	}
+
+	.info-container .info:hover {
+		color: #CC3333;
+	}
+	.input-error{
+		background-color: #fff8ee;
+		border-color: #CC0033;
+	}
+	input.input-error:focus {
+		background-color: #fff8ee;
+		border-color: #CC0033;
+	}
+	.block{
+		/*background: #f5f5f5;*/
+	}
+	.order-table{
+		background: #fff;
+	}
+</style>
+<link rel="stylesheet" href="static/css/public.css">
+<div ng-include src="'static/tpl/index/purc/enMenu.html'"></div>
+<div class="block" id="public">
+	<div class="loading in" ng-class="{'in': loading}">
+		<i></i>
+	</div>
+	<div class="menu condition block">
+		<div class="row">
+			<div class="col-xs-4">
+				<div class="btn-group btn-group-sm btn-group-justified">
+					<div class="btn-group btn-group-sm">
+						<button type="button" class="btn btn-default btn-line"
+								ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部</button>
+					</div>
+					<div class="btn-group btn-group-sm">
+						<button type="button" class="btn btn-default btn-line"
+								ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">已报价</button>
+					</div>
+					<div class="btn-group btn-group-sm">
+						<button type="button" class="btn btn-default btn-line"
+								ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待报价</button>
+					</div>
+					<div class="btn-group btn-group-sm">
+						<button type="button" class="btn btn-default btn-line"
+								ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已过期</button>
+					</div>
+				</div>
+			</div>
+			<!--<div class="col-xs-5">
+				<div class="search">
+					<div class="form-group form-group-sm has-feedback">
+						<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入商品、客户名称或单据流水号搜索" /><span
+							class="form-control-feedback text-simple"><i
+							class="fa fa-search"></i></span>
+					</div>
+				</div>
+			</div>
+			<div class="col-xs-1">
+				<div class="text-default f14 total">
+					共 <span ng-bind="tableParams.total()" class="text-num"></span>
+				</div>
+			</div>-->
+		</div>
+	</div>
+	<div class="height10">&nbsp;</div>
+	<div class="condition block">
+		<div class="search-bg condition block">
+			<div class="row">
+				<div id="topSearch" style="float: left">
+					<span class="text-muted"><i class="fa fa-search fa-lg"></i> 搜索"{{tip}}",为您找到结果:</span>
+					单据{{tableParams.total()}}条
+				</div>
+				<div class="col-xs-6">
+					<div class="search">
+						<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick" on-toggle="searchAdvance=open">
+							<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入企业名称、简称或申请人搜索" />
+							<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+						</div>
+					</div>
+				</div>
+				<div class="fr toggle">
+					<a ng-click="condition.$open=!condition.$open" class="text-simple"><span ng-bind="condition.$open ? '简化筛选条件' : '更多筛选条件'"></span><i class="fa fa-fw" ng-class="{'fa-angle-up': condition.$open, 'fa-angle-down': !condition.$open}"></i></a>
+				</div>
+			</div>
+			<div class="more" ng-class="{'open': condition.$open}">
+				<form class="form-inline">
+					<div class="form-group ">
+						<label>日期:</label>
+						<div class="btn-group btn-menu" dropdown is-open="condition.$dateZoneOpen">
+							<button type="button" dropdown-toggle style="width: 85px;" class="btn btn-default btn-xs dropdown-toggle">
+								{{dateZoneText}}<i class="fa fa-fw fa-angle-down icon-right"></i></span>
+							</button>
+							<ul class="dropdown-menu">
+								<li><a ng-click="changeDateZone(1)">一个月内</a></li>
+								<li><a ng-click="changeDateZone(6)">半年内</a></li>
+								<li><a ng-click="changeDateZone()">半年前</a></li>
+							</ul>
+						</div>
+						<div class="form-group input-group input-group-xs input-trigger">
+							<input type="text" ng-model="condition.dateFrom"
+								   class="form-control" placeholder="从"
+								   datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
+								   ng-required="true"
+								   current-text="今天" clear-text="清除" close-text="关闭"
+								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+								   ng-focus="openDatePicker($event, condition, '$fromOpened')">
+							<span class="input-group-btn">
+								<button type="button" class="btn btn-default"
+										ng-click="openDatePicker($event, condition, '$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="condition.dateTo"
+								   class="form-control" placeholder="到"
+								   datepicker-popup="yyyy-MM-dd" is-open="condition.$toOpened"
+								   ng-required="true"
+								   current-text="今天" clear-text="清除" close-text="关闭"
+								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+								   ng-focus="openDatePicker($event, condition, '$toOpened')">
+							<span class="input-group-btn">
+								<button type="button" class="btn btn-default"
+										ng-click="openDatePicker($event, condition, '$toOpened')">
+									<i class="fa fa-calendar"></i>
+								</button>
+							</span>
+						</div>
+					</div>
+					<div class="form-group">
+						<label>采纳结果:</label>
+						<div class="btn-group btn-menu" dropdown is-open="condition.$agreedOpen">
+							<button type="button" dropdown-toggle style="width: 70px;" class="btn btn-default btn-xs dropdown-toggle">
+								{{agreedText}}<i class="fa fa-fw fa-angle-down icon-right"></i></span>
+							</button>
+							<ul class="dropdown-menu">
+								<li><a ng-click="changeAgreed()">全部</a></li>
+								<li><a ng-click="changeAgreed(1)">已采纳</a></li>
+								<li><a ng-click="changeAgreed(0)">未采纳</a></li>
+							</ul>
+						</div>
+					</div>
+				</form>
+			</div>
+		</div>
+	</div>
+	<table class="order-table block" ng-table="tableParams">
+		<thead>
+		<tr class="header">
+			<th>商品</th>
+			<th width="90"><span class="text-default">≥</span>分段数</th>
+			<th width="90">价格</th>
+			<th width="80">最小订购</th>
+			<th width="80">最小包装</th>
+			<th width="120">有效期</th>
+			<th width="75">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="7"></td>
+		</tr>
+		<tr class="toolbar toolbar-top">
+			<td colspan="6">
+			</td>
+			<td class="text-center">
+				<a href="sale/inquiry/xls?_state={{active}}&keyword={{keywordXls}}" target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-excel-o fa-fw"></i>导出</a>
+			</td>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="7"></td>
+		</tr>
+		</thead>
+		<tbody ng-if="tableParams.total() == 0">
+		<tr>
+			<td colspan="7">
+				<div class="row text-muted info-container" style="padding: 50px 10px;">
+					<div class="col-md-4 text-center">
+						<br>
+						<br>
+						<div><img src="static/img/all/info.png" width="130px" height="90px"></div>
+						<div class="f16">当前没有对应的客户询价单!</div>
+					</div>
+					<div class="col-md-8 br-l">
+						<div class="f16">
+							<p>为什么我没有接收到客户的询价单?</p>
+						</div>
+						<div class="f14">
+							<div class="info">
+								<p>1、您的客户还没有提交审核询价单<br>
+									解决:与您的客户沟通确认单据是否已经审核(只有客户ERP中已经审核的单据才能接收到)</p>
+							</div>
+							<div class="info">
+								<p>2、客户ERP中供应商信息有误<br>
+									解决:与您的客户沟通确认您的信息在客户的供应商资料中是否维护正确,尤其是企业UU号</p>
+							</div>
+							<div class="info">
+								<p>3、您的客户正在使用旧版本的UAS商务平台<br>
+									解决:我们仍有部分用户在使用旧版本UAS商务平台系统,你可以用您的企业UU号和管理员个人UU号 <a href="http://www.usoftchina.com" class="text-bold text-link" title="http://www.usoftchina.com" target="_blank">登陆旧版本UAS商务平台</a></p>
+							</div>
+						</div>
+						<br>
+						<br>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+		<tbody ng-repeat="inquiryItem in $data track by inquiryItem.id">
+		<tr class="order-hd">
+			<td class="first">
+				<div class="order-main">
+						<span> <input type="checkbox" class="selector"
+									  ng-model="inquiryItem.$selected">
+						</span> <span class="text-num text-bold"
+									  title="{{inquiryItem.inquiry.date}}"
+									  ng-bind="::inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span> <span>流水号:<a
+						class="text-num" ng-bind="::inquiryItem.inquiry.code" ui-sref="purc.inquiry_detail({id:inquiryItem.inquiry.id})" target="_self"></a></span>
+				</div>
+			</td>
+			<td colspan="2"><span
+					ng-bind="::inquiryItem.enterprise.enName"></span></td>
+			<td>
+				币别:<span ng-bind="::inquiryItem.currency"></span>
+			</td>
+			<td>
+				税率:<span ng-bind="::inquiryItem.taxrate || 0"></span>%
+			</td>
+			<td class="text-right" colspan="1" class="order-sum">
+				<div ng-if="inquiryItem.replyable">
+					<span class="text-inverse text-bold" ng-bind="::inquiryItem.inquiry.endDate | timespan"></span>
+					<span class="text-muted">后截止报价</span>
+				</div>
+			</td>
+			<td class="text-center">
+				<div class="operates">
+					<!-- <a ng-click="print(inquiryItem)" class="text-muted" title="打印"><i
+                        class="fa fa-print fa-lg"></i></a> -->
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd">
+			<td class="product">
+				<div class="text-num text-bold" ng-bind="::inquiryItem.product.code"></div>
+				<div ng-bind="::inquiryItem.product.title"></div>
+				<div class="text-muted" ng-bind="::inquiryItem.product.spec"></div>
+				<div ng-if="inquiryItem.inquiry.attachs.length" class="text-muted">
+					附件:<a class="file" ng-repeat="attach in inquiryItem.inquiry.attachs" href="file/{{attach.id}}">{{::attach.name}}</a>
+				</div>
+				<div ng-if="::inquiryItem.brand && !inquiryItem.$editing" class="text-muted">
+					品牌:<spans ng-bind="::inquiryItem.brand"></span>
+				</div>
+				<div ng-if="::inquiryItem.vendorprodcode && !inquiryItem.$editing" class="text-muted">
+					物料编号:<spans ng-bind="::inquiryItem.vendorprodcode"></span>
+				</div>
+				<div class="form-group" ng-if="inquiryItem.$editing" style="width: 180px;">
+					<input type="text" class="form-control input-xs"
+						   ng-model="inquiryItem.brand" placeholder="物料品牌">
+				</div>
+				<div class="form-group" ng-if="inquiryItem.$editing" style="width: 180px;">
+					<input type="text" class="form-control input-xs"
+						   ng-model="inquiryItem.vendorprodcode" placeholder="供应商物料编号">
+				</div>
+				<div class="form-group" ng-if="inquiryItem.$editing" style="width: 220px;">
+					<input type="number" class="form-control input-xs" ng-change="verify(inquiryItem.leadtime,'leadtime')"
+						   ng-model="inquiryItem.leadtime" placeholder="交货周期(确切天数)" style="display: inline-block;width: 180px;">
+					<span ng-if="!inquiryItem.leadtime" class="text-inverse"> 必填*</span>
+					<div style="margin-left: 50px;"class="text-bold text-inverse" ng-show="!leadtimeVerify">请填数字!</div>
+				</div>
+			</td>
+			<td class="text-center">
+				<div ng-show="!inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<span ng-bind="reply.lapQty"></span>
+					</div>
+				</div>
+				<div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<div class="form-group input-group input-group-xs">
+							<input type="text" class="form-control input-xs" ng-change="verifylapQty(reply.lapQty,$index)"
+								   ng-model="reply.lapQty" min="{{reply.lapQty == 0 ? 0 : 1}}"
+								   ng-Readonly="$index == 0"
+								   placeholder="数量" /> <span class="input-group-btn" ng-show="$index != 0">
+									<button class="btn btn-default" type="button"
+											ng-click="removeStep(inquiryItem, $index)">
+										<i class="fa fa-trash-o"></i>
+									</button>
+								</span>
+						</div>
+						<div class="text-bold text-inverse" style="margin-top:-15px" ng-show="!replylapQtys[$index]">请填数字!</div>
+					</div>
+					<a ng-click="addStep(inquiryItem)" class="btn btn-default btn-xs"
+					   ng-show="!inquiryItem.custLap">添加分段</a>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div>
+					<div ng-repeat="reply in inquiryItem.replies">
+						<span ng-bind="reply.price | number:6"></span> <span
+							ng-show="reply.price == null" class="text-muted">-</span>
+					</div>
+					<div class="dropdown">
+						<a href="javascript:void(0);" class="dropdown-toggle text-default"
+						   ng-mouseover="getHistory(inquiryItem)">报价信息<i
+								class="fa fa-fw fa-angle-down"></i></a>
+						<div class="dropdown-menu pane" style="width: 270px;">
+							<div class="pane-body">
+								<ul class="list-unstyled list-menu">
+									<li ng-repeat="reply in inquiryItem.replies">
+										<div ng-class="{'text-inverse': $index==0}">
+											<div class="row row-sm"
+												 ng-repeat="reply in inquiryItem.replies">
+												<div class="col-xs-5">≥{{reply.lapQty}}</div>
+												<div class="col-xs-5">价格{{reply.price | number:6}}</div>
+											</div>
+										</div>
+										<div class="text-muted">{{reply.inquiry.date |
+											date:'yyyy-MM-dd'}}{{reply.inquiry.enterprise.enName}}
+										</div>
+									</li>
+								</ul>
+								<div ng-show="!inquiryItem.replies || inquiryItem.replies.length == 0"
+										class="text-center text-muted">暂无报价信息</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<div class="form-group">
+							<input type="text" class="form-control input-xs " ng-class="{'input-error': !replyPrices[$index]}" ng-model="reply.price"
+								   ng-change="verify(reply.price,$index)" placeholder="单价(必填)"  />
+							<div class="text-bold text-inverse" style="margin-bottom:-15px" ng-show="!replyPrices[$index]">请填数字!</div>
+						</div>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<span ng-bind="inquiryItem.minOrderQty"></span> <span
+						ng-show="inquiryItem.minOrderQty == null" class="text-muted">-</span>
+				</div>
+				<div ng-if="inquiryItem.$editing">
+					<input type="text" class="form-control input-xs" ng-change="verify(inquiryItem.minOrderQty,'minOrderQty')"
+						   ng-class="{'input-error': !minOrderQtyVerify}" ng-model="inquiryItem.minOrderQty" placeholder="最小订购" >
+					<div class="text-bold text-inverse" ng-show="!minOrderQtyVerify">请填数字!</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<span ng-bind="inquiryItem.minPackQty"></span> <span
+						ng-show="inquiryItem.minPackQty == null" class="text-muted">-</span>
+				</div>
+				<div ng-if="inquiryItem.$editing">
+					<input type="text" class="form-control input-xs"
+						   ng-model="inquiryItem.minPackQty" placeholder="最小包装"
+						   ng-change="verify(inquiryItem.minPackQty,'minPackQty')" ng-class="{'input-error': !minPackQtyVerify}" >
+					<div class="text-bold text-inverse" ng-show="!minPackQtyVerify">请填数字!</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<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>
+						<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" class="block">
+					<div ng-if="inquiryItem.replies.length > 0" class="text-muted" style="padding-top: 50px;">
+						<a ng-click="accept(inquiryItem.id)">采纳</a>
+						<a ng-click="refuse(inquiryItem.id)">拒绝</a></div>
+				</div>
+				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 1" class="block">
+					<span class="text-trans success">报价已采纳</span>
+				</div>
+				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 0" class="block">
+					<span class="text-trans error">报价未采纳</span>
+				</div>
+				<div ng-if="inquiryItem.status == 200">
+					<div ng-if="inquiryItem.replyable">
+						<div ng-show="!inquiryItem.$editing">
+							
+						</div>
+					</div>
+					<div ng-if="!inquiryItem.replyable" class="block">
+						<span class="text-trans error">已过期</span>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+</div>

+ 316 - 0
src/main/webapp/resources/tpl/index/purc/inquiry_detail.html

@@ -0,0 +1,316 @@
+<div class="pane base-info">
+	<div class="pane-header">
+		客户询价单
+		<!-- <a href="#" class="pull-right text-simple"><i
+			class="fa fa-print fa-fw"></i>打印</a> -->
+	</div>
+	<div class="pane-body">
+		<div class="headerline">
+			<span class="index">1</span> <span class="content">单据信息</span>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">流水号</span>
+				<div class="content" ng-bind="::inquiry.code"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">日期</span>
+				<div class="content" ng-bind="::inquiry.date | date:'yyyy-MM-dd'"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">客户</span>
+				<div class="content" ng-bind="::inquiry.enterprise.enName"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">录单人</span>
+				<div class="content" ng-bind="::inquiry.recorder"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">审核人</span>
+				<div class="content" ng-bind="::inquiry.auditor"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">备注</span>
+				<div class="content" ng-bind="::inquiry.remark"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">截止报价</span>
+				<div class="content" ng-bind="::inquiry.endDate | date:'yyyy-MM-dd'"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">环保要求</span>
+				<div class="content" ng-bind="::inquiry.environment"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">价格种类</span>
+				<div class="content" ng-bind="::inquiry.priceType"></div>
+			</div>
+		</div>
+		<div class="headerline" ng-if="inquiry.attachs.length">
+			<span class="content">附件</span>
+		</div>
+		<div class="row row-sm attach" ng-if="inquiry.attachs.length">
+			<div class="col-xs-3 item" ng-repeat="file in inquiry.attachs">
+				<div class="bg">
+					<div class="global_icon larger icon_undefined_l"
+						ng-class="{'icon_pdf_l': file.type == 'pdf','icon_xls_l': file.type == 'xls' || file.type == 'xlsx' || file.type == 'et', 'icon_doc_l': file.type == 'doc' || file.type == 'docx', 'icon_txt_l': file.type == 'txt', 'icon_zip_l': file.type == 'zip' || file.type == 'rar', 'icon_image_l': file.type == 'png' || file.type == 'jpg' || file.type == 'jpeg' || file.type == 'bmp'|| file.type == 'gif'}"></div>
+				</div>
+				<div class="title" ng-bind="::file.name"></div>
+				<div class="download">
+					<a href="file/{{file.id}}">下载</a>
+				</div>
+			</div>
+		</div>
+		<div class="headerline">
+			<div class="index">2</div>
+			<div class="content">商品价格详情</div>
+		</div>
+		<div class="block">
+			<table class="block table table-default table-striped">
+				<thead>
+					<tr class="header">
+						<th>商品</th>
+						<th width="90"><span class="text-default">≥</span>分段数</th>
+						<th width="90">价格</th>
+						<th width="40">币别</th>
+						<th width="45">税率</th>
+						<th width="80">最小订购</th>
+						<th width="80">最小包装</th>
+						<th width="120">有效期</th>
+						<th width="75">操作</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr
+						ng-repeat="inquiryItem in newinquiryItems track by inquiryItem.id">
+						<td>
+							<div class="text-num text-bold"
+								ng-bind="::inquiryItem.product.code"></div>
+							<div ng-bind="::inquiryItem.product.title"></div>
+							<div class="text-muted" ng-bind="::inquiryItem.product.spec"></div>
+							<div class="form-group" ng-if="inquiryItem.$editing"
+								style="width: 180px;">
+								<input type="text" class="form-control input-xs"
+									ng-model="inquiryItem.brand" placeholder="物料品牌">
+							</div>
+							<div class="form-group" ng-if="inquiryItem.$editing"
+								style="width: 180px;">
+								<input type="text" class="form-control input-xs"
+									ng-model="inquiryItem.vendorprodcode" placeholder="供应商物料编号">
+							</div>
+							<div class="form-group" ng-if="inquiryItem.$editing"
+								style="width: 220px;">
+								<input type="number" class="form-control input-xs"
+									ng-model="inquiryItem.leadtime" placeholder="交货周期(确切天数)"
+									style="display: inline-block; width: 180px;"> <span
+									ng-if="!inquiryItem.leadtime" class="text-inverse"> 必填*</span>
+							</div>
+						</td>
+						<td class="text-center">
+							<div ng-show="!inquiryItem.$editing">
+								<div ng-repeat="reply in inquiryItem.replies">
+									<span ng-bind="reply.lapQty"></span>
+								</div>
+							</div>
+							<div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+								<div ng-repeat="reply in inquiryItem.replies">
+									<div class="form-group input-group input-group-xs">
+										<input type="text" class="form-control input-xs"
+											ng-model="reply.lapQty" min="{{reply.lapQty == 0 ? 0 : 1}}"
+											ng-readonly="inquiryItem.custLap == 1 || reply.lapQty == 0 ? true : false"
+											placeholder="数量" /> <span class="input-group-btn"
+											ng-show="!inquiryItem.custLap && (reply.lapQty == null || reply.lapQty > 0)">
+											<button class="btn btn-default" type="button"
+												ng-click="removeStep(inquiryItem, $index)">
+												<i class="fa fa-trash-o"></i>
+											</button>
+										</span>
+									</div>
+								</div>
+								<a ng-click="addStep(inquiryItem)"
+									class="btn btn-default btn-xs" ng-show="!inquiryItem.custLap">添加分段</a>
+							</div>
+						</td>
+						<td class="text-center">
+							<div ng-show="!inquiryItem.$editing">
+								<div ng-repeat="reply in inquiryItem.replies">
+									<span ng-bind="reply.price | number:6"></span> <span
+										ng-show="reply.price == null" class="text-muted">-</span>
+								</div>
+								<div class="dropdown">
+									<a href="javascript:void(0);"
+										class="dropdown-toggle text-default"
+										ng-mouseover="getHistory(inquiryItem)">历史报价<i
+										class="fa fa-fw fa-angle-down"></i></a>
+									<div class="dropdown-menu pane" style="width: 270px;">
+										<div class="pane-body">
+											<ul class="list-unstyled list-menu">
+												<li ng-repeat="historyItem in ::inquiryItem.history">
+													<div ng-class="{'text-inverse': $index==0}">
+														<div class="row row-sm"
+															ng-repeat="historyReply in historyItem.replies">
+															<div class="col-xs-5">≥{{historyReply.lapQty}}</div>
+															<div class="col-xs-5">价格{{historyReply.price |
+																number:6}}</div>
+														</div>
+													</div>
+													<div class="text-muted">{{historyItem.inquiry.date |
+														date:'yyyy-MM-dd'}}{{historyItem.inquiry.enterprise.enName}}
+													</div>
+												</li>
+											</ul>
+											<div
+												ng-show="!inquiryItem.history || inquiryItem.history.length == 0"
+												class="text-center text-muted">暂无历史报价</div>
+										</div>
+									</div>
+								</div>
+							</div>
+							<div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+								<div ng-repeat="reply in inquiryItem.replies">
+									<div class="form-group">
+										<input type="text" class="form-control input-xs"
+											ng-model="reply.price" placeholder="价格" />
+									</div>
+								</div>
+							</div>
+						</td>
+						<td class="text-center" ng-bind="::inquiryItem.currency"></td>
+						<td class="text-center"><span
+							ng-bind="::inquiryItem.taxrate || 0"></span>%</td>
+						<td class="text-center">
+							<div ng-show="!inquiryItem.$editing">
+								<span ng-bind="inquiryItem.minOrderQty"></span> <span
+									ng-show="inquiryItem.minOrderQty == null" class="text-muted">-</span>
+							</div>
+							<div ng-if="inquiryItem.$editing">
+								<input type="text" class="form-control input-xs"
+									ng-model="inquiryItem.minOrderQty" placeholder="最小订购">
+							</div>
+						</td>
+						<td class="text-center">
+							<div ng-show="!inquiryItem.$editing">
+								<span ng-bind="inquiryItem.minPackQty"></span> <span
+									ng-show="inquiryItem.minPackQty == null" class="text-muted">-</span>
+							</div>
+							<div ng-if="inquiryItem.$editing">
+								<input type="text" class="form-control input-xs"
+									ng-model="inquiryItem.minPackQty" placeholder="最小包装">
+							</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>
+						</td>
+						<td class="text-center">
+							<div
+								ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null"
+								class="block">
+								<span class="text-trans warning">已报价</span>
+								<div ng-if="inquiryItem.replyable" style="padding-top: 50px;">
+									<div ng-show="!inquiryItem.$editing">
+										<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">修改报价</a>
+									</div>
+									<div ng-show="inquiryItem.$editing">
+										<div>
+											<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">取消</a>
+										</div>
+										<div>
+											<button ng-click="onReplyClick(inquiryItem, true)"
+												ng-disabled="!isValid(inquiryItem, true)"
+												class="btn btn-link btn-xs text-inverse">
+												保存并<br>确认报价
+											</button>
+										</div>
+									</div>
+								</div>
+								<div ng-if="inquiryItem.inquiry.check == 1" class="text-muted"
+									style="padding-top: 50px;">
+									客户正在<br>审批...
+								</div>
+							</div>
+							<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 1"
+								class="block">
+								<span class="text-trans success">报价已采纳</span>
+							</div>
+							<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 0"
+								class="block">
+								<span class="text-trans error">报价未采纳</span>
+							</div>
+							<div ng-if="inquiryItem.status == 200 && inquiryItem.inquiry.overdue != 1">
+								<div ng-show="!inquiryItem.$editing">
+									<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">报
+										价</a>
+								</div>
+								<div ng-show="inquiryItem.$editing">
+									<div>
+										<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">取消</a>
+									</div>
+									<div>
+										<button ng-click="onReplyClick(inquiryItem)"
+											ng-disabled="!isValid(inquiryItem)"
+											class="btn btn-link btn-xs text-default">保存</button>
+									</div>
+									<div>
+										<button ng-click="onReplyClick(inquiryItem, true)"
+											ng-disabled="!isValid(inquiryItem, true)"
+											class="btn btn-link btn-xs text-inverse">
+											保存并<br>确认报价
+										</button>
+									</div>
+								</div>
+							</div>
+						</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+	</div>
+</div>

+ 896 - 0
src/main/webapp/resources/tpl/index/purc/inquiry_new.html

@@ -0,0 +1,896 @@
+<!--  询价单  -->
+<link rel="stylesheet" href="static/css/add.css " />
+<style>
+
+/* 标题 */
+.tender-label {
+	/*height: 30px;*/
+	/*margin-left: 10px;*/
+	/*margin-right: 10px;*/
+	/*background-color: #e8e8e8;*/
+	/*box-shadow: 0 0 5px #6f6f6f;*/
+	/*border-top-right-radius: 20px;*/
+	width: 100%;
+	height: 40px;
+	line-height: 42px;
+	background: url(static/img/comm_bg01.png) no-repeat center;
+	background-size: 100%;
+}
+/* 主体 */
+.purc-tender {
+	line-height: 2;
+	font-size: 14px;
+}
+
+.purc-tender .row {
+	margin-left: 0px;
+	margin-right: 0px;
+	padding-left: 15px;
+	padding-right: 15px;
+}
+
+.tender-content {
+	background-color: #fff;
+}
+
+.tender-content>div>div {
+	margin-top: 3px;
+	margin-bottom: 3px;
+}
+/* 二级标题栏 */
+.title-div {
+	font-size: 14px;
+	font-weight: 600;
+	padding-left: 30px;
+	height: 50px;
+	padding-top: 11px;
+}
+
+/* 输入框前描述 */
+.tender-desc {
+	width: 100px;
+	float: left;
+	padding-top: 4px;
+}
+/* 输入框 */
+.tender-input {
+	/*border: #bfbfbf 1px solid !important;
+        padding-left: 10px;
+        height: 34px;
+        line-height: 34px;
+        width: 160px;*/
+	
+}
+
+.tender-input01 {
+	border: #bfbfbf 1px solid !important;
+	padding-left: 10px;
+	height: 34px;
+	line-height: 34px;
+	width: 160px;
+}
+
+.tender-input:focus {
+	border: #3578ba 1px solid !important;
+}
+
+/* 收货地址 */
+.address-group {
+	border-bottom: 1px solid #323232;
+	border-bottom-left-radius: 0;
+	margin-right: 20px;
+}
+
+.address-group>input:focus {
+	outline: none;
+}
+
+/* 基本信息 */
+.base-info {
+	border-bottom: 1px solid #e8e8e8;
+	padding-bottom: 30px;
+	padding-top: 20px;
+	margin-bottom: 0; /* 去除index中公共样式影响 */
+}
+
+/* 地址附加图标 */
+.address-addon {
+	border: none;
+	background: none;
+}
+
+/* 下拉选项 */
+.select-menu {
+	margin: 4px 0;
+	width: 100px;
+	padding: 0 5%;
+	height: 30px;
+}
+
+select.select-menu {
+	/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
+	border: solid 1px #bfbfbf;
+	height: 34px;
+	line-height: 34px;
+	width: 160px;
+	/*很关键:将默认的select选择框样式清除*/
+	/* appearance:none;
+        -moz-appearance:none;
+        -webkit-appearance:none;*/
+	/*在选择框的最右侧中间显示小箭头图片*/
+	/*background: url("resources/img/tender/select.png") no-repeat scroll right center transparent;*/
+	/*为下拉小箭头留出一点位置,避免被文字覆盖*/
+	padding-right: 14px;
+}
+
+/*清除ie的默认选择框样式清除,隐藏下拉箭头*/
+select.select-menu::-ms-expand {
+	display: none;
+}
+
+/* 日期选择器 */
+.purc-tender .date-picker {
+	padding-top: 10px;
+}
+
+.purc-tender .date-picker input {
+	border-radius: 0;
+	border: 1px solid #5078cb;
+	border-right: none;
+	font-size: 12px;
+}
+
+.purc-tender .date-picker span .btn-open {
+	color: #fff;
+	background-color: #5078cb;
+	border-radius: 0;
+	border: 1px solid #5078cb;
+	border-left: none;
+}
+
+/* 修改本页内btn的样式 及datepicker中的btn-success的样式 */
+.tender-content .date-picker .btn {
+	border-radius: 0;
+}
+
+.tender-content .date-picker .btn-success {
+	background-color: #327EBE;
+}
+
+.tender-content .date-picker ul {
+	border-radius: 0;
+}
+
+.tender-content .date-picker ul div:focus {
+	outline: none;
+	border-radius: 0;
+	border: none;
+}
+
+/* 附件上传 */
+.purc-tender .base-info .attach-upload {
+	display: inline;
+}
+
+.purc-tender .base-info .attach-upload input {
+	height: 100px;
+	width: 100px;
+	margin: 6px 0 0 100px;
+	opacity: 0;
+	z-index: 1;
+	position: relative;
+}
+
+.purc-tender .base-info .attach-upload input:hover {
+	cursor: pointer;
+}
+
+.fileInputContainer {
+	height: 100px;
+	background-image: url('resources/img/tender/upload.png');
+	position: relative;
+	width: 100px;
+	margin-left: 100px;
+	margin-top: 20px;
+}
+
+.fileInput {
+	height: 100px;
+	width: 100px;
+	font-size: 100px;
+	position: absolute;
+	margin-left: 100px;
+	margin-top: 20px;
+	right: 0;
+	top: 0;
+	opacity: 0;
+	filter: alpha(opacity = 0);
+	cursor: pointer;
+}
+/* 图片点击上传 */
+/*.upload-bg {*/
+/*width: 100px;*/
+/*height: 100px;*/
+/*background-image: url('resources/img/tender/upload.png');*/
+/*margin-top: 10px;*/
+/*margin-left: 100px;*/
+/*border: 1px solid #e8e8e8;*/
+/*z-index: 2;*/
+/*}*/
+/* 供应商信息 添加供应商 */
+.vend-info  a.add-vendor {
+	color: #5078cb;
+}
+
+.vend-info  a.add-vendor:hover {
+	cursor: pointer;
+	color: #55b6ff;
+}
+
+.vend-info  a.remove-vendor {
+	color: #FF2E2F;
+}
+
+.vend-info  a.remove-vendor:hover {
+	cursor: pointer;
+	color: #D32526;
+}
+
+/* 单选框 复选框 */
+input[type="radio"], input[type="checkbox"] {
+	vertical-align: text-bottom;
+	margin-bottom: 2px;
+	margin-bottom: -2px\9;
+}
+
+.vend-info .input-select {
+	float: left;
+	padding-top: 4px;
+	margin-left: -20px;
+}
+
+.vend-info .input-select input {
+	margin-right: 8px;
+}
+
+/* 右下角按钮 */
+.tender-content>div {
+	background-color: #fff;
+}
+
+.tender-content>div>div>button {
+	width: 94px;
+	height: 36px;
+	font-size: 14px;
+	color: #fff;
+	border-radius: 0;
+}
+
+.tender-content>div>div.btn-publish>button {
+	background-color: #327EBE;
+}
+
+.tender-content>div>div.btn-save>button {
+	background-color: #32bebc;
+}
+
+.read-only {
+	border: none;
+	color: #969595;
+}
+
+.read-only:focus {
+	border: none;
+}
+
+.attach-file {
+	margin-left: 100px;
+	width: 400px;
+}
+
+.com_head {
+	width: 100%;
+	height: 40px;
+	line-height: 42px;
+	background: url(static/img/comm_bg01.png) no-repeat center;
+	background-size: 100%;
+}
+
+.com_head span {
+	margin-left: 30px;
+	color: #000;
+	font-size: 14px;
+}
+
+.com_head a {
+	color: #327ebe;
+	float: right;
+	margin-right: 40px;
+	font-size: 14px;
+}
+
+.com_head a i {
+	margin-left: 5px;
+	line-height: 40px;
+}
+
+.com_head a:hover {
+	color: #d2272d;
+}
+
+.com_title {
+	width: 100%;
+	margin: 0px auto;
+	height: 40px;
+	line-height: 40px;
+	font-size: 14px;
+	color: #323232;
+	background: #f5f5f5;
+}
+
+.com_title font {
+	color: #327ebe;
+}
+
+.com_title01 {
+	height: 50px;
+	line-height: 50px;
+	width: 100%;
+	border-bottom: #3578ba 1px dotted;
+	border-top: #e8e8e8 1px solid;
+	margin-top: -4px;
+} /*  这里修改过 margin-top*/
+.com_title01 span {
+	margin-left: 20px;
+	font-size: 14px;
+	line-height: 50px;
+	color: #555;
+	font-weight: bold;
+}
+
+.com_title01  a {
+	color: #5078cb;
+}
+
+.com_title01  a:hover {
+	cursor: pointer;
+	color: #55b6ff;
+}
+
+/*招标单*/
+.tender-list02 dl {
+	width: 100%;
+	margin: 0 auto;
+	position: relative;
+}
+
+.tender-list02 dl dt {
+	width: 100%;
+	margin: 0 auto;
+	height: 40px;
+}
+
+.tender-list02 dl dt span {
+	height: 50px;
+	line-height: 50px;
+	display: inline-block;
+	color: #323232;
+}
+
+.tender-list02 dl dd {
+	width: 100%;
+	margin: 0 auto;
+	height: 50px;
+	border-bottom: #ccc 1px dotted;
+	overflow: hidden;
+}
+
+.tender-list02 dl dd:hover {
+	border: #d32526 1px solid;
+}
+
+.tender-list02 dl dd:hover span a {
+	display: inline-block;
+}
+
+.tender-list02 dl dd span {
+	height: 50px;
+	line-height: 50px;
+	display: inline-block;
+}
+
+.tender-list02 dl span {
+	width: 11%;
+	font-size: 14px;
+	float: left;
+	text-align: center;
+}
+
+.tender-list02 dl span.wid01 {
+	width: 15%;
+}
+
+.tender-list02 dl span.wid02 {
+	width: 15%;
+}
+
+.tender-list02 dl span.wid03 {
+	width: 5%;
+}
+
+.tender-list02 .editable {
+	text-align: center;
+	width: 100%;
+}
+
+.tender-list02  .scroll-y dd input {
+	width: 100%;
+	height: 34px;
+	border: none;
+	font-size: 14px;
+	padding-left: 4px;
+	text-align: center;
+	vertical-align: middle;
+	line-height: 34px;
+}
+
+.tender-list02 dl span.wid03 a {
+	display: none;
+}
+
+.tender-list02 dl span.wid03 a.active {
+	display: inline-block;
+}
+
+.tender-list02 dl span.wid03 a i {
+	width: 20px;
+	height: 20px;
+	display: inline-block;
+	line-height: 20px;
+	background: #d2272d;
+	text-align: center;
+	border-radius: 100%;
+	color: #fff;
+}
+
+.tender-list02 .com_title01 a {
+	float: right;
+	margin-right: 45px;
+	font-size: 14px;
+	line-height: 50px;
+}
+
+.scroll-y {
+	width: 100%;
+	margin: 0 auto;
+	max-height: 500px;
+	overflow-y: auto;
+}
+
+.scroll-y.active {
+	overflow-y: scroll;
+	overflow-x: hidden;
+}
+
+/**日期选择器  start**/
+.tender-list02 .dropdown-menu{
+	min-width: auto;
+}
+
+.tender-list02 .save button {
+	border: 1px;
+	width: 94px;
+	height: 36px;
+	display: inline-block;
+	background: #3578ba;
+	text-align: center;
+	color: #fff;
+	font-size: 14px;
+	float: right;
+	line-height: 36px;
+	margin-right: 40px;
+	float:left;
+}
+
+.btn-group.pull-left{
+	width:120px;
+}
+
+.tender-list02 .dropdown-menu tr,.tender-list02 .dropdown-menu th,.tender-list02 .dropdown-menu td{
+	line-height:30px;
+}
+.tender-list02 .dropdown-menu button span{
+	line-height:15px;
+	width:15px;
+	height:15px;
+	font-size:12px;
+}
+/*end*/
+/* 弹框 */
+.bomb-box {
+	width: 100%;
+	height: 100%;
+	position: fixed;
+	z-index: 11111;
+	background: rgba(0, 0, 0, 0.2);
+	top: 0;
+	left: 0;
+}
+
+.bomb-box .box {
+	position: absolute;
+	left: 0;
+	right: 0;
+	top: 0;
+	bottom: 0;
+	margin: auto;
+	box-shadow: 0 0 3px #888;
+}
+
+.bomb-box .box01 {
+	width: 580px;
+	height: 406px;
+	border-radius: 5px;
+	background: #fff;
+}
+
+.bomb-box .box i.off {
+	width: 20px;
+	height: 20px;
+	display: inline-block;
+	position: absolute;
+	right: 8px;
+	top: 8px;
+	text-align: center;
+	cursor: pointer;
+}
+
+.bomb-box .box p {
+	height: 40px;
+	line-height: 40px;
+	font-size: 14px;
+	width: 100%;
+	margin: 0 auto;
+	border-bottom: #e8e8e8 1px solid;
+	padding-left: 20px;
+}
+
+.per-data {
+	width: 90%;
+	margin: 0 auto;
+}
+
+.per-data ul, .per-data ul li {
+	width: 100%;
+	margin: 0 auto;
+}
+
+.per-data ul li {
+	height: 34px;
+	line-height: 34px;
+	margin-top: 15px;
+}
+
+.per-data ul li em {
+	width: 60px;
+	font-size: 14px;
+	float: left;
+}
+
+.per-data ul li input, .per-data ul li select {
+	width: 236px;
+	height: 34px;
+	border: #e8e8e8 1px solid;
+	font-size: 14px;
+	padding-left: 10px;
+}
+
+.per-data ul li select {
+	background: url("../images/select.png") no-repeat right;
+	-webkit-appearance: none;
+	appearance: none;
+	-o-appearance: none;
+	-moz-appearance: none;
+	-ms-appearance: none;
+}
+
+.per-data ul li select option {
+	line-height: 30px;
+}
+
+.per-data ul li span {
+	color: #959595;
+	line-height: 18px;
+	float: right;
+	width: 215px;
+	display: inline-block;
+}
+
+.per-data ul li.per-btn {
+	margin-top: 30px;
+}
+
+.per-data ul li a {
+	width: 94px;
+	height: 36px;
+	display: inline-block;
+	font-size: 14px;
+	color: #fff;
+	text-align: center;
+	line-height: 34px;
+	float: left;
+}
+
+.per-data ul li a.save {
+	margin-left: 60px;
+	background: #327ebe;
+}
+
+.per-data ul li a.mod-psd {
+	background: #8dc7f9;
+	margin-left: 30px;
+}
+
+.per-data ul li a:hover {
+	background: #3578ba;
+}
+
+.add-address {
+	color: #327ebe;
+	font-size: 14px;
+	padding-left: 30px;
+}
+
+.add-address:hover {
+	color: #8dc7f9;
+}
+
+.tender-content  ul.association {
+	position: absolute;
+	left: 0;
+	top: 100%;
+	right: 61px;
+	list-style: none;
+	-webkit-padding-start: 0;
+	background: #ffffff;
+	border: 1px solid #dddddd;
+	z-index: 21;
+}
+
+.tender-content  ul.association li {
+	padding: 0 15px;
+	line-height: 30px;
+	text-align: left;
+}
+
+.tender-content  ul.association li.active, .tender-content  ul.association li.active:hover
+	{
+	background: #dddddd;
+}
+
+.tender-content  ul.association li:hover {
+	background: #EEEEEE;
+	cursor: pointer;
+}
+</style>
+<div ng-include src="'static/tpl/index/purc/enMenu.html'"></div>
+<div class="ng-scope">
+    <form name="tenderForm">
+        <div class="purc-tender">
+            <div class="com_title">服务>询价单<font>>新增询价单</font></div>
+            <!--<div class="loading in" ng-class="{'in': loading}">
+            <i></i>
+            </div>-->
+            <div class="tender-label list-unstyled">
+                <div class="com_head"><span>询价单</span></div>
+            </div>
+            <div class="tender-content ng-scope">
+                <div class="title-div" style="border-bottom: 1px dashed #327ebe;">
+                    <span class="f14">基本信息</span>&nbsp;
+                    <span style="color: rgb(211,37,38);">*</span>
+                </div>
+                <div class="row base-info">
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">询价单号:</div>
+                        <input class="tender-input01" type="text" name="title" ng-model="inquiry.code" required readonly/>
+                    </div>
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">询价日期:</div>
+                        <input class="tender-input01" type="text" name="user" ng-model="inquiry.showdate" required readonly/>
+                    </div>
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">价格类型:</div>
+                        <select class="select-menu" data-style="btn-primary" ng-model="inquiry.priceType" ng-init="inquiry.priceType = '委外'">
+                            <option value ="委外">委外</option>
+                            <option value ="采购">采购</option>
+                        </select>
+                    </div>
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">备注:</div>
+                        <input class="tender-input01" type="text" name="user" ng-model="inquiry.remark"/>
+                    </div>
+                    <div class="col-xs-4">
+                        <span class="tender-desc f14" style="padding-top: 15px;">报价截止时间:</span>
+                        <div class="input-group input-trigger date-picker">
+                            <input type="text" ng-model="inquiry.endDate" required
+                                   class="form-control" placeholder="点击选择截止日期" readonly="readonly"
+                                   datepicker-popup="yyyy-MM-dd" is-open="inquiry.$fromOpened"
+                                   ng-required="true" current-text="今天" min-date = "currentDay()"
+                                   clear-text="清除" close-text="关闭"
+                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                   ng-click="openDatePicker($event, condition, '$fromOpened')"> <span
+                                class="input-group-btn">
+							<button type="button" class="btn btn-default btn-open"
+                                    ng-click="openEndDatePicker($event, inquiry, '$fromOpened')">
+								<i class="fa fa-calendar"></i>
+							</button>
+						</span>
+                        </div>
+                    </div>
+                    <div class="col-xs-4">
+                    </div>
+                   <!--  <div class="col-xs-12">
+                        <div class="tender-desc">上传附件:</div>
+                        <div class="fileInputContainer">
+                            <input class="fileInput" type="file" ng-file-select name="file" ng-model="myFiles"/>
+                            href="file/{{attach.id}}"
+                        </div>
+                        <div style="margin-left: 100px; color: #969595; font-size: 12px; ">
+                        	   提示:选择附件大小不超过5MB,可上传JPG,PNG,EXCEL,WORD,PDF
+                        </div>
+                        <div style="margin-left: 100px; color: #969595; font-size: 12px; ">
+                       		     如果需要上传多个文件,请尝试同时选取多个文件
+                        </div>
+                    </div> -->
+                </div>
+
+                <div class="wrap">
+                    <div class="content">
+                        <div class="tender-list02">
+                            <!--产品信息-->
+                            <div class="com_title01"><span>产品明细</span></div>
+                            <dl>
+                                <dt>
+                                    <span>序号</span>
+                                    <span class="wid01">物料编号</span>
+                                    <span class="wid01">名称</span>
+                                    <span class="wid02">规格</span>
+                                    <span>单位</span>
+                                    <span>币别</span>
+                                    <span>价格截止日期</span>
+                                    <span class="wid03">&nbsp;</span>
+                                </dt>
+                                <div class="scroll-y">
+                                    <dd ng-repeat="prod in inquiry.inquiryItems">
+                                        <span>{{$index + 1}}</span>
+                                        <span class="wid01"><input type="text"  ng-model="prod.prodCode"  readonly /></span>
+                                        <span class="wid01"><input type="text" ng-model="prod.prodTitle" readonly /></span>
+                                        <span class="wid02"><input type="text" ng-model="prod.spec" readonly/></span>
+                                        <span><input type="text" ng-model="prod.unit" readonly/></span>
+                                        <span><select class="wid01" data-style="btn-primary" ng-model="prod.currency" ng-init="prod.currency = 'RMB'">
+					                            <option value ="RMB">RMB</option>
+					                            <option value ="USD">USD</option>
+					                            <option value ="HKD">HKD</option>
+					                            <option value ="EUR">EUR</option>
+					                       	  </select></span>
+                                        <span><input ng-model="prod.toDate" type="text" class="editable" 
+													placeholder="选择时间" datepicker-popup="yyyy-MM-dd" is-open="prod.$toDateOpen"
+													min-date="getMinDate()"
+													current-text="今天" clear-text="清除" close-text="关闭"
+													datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+													ng-focus="openDatePicker($event, prod.$toDateOpen)" readonly="readonly"
+													ng-click="openDatePicker($event, prod.$toDateOpen, $index)"></span>
+                                        <span class="wid03"><a ng-click="del($index)"><i class="fa fa-close"></i></a></span>
+                                    </dd>
+                                </div>
+                            </dl>
+                        </div>
+                    </div>
+                </div>
+                <!-- <div class="com_title01" style="border-bottom: 1px solid #969595;"><a ng-click="add()" style="margin-left: 20px;"><i class="fa fa-plus"></i>新增产品明细</a></div>-->
+                <div  class="title-div" style="border-bottom: 1px dashed #327ebe;">
+                    <span>供应商信息</span>
+                </div>
+                <div class="row vend-info">
+                    <div class="col-xs-12">
+                        <a class="add-vendor tender-desc" ng-click="dbfindVendor()" href="javascript:void(0)">
+                            <i class="fa fa-plus-square"></i>添加供应商&nbsp;
+                        </a>
+                    </div>
+                    <div class="col-xs-12" style="" ng-repeat="vendor in vendors">
+                        <div class="col-xs-2 control-label" style="width: 100px;">{{$index + 1}}</div>
+                        <div class="col-xs-2" style="width: 100px;">供应商</div>
+                        <div class="col-xs-3">
+                            <input class="tender-input01" ng-model="vendor.enName" type="text" readonly>
+                        </div>
+                        <div class="col-xs-1" style="width: 60px; margin-left: 20px; margin-right: -20px;">UU</div>
+                        <div class="col-xs-2">
+                            <input ng-model="vendor.enuu" type="text" style="width: 100%;" class="tender-input01" readonly>
+                        </div>
+                        <div class="col-xs-1">
+                            <a class="remove-vendor" href="javascript:void(0)" ng-click="removeVendor($index)" title="删除"><i class="fa fa-trash-o"></i></a>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-xs-12" style="padding: 30px;">
+                    <div class="col-xs-2 pull-right btn-publish">
+                        <button class="btn" ng-disabled="tenderForm.$invalid " ng-click="save()">保存</button>
+                    </div>
+                    <div class="col-xs-2 pull-right btn-save">
+                        <button class="btn" ng-disabled="tenderForm.$invalid " ng-click="submit()">保存并提交</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </form>
+    <div class="pro-add-data02" style="min-height: 500px;" >
+		<div class="pro-search">
+                <div class="search-result fl"><img src="resources/img/purc/search01.png"/>搜索“{{tip}}”,为您找到<em>{{total}}</em>个结果</div>
+                <div class="search fr">
+                    <input type="text" placeholder="输入供应商物料关键字查询" ng-model="keyword" autofocus ng-search="onSearch(keyword)"/>
+                    <a class="seek" ng-click="onSearch(keyword)">搜索</a>
+                </div>
+            </div>
+		<table class="block table table-default table-striped" ng-table="tableParams">
+			<thead>
+				<tr class="header">
+					<th width="160px">编号</th>
+					<th width="120px">名称</th>
+					<th>规格</th>
+					<th width="120px">单位</th>
+					<th width="80px">选择</th>
+				</tr>
+			</thead>
+			<tbody ng-if="tableParams.total() == 0">
+				<tr>
+					<td class="text-center" colspan="7" ng-if="tip != null">
+						<br>
+						<div class="text-muted" style="font-size: 14px;"><i class="fa fa-spinner"></i> 搜索"{{tip}}"未找到产品信息,请重新输入搜索条件</div>
+					</td>
+					<td class="text-center" colspan="7" ng-if="tip == null">
+						<br>
+						<div class="text-muted" style="font-size: 14px;"><i class="fa fa-spinner"></i> 您的供应商还未添加商品信息,请尽快通知供应商</div>
+					</td>
+				</tr>
+			</tbody>
+			<tbody>
+				<tr ng-repeat="product in $data">
+					<td class="text-center" ng-bind="::product.code"></td>
+					<td class="text-center" ng-bind="::product.title"></td>
+					<td class="text-center f12" ng-bind="::product.spec"></td>
+					<td class="text-center" ng-bind="::product.unit"></td>
+					<td class="text-center" ><a title="添加" href="javascript:void(0)" ng-click="check(product)" style="text-decoration: none; color: #327ebe;" id="click" class="add01">添加</a>
+					<div class="add-tanchuang">
+	                        <ul>
+	                            <li>
+	                                <div class="fl">数量:</div>
+	                                <div class="fr">
+	                                    <div class="btn-wrap">
+	                                        <span class="number">
+	                                            <a href="###" class="reduce">-</a>
+	                                            <input type="text" value="100">
+	                                            <a href="###" class="add">+</a>
+	                                        </span>
+	                                    </div>
+	                                </div>
+	                            </li>
+	                            <li>
+	                                <div class="fl">交期:</div>
+	                                <div class="fr"><input type="text" class="price-input" value="时间选择"></div>
+	                            </li>
+	                            <li>
+	                                <div class="fl">单价:</div>
+	                                <div class="fr"><input type="text" class="price-input" value="¥1.23"></div>
+	                            </li>
+	                            <li class="add-btn">
+	                                <div class="fl">&nbsp;</div>
+	                                <div class="fr"><a href="javascript:void(0);" class="off">取消</a><a href="javascript:void(0);" class="ok">确认</a></div>
+	                            </li>
+	                        </ul>
+	                    </div>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+</div>

+ 259 - 0
src/main/webapp/resources/tpl/index/purc/inquiry_unapply.html

@@ -0,0 +1,259 @@
+<style>
+.condition .more.open {
+	margin-top: 10px;
+	height: 36px;
+	opacity: 1;
+}
+
+.condition .more .form-group {
+	margin-bottom: 10px;
+}
+
+.inquiry-table .header>th {
+	height: 38px;
+	text-align: center;
+	background: #f5f5f5;
+	binquiry-top: 1px solid #e8e8e8;
+	binquiry-bottom: 1px solid #e8e8e8;
+}
+
+.inquiry-table .sep-row {
+	height: 10px;
+}
+
+.inquiry-table .selector {
+	vertical-align: middle;
+	margin: 0 0 2px 0;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.toolbar .select_all {
+	margin: 0 6px 0 10px;
+	line-height: 20px;
+}
+
+.toolbar .btn {
+	-moz-binquiry-radius: 2px;
+	margin-right: 5px;
+	binquiry: 1px solid #dcdcdc;
+	binquiry-radius: 2px;
+	-webkit-binquiry-radius: 2px;
+}
+
+.inquiry-table .inquiry-hd {
+	background: #f5f5f5;
+	height: 40px;
+	line-height: 40px;
+}
+
+.inquiry-table .inquiry-hd td.first {
+	padding-left: 20px;
+}
+
+.inquiry-table .inquiry-hd .inquiry-main span {
+	margin-right: 8px;
+}
+
+.inquiry-table .inquiry-hd .inquiry-code {
+	font-style: normal;
+	font-family: verdana;
+}
+
+.inquiry-table .inquiry-hd .inquiry-sum {
+	padding: 0 5px;
+}
+
+.inquiry-table>tbody {
+	binquiry: 1px solid transparent;
+}
+
+.inquiry-table>tbody:hover {
+	binquiry-color: #d32526;
+	binquiry-width: 2px;
+}
+
+.inquiry-table .operates {
+	display: none;
+}
+
+.inquiry-table .operates i {
+	padding: 0 2px;
+}
+
+.inquiry-table>tbody:hover .operates {
+	display: block;
+}
+.inquiry-table>tbody:hover .operates-status {
+	display: none;
+}
+
+
+.inquiry-table .inquiry-bd {
+	binquiry-bottom: 1px solid #e6e6e6;
+}
+
+.inquiry-table .inquiry-bd>td {
+	padding: 10px 5px;
+	vertical-align: top;
+	position: relative;
+}
+
+.inquiry-table .inquiry-bd .product {
+	padding-left: 20px;
+}
+
+.inquiry-table .inquiry-bd .inquiry-number {
+	position: absolute;
+	top: -1px;
+	left: -1px;
+	width: 20px;
+	height: 20px;
+	line-height: 20px;
+	text-align: center;
+	background: #f5f5f5;
+	font-weight: 500;
+	binquiry: solid 1px #d5d5d5;
+	binquiry-radius: 0 0 10px 0;
+}
+
+.inquiry-table .inquiry-bd .inquiry-number.key {
+	background: #56a022;
+	color: #ffffff;
+}
+
+.unPrinted {
+	color: #56a022;
+}
+
+.info-container .info:hover {
+	color: #CC3333;
+}
+
+</style>
+<div ng-include src="'static/tpl/index/purc/enMenu.html'"></div>
+<link rel="stylesheet" href="static/css/public.css">
+<div class="block" id="public">
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<table class="inquiry-table block" ng-table="tableParams">
+	<thead>
+		<tr class="header">
+			<th>商品</th>
+			<th width="80">编号</th>
+			<th width="100">录入人</th>
+			<th width="120">截止日期</th>
+			<th width="180">备注</th>
+			<th width="120">供应商</th>
+			<th width="100">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="5"></td>
+		</tr>
+	</thead>
+	<tbody ng-if="tableParams.total() == 0">
+		<tr>
+			<td colspan="6">
+				<div class="row text-muted info-container" style="padding: 50px 10px;">
+					<div class="col-md-4 text-center">
+						<br>
+						<br>
+						<div><img src="static/img/all/info.png" width="130px" height="90px"></div>
+						<div class="f16">当前没有对应的采购订单!</div>
+					</div>
+					<div class="col-md-8 br-l">
+						<div class="f16">
+							<p>为什么我没有采购订单?</p>
+						</div>
+						<div class="f14">
+							<div class="info">
+								<p>1、您的采购单在ERP系统上还没审核,订单无法上传到平台<br>
+								解决:采购员沟通确认单据是否已经审核(只有ERP中已经审核的单据才能接收到)</p>
+							</div>
+							<div class="info">
+								<p>2、ERP中供应商信息有误<br>
+								解决:与您的供应商沟通确认他的资料在供应商资料中是否维护正确,尤其是企业UU号</p>
+							</div>
+							<div class="info">
+								<p>3、您的供应商正在使用旧版本的UAS商务平台<br>
+								解决:我们仍有部分用户在使用旧版本UAS商务平台系统,你可以用您的企业UU号和管理员个人UU号 <a href="http://www.usoftchina.com" class="text-bold text-link" title="http://www.usoftchina.com" target="_blank">登陆旧版本UAS商务平台</a></p>
+							</div>
+						</div>
+						<br>
+						<br>
+					</div>
+				</div>
+			</td>
+		</tr>
+	</tbody>
+	<tbody ng-repeat="inquiry in $data track by inquiry.id">
+		<tr class="inquiry-hd" ng-dblclick="inquiry.$collapsed=!inquiry.$collapsed" ng-class="{'text-bold': inquiry.display>0}">
+			<td class="first">
+				<div class="inquiry-main">
+					<span> <input type="checkbox" class="selector"
+						ng-model="inquiry.$selected" ng-click="checkOne(inquiry)">
+					</span> 
+					&nbsp;<span class="text-num text-bold"
+						ng-bind="::inquiry.date | date:'yyyy-MM-dd'"></span> 
+				</div>
+			</td>
+			<td colspan="1"><a ng-bind="::inquiry.code" ui-sref="purc.inquiry_detail({id:inquiry.id})" target="_self"></a> </td>
+			<td colspan="1">{{::inquiry.recorder}}</td>
+			<td colspan="2" class="inquiry-sum">
+				<div ng-if="inquiryItem.replyable">
+					<span class="text-inverse text-bold" ng-bind="::inquiry.endDate | timespan"></span>
+					<span class="text-muted">后截止报价</span>
+				</div>
+			</td>
+			<td colspan="1" class="text-center">
+			</td>
+			<td colspan="1" class="text-center">
+				<a ng-click="submit(inquiry.id)">提交</a>
+				<a ng-click="clearOrder(inquiry.id)">删除</a>
+			</td>
+		</tr>
+		<tr class="inquiry-bd" ng-repeat="item in inquiry.inquiryItems track by item.id"
+			ng-if="!inquiry.$collapsed ">
+			<td class="product">
+				<div class="text-num inquiry-number" ng-class="{'key': item.key&&inquiry.$showAll}" title="第{{::item.number}}行">{{::item.number}}</div>
+				<div class="text-num text-bold">
+					<span ng-bind="::item.product.code"></span>
+				</div>
+				<div>
+					<span ng-bind="::item.product.title"></span>
+				</div>
+				<div class="text-muted"
+					ng-bind="::item.product.spec"></div>
+				<div class="text-muted text-bold" ng-if="item.currency"><span ng-bind="::item.currency"></span></div>
+			</td>
+			<td class="text-center">
+				<div class="text-muted">税率:{{::item.taxrate || 0}}%</div>
+			</td>
+			<td class="text-center">
+				<div class="text-num" ng-bind="::item.qty"></div>
+				<div class="text-muted" ng-bind="::item.product.unit"></div>
+				<div style="margin: 0 auto" ng-if="item.$editing">
+					<input type="number" ng-model="item.reply.qty" min="0" max="{{item.qty}}"
+						ng-init="item.reply.qty=item.qty-item.replyQty"
+						class="form-control input-xs" placeholder="0~{{item.qty-item.replyQty}}">
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num" ng-bind="::item.delivery | date:'yyyy-MM-dd'"></div>
+			</td>
+			<td class="br-l">
+				<div style="margin: 0 auto" ng-if="item.$editing">
+					<br><br><input type="text" ng-model="item.reply.remark"
+						class="form-control input-xs" placeholder="回复备注" />
+				</div>
+			</td>
+			<td ng-bind="::item.enterprise.enName"></td>
+			<td class="text-center"><a ng-click="deleteById(item.id)">删除</a></td>
+		</tr>
+	</tbody>
+</table>
+</div>

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

@@ -21,7 +21,7 @@
 	<ul class="list-unstyled">
 		<li ui-sref-active="active"><a ui-sref="purc.tenderlist">招标</a></li>
 	</ul>
-	<!-- <ul class="list-unstyled">
-		<li ui-sref-active="active"><a ui-sref="purc.inquiry_new">询价</a></li>
-	</ul> -->
+	<ul class="list-unstyled">
+		<li ui-sref-active="active"><a ui-sref="purc.inquiry">询价</a></li>
+	</ul>
 </div>