diff --git a/src/views/EquipmentEntryApply/equipmentInput/add.vue b/src/views/EquipmentEntryApply/equipmentInput/add.vue
index 62ff26f0..ae63151e 100644
--- a/src/views/EquipmentEntryApply/equipmentInput/add.vue
+++ b/src/views/EquipmentEntryApply/equipmentInput/add.vue
@@ -391,6 +391,9 @@ export default {
count: [{ required: true, message: '请输入装备数量', trigger: 'blur' }],
unit: [{ required: true, message: '请输入计数单位', trigger: 'blur' }],
purchaseDate: [{ required: true, message: '请选择采购日期', trigger: 'change' }],
+ certificateList: [{ required: true, message: '请上传合格证', trigger: 'change' }],
+ inspectionList: [{ required: true, message: '请上传检测证书', trigger: 'change' }],
+ mainFileList: [{ required: true, message: '请上传图片', trigger: 'change' }]
},
propertyVoList: [], // 特征属性集合
}
diff --git a/src/views/EquipmentRetireApply/detail.vue b/src/views/EquipmentRetireApply/detail.vue
index 4fe8bda8..412d1d05 100644
--- a/src/views/EquipmentRetireApply/detail.vue
+++ b/src/views/EquipmentRetireApply/detail.vue
@@ -64,14 +64,15 @@
-
+ >
+
+
+
@@ -148,11 +149,12 @@ export default {
computed: {
// 判断是否可以编辑(新增状态或待审批状态下可以编辑)
canEdit() {
- if (this.isNew) {
- return true
- }
- const status = this.getStatusLabel()
- return status === '待审批'
+ // 如果是新增页面,允许编辑
+ if (this.isNew) return true;
+ // 从路由参数中获取 mode
+ const mode = this.$route.query.mode;
+ // 如果 mode 是 'edit',允许编辑;如果是 'view' 或其他值,不允许编辑
+ return mode === 'edit';
}
},
methods: {
diff --git a/src/views/EquipmentRetireApply/index.vue b/src/views/EquipmentRetireApply/index.vue
index c0699381..00ab629b 100644
--- a/src/views/EquipmentRetireApply/index.vue
+++ b/src/views/EquipmentRetireApply/index.vue
@@ -142,12 +142,15 @@ export default {
this.$router.push('/equipment/retire-apply/detail/new')
},
- // 查看/编辑
+ // 查看
onHandleView(row) {
this.$router.push({
name: 'RetireApplyDetail',
params: { id: row.id },
- query: { taskInfo: JSON.stringify(row) }
+ query: {
+ taskInfo: JSON.stringify(row),
+ mode: 'view' // 增加 mode 参数,标识为查看模式
+ }
})
},
@@ -156,10 +159,15 @@ export default {
this.$router.push({
name: 'RetireApplyDetail',
params: { id: row.id },
- query: { taskInfo: JSON.stringify(row) }
+ query: {
+ taskInfo: JSON.stringify(row),
+ mode: 'edit' // 增加 mode 参数,标识为编辑模式
+ }
})
},
+
+
// 删除
async onHandleDelete(row) {
this.$confirm('确定删除该退役申请吗?', '提示', {
diff --git a/src/views/address-manage/index.vue b/src/views/address-manage/index.vue
index a4b9f3f5..f3b0097f 100644
--- a/src/views/address-manage/index.vue
+++ b/src/views/address-manage/index.vue
@@ -41,7 +41,8 @@
@@ -51,7 +52,7 @@
-
+
diff --git a/src/views/toolsManage/codeToolsLedger/index.vue b/src/views/toolsManage/codeToolsLedger/index.vue
index 146b9985..d5242d51 100644
--- a/src/views/toolsManage/codeToolsLedger/index.vue
+++ b/src/views/toolsManage/codeToolsLedger/index.vue
@@ -325,6 +325,37 @@ export default {
{ label: '规格型号', prop: 'typeName' },
{ label: '计量单位', prop: 'unitName' },
{ label: '工具编码', prop: 'toolCode' },
+ {
+ label: "工具状态",
+ prop: "status",
+ width: 120,
+ render: (h, { row }) => {
+ // 定义状态与 el-tag 属性的映射关系
+ // 这样做比 switch/case 更清晰,也更容易维护
+ const statusOptions = {
+ 0: { text: "在库", type: "success" },
+ 1: { text: "在用", type: "info" },
+ 2: { text: "在修", type: "warning" },
+ 3: { text: "已报废", type: "danger" },
+ };
+ // 获取当前状态对应的配置,如果没有则用默认值
+ const option = statusOptions[row.status] || {
+ text: "未知状态",
+ type: "",
+ };
+ return h(
+ "el-tag", // 1. 要创建的组件是 el-tag
+ {
+ props: {
+ type: option.type,
+ size: "mini",
+ },
+ },
+ option.text
+ );
+ },
+ },
+
{ label: '下次检验时间', prop: 'nextCheckDate' },
{ label: '生产厂家', prop: 'supplierName', width: 200 },
{ label: '出厂日期', prop: 'productionDate' },