| | |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | /> |
| | | style="height:5px" |
| | | > |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseout'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"--> |
| | | <!-- @mouseenter="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseenter'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown':'doubleUp'"--> |
| | | <!-- @click="isExpandForm=!isExpandForm"--> |
| | | <!-- @mouseout="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | |
| | | 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="自增位数" |
| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | }, |
| | | 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') |
| | |
| | | this.getHeight() |
| | | |
| | | this.getCodeMenuSelect() |
| | | console.log(this.$buttoncode) |
| | | }, |
| | | methods: { |
| | | async getCodeMenuSelect() { |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const rightcode = this.$refs.cascader.checkedValue[this.$refs.cascader.checkedValue.length - 1] |
| | | this.dialogForm.rightcode = rightcode |
| | | this.dialogForm.rightname = this.menuOptions[this.menuOptions.findIndex(i => i.menucode === this.$refs.cascader.checkedValue[0])].children.find(i => i.menucode === rightcode).menuname |
| | | |
| | | SaveEncodingRules(this.dialogForm).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.getEncodingRules() |
| | | } else { |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.$notify.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |
| | | }) |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.tableHeight = this.mainHeight - 240 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |