|
@@ -379,19 +379,21 @@
|
|
|
$(this).attr('disabled', true);
|
|
|
$(this).text('签名条件判断中...');
|
|
|
// 判断同表中历史归档是否已存在签名
|
|
|
- const archiveList = _.find(ARCHIVE_LIST, { rpt_id: rptArchiveObj.currentNode.ID.toString() });
|
|
|
- if (archiveList && archiveList.items) {
|
|
|
- const aidList = _.map(archiveList.items, 'uuid');
|
|
|
- _.remove(aidList, function (n) {
|
|
|
- return n === rptArchiveObj.currentArchiveUuid;
|
|
|
- });
|
|
|
- if (aidList.length > 0) {
|
|
|
- for (const a of aidList) {
|
|
|
- if (_.findIndex(signLogList, { uuid: a }) !== -1) {
|
|
|
- toastr.error('历史归档中已存在签名,请勿重复签署');
|
|
|
- $(this).attr('disabled', false);
|
|
|
- $(this).text('确定');
|
|
|
- return false;
|
|
|
+ if(rptArchiveObj.currentNode && rptArchiveObj.currentArchiveUuid) {
|
|
|
+ const archiveList = _.find(ARCHIVE_LIST, { rpt_id: rptArchiveObj.currentNode.ID.toString() });
|
|
|
+ if (archiveList && archiveList.items) {
|
|
|
+ const aidList = _.map(archiveList.items, 'uuid');
|
|
|
+ _.remove(aidList, function (n) {
|
|
|
+ return n === rptArchiveObj.currentArchiveUuid;
|
|
|
+ });
|
|
|
+ if (aidList.length > 0) {
|
|
|
+ for (const a of aidList) {
|
|
|
+ if (_.findIndex(signLogList, { uuid: a }) !== -1) {
|
|
|
+ toastr.error('历史归档中已存在签名,请勿重复签署');
|
|
|
+ $(this).attr('disabled', false);
|
|
|
+ $(this).text('确定');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|