修改抽屉插件

This commit is contained in:
yangjun 2025-08-05 10:54:03 +08:00
parent 5e29db84a2
commit 45200e2a75
5 changed files with 42 additions and 10 deletions

View File

@ -60,6 +60,12 @@
<div>
<div style="width:300px;float: left;">
<div style="background: white; border-radius: 8px;padding: 8px;margin-right: 8px;min-height: 400px;">
<div style="text-align: right;">
<a-radio-group v-model:value="treeParam.izEnabled" @change="getTreeData">
<a-radio-button value="">全部</a-radio-button>
<a-radio-button value="0">启用</a-radio-button>
</a-radio-group>
</div>
<div style="width:100%;text-align: right;" v-if="treeData.length == 0">
<a-button type="primary" v-auth="'ConfigMaterial:config_material_category:add'" @click="handleAddbj({levle:'1'})" preIcon="ant-design:plus-outlined"> 一级分类</a-button>
</div>
@ -160,6 +166,7 @@
const formRef = ref();
const queryParam = reactive<any>({});
const treeParam = reactive<any>({izEnabled:'0'});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
@ -397,10 +404,9 @@ const getCardStyle = (index,allSize) => {
}
//
function handleAddbj(data){
// var params = {id:data.key,level:1,title:data.title}
var params = {}
registerDrawer.value.disableSubmit = false;
registerDrawer.value.edit(params);
registerDrawer.value.add(params);
}
//
function handleAddxj(data){
@ -480,7 +486,8 @@ const getCardStyle = (index,allSize) => {
}
function getTreeData(){
defHttp.get({url:'/invoicing/configMaterialCategory/getMaterialTreeData'}).then(res =>{
const params = {izEnabled:treeParam.izEnabled}
defHttp.get({url:'/invoicing/configMaterialCategory/getMaterialTreeData',params}).then(res =>{
treeData.value = res;
// console.log("🚀 ~ defHttp.get ~ treeData:", treeData)
// console.log("🚀 ~ defHttp.get ~ res:", res)

View File

@ -1,7 +1,12 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="false"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ConfigMaterialCategoryForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigMaterialCategoryForm>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -1,7 +1,16 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ConfigMaterialInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigMaterialInfoForm>
</j-modal>
-->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="false"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ConfigMaterialInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigMaterialInfoForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -1,7 +1,13 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="false"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ConfigMaterialMedicationForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigMaterialMedicationForm>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -1,7 +1,12 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="false"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ConfigMaterialTypeForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigMaterialTypeForm>
</j-modal>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>