style:编码规则添加码类型列

pull/1/head
黄伟杰 2 months ago
parent 643b3b9f99
commit 887495f8b2

@ -52,6 +52,7 @@ export interface AutocodeRuleVO {
id: number // ID id: number // ID
ruleCode: string // 规则编码 ruleCode: string // 规则编码
ruleName: string // 规则名称 ruleName: string // 规则名称
barcodeType?: number | string
ruleDesc: string // 描述 ruleDesc: string // 描述
maxLength: number // 最大长度 maxLength: number // 最大长度
isPadded: string // 是否补齐 isPadded: string // 是否补齐

@ -1886,6 +1886,7 @@ export default {
exportButtonText: 'Export', exportButtonText: 'Export',
tableRuleCodeColumn: 'Rule Code', tableRuleCodeColumn: 'Rule Code',
tableRuleNameColumn: 'Rule Name', tableRuleNameColumn: 'Rule Name',
tableBarcodeTypeColumn: 'Code Type',
tableRuleDescColumn: 'Description', tableRuleDescColumn: 'Description',
tableMaxLengthColumn: 'Max Length', tableMaxLengthColumn: 'Max Length',
tableIsPaddedColumn: 'Pad', tableIsPaddedColumn: 'Pad',

@ -2691,6 +2691,7 @@ export default {
exportButtonText: '导出', exportButtonText: '导出',
tableRuleCodeColumn: '规则编码', tableRuleCodeColumn: '规则编码',
tableRuleNameColumn: '规则名称', tableRuleNameColumn: '规则名称',
tableBarcodeTypeColumn: '码类型',
tableRuleDescColumn: '描述', tableRuleDescColumn: '描述',
tableMaxLengthColumn: '最大长度', tableMaxLengthColumn: '最大长度',
tableIsPaddedColumn: '是否补齐', tableIsPaddedColumn: '是否补齐',

@ -100,6 +100,11 @@
<!-- <el-table-column label="ID" align="center" prop="id" /> --> <!-- <el-table-column label="ID" align="center" prop="id" /> -->
<el-table-column :label="t('FactoryModeling.AutocodeRule.tableRuleCodeColumn')" align="center" prop="ruleCode" sortable/> <el-table-column :label="t('FactoryModeling.AutocodeRule.tableRuleCodeColumn')" align="center" prop="ruleCode" sortable/>
<el-table-column :label="t('FactoryModeling.AutocodeRule.tableRuleNameColumn')" align="center" prop="ruleName" sortable/> <el-table-column :label="t('FactoryModeling.AutocodeRule.tableRuleNameColumn')" align="center" prop="ruleName" sortable/>
<el-table-column :label="t('FactoryModeling.AutocodeRule.tableBarcodeTypeColumn')" align="center">
<template #default="scope">
<el-tag type="primary">{{ getBarcodeTypeLabel(scope.row.barcodeType) }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="t('FactoryModeling.AutocodeRule.tableRuleDescColumn')" align="center" prop="ruleDesc" /> <el-table-column :label="t('FactoryModeling.AutocodeRule.tableRuleDescColumn')" align="center" prop="ruleDesc" />
<el-table-column :label="t('FactoryModeling.AutocodeRule.tableMaxLengthColumn')" align="center" prop="maxLength" /> <el-table-column :label="t('FactoryModeling.AutocodeRule.tableMaxLengthColumn')" align="center" prop="maxLength" />
<el-table-column :label="t('FactoryModeling.AutocodeRule.tableIsPaddedColumn')" align="center" prop="isPadded"> <el-table-column :label="t('FactoryModeling.AutocodeRule.tableIsPaddedColumn')" align="center" prop="isPadded">
@ -196,6 +201,13 @@ const queryParams = reactive({
const queryFormRef = ref() // const queryFormRef = ref() //
const exportLoading = ref(false) // const exportLoading = ref(false) //
const getBarcodeTypeLabel = (value: any) => {
const str = value === undefined || value === null ? '' : String(value)
if (str === '1') return '条码'
if (str === '2') return '二维码'
return '-'
}
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true

Loading…
Cancel
Save