Browse Source

添加已采纳和未采纳导出

wangmh 8 years ago
parent
commit
23eb6fa172

+ 40 - 0
src/main/java/com/uas/platform/b2b/controller/SaleQuotationController.java

@@ -537,6 +537,46 @@ public class SaleQuotationController {
 		return modelAndView;
 	}
 
+	/**
+	 * 导出Excel - 已采纳
+	 *
+	 * @param params
+	 * @return
+	 */
+	@RequestMapping(value = "/xls", params = RequestState.AGREED, method = RequestMethod.GET)
+	public ModelAndView exportAgreedQuotation(PageParams params, String searchFilter) {
+		params.setPage(1);
+		params.setCount(SearchConstants.TOP_NUM);
+		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
+		ModelAndView modelAndView = new ModelAndView();
+		modelAndView.addObject("state", "已采纳");
+		modelAndView.addObject("dateFormat", dateFormat);
+		modelAndView.addObject("data",getAgreedQuotationItems(params, searchFilter).getContent());
+		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/saleQuotation", "主动报价单列表_已失效"));
+		logger.log("主动报价单", "导出Excel列表", "导出已失效Excel列表");
+		return modelAndView;
+	}
+
+	/**
+	 * 导出Excel - 未采纳
+	 *
+	 * @param params
+	 * @return
+	 */
+	@RequestMapping(value = "/xls", params = RequestState.REFUSED, method = RequestMethod.GET)
+	public ModelAndView exportRefusedQuotation(PageParams params, String searchFilter) {
+		params.setPage(1);
+		params.setCount(SearchConstants.TOP_NUM);
+		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
+		ModelAndView modelAndView = new ModelAndView();
+		modelAndView.addObject("state", "未采纳");
+		modelAndView.addObject("dateFormat", dateFormat);
+		modelAndView.addObject("data",getRefusedQuotationItems(params, searchFilter).getContent());
+		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/saleQuotation", "主动报价单列表_已失效"));
+		logger.log("主动报价单", "导出Excel列表", "导出已失效Excel列表");
+		return modelAndView;
+	}
+
 	/**
 	 * 导出Excel - 已失效
 	 *

+ 0 - 14
src/main/webapp/resources/tpl/index/sale/quotation_list.html

@@ -324,20 +324,6 @@
 		<tr class="sep-row">
 			<td colspan="7"></td>
 		</tr>
-		<tr class="toolbar toolbar-top">
-			<td colspan="6">
-				<!--<div>
-					<label><input ng-disabled="true" type="checkbox" class="selector select_all"
-								  ng-model="selectAll">全选</label>
-				</div> &lt;!&ndash; 分页 &ndash;&gt;-->
-			</td>
-			<td class="text-center">
-				<a href="sale/quotation/xls?_state={{active}}&searchFilter={{searchFilterXls}}" 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>