<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>供货商管理</title>
|
[#include "/business/pages/include/static.html" /]
|
</head>
|
|
<body>
|
|
<div class="fs_main clearfix">
|
<div class="event_fill list_common_select">
|
<form id="myform" action="">
|
<table>
|
<tr>
|
<th width="70%">
|
<div class="fill_item"><label>备件分类:</label><input class="general" type="text" id="cate_name" name="cate_name"/></div>
|
<div class="fill_item"><label>分类编码:</label><input class="general" type="text" id="code" name="code"/></div>
|
</th>
|
<td width="30%">
|
<a class="retrievebtn" id="reset">重置</a><a class="retrievebtn focus" href="javascript:query();">查询</a>
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
</div>
|
|
|
<div class="fs_main clearfix">
|
<table class="display_form common_list_table">
|
<tr class="title">
|
<td width="7%"><input type="checkbox" id="selAll"></td>
|
<td width="30%">备件分类</td>
|
<td width="30%">分类编码</td>
|
<td width="30%">报价(元)</td>
|
</tr>
|
[#if cateList?? && cateList?size>0]
|
[#list cateList as item]
|
<tr>
|
<td><input type="checkbox" name="ids" class="ids" value="${item.id}"></td>
|
<td>${item.lv1_name}-${item.lv2_name}-${item.lv3_name}</td>
|
<td>${item.code1}-${item.code2}-${item.code}</td>
|
<td><input type="text" name="offer_price" class="general"/></td>
|
</tr>
|
[/#list]
|
[/#if]
|
</table>
|
</div>
|
|
|
|
<script type="text/javascript">
|
$(function () {
|
|
$("input[name=offer_price]").blur(function () {
|
if(!/(^[0-9]{1,7}$)|(^[0-9]{1,7}[\.]{1}[0-9]{1,2}$)/.test($.trim($(this).val()))){
|
popupTips("请输入正确的报价(整数最多七位,小数最多两位)");
|
$(this).focus();
|
}
|
})
|
|
$("#reset").click(function () {
|
$("#myform")[0].reset();
|
});
|
|
$("#selAll").click(function () {
|
if($(this).prop("checked")==true){
|
$(".ids:checkbox").prop("checked",true);
|
}else{
|
$(".ids:checkbox").prop("checked",false);
|
}
|
});
|
})
|
|
function query() {
|
$("#myform").submit();
|
}
|
|
function onDialogBtnClick(btnID, dialogID, config) {
|
if (btnID == "btnSure") {
|
var flag = true;
|
var cateAry = [];
|
$(".ids:checkbox:checked").each(function (i) {
|
var cate = {};
|
var cate_id = $(this).val();
|
var name = $(this).parent().next("td").text();
|
var code = $(this).parent().next("td").next("td").text();
|
var offer_price = $.trim($(this).parent().parent().find("input[name=offer_price]").val());
|
cate["cate_id"] = cate_id;
|
cate["name"] = name;
|
cate["code"] = code;
|
cate["offer_price"] = offer_price;
|
|
cateAry.push(cate);
|
|
if($.util.isEmpty(offer_price)){
|
flag = false;
|
return false;
|
}
|
|
})
|
|
if(cateAry.length>0) {
|
if(flag){
|
window.top.frames["dialogIframe0"].selCate(cateAry);
|
window.top.hideDialog(1);
|
}else {
|
popupTips("报价不能为空");
|
}
|
}else {
|
popupTips("请填写供货信息");
|
}
|
}
|
}
|
|
</script>
|
|
</body>
|
</html>
|