diff --git a/erp_web/js/common/common.js b/erp_web/js/common/common.js
index bb3fdff5..3c65679c 100644
--- a/erp_web/js/common/common.js
+++ b/erp_web/js/common/common.js
@@ -275,4 +275,16 @@
}
}
return newArr;
+ }
+
+ /**
+ * 验证单据
+ * @param id
+ */
+ function validateForm(id) {
+ if(!$('#'+ id).form('validate')) {
+ return true;
+ } else {
+ return false;
+ }
}
\ No newline at end of file
diff --git a/erp_web/js/pages/manage/supplier.js b/erp_web/js/pages/manage/supplier.js
index e46a41ba..be3ffa31 100644
--- a/erp_web/js/pages/manage/supplier.js
+++ b/erp_web/js/pages/manage/supplier.js
@@ -457,6 +457,9 @@
});
//保存信息
$("#saveSupplier").off("click").on("click", function () {
+ if(validateForm("supplierFM")) {
+ return;
+ }
if (checkSupplierName()) {
return;
}
diff --git a/erp_web/pages/manage/customer.html b/erp_web/pages/manage/customer.html
index 346d774f..4448e41b 100644
--- a/erp_web/pages/manage/customer.html
+++ b/erp_web/pages/manage/customer.html
@@ -120,9 +120,9 @@
|
- 税率 |
+ 税率(%) |
-
+
|
diff --git a/erp_web/pages/manage/vendor.html b/erp_web/pages/manage/vendor.html
index 31fe9735..33937461 100644
--- a/erp_web/pages/manage/vendor.html
+++ b/erp_web/pages/manage/vendor.html
@@ -120,9 +120,9 @@
|
|
- 税率 |
+ 税率(%) |
-
+
|
diff --git a/erp_web/pages/materials/material.html b/erp_web/pages/materials/material.html
index 80216199..c987bacb 100644
--- a/erp_web/pages/materials/material.html
+++ b/erp_web/pages/materials/material.html
@@ -1109,6 +1109,7 @@
$(".window-mask").css({width: webW, height: webH});
$("#Name").val("").focus();
$("#manyUnitCheck").prop("checked", false);
+ $("#manyUnit").val(""); //置空
//当前为不选中状态
$("#Unit").show();
$("#manyUnit").hide();
@@ -1200,6 +1201,10 @@
$.messager.alert('提示', '型号不能为空!', 'warning');
return;
}
+ if(!$("#Unit").val() && !$("#manyUnit").val()) {
+ $.messager.alert('提示', '单位为必填项!', 'warning');
+ return;
+ }
if (checkIsExist()) {
return;
}
@@ -1283,9 +1288,9 @@
$("#Color").focus().val(materialInfo[11]);
$("#EnableSerialNumber").val(materialInfo[24]=='1'?'1':'0');
//商品类别id
- $("#parentid").val(materialInfo[14]);
+ $("#parentid").val(materialInfo[14] == "undefined" ? "" : materialInfo[14]);
//商品类别名称
- $("#parentName").val(materialInfo[15]);
+ $("#parentName").val(materialInfo[15] == "undefined" ? "" : materialInfo[15]);
mId = materialInfo[14];
mName = materialInfo[15];
$("#Packing").focus().val(materialInfo[12]);