| | |
| | | prop="filingdate" |
| | | label="编码格式" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ dateType.find(i => i.code === row.filingdate).name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | /> |
| | | <el-table-column |
| | | prop="incbit" |
| | | label="自增位数" |
| | |
| | | }, |
| | | encodingPre: '', // 编码预览 |
| | | dateType: [ |
| | | { name: '年月日', code: 'YMD' }, |
| | | { name: '年月', code: 'YM' }, |
| | | { name: '年', code: 'Y' } |
| | | { name: '年月日', code: '年月日' }, |
| | | { name: '年月', code: '年月' }, |
| | | { name: '年', code: '年' } |
| | | ], |
| | | menuOptionsAll: [], |
| | | menuOptions: [], |
| | |
| | | handler(newValue, oldValue) { |
| | | const date = new Date() |
| | | let newDate = '' |
| | | if (newValue.filingdate === 'YMD') { |
| | | if (newValue.filingdate === '年月日') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') + '' + (date.getDate() + '').padStart(2, '0') |
| | | } else if (newValue.filingdate === 'YM') { |
| | | } else if (newValue.filingdate === '年月') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') |
| | | } else if (newValue.filingdate === 'Y') { |
| | | } else if (newValue.filingdate === '年') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' |
| | | } |
| | | this.encodingPre = newValue.prefix + '' + newDate + '' + (1 + '').padStart(newValue.incbit, '0') |