|
|
@@ -166,15 +166,14 @@
|
|
|
|
|
|
function checkForm() {
|
|
|
var rs = true;
|
|
|
- /* var contract_number = $("#contract_number").val();
|
|
|
+ var contract_number = $("#contract_number").val();
|
|
|
if (contract_number) {
|
|
|
validContractNumber(contract_number, function(flag) {
|
|
|
rs = flag ? checkFormMore() : false;
|
|
|
});
|
|
|
} else {
|
|
|
rs = checkFormMore();
|
|
|
- } */
|
|
|
- rs = checkFormMore();
|
|
|
+ }
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
@@ -184,12 +183,17 @@
|
|
|
var rs = true;
|
|
|
|
|
|
// 检查各字段是否需要验证 (启动节点或在 table_fields 配置中)
|
|
|
+ var contract_number_required = (se == 1 || table_fields.indexOf(',contract_number,') > -1);
|
|
|
var contract_name_required = (se == 1 || table_fields.indexOf(',contract_name,') > -1);
|
|
|
var contract_type_required = (se == 1 || table_fields.indexOf(',contract_type,') > -1);
|
|
|
var salesman_required = (se == 1 || table_fields.indexOf(',salesman_name,') > -1);
|
|
|
var contract_money_required = (se == 1 || table_fields.indexOf(',contract_money,') > -1);
|
|
|
var supplierName_required = (se == 1 || table_fields.indexOf(',supplierName,') > -1);
|
|
|
|
|
|
+ if(contract_number_required){
|
|
|
+ rs = $.validate({name:"contractInfo.contract_number",model:[{type:"require",msg:"合同编号不能为空!"},
|
|
|
+ {type:"len",max:100,msg:"合同编号长度不能超过100!"}]}) && rs;
|
|
|
+ }
|
|
|
if(contract_name_required){
|
|
|
rs = $.validate({name:"contractInfo.contract_name",model:[{type:"require",msg:"合同名称不能为空!"},
|
|
|
{type:"len",max:100,msg:"合同名称长度不能超过 100!"}]}) && rs;
|
|
|
@@ -464,10 +468,20 @@
|
|
|
<input type="hidden" id="applyDate" name="contractInfo.applyDate" value="${contractInfo.applyDate}"/>
|
|
|
${contractInfo.applyDate}
|
|
|
</td>
|
|
|
- <td class="l-table-edit-text">合同编号:
|
|
|
+ <td class="l-table-edit-text">合同编号
|
|
|
+ <c:if test="${fn:contains(curTacheModel.table_fields, ',contract_number,') || curTacheModel.n_se eq 1}">
|
|
|
+ <font color="red">*</font>:
|
|
|
+ </c:if>
|
|
|
</td>
|
|
|
<td class="l-table-edit-td" colspan="3">
|
|
|
- <input type="hidden" id="contract_number" name="contractInfo.contract_number" value="${contractInfo.contract_number }"/>${contractInfo.contract_number }
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:contains(curTacheModel.table_fields, ',contract_number,') || curTacheModel.n_se eq 1}">
|
|
|
+ <input type="text" id="contract_number" name="contractInfo.contract_number" value="${contractInfo.contract_number }"/>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <input type="hidden" id="contract_number" name="contractInfo.contract_number" value="${contractInfo.contract_number }"/>${contractInfo.contract_number }
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|