diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue
index fbed747..b910bfb 100644
--- a/src/components/DictTag/index.vue
+++ b/src/components/DictTag/index.vue
@@ -46,7 +46,7 @@ const props = defineProps({
}
})
const dataList = computed(() => {
- if (props.config) {
+ if (props.config && typeof props.config === 'object' && props.config.label && props.config.value && props.options) {
let config = props.config
var newList = []
@@ -58,7 +58,7 @@ const dataList = computed(() => {
}
return newList
}
- return props.options
+ return props.options || []
})
const values = computed(() => {
if (props.value !== null && typeof props.value !== 'undefined') {
diff --git a/src/views/materialManagement/productionMaterial/MmMaterial.vue b/src/views/materialManagement/productionMaterial/MmMaterial.vue
index 0c5671f..ab8d400 100644
--- a/src/views/materialManagement/productionMaterial/MmMaterial.vue
+++ b/src/views/materialManagement/productionMaterial/MmMaterial.vue
@@ -164,8 +164,9 @@
- 停用
- 启用
+
+ {{ item.dictLabel }}
+
@@ -294,7 +295,7 @@ const state = reactive({
single: true,
multiple: true,
form: {
- status: 2
+ status: '1'
},
rules: {
materialCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
@@ -326,11 +327,11 @@ const state = reactive({
],
statusOptions: [
{
- dictValue: '0',
+ dictValue: '停用',
dictLabel: '停用'
},
{
- dictValue: '1',
+ dictValue: '启用',
dictLabel: '启用'
}
]
@@ -359,7 +360,7 @@ function reset() {
supplierCode: null,
supplierName: null,
safetyStock: null,
- status: null,
+ status: '1',
createdTime: null,
updatedTime: null,
description: null
diff --git a/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue b/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue
index d164fd8..1abb6fa 100644
--- a/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue
+++ b/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue
@@ -110,7 +110,7 @@
-
+
{{ item.dictLabel }}
@@ -232,7 +232,7 @@ const state = reactive({
single: true,
multiple: true,
form: {
- status: '1'
+ status: 1
},
rules: {
categoryCode: [{ required: true, message: '分类编码不能为空', trigger: 'blur' }],
@@ -242,11 +242,11 @@ const state = reactive({
// 状态(0/1) 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
statusOptions: [
{
- dictValue: '0',
+ dictValue: 0,
dictLabel: '停用'
},
{
- dictValue: '1',
+ dictValue: 1,
dictLabel: '启用'
}
]
@@ -270,7 +270,7 @@ function reset() {
parentCode: null,
levelNo: null,
description: null,
- status: '1', // 设置默认值为'1'(启用)
+ status: 1, // 设置默认值为'1'(启用)
createdTime: null,
updatedTime: null
}