深圳全飞鸿
标题:
关于fastadmin的table工具栏的approve按钮
[打印本页]
作者:
syant
时间:
2025-2-24 22:23
标题:
关于fastadmin的table工具栏的approve按钮
toolbar.on('click', Table.config.approvebtn, function () {
var that = this;
var ids = Table.api.selectedids(table);
if (ids.length > 1) {
top.Toastr.error('一次只能选择一张单据审核!');
return;
}
var title = $(that).data('title') || $(that).attr("title") || __('Approve');
var data = $(that).data() || {};
delete data.title;
//循环弹出多个编辑框
$.each(Table.api.selecteddata(table), function (index, row) {
//console.log(row);
if(row["check_status"]=="1"){
top.Toastr.error('该单据已审核!');
return ;
}
var url = options.extend.approve_url;
row = $.extend({}, row ? row : {}, {ids: row[options.pk]});
url = Table.api.replaceurl(url, row, table);
Fast.api.open(url, typeof title === 'function' ? title.call(table, row) : title, data);
});
});
欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/)
Powered by Discuz! X3.2