...
|
...
|
@@ -69,7 +69,6 @@ $('body').on('click', '#videoDialog', function() { |
|
|
var limitAddForm = new common.edit("#limit-add-form");
|
|
|
limitAddForm.init();
|
|
|
|
|
|
|
|
|
limitAddForm.on("validate", function(){
|
|
|
var param = {
|
|
|
batchNo: $('#batchNo').val()
|
...
|
...
|
@@ -77,27 +76,45 @@ limitAddForm.on("validate", function(){ |
|
|
if (type == 'update') {
|
|
|
param.id = $('#batchNo').data('id');
|
|
|
}
|
|
|
common.util.__ajax2({
|
|
|
url:'/limit/checkBatch',
|
|
|
async: false,
|
|
|
data: param
|
|
|
});
|
|
|
/*common.util.__ajax2({
|
|
|
|
|
|
});*/
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
//表单提交
|
|
|
$('.limit-add-btn').click(function () {
|
|
|
var $this = $(this);
|
|
|
var param = {
|
|
|
batchNo: $('#batchNo').val()
|
|
|
}
|
|
|
if (type == 'update') {
|
|
|
param.id = $('#batchNo').data('id');
|
|
|
}
|
|
|
|
|
|
common.util.__ajax2({
|
|
|
url:'/limit/checkBatch',
|
|
|
data: param
|
|
|
}, function(res) {
|
|
|
if (res.code == 200) {
|
|
|
limitAddForm.submit($('#limit-add-form').attr('action'), function(option, that) {
|
|
|
option.beforeSend = function () {
|
|
|
$this.attr('disabled', 'disabled');
|
|
|
var param = {
|
|
|
batchNo: $('#batchNo').val()
|
|
|
}
|
|
|
if (type == 'update') {
|
|
|
param.id = $('#batchNo').data('id');
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
option.success=function(res){
|
|
|
if (res.data.code == 200) {
|
|
|
//成功返回列表页
|
|
|
limitAddForm.$tip('提交成功',function(){
|
|
|
window.location.href = '/limit/product/index';
|
|
|
//window.location.href = '/limit/product/index';
|
|
|
}, 'growl-success');
|
|
|
$this.removeAttr('disabled');
|
|
|
} else {
|
...
|
...
|
@@ -149,6 +166,10 @@ $('.limit-add-btn').click(function () { |
|
|
console.log(option.data);
|
|
|
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
//编辑页,时间戳转换
|
...
|
...
|
|