This commit is contained in:
zoujiandong
2026-09-08 14:32:12 +08:00
parent 6623001b5b
commit 4107083102
3 changed files with 63 additions and 18 deletions
+17 -7
View File
@@ -51,25 +51,35 @@
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="avatar" label="药店编码:">
<span>{{modalForm.pharmacy_code}} </span>
<a-form-item label="所属药房:">
<span>{{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}</span>
<span v-if="modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code" style="color: #86909c; margin-left: 8px">
({{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code }})
</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第三方药房药品编码:">
<span>{{modalForm.product_pharmacy_code || '-'}}</span>
<a-form-item label="第三方药房编码:">
<span>{{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="处方平台编码:" >
<div class="cardNum">{{modalForm.product_platform_code}}</div>
<a-form-item label="药店编码:">
<span>{{ modalForm.product_pharmacy_code || '-' }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="idCard" label="处方平台编码:" >
<div class="cardNum">{{ modalForm.product_platform_code || '-' }}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="avatar" label="创建时间:">
<span>{{modalForm.created_at}} </span>
<span>{{ modalForm.created_at || '-' }}</span>
</a-form-item>
</a-col>
</a-row>
+5 -3
View File
@@ -13,8 +13,10 @@
<a-select :style="{width:'300px'}" allow-search placeholder="请选择药品名称" v-model="modalForm.product_name"
:loading="loading" @change="changeMedince" @search="handList" :disabled="modalSatus=='edit'">
<a-option size="large" style="max-width:400px" v-for="item in medinceList" :key="item.product_platform_id"
:value="item.product_platform_id" :label="item.product_name+'('+item.product_platform_code+')'">
{{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 + ')'">
<span>{{ item.product_name }}</span>
<span v-if="item.pharmacy_name || item.pharmacy?.pharmacy_name" style="color: #165dff; margin-left: 6px;">[{{ item.pharmacy_name || item.pharmacy?.pharmacy_name }}]</span>
<span style="color: #86909c; margin-left: 4px;">({{ item.product_platform_code }})</span>
</a-option>
</a-select>
@@ -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 || '',
});
}
+41 -8
View File
@@ -5,11 +5,18 @@
<a-form-item field="product_name" label="药品名称">
<a-input :style="{ width: '182px' }" v-model="queryForm.product_name" placeholder="请输入药品名称或通用名" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="pharmacy_code" label="药店编码">
<a-input :style="{ width: '182px' }" v-model="queryForm.pharmacy_code" placeholder="请输入药品编码" @press-enter="handleQuery" />
<a-form-item field="pharmacy_id" label="所属药房">
<a-select v-model="queryForm.pharmacy_id" placeholder="请选择所属药房" allow-clear allow-search :style="{ width: '182px' }">
<a-option v-for="item in pharmacyList" :key="item.pharmacy_id" :value="String(item.pharmacy_id)">
{{ item.pharmacy_name }}
</a-option>
</a-select>
</a-form-item>
<a-form-item field="product_pharmacy_code" label="第三方药房编码">
<a-input :style="{ width: '182px' }" v-model="queryForm.product_pharmacy_code" placeholder="请输入第三方药房编码" @press-enter="handleQuery" />
<a-form-item field="pharmacy_code" label="第三方药房编码">
<a-input :style="{ width: '182px' }" v-model="queryForm.pharmacy_code" placeholder="请输入第三方药房编码" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="product_pharmacy_code" label="药店编码">
<a-input :style="{ width: '182px' }" v-model="queryForm.product_pharmacy_code" placeholder="请输入药店编码" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="manufacturer" label="生产企业">
<a-input :style="{ width: '182px' }" v-model="queryForm.manufacturer" placeholder="请输入生产企业" @press-enter="handleQuery" />
@@ -50,7 +57,7 @@
<!-- table -->
<a-table :columns="columns" :data="tableData"
:scroll="{ x: 1500 }"
:scroll="{ x: 1700 }"
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
row-key="family_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
@@ -58,6 +65,12 @@
<template #doctor_id="{record,rowIndex}">
<div>{{(rowIndex+1)+(pager.page-1)*pager.page_size}}</div>
</template>
<template #pharmacy_name="{record}">
<div>{{ record.pharmacy_name || record.pharmacy?.pharmacy_name || '-' }}</div>
<div v-if="record.pharmacy_code || record.pharmacy?.pharmacy_code" style="font-size: 12px; color: #86909c;">
{{ record.pharmacy_code || record.pharmacy?.pharmacy_code }}
</div>
</template>
<template #action="{ record }">
<a-space>
<a-button v-has="'admin:platformMedinceList:detail'" type="text"
@@ -88,7 +101,9 @@
<script setup>
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();
});
</script>