| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">修改</el-button> |
| | | <el-button type="text" @click="edit('edit',row)">编辑</el-button> |
| | | <!-- <el-button type="text" @click="del(row)">删除</el-button>--> |
| | | </div> |
| | | </template> |
| | |
| | | <el-select |
| | | v-model="dialogForm.filingdate" |
| | | style="width: 220px" |
| | | filterable |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | > |
| | |
| | | </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 }} |
| | |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | name: 'BMGZ', |
| | | components: { |
| | | Pagination |
| | | }, |
| | |
| | | }, |
| | | 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 |