diff --git a/src/api/basic/pharmacy.js b/src/api/basic/pharmacy.js
new file mode 100644
index 0000000..df2283a
--- /dev/null
+++ b/src/api/basic/pharmacy.js
@@ -0,0 +1,160 @@
+import request from '@/utils/request';
+
+/**
+ * 获取药房分页列表
+ * @param {Object} data - 查询参数及分页参数
+ * @returns {Promise}
+ */
+export function getPharmacyPage(data) {
+ return request({
+ url: '/admin/basic/pharmacy/page',
+ method: 'post',
+ data,
+ });
+}
+
+/**
+ * 获取药房列表(下拉选择框)
+ * @param {Object} params - 过滤条件
+ * @returns {Promise}
+ */
+export function getPharmacyList(params) {
+ return request({
+ url: '/admin/basic/pharmacy/list',
+ method: 'get',
+ params,
+ });
+}
+
+/**
+ * 获取药房详情
+ * @param {String} pharmacy_id - 药房 ID
+ * @returns {Promise}
+ */
+export function getPharmacyDetail(pharmacy_id) {
+ return request({
+ url: `/admin/basic/pharmacy/${pharmacy_id}`,
+ method: 'get',
+ });
+}
+
+/**
+ * 新增药房
+ * @param {Object} data - 药房实体参数
+ * @returns {Promise}
+ */
+export function addPharmacy(data) {
+ return request({
+ url: '/admin/basic/pharmacy',
+ method: 'post',
+ data,
+ });
+}
+
+/**
+ * 修改药房
+ * @param {String} pharmacy_id - 药房 ID
+ * @param {Object} data - 药房实体参数
+ * @returns {Promise}
+ */
+export function updatePharmacy(pharmacy_id, data) {
+ return request({
+ url: `/admin/basic/pharmacy/${pharmacy_id}`,
+ method: 'put',
+ data,
+ });
+}
+
+/**
+ * 切换药房状态(快捷开关)
+ * @param {String} pharmacy_id - 药房 ID
+ * @param {Number} status - 0: 禁用, 1: 正常
+ * @returns {Promise}
+ */
+export function updatePharmacyStatus(pharmacy_id, status) {
+ return request({
+ url: `/admin/basic/pharmacy/status/${pharmacy_id}`,
+ method: 'put',
+ data: { status },
+ });
+}
+
+/**
+ * 删除药房(软删除)
+ * @param {String} pharmacy_id - 药房 ID
+ * @returns {Promise}
+ */
+export function deletePharmacy(pharmacy_id) {
+ return request({
+ url: `/admin/basic/pharmacy/${pharmacy_id}`,
+ method: 'delete',
+ });
+}
+
+/**
+ * 获取药房绑定的医生列表-分页
+ * @param {Object} data - { pharmacy_id: string, page?: number, page_size?: number, doctor_name?: string, mobile?: string }
+ * @returns {Promise}
+ */
+export function getPharmacyDoctorPage(data) {
+ return request({
+ url: '/admin/basic/pharmacy/doctor/page',
+ method: 'post',
+ data,
+ });
+}
+
+/**
+ * 获取药房绑定的医生列表(全部/不分页)
+ * @param {String} pharmacy_id - 药房 ID
+ * @returns {Promise}
+ */
+export function getPharmacyDoctorList(pharmacy_id) {
+ return request({
+ url: `/admin/basic/pharmacy/doctor/${pharmacy_id}`,
+ method: 'get',
+ });
+}
+
+/**
+ * 导出药房关联医生列表
+ * @param {Object} data - 请求参数
+ * @param {1|2|3} data.type - 1:当前筛选导出, 2:选中的数据导出, 3:全部导出
+ * @param {string} [data.pharmacy_id] - 药房 ID
+ * @param {string} [data.doctor_name] - 医生姓名
+ * @param {string} [data.mobile] - 医生手机号
+ * @param {string} [data.id] - 选中的数据 ID,多条用英文逗号分隔
+ * @returns {Promise}
+ */
+export function exportPharmacyDoctor(data) {
+ return request({
+ url: '/admin/export/pharmacy/doctor',
+ method: 'post',
+ data,
+ });
+}
+
+/**
+ * 获取药房下线受影响医生列表(预检接口)
+ * @param {String|Number} pharmacy_id - 药房 ID
+ * @returns {Promise}
+ */
+export function getAffectedDoctors(pharmacy_id) {
+ return request({
+ url: `/admin/pharmacy/affected-doctors/${pharmacy_id}`,
+ method: 'get',
+ });
+}
+
+/**
+ * 批量迁移默认药房并执行下线操作
+ * @param {Object} data - { source_pharmacy_id, action: 'disable'|'delete', unbind_source: 1|0, transfers: Array<{ doctor_id, target_pharmacy_id }> }
+ * @returns {Promise}
+ */
+export function batchTransferAndAction(data) {
+ return request({
+ url: '/admin/pharmacy/batch-transfer-and-action',
+ method: 'post',
+ data,
+ });
+}
diff --git a/src/api/doctor/pharmacy.js b/src/api/doctor/pharmacy.js
new file mode 100644
index 0000000..7e14d14
--- /dev/null
+++ b/src/api/doctor/pharmacy.js
@@ -0,0 +1,90 @@
+import request from '@/utils/request';
+
+/**
+ * 1. 获取医生绑定的药房列表
+ * @param {String} doctor_id - 医生 ID
+ * @returns {Promise}
+ */
+export function getDoctorPharmacyList(doctor_id) {
+ return request({
+ url: `/admin/doctor/pharmacy/${doctor_id}`,
+ method: 'get',
+ });
+}
+
+/**
+ * 2. 批量设置医生绑定的药房列表(全量覆盖)
+ * @param {String} doctor_id - 医生 ID
+ * @param {Object} data - { pharmacy_ids: string[], default_pharmacy_id?: string }
+ * @returns {Promise}
+ */
+export function setDoctorPharmacies(doctor_id, data) {
+ return request({
+ url: `/admin/doctor/pharmacy/${doctor_id}`,
+ method: 'put',
+ data,
+ });
+}
+
+/**
+ * 3. 为医生新增单个药房绑定
+ * @param {Object} data - { doctor_id: string, pharmacy_id: string, is_default?: number }
+ * @returns {Promise}
+ */
+export function addDoctorPharmacy(data) {
+ return request({
+ url: '/admin/doctor/pharmacy',
+ method: 'post',
+ data,
+ });
+}
+
+/**
+ * 4. 解除单个药房绑定 (DELETE 方式,传入绑定记录 ID)
+ * @param {String} doctor_pharmacy_id - 绑定记录 ID
+ * @returns {Promise}
+ */
+export function removeDoctorPharmacy(doctor_pharmacy_id) {
+ return request({
+ url: `/admin/doctor/pharmacy/${doctor_pharmacy_id}`,
+ method: 'delete',
+ });
+}
+
+/**
+ * 4.1 快捷解除绑定 (POST 方式,Body 传参)
+ * @param {Object} data - { doctor_pharmacy_id?: string, doctor_id?: string, pharmacy_id?: string }
+ * @returns {Promise}
+ */
+export function unbindDoctorPharmacy(data) {
+ return request({
+ url: '/admin/doctor/pharmacy/unbind',
+ method: 'post',
+ data,
+ });
+}
+
+/**
+ * 5. 设为医生的默认药房 (PUT 方式,传入绑定记录 ID)
+ * @param {String} doctor_pharmacy_id - 绑定记录 ID
+ * @returns {Promise}
+ */
+export function setDefaultDoctorPharmacy(doctor_pharmacy_id) {
+ return request({
+ url: `/admin/doctor/pharmacy/default/${doctor_pharmacy_id}`,
+ method: 'put',
+ });
+}
+
+/**
+ * 5.1 快捷设为默认药房 (PUT 方式,Body 传参)
+ * @param {Object} data - { doctor_pharmacy_id?: string, doctor_id?: string, pharmacy_id?: string }
+ * @returns {Promise}
+ */
+export function setDefaultDoctorPharmacyByBody(data) {
+ return request({
+ url: '/admin/doctor/pharmacy/default',
+ method: 'put',
+ data,
+ });
+}
diff --git a/src/components/doctorModal.vue b/src/components/doctorModal.vue
index dea9b33..6ddc549 100644
--- a/src/components/doctorModal.vue
+++ b/src/components/doctorModal.vue
@@ -151,11 +151,37 @@
-
-
+
+
+
+
+
+
+
+
+
+ {{ item.pharmacy_name }}
+ (默认)
+
+
+
暂未绑定任何药房
+
+
+
+
+
+
@@ -495,6 +521,7 @@ const modalForm = reactive({
cur_doctor_expertise: [],
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/doctor_avatar.png',
bank_card_code: '',
+ doctor_pharmacy_list: [],
});
const hospital_name = ref('');
watch(() => modalForm.hospital, () => {
@@ -807,6 +834,11 @@ const modalForm = reactive({
}
modalForm.cur_doctor_expertise = arr;
}
+ if (data.doctor_pharmacy && Array.isArray(data.doctor_pharmacy)) {
+ modalForm.doctor_pharmacy_list = data.doctor_pharmacy;
+ } else {
+ modalForm.doctor_pharmacy_list = [];
+ }
}
};
const departmentData = ref([]);
diff --git a/src/components/medinceDetailModal.vue b/src/components/medinceDetailModal.vue
index d40ed62..95e1096 100644
--- a/src/components/medinceDetailModal.vue
+++ b/src/components/medinceDetailModal.vue
@@ -51,24 +51,35 @@
-
- {{modalForm.product_pharmacy_code
-}}
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+ ({{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code }})
+
+
+ {{ modalForm.product_pharmacy_code || modalForm.pharmacy?.product_pharmacy_code || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy_code || '-' }}
+
+
+
- {{modalForm.product_platform_code
-}}
+ {{ modalForm.product_platform_code || '-' }}
-
- {{modalForm.created_at
-}}
+ {{ modalForm.created_at || '-' }}
diff --git a/src/components/medinceModal.vue b/src/components/medinceModal.vue
index 96cf513..c0c1371 100644
--- a/src/components/medinceModal.vue
+++ b/src/components/medinceModal.vue
@@ -80,6 +80,37 @@
+
+
+
+
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+
+
+
+
+ {{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy?.telephone || '-' }}
+
+
+
+
+ {{ modalForm.pharmacy?.full_address || modalForm.pharmacy?.address || '-' }}
+
+
+
+
退款信息
diff --git a/src/components/medinceOrderModal.vue b/src/components/medinceOrderModal.vue
index 05e9b5f..469aa5f 100644
--- a/src/components/medinceOrderModal.vue
+++ b/src/components/medinceOrderModal.vue
@@ -91,6 +91,37 @@
+
+
+
+
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+
+
+
+
+ {{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy?.telephone || '-' }}
+
+
+
+
+ {{ modalForm.pharmacy?.full_address || modalForm.pharmacy?.address || '-' }}
+
+
+
+
退款信息
diff --git a/src/components/prescriptionModal.vue b/src/components/prescriptionModal.vue
index 65903ed..51b98a9 100644
--- a/src/components/prescriptionModal.vue
+++ b/src/components/prescriptionModal.vue
@@ -67,14 +67,45 @@
-
-
-
- {{ modalForm.doctor_advice }}
-
-
-
-
+
+
+
+ {{ modalForm.doctor_advice }}
+
+
+
+
+
+
+
+
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+
+
+
+
+ {{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy?.telephone || '-' }}
+
+
+
+
+ {{ modalForm.pharmacy?.full_address || modalForm.pharmacy?.address || '-' }}
+
+
+
+
医生信息
diff --git a/src/components/prescriptionModalTransfer.vue b/src/components/prescriptionModalTransfer.vue
index 22bf809..01e523f 100644
--- a/src/components/prescriptionModalTransfer.vue
+++ b/src/components/prescriptionModalTransfer.vue
@@ -67,14 +67,45 @@
-
-
-
- {{ modalForm.doctor_advice }}
-
-
-
-
+
+
+
+ {{ modalForm.doctor_advice }}
+
+
+
+
+
+
+
+
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+
+
+
+
+ {{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy?.telephone || '-' }}
+
+
+
+
+ {{ modalForm.pharmacy?.full_address || modalForm.pharmacy?.address || '-' }}
+
+
+
+
医生信息
diff --git a/src/components/sysmedinceDetailModal.vue b/src/components/sysmedinceDetailModal.vue
index ce77417..63911a8 100644
--- a/src/components/sysmedinceDetailModal.vue
+++ b/src/components/sysmedinceDetailModal.vue
@@ -13,20 +13,55 @@
- {{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 }})
+
+
+
+
+ {{ item.pharmacy_name }} ({{ item.pharmacy_code }})
+
+
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+ ({{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code }})
+
+
+
+
+
+
{{modalForm.product_spec}}
选择药品后展示
-
+
+
+ {{modalForm.manufacturer}}
+ 选择药品后展示
+
+
@@ -44,33 +79,6 @@
-
-
-
-
-
-
- {{modalForm.manufacturer}}
- 选择药品后展示
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (pager.page - 1) * pager.page_size + rowIndex + 1 }}
+
+
+
+
+
+
+
+
+
+
+
{{ record.user_name || '-' }}
+
{{ record.doctor_title_name || '医生' }}
+
+
+
+
+
+
+ {{ record.hospital_name || '-' }}
+ {{ record.department_custom_name || '-' }}
+
+
+
+
+
+
+ 首选默认
+
+ 普通关联
+
+
+
+
+
+
+
+ 档案
+
+
+
+
+ 解绑
+
+
+
+
+
+
+
+
{ doctorModalVisible = false; selectedDoctorId = ''; }"
+ />
+
+
+
+
+
+
diff --git a/src/views/basic/pharmacy/components/pharmacyModal.vue b/src/views/basic/pharmacy/components/pharmacyModal.vue
new file mode 100644
index 0000000..a884581
--- /dev/null
+++ b/src/views/basic/pharmacy/components/pharmacyModal.vue
@@ -0,0 +1,416 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 支持
+ 不支持
+
+
+
+
+
+
+ 正常
+ 禁用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.area_name }}
+
+
+
+
+
+ {{ item.area_name }}
+
+
+
+
+
+ {{ item.area_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/basic/pharmacy/components/pharmacyTransferDrawer.vue b/src/views/basic/pharmacy/components/pharmacyTransferDrawer.vue
new file mode 100644
index 0000000..e685aeb
--- /dev/null
+++ b/src/views/basic/pharmacy/components/pharmacyTransferDrawer.vue
@@ -0,0 +1,407 @@
+
+
+
+
+
+ 当前【{{ sourcePharmacy?.pharmacy_name }}】共有
+ {{ affectedDoctorCount }}
+ 位医生的首选默认药房受到影响。
+ 为保障处方业务正常运转,请为他们指定新的默认药房;确认后系统将自动完成迁移并执行{{ actionText }}。
+
+
+
+
+
+
+
+
+
+
+
{{ record.user_name || '-' }}
+
{{ record.doctor_title_name || '医生' }}
+
{{ record.mobile || '-' }}
+
+
+
+
+
+ {{ record.hospital_name || '-' }}
+ {{ record.department_custom_name || '-' }}
+
+
+
+
+
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
+ 无其他绑定药房
+
+
+
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/basic/pharmacy/index.vue b/src/views/basic/pharmacy/index.vue
new file mode 100644
index 0000000..c835988
--- /dev/null
+++ b/src/views/basic/pharmacy/index.vue
@@ -0,0 +1,620 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 正常
+ 禁用
+
+
+
+
+
+ 支持
+ 不支持
+
+
+
+
+
+
+ {{ item.area_name }}
+
+
+
+
+
+
+
+ {{ item.area_name }}
+
+
+
+
+
+
+
+ {{ item.area_name }}
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (pager.page - 1) * pager.page_size + rowIndex + 1 }}
+
+
+
+
+ ¥{{ Number(record.postage || 0).toFixed(2) }}
+
+
+
+
+
+ ¥{{ Number(record.free_shipping_threshold).toFixed(2) }}
+
+ 不设门槛
+
+
+
+
+ 支持
+ 不支持
+
+
+
+
+
+
+ {{ record.full_address || record.address || '-' }}
+
+
+
+
+
+
+ handleStatusToggle(record, val)"
+ >
+ 正常
+ 禁用
+
+
+ {{ record.status === 1 ? '正常' : '禁用' }}
+
+
+
+
+
+
+
+
+ 详情
+
+
+
+ 修改
+
+
+
+ 关联医生列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/doctor/doctor-list/components/doctorPharmacyDrawer.vue b/src/views/doctor/doctor-list/components/doctorPharmacyDrawer.vue
new file mode 100644
index 0000000..6377525
--- /dev/null
+++ b/src/views/doctor/doctor-list/components/doctorPharmacyDrawer.vue
@@ -0,0 +1,456 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已绑定的药房列表
+ (提示:每个医生仅支持设置 1 家默认发药药房)
+
+
+
+ 新增药房绑定
+
+
+
+
+
+
+
+ {{ rowIndex + 1 }}
+
+
+
+
+ {{ record.pharmacy_name }}
+ {{ record.pharmacy_code }}
+
+
+
+
+
+ ¥{{ Number(record.postage || 0).toFixed(2) }}
+
+
+
+
+
+
+ ¥{{ Number(record.free_shipping_threshold).toFixed(2) }}
+
+ 不设门槛
+
+
+
+
+
+ 支持
+ 不支持
+
+
+
+
+
+
+
+ {{ record.full_address || record.address || '-' }}
+
+
+
+
+
+
+
+
+
+ 默认药房
+
+
+ 设为默认
+
+ 普通药房
+
+
+
+
+
+
+
+
+ 解除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.pharmacy_name }}
+ {{ item.pharmacy_code }}
+
+
+
+
+
+
+
+ 是(开方时默认推荐)
+ 否(仅作为可选药房)
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/doctor/doctor-list/index.vue b/src/views/doctor/doctor-list/index.vue
index 2ae055c..6a32b5f 100644
--- a/src/views/doctor/doctor-list/index.vue
+++ b/src/views/doctor/doctor-list/index.vue
@@ -176,6 +176,8 @@
@click="handleDetail(record)">详情
修改
+ 药房配置
@@ -345,6 +347,50 @@
+
+
+
+
+
+
+ {{ item.pharmacy_name }} ({{ item.pharmacy_code }})
+
+
+
+
+
+
+ {{ item.pharmacy_name }}
+ (默认)
+
+
+
暂未绑定任何药房
+
+
+
+
+
是否推荐
@@ -694,6 +740,9 @@
确定申请CA证书?
修改职称或者执业证/资格证,需要先在【四川省互联网医疗服务监管平台】修改备案信息成功后,才可保存 (谨慎操作) 。
+
+
+
@@ -701,6 +750,8 @@
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue';
import { getDoctorList, addDoctor, removeDoctor, updateDoctor, getDoctorDetail, departmentList, decryptCard, hospitalList, expertiseList, areaList, bankList, decryptBank, exportDoctor } from '@/api/doctor/list';
import { applyCA, updateCA, removeCA, updateSign, applySign } from '@/api/doctor/ca';
+import { getPharmacyList } from '@/api/basic/pharmacy';
+import DoctorPharmacyDrawer from './components/doctorPharmacyDrawer.vue';
import { ossSign, ossUpload } from '@/api/oss';
import { parseTime } from '@/utils/parseTime';
import { Message } from '@arco-design/web-vue';
@@ -772,7 +823,25 @@ const modalForm = reactive({
cur_doctor_expertise: [],
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/doctor_avatar.png',
bank_card_code: '',
+ doctor_pharmacy: [],
+ doctor_pharmacy_list: [],
});
+const pharmacyDrawerRef = ref(null);
+const pharmacyOptions = ref([]);
+const handleOpenPharmacyDrawer = (record) => {
+ pharmacyDrawerRef.value?.open(record);
+};
+const loadPharmacyOptions = async () => {
+ if (pharmacyOptions.value.length > 0) return;
+ try {
+ const res = await getPharmacyList({ status: 1 });
+ if (res.code === 200 && res.data) {
+ pharmacyOptions.value = res.data;
+ }
+ } catch (e) {
+ console.error('加载药房选项失败:', e);
+ }
+};
const hospital_name = ref('');
watch(() => modalForm.hospital, () => {
if (modalForm.hospital && modalForm.hospital.hospital_name) {
@@ -1098,7 +1167,7 @@ const columns = [
{ title: '状态', dataIndex: 'status', slotName: 'status' },
// { title: '创建时间', dataIndex: 'created_at', slotName: 'created_at' },
- { title: '操作', slotName: 'action', fixed: "right", width: 180 },
+ { title: '操作', slotName: 'action', fixed: "right", width: 280 },
];
// Table Data
@@ -1115,6 +1184,7 @@ const changeSelect = (value) => {
// 新增Satus
const handleAdd = () => {
+ loadPharmacyOptions();
modalVisible.value = true;
modalTitle.value = '新增医生';
modalSatus.value = 'add';
@@ -1135,6 +1205,8 @@ const handleAdd = () => {
modalForm.sign_image = '';
modalForm.doctor_bank_card = {
}
+ modalForm.doctor_pharmacy = [];
+ modalForm.doctor_pharmacy_list = [];
license_cert_list.value = [];
qualification_cert_list.value = [];
@@ -1198,10 +1270,18 @@ const handleDetail = async (record) => {
}
modalForm.cur_doctor_expertise = arr;
}
+ if (data.doctor_pharmacy && Array.isArray(data.doctor_pharmacy)) {
+ modalForm.doctor_pharmacy_list = data.doctor_pharmacy;
+ modalForm.doctor_pharmacy = data.doctor_pharmacy.map((item) => String(item.pharmacy_id));
+ } else {
+ modalForm.doctor_pharmacy_list = [];
+ modalForm.doctor_pharmacy = [];
+ }
}
};
// 修改
const handleUpdate = async (record) => {
+ loadPharmacyOptions();
modalVisible.value = true;
modalTitle.value = '修改医生';
modalSatus.value = 'edit';
@@ -1266,6 +1346,13 @@ const handleUpdate = async (record) => {
})
modalForm.cur_doctor_expertise = arr;
}
+ if (data.doctor_pharmacy && Array.isArray(data.doctor_pharmacy)) {
+ modalForm.doctor_pharmacy_list = data.doctor_pharmacy;
+ modalForm.doctor_pharmacy = data.doctor_pharmacy.map((item) => String(item.pharmacy_id));
+ } else {
+ modalForm.doctor_pharmacy_list = [];
+ modalForm.doctor_pharmacy = [];
+ }
}
//await nextTick();
@@ -1386,7 +1473,8 @@ const handleSubmit = (done) => {
bank_card_province_id: modalForm.doctor_bank_card.province_id ? modalForm.doctor_bank_card.province_id : 0,
bank_card_city_id: modalForm.doctor_bank_card.city_id ? modalForm.doctor_bank_card.city_id : 0,
bank_card_county_id: modalForm.doctor_bank_card.county_id ? modalForm.doctor_bank_card.county_id : 0,
- bank_id: modalForm.doctor_bank_card.bank_id
+ bank_id: modalForm.doctor_bank_card.bank_id,
+ doctor_pharmacy: modalForm.doctor_pharmacy || []
}
if(modalForm.is_transfer_prescription == 1 || modalForm.is_transfer_prescription ==0) {
modalData.is_transfer_prescription = modalForm.is_transfer_prescription;
@@ -1784,7 +1872,6 @@ onMounted(() => {
handelAreaList("", "", 2);
handleBankList();
-
});
diff --git a/src/views/medince/platform-medince/index.vue b/src/views/medince/platform-medince/index.vue
index 0693cba..bc25c60 100644
--- a/src/views/medince/platform-medince/index.vue
+++ b/src/views/medince/platform-medince/index.vue
@@ -5,8 +5,18 @@
-
-
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
+
+
+
+
+
@@ -47,6 +57,7 @@
{deleteData = selection;console.log(selection)}"
@@ -54,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 删除对话框
@@ -111,7 +130,9 @@
};
// form
const queryForm = reactive({
-
+ pharmacy_id: undefined,
+ pharmacy_code: '',
+ product_pharmacy_code: '',
});
const modalForm = reactive({
user:{},
@@ -140,10 +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:100 },
+ { 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 },
];
@@ -234,6 +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)=>{
@@ -274,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();
});
diff --git a/src/views/medince/sys-medince/index.vue b/src/views/medince/sys-medince/index.vue
index f1292bd..1521088 100644
--- a/src/views/medince/sys-medince/index.vue
+++ b/src/views/medince/sys-medince/index.vue
@@ -12,8 +12,18 @@
-
-
+
+
+
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
+
+
@@ -69,6 +79,7 @@
{deleteData = selection;console.log(selection)}"
@@ -76,6 +87,12 @@
{{(rowIndex+1)+(pager.page-1)*pager.page_size}}
+
+ {{ record.pharmacy_name || '-' }}
+
+ {{ record.pharmacy_code }}
+
+
{{formatProductStatus(record.product_status)}}
{{formatProductStatus(record.product_status)}}
@@ -113,8 +130,10 @@
diff --git a/src/views/order/medince-list/index.vue b/src/views/order/medince-list/index.vue
index e22240e..a95c310 100644
--- a/src/views/order/medince-list/index.vue
+++ b/src/views/order/medince-list/index.vue
@@ -195,6 +195,24 @@
上报失败
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
+ {{ record.pharmacy_name || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy_name || modalForm.pharmacy?.pharmacy_name || '-' }}
+
+
+
+
+
+ {{ modalForm.pharmacy_code || modalForm.pharmacy?.pharmacy_code || '-' }}
+
+
+
+
+
+
+ {{ modalForm.pharmacy?.telephone || '-' }}
+
+
+
+
+ {{ modalForm.pharmacy?.full_address || modalForm.pharmacy?.address || '-' }}
+
+
+
+
退款信息
@@ -878,6 +930,7 @@ import {
inquiryCase,
exportProduct
} from '@/api/order/list';
+import { getPharmacyList } from '@/api/basic/pharmacy';
import { parseTime } from '@/utils/parseTime';
import {
formatDoctorTitle,
@@ -888,6 +941,7 @@ import {
} from '@/utils/format';
const IMG_URL = import.meta.env.VITE_IMG_URL;
import { downloadFile } from '@/utils/downloadFile';
+const pharmacyList = ref([]);
// Akiraka 20230210 删除数据
const deleteData = ref([]);
// Akiraka 20230210 删除对话框
@@ -1044,6 +1098,7 @@ const columns = [
{ title: '药品名称', dataIndex: 'product_name', width: 150 },
{ title: '药品备注', dataIndex: 'remarks', width: 130 },
{ title: '就诊人联系电话', dataIndex: 'patient_mobile', width: 130 },
+ { title: '发货药房', dataIndex: 'pharmacy_name', slotName: 'pharmacy_name', width: 160, ellipsis: true },
{ title: '订单金额', dataIndex: 'amount_total', slotName: 'amount_total' },
{
title: '实付金额',
@@ -1245,8 +1300,8 @@ const closeChangeOk = (data) => {
// 重置搜索
const handleResetQuery = () => {
proxy.$refs.queryFormRef.resetFields();
+ queryForm.pharmacy_id = undefined;
currentPage.value=1;
- //getProductInfo(queryForm);
handleQuery();
};
const openDcotor = () => {
@@ -1298,11 +1353,24 @@ const handlExport=async(type)=>{
}
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(() => {
let userInfo=localStorage.getItem('manage-userInfo')?JSON.parse(localStorage.getItem('manage-userInfo')):{};
showTransferDoctor.value=userInfo.role_name!='处方流转平台';
getProductInfo(pager);
-
+ fetchPharmacyList();
});
diff --git a/src/views/prescription/prescription-list/index.vue b/src/views/prescription/prescription-list/index.vue
index aa2602b..dcec028 100644
--- a/src/views/prescription/prescription-list/index.vue
+++ b/src/views/prescription/prescription-list/index.vue
@@ -44,6 +44,24 @@
审核驳回
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
{deleteData = selection;console.log(selection)}"
@@ -113,6 +131,9 @@
record.patient_sex == 1 ? '男,' : '女,'
}}{{ record.patient_age }}岁)
+
+ {{ record.pharmacy_name || '-' }}
+
{{record.order_prescription_icd}}
@@ -146,9 +167,12 @@
diff --git a/src/views/prescription/transferPrescription-list/index.vue b/src/views/prescription/transferPrescription-list/index.vue
index a6570d9..22c1dc7 100644
--- a/src/views/prescription/transferPrescription-list/index.vue
+++ b/src/views/prescription/transferPrescription-list/index.vue
@@ -44,6 +44,24 @@
审核驳回
+
+
+
+ {{ item.pharmacy_name }}
+
+
+
{deleteData = selection;console.log(selection)}"
@@ -113,6 +131,9 @@
record.patient_sex == 1 ? '男,' : '女,'
}}{{ record.patient_age }}岁)
+
+ {{ record.pharmacy_name || '-' }}
+
{{record.order_prescription_icd}}
@@ -146,10 +167,12 @@