初始化项目
This commit is contained in:
167
AUTS.Web/Plugin/basicfunc.js
Normal file
167
AUTS.Web/Plugin/basicfunc.js
Normal file
@@ -0,0 +1,167 @@
|
||||
|
||||
|
||||
//修改会员
|
||||
$("#btnModifyPLine").click(function () {
|
||||
|
||||
var btnText = $('#btnModifyPLine').html()
|
||||
$("#btnModifyPLine").attr("disabled", "true"); //设置禁用按钮
|
||||
$('#btnModifyPLine').text('提交中...'); //显示提交中
|
||||
|
||||
$("#modifyPLineForm").ajaxSubmit({
|
||||
url: "/APP/BasicFunc/ModifyPLine",
|
||||
type: "post",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
$.toastr.success('保存成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000,
|
||||
callback: function () {
|
||||
$('#btnModifyPLine').text(btnText); //还原显示
|
||||
$('#btnModifyPLine').removeAttr('disabled')//重置按钮
|
||||
location.href = "/APP/BasicFunc/PLineList";
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$.toastr.error('保存失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
$('#btnModifyPLine').text(btnText); //还原显示
|
||||
$('#btnModifyPLine').removeAttr('disabled')//重置按钮
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#btnModifyPLine').removeAttr('disabled')//重置按钮
|
||||
$('#btnModifyPLine').text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//修改提交
|
||||
function excutedUpDate(btnID, url, formID) {
|
||||
try {
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
if (!res.Message) {
|
||||
$.toastr.success('保存成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000,
|
||||
callback: function () {
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
//location.href = sucUrl;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.toastr.success('保存成功! <br />' + res.Message,
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 3000,
|
||||
callback: function () {
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
//location.href = sucUrl;
|
||||
}
|
||||
});
|
||||
}
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
} else {
|
||||
|
||||
$.toastr.error('保存失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
//添加修改内部单生产计划
|
||||
function excutedUpDatePPlan(btnID, url, formID, orderInternalID) {
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
$.toastr.success('保存成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000,
|
||||
callback: function () {
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
gotoDetailPartial('/APP/PPlan/PPlanInternalDetails', orderInternalID, 'pPlanInterBox_Content')
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$.toastr.error('保存失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
function leave() {
|
||||
var name = $("input[name='Matlab']").val();
|
||||
console.log(name);
|
||||
$.ajax({
|
||||
url: "/APP/ProductMaintain/judgecode",
|
||||
data: { name: name },
|
||||
type: "POST",
|
||||
success: function (res)
|
||||
{
|
||||
if (res)
|
||||
{
|
||||
$('#hintname').val("已用此不良代码");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user