优化单据页面新增账户和仓库的功能
This commit is contained in:
@@ -50,7 +50,7 @@ $.get("../../pages/template/base.html?7891", function(tem) {
|
|||||||
collapsible: false,
|
collapsible: false,
|
||||||
closable: true
|
closable: true
|
||||||
});
|
});
|
||||||
$("#depotDlg #name,#depotDlg #address").textbox({
|
$("#depotDlg #name").textbox({
|
||||||
required: true,
|
required: true,
|
||||||
validType: 'length[2,30]'
|
validType: 'length[2,30]'
|
||||||
});
|
});
|
||||||
@@ -232,6 +232,9 @@ function bindDepotEvent() {
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
$("#saveDepot").off("click").on("click", function () {
|
$("#saveDepot").off("click").on("click", function () {
|
||||||
|
if(!$('#depotFM').form('validate')){
|
||||||
|
return;
|
||||||
|
}
|
||||||
var infoObj = $("#depotFM").serializeObject();
|
var infoObj = $("#depotFM").serializeObject();
|
||||||
infoObj.type = 0;
|
infoObj.type = 0;
|
||||||
if (checkDepotName()) {
|
if (checkDepotName()) {
|
||||||
@@ -300,6 +303,9 @@ function bindAccountEvent() {
|
|||||||
if (checkAccountName()) {
|
if (checkAccountName()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(!$('#accountFM').form('validate')){
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/account/add',
|
url: '/account/add',
|
||||||
type: "post",
|
type: "post",
|
||||||
@@ -319,5 +325,6 @@ function bindAccountEvent() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user