This commit is contained in:
1378012178@qq.com 2025-07-03 09:32:27 +08:00
commit b99b7ccc8a
11 changed files with 283 additions and 81 deletions

View File

@ -4,14 +4,14 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/ConfigMaterial/configMaterialCategory/list', list = '/invoicing/configMaterialCategory/list',
selectMaterialList = '/ConfigMaterial/configMaterialCategory/selectMaterialList', selectMaterialList = '/invoicing/configMaterialCategory/selectMaterialList',
save='/ConfigMaterial/configMaterialCategory/add', save='/invoicing/configMaterialCategory/add',
edit='/ConfigMaterial/configMaterialCategory/edit', edit='/invoicing/configMaterialCategory/edit',
deleteOne = '/ConfigMaterial/configMaterialCategory/delete', deleteOne = '/invoicing/configMaterialCategory/delete',
deleteBatch = '/ConfigMaterial/configMaterialCategory/deleteBatch', deleteBatch = '/invoicing/configMaterialCategory/deleteBatch',
importExcel = '/ConfigMaterial/configMaterialCategory/importExcel', importExcel = '/invoicing/configMaterialCategory/importExcel',
exportXls = '/ConfigMaterial/configMaterialCategory/exportXls', exportXls = '/invoicing/configMaterialCategory/exportXls',
} }
/** /**
* api * api

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/configMaterialInfo/configMaterialInfo/list', list = '/invoicing/configMaterialInfo/list',
save='/configMaterialInfo/configMaterialInfo/add', save='/invoicing/configMaterialInfo/add',
edit='/configMaterialInfo/configMaterialInfo/edit', edit='/invoicing/configMaterialInfo/edit',
deleteOne = '/configMaterialInfo/configMaterialInfo/delete', deleteOne = '/invoicing/configMaterialInfo/delete',
deleteBatch = '/configMaterialInfo/configMaterialInfo/deleteBatch', deleteBatch = '/invoicing/configMaterialInfo/deleteBatch',
importExcel = '/configMaterialInfo/configMaterialInfo/importExcel', importExcel = '/invoicing/configMaterialInfo/importExcel',
exportXls = '/configMaterialInfo/configMaterialInfo/exportXls', exportXls = '/invoicing/configMaterialInfo/exportXls',
} }
/** /**

View File

@ -19,7 +19,7 @@
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="medicationId"> <a-form-item name="medicationId">
<template #label><span title="用药类型">用药类型</span></template> <template #label><span title="用药类型">用药类型</span></template>
<j-dict-select-tag type='list' placeholder="请选择用药类型" v-model:value="queryParam.medicationId" :dictCode="`nu_config_material_medication,medication_name,id,iz_enabled = 0 and del_flag = 0 and type_id = ${queryParam.typeId || -1}`" allow-clear /> <j-dict-select-tag type='list' placeholder="请选择用药类型" v-model:value="queryParam.medicationId" :dictCode="`config_material_medication,medication_name,id,iz_enabled = 0 and del_flag = 0 and type_id = ${queryParam.typeId || -1}`" allow-clear />
</a-form-item> </a-form-item>
</a-col> --> </a-col> -->
<a-col :lg="6"> <a-col :lg="6">
@ -28,12 +28,6 @@
<j-input placeholder="请输入货品名称" v-model:value="queryParam.materialName" allow-clear ></j-input> <j-input placeholder="请输入货品名称" v-model:value="queryParam.materialName" allow-clear ></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6">
<a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' placeholder="请选择是否启用" v-model:value="queryParam.izEnabled" dictCode="iz_enabled" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="materialNo"> <a-form-item name="materialNo">
<template #label><span title="货品编码">货品编码</span></template> <template #label><span title="货品编码">货品编码</span></template>
@ -42,10 +36,16 @@
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="pinyin"> <a-form-item name="pinyin">
<template #label><span title="拼音检索">拼音检索</span></template> <template #label><span title="拼音检索">拼音检索</span></template>
<j-input placeholder="请输入拼音" v-model:value="queryParam.pinyin" allow-clear ></j-input> <j-input placeholder="请输入拼音" v-model:value="queryParam.pinyin" allow-clear ></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6">
<a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' placeholder="请选择是否启用" v-model:value="queryParam.izEnabled" dictCode="iz_enabled" allow-clear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
@ -57,21 +57,50 @@
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<a-row> <div>
<a-col :span="4" style="padding: 0 10px 0 0;"> <div style="width:300px;float: left;">
<div style="height:600px;background:white; "> <div style="with: 100%;display: flex;">
<div class="all-card">
<a-tree <div v-for="(item, index) in treeData" :key="index" style="position: relative;">
show-line <div :class="clickCount === index ? 'card-target' : 'card'" :style="getCardStyle(index,treeData.length)" @click="handleClick(index,item)">
autoExpandParent <img src="/src/assets/images/logo.png" width="30" height="30" />
:tree-data="treeData" <span style="margin-top: 8px;">{{ item.title }}</span>
@select="onSelect"
>
<template #switcherIcon="{ switcherCls }"><down-outlined :class="switcherCls" /></template>
</a-tree>
</div> </div>
</a-col> <div v-show="clickCount === index && index !== 4" class="sanjiao-down"></div>
<a-col :span="20"> <div v-show="clickCount === index && index" class="sanjiao-up"></div>
</div>
</div>
<div style="background: #fff;border-radius: 0px 5px 5px 5px ;width: calc(100% - 80px);">
<a-menu
v-model:openKeys="openKeys"
v-model:selectedKeys="selectedKeys"
style="height:700px;overflow-y:auto;overflow-x: hidden;"
mode="inline"
>
<template v-for="(item2,key2) in treeChildData" >
<a-sub-menu v-if="item2.children.length>0" :key="`sub`+key2" style="margin:20px;background-image: url('../resource/img/bj.png');text-align:center;border-radius:5px;">
<template #title>
<div style="height:50px;line-height:50px;">
<span><img src="/src/assets/images/logo.png" width="30" height="30" /></span><span style="margin-left: 10px;">{{item2.title}}</span>
</div>
</template>
<a-menu-item v-for="(item3,key3) in item2.children" :key="key3" style="height:50px;text-align:left;" >
<div @click="onSelect(item3)">
<span style="font-size: 18px;">·</span> <span style="margin-left: 10px;">{{item3.title}}</span>
</div>
</a-menu-item>
</a-sub-menu>
<a-menu-item v-if="item2.children.length==0" :key="`sub`+key2" style="margin:20px;background-image: url('../resource/img/bj.png');text-align:center;border-radius:5px;width:85%;height:50px;line-height:50px;">
<div @click="onSelect(item2)">
<span><img src="/src/assets/images/logo.png" width="30" height="30"/></span><span style="margin-left: 10px;">{{item2.title}}</span>
</div>
</a-menu-item>
</template>
</a-menu>
</div>
</div>
</div>
<div style="width:calc(100% - 320px);float: left;margin-left: 20px;">
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" > <BasicTable @register="registerTable" >
<!--插槽:table标题--> <!--插槽:table标题-->
@ -87,8 +116,12 @@
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
</template> </template>
</BasicTable> </BasicTable>
</a-col> </div>
</a-row>
</div>
<!-- 表单区域 --> <!-- 表单区域 -->
<ConfigMaterialInfoModal ref="registerModal" @success="handleSuccess"></ConfigMaterialInfoModal> <ConfigMaterialInfoModal ref="registerModal" @success="handleSuccess"></ConfigMaterialInfoModal>
@ -111,6 +144,7 @@
import type { TreeProps } from 'ant-design-vue'; import type { TreeProps } from 'ant-design-vue';
import { DownOutlined } from '@ant-design/icons-vue'; import { DownOutlined } from '@ant-design/icons-vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import type { CollapseProps } from 'ant-design-vue';
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
@ -118,6 +152,40 @@ import { defHttp } from '/@/utils/http/axios';
const registerModal = ref(); const registerModal = ref();
const userStore = useUserStore(); const userStore = useUserStore();
let treeData = ref<any>([]); let treeData = ref<any>([]);
let treeChildData = ref<any>([]);
const activeKey = ref(0);
const activeKey2 = ref(0);
const rootSubmenuKeys= ['sub1']
const openKeys= []
const selectedKeys= []
const clickCount = ref(0);
/**
* 点击菜单
* @param index 菜单索引
* @param lengths 菜单数量
* @param item 菜单数据
*/
const handleClick = (index,item) => {
clickCount.value = index;
treeChildData.value = item.children;
};
const getCardStyle = (index,allSize) => {
const style = {borderBottomLeftRadius:'',borderTopLeftRadius:''};
if (clickCount.value - 1 === index) {
style.borderBottomLeftRadius = '5px';
}
if (clickCount.value + 1 === index) {
style.borderTopLeftRadius= '5px';
}
if(!index){
style.borderTopLeftRadius= '5px';
}
if(index === allSize){
style.borderBottomLeftRadius= '5px';
}
return style;
};
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
@ -157,9 +225,20 @@ import { defHttp } from '/@/utils/http/axios';
sm: 20, sm: 20,
}); });
function onSelect(ids, e) { function onOpenChange (openKeys: string[]){
let id = ids[0]; const latestOpenKey = openKeys.find(key => openKeys.indexOf(key) === -1);
queryParam.treeId =id; if (rootSubmenuKeys.indexOf(latestOpenKey!) === -1) {
openKeys = openKeys;
} else {
openKeys = latestOpenKey ? [latestOpenKey] : [];
}
};
function onSelect({ key, domEvent }) {
// console.log(ids);
// console.log(e);
// let id = ids[0];
queryParam.treeId =key;
reload(); reload();
} }
/** /**
@ -264,8 +343,14 @@ import { defHttp } from '/@/utils/http/axios';
// //
onMounted(() => { onMounted(() => {
defHttp.get({url:'/ConfigMaterial/configMaterialCategory/getMaterialTreeData'}).then(res =>{ defHttp.get({url:'/invoicing/configMaterialCategory/getMaterialTreeData'}).then(res =>{
treeData.value = res; treeData.value = res;
console.log("🚀 ~ defHttp.get ~ treeData:", treeData)
console.log("🚀 ~ defHttp.get ~ res:", res)
if(treeData.value.length > 0){
treeChildData.value = treeData.value[0].children;
}
}) })
}); });
@ -296,4 +381,67 @@ import { defHttp } from '/@/utils/http/axios';
width: 100%; width: 100%;
} }
} }
.all-card {
width: 80px;
height: 730px;
// background-color: rgb(217, 230, 239);
// display: flex;
/* justify-content: flex-end; */
align-items: flex-end;
flex-direction: column;
// padding-top: 10px;
}
.card {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 120px;
flex-direction: column;
background-color: rgb(243, 248, 251);
/* border-radius: 25px; */
}
.card-target {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 120px;
flex-direction: column;
background-color: #fff;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
/* position: relative; */
/* border-radius: 10px; */
}
.sanjiao-down {
position: absolute;
bottom: -26px;
left: 17px;
width: 64px;
/* 上边长度 */
height: 27px;
/* 右边长度 */
background-color: #fff;
/* 三角形填充色 */
/* 三点依次为:右上 (100% 0),右下 (100% 100%),左上 (0 0) */
clip-path: polygon(100% 0, 100% 100%, 0 0);
z-index: 999;
}
.sanjiao-up {
position: absolute;
top: -26px;
left: 17px;
width: 64px;
height: 27px;
background-color: #fff;
/* 三点依次为:右下 (100% 100%),左下 (0 100%),右上 (100% 0) */
clip-path: polygon(100% 100%, 0 100%, 100% 0);
z-index: 999;
}
</style> </style>

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/ConfigMaterial/configMaterialMedication/list', list = '/invoicing/configMaterialMedication/list',
save='/ConfigMaterial/configMaterialMedication/add', save='/invoicing/configMaterialMedication/add',
edit='/ConfigMaterial/configMaterialMedication/edit', edit='/invoicing/configMaterialMedication/edit',
deleteOne = '/ConfigMaterial/configMaterialMedication/delete', deleteOne = '/invoicing/configMaterialMedication/delete',
deleteBatch = '/ConfigMaterial/configMaterialMedication/deleteBatch', deleteBatch = '/invoicing/configMaterialMedication/deleteBatch',
importExcel = '/ConfigMaterial/configMaterialMedication/importExcel', importExcel = '/invoicing/configMaterialMedication/importExcel',
exportXls = '/ConfigMaterial/configMaterialMedication/exportXls', exportXls = '/invoicing/configMaterialMedication/exportXls',
} }
/** /**

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/ConfigMaterial/configMaterialType/list', list = '/invoicing/configMaterialType/list',
save='/ConfigMaterial/configMaterialType/add', save='/invoicing/configMaterialType/add',
edit='/ConfigMaterial/configMaterialType/edit', edit='/invoicing/configMaterialType/edit',
deleteOne = '/ConfigMaterial/configMaterialType/delete', deleteOne = '/invoicing/configMaterialType/delete',
deleteBatch = '/ConfigMaterial/configMaterialType/deleteBatch', deleteBatch = '/invoicing/configMaterialType/deleteBatch',
importExcel = '/ConfigMaterial/configMaterialType/importExcel', importExcel = '/invoicing/configMaterialType/importExcel',
exportXls = '/ConfigMaterial/configMaterialType/exportXls', exportXls = '/invoicing/configMaterialType/exportXls',
} }
/** /**

View File

@ -40,7 +40,7 @@
}); });
let formData = {}; let formData = {};
const queryByIdUrl = '/ConfigMaterial/configMaterialCategory/queryById'; const queryByIdUrl = '/invoicing/configMaterialCategory/queryById';
async function initFormData(){ async function initFormData(){
let params = {id: props.formData.dataId}; let params = {id: props.formData.dataId};
const data = await defHttp.get({url: queryByIdUrl, params}); const data = await defHttp.get({url: queryByIdUrl, params});

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/configSuppliersInfo/configSuppliersInfo/list', list = '/invoicing/configSuppliersInfo/list',
save='/configSuppliersInfo/configSuppliersInfo/add', save='/invoicing/configSuppliersInfo/add',
edit='/configSuppliersInfo/configSuppliersInfo/edit', edit='/invoicing/configSuppliersInfo/edit',
deleteOne = '/configSuppliersInfo/configSuppliersInfo/delete', deleteOne = '/invoicing/configSuppliersInfo/delete',
deleteBatch = '/configSuppliersInfo/configSuppliersInfo/deleteBatch', deleteBatch = '/invoicing/configSuppliersInfo/deleteBatch',
importExcel = '/configSuppliersInfo/configSuppliersInfo/importExcel', importExcel = '/invoicing/configSuppliersInfo/importExcel',
exportXls = '/configSuppliersInfo/configSuppliersInfo/exportXls', exportXls = '/invoicing/configSuppliersInfo/exportXls',
} }
/** /**
* api * api

View File

@ -40,7 +40,7 @@
}); });
let formData = {}; let formData = {};
const queryByIdUrl = '/configSuppliersInfo/configSuppliersInfo/queryById'; const queryByIdUrl = '/invoicing/configSuppliersInfo/queryById';
async function initFormData(){ async function initFormData(){
let params = {id: props.formData.dataId}; let params = {id: props.formData.dataId};
const data = await defHttp.get({url: queryByIdUrl, params}); const data = await defHttp.get({url: queryByIdUrl, params});

View File

@ -515,4 +515,22 @@ html[data-theme='dark'] {
background: transparent; background: transparent;
} }
} }
/* Chrome/Edge/Safari */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
/* 重新设置背景色、文字色、边框等 */
background-color: #f5f5f5 !important;
color: #333333 !important;
/* 取消浏览器自己的内阴影 */
box-shadow: 0 0 0px 1000px #f5f5f5 inset !important;
/* 如果需要边框高亮,也可以一起重置 */
// border: 1px solid #ccc !important;
}
/* Firefox */
input:-moz-autofill {
background-color: #f5f5f5 !important;
color: #333333 !important;
}
</style> </style>

View File

@ -515,4 +515,22 @@ html[data-theme='dark'] {
background: transparent; background: transparent;
} }
} }
/* Chrome/Edge/Safari */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
/* 重新设置背景色、文字色、边框等 */
background-color: #f5f5f5 !important;
color: #333333 !important;
/* 取消浏览器自己的内阴影 */
box-shadow: 0 0 0px 1000px #f5f5f5 inset !important;
/* 如果需要边框高亮,也可以一起重置 */
// border: 1px solid #ccc !important;
}
/* Firefox */
input:-moz-autofill {
background-color: #f5f5f5 !important;
color: #333333 !important;
}
</style> </style>

View File

@ -515,4 +515,22 @@ html[data-theme='dark'] {
background: transparent; background: transparent;
} }
} }
/* Chrome/Edge/Safari */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
/* 重新设置背景色、文字色、边框等 */
background-color: #f5f5f5 !important;
color: #333333 !important;
/* 取消浏览器自己的内阴影 */
box-shadow: 0 0 0px 1000px #f5f5f5 inset !important;
/* 如果需要边框高亮,也可以一起重置 */
// border: 1px solid #ccc !important;
}
/* Firefox */
input:-moz-autofill {
background-color: #f5f5f5 !important;
color: #333333 !important;
}
</style> </style>