添加系统详情

This commit is contained in:
zoujiandong
2023-12-28 17:05:47 +08:00
parent fafbf5aad4
commit 4f111ddf80
4 changed files with 43 additions and 7 deletions
+3 -3
View File
@@ -6,7 +6,7 @@
<div class="bar"></div>
<div class="name">基本信息</div>
</div>
<a-form :model="modalForm" :rules="rules" ref="modalFormRef" :auto-label-width="true">
<a-form :model="modalForm" :rules="rules" ref="modalFormRef" :auto-label-width="true" :disabled="modalSatus=='detail'">
<a-row :gutter="24" style="margin-top: 35px;">
<a-col :span="12">
<a-form-item field="avatar" label="药品名称:">
@@ -214,11 +214,11 @@
</a-row>
<a-divider />
</a-form>
<div class="titlebox" >
<div class="titlebox" v-if="modalSatus!='detail'">
<div class="bar"></div>
<div class="name">操作</div>
</div>
<a-row :gutter="24" style="margin-top: 35px;" >
<a-row :gutter="24" style="margin-top: 35px;" v-if="modalSatus!='detail'">
<a-col :span="24">
<a-form-item field="" label="" no-style>
<a-space >
+12 -4
View File
@@ -77,8 +77,10 @@
</template>
<template #action="{ record }">
<a-space>
<a-button v-has="'admin:sysMedinceList:detail'" type="text"
@click="handleDetail(record,'detail')"><icon-book />详情</a-button>
<a-button v-has="'admin:sysMedinceList:edit'" type="text"
@click="handleDetail(record)"><icon-edit />修改</a-button>
@click="handleDetail(record,'edit')"><icon-edit />修改</a-button>
<!-- <a-button v-has="'admin:sysMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
修改</a-button> -->
<!-- <a-button v-has="'admin:sysMedinceList:remove'" type="text"
@@ -205,14 +207,20 @@
};
//详情
const handleDetail = async (record) => {
const handleDetail = async (record,type) => {
const { code, data, message } = await getSysMedinceDetail(record.product_id);
if (code == 200) {
Object.assign(modalForm, data);
if(type=="edit"){
modalSatus.value = 'edit';
modalTitle.value = '修改药品';
}else{
modalSatus.value = 'detail';
modalTitle.value = '药品详情';
}
modalVisible.value = true;
modalSatus.value = 'edit';
modalTitle.value = '修改药品';
}
};
// 批量删除