|
@@ -287,31 +287,62 @@ let rptSignatureHelper = {
|
|
|
zTreeOprObj.showPage(zTreeOprObj.currentPage, zTreeOprObj.canvas);
|
|
|
},
|
|
|
resetSignDate: function() {
|
|
|
- for (let idx = 0; idx < ROLE_REL_LIST.length; idx++) {
|
|
|
- const role_rel = ROLE_REL_LIST[idx];
|
|
|
- const idSuffixStr = 'dtp_' + role_rel.signature_name;
|
|
|
- let dtDom = $('#' + idSuffixStr);
|
|
|
- if (dtDom.length === 1) {
|
|
|
- const dtStr = dtDom[0].value;
|
|
|
- if (dtStr && dtStr !== '' && dtStr.length >= 8 && dtStr.length <= 10) {
|
|
|
- // const tmpDt = new Date(dtStr);
|
|
|
- // const year = parseInt(tmpDt.getFullYear());
|
|
|
- // const month = parseInt(tmpDt.getMonth());
|
|
|
- // const dt = parseInt(tmpDt.getDate());
|
|
|
- // role_rel.sign_date = new Date(year, month, dt);
|
|
|
- role_rel.sign_date = new Date(dtStr);
|
|
|
- } else {
|
|
|
- role_rel.sign_date = '';
|
|
|
- }
|
|
|
- // 要处理相关签名Cell属性(默认跟普通cell一样,就多了个signature_name)
|
|
|
- for (const page of zTreeOprObj.currentRptPageRst.items) {
|
|
|
- if (page.signature_date_cells) {
|
|
|
- for (const sCell of page.signature_date_cells) {
|
|
|
+ // for (let idx = 0; idx < ROLE_REL_LIST.length; idx++) {
|
|
|
+ // const role_rel = ROLE_REL_LIST[idx];
|
|
|
+ // const idSuffixStr = 'dtp_' + role_rel.signature_name;
|
|
|
+ // let dtDom = $('#' + idSuffixStr);
|
|
|
+ // if (dtDom.length === 1) {
|
|
|
+ // const dtStr = dtDom[0].value;
|
|
|
+ // if (dtStr && dtStr !== '' && dtStr.length >= 8 && dtStr.length <= 10) {
|
|
|
+ // // const tmpDt = new Date(dtStr);
|
|
|
+ // // const year = parseInt(tmpDt.getFullYear());
|
|
|
+ // // const month = parseInt(tmpDt.getMonth());
|
|
|
+ // // const dt = parseInt(tmpDt.getDate());
|
|
|
+ // // role_rel.sign_date = new Date(year, month, dt);
|
|
|
+ // role_rel.sign_date = new Date(dtStr);
|
|
|
+ // } else {
|
|
|
+ // role_rel.sign_date = '';
|
|
|
+ // }
|
|
|
+ // // 要处理相关签名Cell属性(默认跟普通cell一样,就多了个signature_name)
|
|
|
+ // for (const page of zTreeOprObj.currentRptPageRst.items) {
|
|
|
+ // if (page.signature_date_cells) {
|
|
|
+ // for (const sCell of page.signature_date_cells) {
|
|
|
+ // sCell.Value = _getSignDateDftName();
|
|
|
+ // if (sCell.signature_name === role_rel.signature_name + '_签字日期') {
|
|
|
+ // if (role_rel.sign_date !== '') {
|
|
|
+ // sCell.Value = role_rel.sign_date.Format(role_rel.sign_date_format);
|
|
|
+ // } else {
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ for (const page of zTreeOprObj.currentRptPageRst.items) {
|
|
|
+ if (page.signature_date_cells) {
|
|
|
+ for (const sCell of page.signature_date_cells) {
|
|
|
+ sCell.Value = _getSignDateDftName();
|
|
|
+ for (let idx = 0; idx < ROLE_REL_LIST.length; idx++) {
|
|
|
+ const role_rel = ROLE_REL_LIST[idx];
|
|
|
+ const idSuffixStr = 'dtp_' + role_rel.signature_name;
|
|
|
+ let dtDom = $('#' + idSuffixStr);
|
|
|
+ if (dtDom.length === 1) {
|
|
|
+ const dtStr = dtDom[0].value;
|
|
|
+ if (dtStr && dtStr !== '' && dtStr.length >= 8 && dtStr.length <= 10) {
|
|
|
+ // const tmpDt = new Date(dtStr);
|
|
|
+ // const year = parseInt(tmpDt.getFullYear());
|
|
|
+ // const month = parseInt(tmpDt.getMonth());
|
|
|
+ // const dt = parseInt(tmpDt.getDate());
|
|
|
+ // role_rel.sign_date = new Date(year, month, dt);
|
|
|
+ role_rel.sign_date = new Date(dtStr);
|
|
|
+ } else {
|
|
|
+ role_rel.sign_date = '';
|
|
|
+ }
|
|
|
+ // 要处理相关签名Cell属性(默认跟普通cell一样,就多了个signature_name)
|
|
|
if (sCell.signature_name === role_rel.signature_name + '_签字日期') {
|
|
|
if (role_rel.sign_date !== '') {
|
|
|
sCell.Value = role_rel.sign_date.Format(role_rel.sign_date_format);
|
|
|
- } else {
|
|
|
- // sCell.Value = '';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -319,8 +350,6 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 还有ROLE_REL_LIST
|
|
|
- // rptSignatureHelper.cleanOldSignature(accTxtName);
|
|
|
|
|
|
},
|
|
|
setupAfterSelectSignature: function () {
|
|
@@ -471,12 +500,11 @@ let rptSignatureHelper = {
|
|
|
for (const page of pageData.items) {
|
|
|
if (page.signature_date_cells) {
|
|
|
for (const sCell of page.signature_date_cells) {
|
|
|
+ sCell.Value = _getSignDateDftName();
|
|
|
for (const role_rel of ROLE_REL_LIST) {
|
|
|
if (sCell.signature_name === role_rel.signature_name + '_签字日期') {
|
|
|
if (role_rel.sign_date !== '') {
|
|
|
sCell.Value = role_rel.sign_date.Format(role_rel.sign_date_format);
|
|
|
- } else {
|
|
|
- // sCell.Value = '';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -484,4 +512,8 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+function _getSignDateDftName() {
|
|
|
+ return ' 年 月 日';
|
|
|
}
|