| | |
| | | </el-form-item> |
| | | <el-form-item label="自增位数" prop="incbit"> |
| | | <!-- @change="handleChange"--> |
| | | <el-input-number v-model="dialogForm.incbit" :min="1" :max="100" label="描述文字" /> |
| | | <!-- <el-input-number v-model="dialogForm.incbit" :min="1" :max="100" label="描述文字" />--> |
| | | |
| | | <!-- <el-input v-model="dialogForm.incbit" style="width: 220px" />--> |
| | | <el-input |
| | | v-model="dialogForm.incbit" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 220px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="编码预览"> |
| | | {{ encodingPre }} |
| | |
| | | }, |
| | | watch: { |
| | | dialogForm: { |
| | | handler(newVlaue, oldValue) { |
| | | handler(newValue, oldValue) { |
| | | const date = new Date() |
| | | let newDate = '' |
| | | if (newVlaue.filingdate === 'YMD') { |
| | | newDate = date.getFullYear() + '' + (date.getMonth() + 1 + '').padStart(2, '0') + '' + (date.getDate() + '').padStart(2, '0') |
| | | } else if (newVlaue.filingdate === 'YM') { |
| | | newDate = date.getFullYear() + '' + (date.getMonth() + 1 + '').padStart(2, '0') |
| | | } else if (newVlaue.filingdate === 'Y') { |
| | | newDate = date.getFullYear() + '' |
| | | if (newValue.filingdate === 'YMD') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') + '' + (date.getDate() + '').padStart(2, '0') |
| | | } else if (newValue.filingdate === 'YM') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') |
| | | } else if (newValue.filingdate === 'Y') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' |
| | | } |
| | | this.encodingPre = newVlaue.prefix + '' + newDate + '' + (1 + '').padStart(newVlaue.incbit, '0') |
| | | this.encodingPre = newValue.prefix + '' + newDate + '' + (1 + '').padStart(newValue.incbit, '0') |
| | | }, |
| | | immediate: true, |
| | | deep: true |