|
@@ -436,22 +436,23 @@ let rptSignatureHelper = {
|
|
|
},
|
|
|
resetSignDate: function(signatureDivId) {
|
|
|
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 + '_' + signatureDivId;
|
|
|
- let dtDom = $('#' + idSuffixStr);
|
|
|
- if (dtDom.length === 1) {
|
|
|
- const dtStr = dtDom[0].value;
|
|
|
- if (dtStr && dtStr !== '' && dtStr.length >= 8 && dtStr.length <= 10) {
|
|
|
- role_rel.sign_date = new Date(dtStr);
|
|
|
- } else {
|
|
|
- role_rel.sign_date = '';
|
|
|
- }
|
|
|
- // 要处理相关签名Cell属性(默认跟普通cell一样,就多了个signature_name)
|
|
|
+ // 调整了下次序,无论有没有签名时间显示,签名对象的sign_date必须得更新及保存
|
|
|
+ for (let idx = 0; idx < ROLE_REL_LIST.length; idx++) {
|
|
|
+ const role_rel = ROLE_REL_LIST[idx];
|
|
|
+ const idSuffixStr = 'dtp_' + role_rel.signature_name + '_' + signatureDivId;
|
|
|
+ let dtDom = $('#' + idSuffixStr);
|
|
|
+ if (dtDom.length === 1) {
|
|
|
+ const dtStr = dtDom[0].value;
|
|
|
+ if (dtStr && dtStr !== '' && dtStr.length >= 8 && dtStr.length <= 10) {
|
|
|
+ role_rel.sign_date = new Date(dtStr);
|
|
|
+ } else {
|
|
|
+ role_rel.sign_date = '';
|
|
|
+ }
|
|
|
+ // 要处理相关签名Cell属性(默认跟普通cell一样,就多了个signature_name)
|
|
|
+ if (page.signature_date_cells) {
|
|
|
+ for (const sCell of page.signature_date_cells) {
|
|
|
if (sCell.signature_name === role_rel.signature_name + '_签字日期') {
|
|
|
+ sCell.Value = _getSignDateDftName();
|
|
|
if (role_rel.sign_date !== '') {
|
|
|
sCell.Value = role_rel.sign_date.Format(role_rel.sign_date_format);
|
|
|
}
|