From 0c86e5e2eaf907dfcb63aea13e6efac3ccc52cce Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 25 二月 2020 11:06:20 +0800 Subject: [PATCH] 2020-02-25 --- src/templates/tableshare/verifycard/index.jsx | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/templates/tableshare/verifycard/index.jsx b/src/templates/tableshare/verifycard/index.jsx index 358d8b4..ebc1365 100644 --- a/src/templates/tableshare/verifycard/index.jsx +++ b/src/templates/tableshare/verifycard/index.jsx @@ -303,14 +303,22 @@ width: '13%', render: (text, record) => { let _text = '' + + let _type = record.Type + if (_type && typeof(_type) === 'string') { + _type = parseInt(_type) + } else { + _type = 4 + } + if (record.TypeCharOne === 'n') { - _text = record.ModularDetailCode + Array(record.Type).join('0') + '1' + _text = record.ModularDetailCode + Array(_type).join('0') + '1' } else if (record.TypeCharOne === 'Y') { - _text = record.ModularDetailCode + moment().format('YYYYMMDD') + Array(record.Type).join('0') + '1' + _text = record.ModularDetailCode + moment().format('YYYYMMDD') + Array(_type).join('0') + '1' } else if (record.TypeCharOne === 'Lp') { - _text = Array(record.Type).join('0') + '10' + _text = Array(_type).join('0') + '10' } else if (record.TypeCharOne === 'BN') { - _text = moment().format('YYYYMMDD') + Array(record.Type).join('0') + '1' + _text = moment().format('YYYYMMDD') + Array(_type).join('0') + '1' } return _text } @@ -434,14 +442,14 @@ _fields = _LongParam.fields } - let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey'] + let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName'] let hasBid = false _fields.forEach(_f => { if (_f.field) { _usefulfields.push(_f.field) } - if (_f.field.toLowerCase() === 'bid') { + if (_f.field && _f.field.toLowerCase() === 'bid') { hasBid = true } }) @@ -480,7 +488,7 @@ } }) } else { - let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey'] + let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName'] if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired') { columns.forEach(_f => { -- Gitblit v1.8.0