易用性优化
parent
1ded200aa8
commit
14a6e4c112
|
@ -55,6 +55,8 @@ BUDGET_PLAN_DETAIL={
|
|||
"repaymentPlan":[true,"还款计划","number"]
|
||||
};
|
||||
|
||||
var result = 0;
|
||||
|
||||
$(function () {
|
||||
$("input[name='costCompanyManageTaxExclude']").change(function () {
|
||||
digitalSelf("costCompanyManageTaxExclude", "input[name='costCompanyManageTaxExclude']");
|
||||
|
@ -81,6 +83,13 @@ $(function () {
|
|||
$("#saveDraft").click(function () {
|
||||
$("#saveDraft").attr('disabled', true);
|
||||
|
||||
checkName();
|
||||
if (result == 1) {
|
||||
window.confirm('项目名称已存在');
|
||||
$("#saveDraft").attr('disabled', false);
|
||||
return;
|
||||
}
|
||||
|
||||
var dataIncome = collectData("am-modal-prompt-input-income");
|
||||
if (dataIncome.length <= 0) {
|
||||
window.confirm('请填写收入明细表');
|
||||
|
@ -191,6 +200,13 @@ $(function () {
|
|||
$("#saveApprove").click(function () {
|
||||
$("#saveApprove").attr('disabled', true);
|
||||
|
||||
checkName();
|
||||
if (result == 1) {
|
||||
window.confirm('项目名称已存在');
|
||||
$("#saveApprove").attr('disabled', false);
|
||||
return;
|
||||
}
|
||||
|
||||
var dataIncome = collectData("am-modal-prompt-input-income");
|
||||
if (dataIncome.length <= 0) {
|
||||
window.confirm('请填写收入明细表');
|
||||
|
@ -297,6 +313,21 @@ $(function () {
|
|||
$("#pmsForm").attr("action", base + "/project/budgetEditSaveAndApprove");
|
||||
$("#pmsForm").submit();
|
||||
});
|
||||
|
||||
function checkName () {
|
||||
var name = $("#name").val();
|
||||
var id = $("#id").val();
|
||||
$.ajax({
|
||||
url: base + "/project/checkName",
|
||||
data: {name: name, id: id},
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function (data) {
|
||||
result = data.status;
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue