diff --git a/src/components/medinceDetailModal.vue b/src/components/medinceDetailModal.vue index e9e6f92..ce36620 100644 --- a/src/components/medinceDetailModal.vue +++ b/src/components/medinceDetailModal.vue @@ -51,25 +51,35 @@ - - {{modalForm.pharmacy_code}} + + {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }} + + ({{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code }}) + - - {{modalForm.product_pharmacy_code || '-'}} + + {{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }} - - {{modalForm.product_platform_code}} + + {{ modalForm.product_pharmacy_code || '-' }} + + + {{ modalForm.product_platform_code || '-' }} + + + + - {{modalForm.created_at}} + {{ modalForm.created_at || '-' }} diff --git a/src/components/sysmedinceDetailModal.vue b/src/components/sysmedinceDetailModal.vue index 8832bf1..63911a8 100644 --- a/src/components/sysmedinceDetailModal.vue +++ b/src/components/sysmedinceDetailModal.vue @@ -13,8 +13,10 @@ - {{item.product_name+'('+item.product_platform_code+')' }} + :value="item.product_platform_id" :label="item.product_name + (item.pharmacy_name || item.pharmacy?.pharmacy_name ? ' [' + (item.pharmacy_name || item.pharmacy?.pharmacy_name) + ']' : '') + '(' + item.product_platform_code + ')'"> + {{ item.product_name }} + [{{ item.pharmacy_name || item.pharmacy?.pharmacy_name }}] + ({{ item.product_platform_code }}) @@ -293,7 +295,7 @@ const matchAndSetPharmacy = (target = {}) => { if (!pharmacyList.value.some((p) => String(p.pharmacy_id) === String(pid))) { pharmacyList.value.push({ pharmacy_id: String(pid), - pharmacy_name: modalForm.value.pharmacy_name || '所属药房', + pharmacy_name: modalForm.value.pharmacy_name || '-', pharmacy_code: modalForm.value.pharmacy_code || '', }); } diff --git a/src/views/medince/platform-medince/index.vue b/src/views/medince/platform-medince/index.vue index 9a62532..8999a48 100644 --- a/src/views/medince/platform-medince/index.vue +++ b/src/views/medince/platform-medince/index.vue @@ -5,11 +5,18 @@ - - + + + + {{ item.pharmacy_name }} + + - - + + + + + @@ -50,7 +57,7 @@ {deleteData = selection;console.log(selection)}" @@ -58,6 +65,12 @@ {{(rowIndex+1)+(pager.page-1)*pager.page_size}} + + {{ record.pharmacy_name || record.pharmacy?.pharmacy_name || '-' }} + + {{ record.pharmacy_code || record.pharmacy?.pharmacy_code }} + + import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue'; import { getMedinceList,getMedinceDetail} from '@/api/medince/list'; + import { getPharmacyList } from '@/api/basic/pharmacy'; import { downloadFile } from '@/utils/downloadFile'; + const pharmacyList = ref([]); // Akiraka 20230210 删除数据 const deleteData = ref([]) // Akiraka 20230210 删除对话框 @@ -115,7 +130,9 @@ }; // form const queryForm = reactive({ - + pharmacy_id: undefined, + pharmacy_code: '', + product_pharmacy_code: '', }); const modalForm = reactive({ user:{}, @@ -144,11 +161,12 @@ { title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' }, { title: '药品名称', dataIndex: 'product_name',width:200 }, { title: '规格', dataIndex: 'product_spec',width:200 }, + { title: '所属药房', dataIndex: 'pharmacy_name', slotName: 'pharmacy_name', width: 170, ellipsis: true }, { title: '单价(元)', dataIndex: 'product_price', slotName: 'product_price',width: 150 }, { title: '批准文号', dataIndex: 'license_number',width:200 }, { title: '生产厂家', dataIndex: 'manufacturer',width:200 }, - { title: '第三方药房药品编码', dataIndex: 'product_pharmacy_code',width:160,ellipsis: true }, - { title: '药店编码', dataIndex: 'pharmacy_code', width: 100, ellipsis: true }, + { title: '药店编码', dataIndex: 'product_pharmacy_code', width: 120, ellipsis: true }, + { title: '第三方药房编码', dataIndex: 'pharmacy_code', width: 160, ellipsis: true }, // { title: '启用状态', dataIndex: 'status', slotName: 'status' }, { title: '操作', slotName: 'action', fixed: "right", width: 180 }, ]; @@ -239,7 +257,9 @@ // 重置搜索 const handleResetQuery = () => { proxy.$refs.queryFormRef.resetFields(); + queryForm.pharmacy_id = undefined; queryForm.pharmacy_code = ''; + queryForm.product_pharmacy_code = ''; getMedinceInfo(queryForm); } const handlExport=async(type)=>{ @@ -280,8 +300,21 @@ proxy.$loading.hide(); } + // 获取药房下拉列表 + const fetchPharmacyList = async () => { + try { + const res = await getPharmacyList(); + if (res.code === 200) { + pharmacyList.value = res.data || []; + } + } catch (e) { + console.error('获取药房列表异常:', e); + } + }; + onMounted(() => { getMedinceInfo(pager); + fetchPharmacyList(); });