fix:调整需求开发

This commit is contained in:
huxuejian 2026-08-12 15:20:29 +08:00
parent a8194e7d8f
commit ab6e2df186
9 changed files with 127 additions and 15 deletions

View File

@ -5,4 +5,4 @@ VITE_CORP_ID = "4G7H8J2K9L0M1N3P5Q6R7S8T9U"
VITE_NEED_LOGIN = "true" VITE_NEED_LOGIN = "true"
VITE_NEED_IM = "true" VITE_NEED_IM = "true"
VITE_NEED_CA = "true" VITE_NEED_CA = "true"
VITE_STORE_QRCODE_BASE="https://www.youcan365.com/hn/hnhlw?storeId=" VITE_STORE_QRCODE_BASE="https://www.youcan365.com/hn/hnhlw?type=store&storeId="

View File

@ -45,10 +45,23 @@
return null; return null;
} }
window.onload = function () { function getPageQuery() {
const type = getQueryParam(location.href, 'type') || '';
if (type === 'ybAuth') {
const id = getQueryParam(location.href, 'id') || ''
return encodeURIComponent(`pages/consult/self-auth/auth-action?id=${id}`);
} else if (type === 'store') {
const storeId = getQueryParam(location.href, 'storeId') || ''; const storeId = getQueryParam(location.href, 'storeId') || '';
const query = encodeURIComponent(`pages/home/home?storeId=${storeId}`); return encodeURIComponent(`pages/home/home?storeId=${storeId}`);
const scheme = `alipays://platformapi/startapp?appId=2021004129669493&page=${query}`; }
return ''
}
window.onload = function () {
const query = getPageQuery()
const scheme = `alipays://platformapi/startapp?appId=2021004129669493${query ? '&page=' : ''}${query}`;
const href = `https://ds.alipay.com/?scheme=${encodeURIComponent(scheme)}`; const href = `https://ds.alipay.com/?scheme=${encodeURIComponent(scheme)}`;
location.href = href; location.href = href;
// console.log(href); // console.log(href);

View File

@ -17,7 +17,7 @@
<div class="info-row"> <div class="info-row">
<div class="info-item w-1/4">姓名{{ data.name }}</div> <div class="info-item w-1/4">姓名{{ data.name }}</div>
<div class="info-item w-1/4">性别{{ info.sex }}</div> <div class="info-item w-1/4">性别{{ info.sex }}</div>
<div class="info-item w-1/4">年龄{{ info.age }}</div> <div class="info-item w-1/4">年龄{{ data.age > 0 ? data.age + '岁' : '' }}</div>
<div class="info-item w-1/4">费别{{ data.feeType === 'YB' ? '医保' : '自费' }}</div> <div class="info-item w-1/4">费别{{ data.feeType === 'YB' ? '医保' : '自费' }}</div>
</div> </div>
<div class="info-row"> <div class="info-row">
@ -73,7 +73,7 @@
</div> </div>
</div> </div>
<div class="flex-shrink-0 w-1/3"> <div class="flex-shrink-0 w-1/3">
<div>审方<img v-if="data.pharmacistSignImg" class="signImage" :src="data.pharmacistSignImg" /> <div>药师审方<img v-if="data.pharmacistSignImg" class="signImage" :src="data.pharmacistSignImg" />
<text v-else>{{ data.pharmacist }}</text> <text v-else>{{ data.pharmacist }}</text>
</div> </div>
</div> </div>
@ -89,7 +89,7 @@
发药 发药
</div> </div>
</div> </div>
<div class="notice">注意请勿丢失处方当日有效因特殊情况该处方有效为签名</div> <div class="notice">注意请勿丢失处方当日有效因特殊情况该处方有效为<span class="write_line"></span> 签名<span class="write_line"></span> </div>
</div> </div>
</div> </div>
</layout-main> </layout-main>
@ -163,7 +163,7 @@ const info = computed(() => {
const info = { sex: sexCode % 2 === 0 ? '女' : '男' }; const info = { sex: sexCode % 2 === 0 ? '女' : '男' };
if (createTime) { if (createTime) {
info.age = createTime.diff(dayjs(birthDate), 'year') + '岁'; info.age = createTime.diff(dayjs(birthDate), 'year') + '岁';
info.time = createTime.format('YYYY-MM-DD'); info.time = createTime.format('YYYY-MM-DD HH:mm');
} }
return info return info
}) })
@ -190,7 +190,8 @@ function waitForPrintImages(root) {
function openPrintDialog() { function openPrintDialog() {
printPaperSize.value = 'A5'; printPaperSize.value = 'A5';
printDialogVisible.value = true; // printDialogVisible.value = true;
confirmPrint()
} }
async function confirmPrint() { async function confirmPrint() {
@ -414,6 +415,24 @@ defineExpose({ print: openPrintDialog });
.no { .no {
margin-top: 5px; margin-top: 5px;
} }
.write_line{
position: relative;
display: inline-block;
height: 1em;
width: 40px;
}
.write_line + .write_line{
width: 80px;
}
.write_line::after{
content: '';
position: absolute;
left: 0;
right: 0;
bottom: -4px;
border-bottom: 1px solid currentColor;
}
</style> </style>
<style> <style>
.rx-print-root { .rx-print-root {

View File

@ -10,7 +10,7 @@
<el-col :span="12" v-for="item in basicInfoList" :key="item.prop"> <el-col :span="12" v-for="item in basicInfoList" :key="item.prop">
<el-form-item class="mb-5px" :label="item.label" :prop="item.prop" <el-form-item class="mb-5px" :label="item.label" :prop="item.prop"
:class="requiredMap[item.prop] ? 'is-required' : ''"> :class="requiredMap[item.prop] ? 'is-required' : ''">
{{ form[item.prop] }} {{ item.format ? item.format(form[item.prop]) : form[item.prop] }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -68,6 +68,9 @@ import { memberStore } from "@/store/member";
import MyLayout, { LayoutMain, LayoutItem } from "@/components/layout"; import MyLayout, { LayoutMain, LayoutItem } from "@/components/layout";
const antibioticLevelMap = { 0: '0 (无)', 1: '1 (非限制使用级)', 2: '2 (限制使用级)', 3: '3 (特殊使用级)' };
const tumorUseMap = { 0: '0 (无)', 1: '1 (非限制使用级)', 2: '2 (限制使用级)', 3: '3 (特殊使用级)' };
const emits = defineEmits(['close', 'edit', 'changeSale']) const emits = defineEmits(['close', 'edit', 'changeSale'])
const props = defineProps({ const props = defineProps({
visible: { visible: {
@ -98,6 +101,8 @@ const basicInfo = [
{ label: '药品拼音码', prop: "pinyin_code" }, { label: '药品拼音码', prop: "pinyin_code" },
{ label: '通用名', prop: "generic_name" }, { label: '通用名', prop: "generic_name" },
{ label: '通用名拼音码', prop: "generic_pinyin" }, { label: '通用名拼音码', prop: "generic_pinyin" },
{ label: '抗生素级别', prop: "antibiotic_level", format: value => antibioticLevelMap[value] ?? '0 (无)' },
{ label: '肿瘤使用', prop: "tumor_use", format: value => tumorUseMap[value] ?? '0 (无)' },
] ]
// 线 + // 线 +

View File

@ -21,6 +21,8 @@ export const drugFieldDict = [
{ name: '药库货品ID', field: 'product_id', libType: 'online', verify: (val, label) => validateNumber(val, label) }, { name: '药库货品ID', field: 'product_id', libType: 'online', verify: (val, label) => validateNumber(val, label) },
{ name: '通用名', field: 'generic_name', verify: (val, label) => verifyString(val, label) }, { name: '通用名', field: 'generic_name', verify: (val, label) => verifyString(val, label) },
{ name: '通用名拼音码', field: 'generic_pinyin', verify: (val, label) => verifyString(val, label) }, { name: '通用名拼音码', field: 'generic_pinyin', verify: (val, label) => verifyString(val, label) },
{ name: '抗生素级别', field: 'antibiotic_level', verify: (val, label) => verifyListItem(val, [0, 1, 2, 3], false, label, 0) },
{ name: '肿瘤使用', field: 'tumor_use', verify: (val, label) => verifyListItem(val, [0, 1, 2, 3], false, label, 0) },
// 仅在线药品库使用:管理分类(处方药 / OTC与剂型 // 仅在线药品库使用:管理分类(处方药 / OTC与剂型
{ name: '管理分类', field: 'manage_category', verify: (val, label) => verifyString(val, label) }, { name: '管理分类', field: 'manage_category', verify: (val, label) => verifyString(val, label) },
{ name: '剂型', field: 'dosage_form', required: true, verify: (val, label) => verifyString(val, label, 1) }, { name: '剂型', field: 'dosage_form', required: true, verify: (val, label) => verifyString(val, label, 1) },

View File

@ -11,7 +11,8 @@
<el-form-item :label="item.label" :prop="item.prop" :class="requiredMap[item.prop] ? 'is-required' : ''"> <el-form-item :label="item.label" :prop="item.prop" :class="requiredMap[item.prop] ? 'is-required' : ''">
<el-select v-if="item.options" filterable clearable :model-value="form[item.prop]" <el-select v-if="item.options" filterable clearable :model-value="form[item.prop]"
:placeholder="`请选择${item.label}`" class="w-full" @update:model-value="changeValue($event, item.prop)"> :placeholder="`请选择${item.label}`" class="w-full" @update:model-value="changeValue($event, item.prop)">
<el-option v-for="option in item.options" :key="option" :label="option" :value="option" /> <el-option v-for="option in item.options" :key="getOptionValue(option)"
:label="getOptionLabel(option)" :value="getOptionValue(option)" />
</el-select> </el-select>
<el-input v-else clearable :model-value="form[item.prop]" :maxlength="item.maxlength" <el-input v-else clearable :model-value="form[item.prop]" :maxlength="item.maxlength"
:placeholder="`请输入${item.label}`" @update:model-value="changeValue($event, item.prop)" /> :placeholder="`请输入${item.label}`" @update:model-value="changeValue($event, item.prop)" />
@ -24,7 +25,8 @@
<el-form-item :label="item.label" :prop="item.prop" :class="requiredMap[item.prop] ? 'is-required' : ''"> <el-form-item :label="item.label" :prop="item.prop" :class="requiredMap[item.prop] ? 'is-required' : ''">
<el-select v-if="item.options" filterable clearable :model-value="form[item.prop]" <el-select v-if="item.options" filterable clearable :model-value="form[item.prop]"
:placeholder="`请选择${item.label}`" class="w-full" @update:model-value="changeValue($event, item.prop)"> :placeholder="`请选择${item.label}`" class="w-full" @update:model-value="changeValue($event, item.prop)">
<el-option v-for="option in item.options" :key="option" :label="option" :value="option" /> <el-option v-for="option in item.options" :key="getOptionValue(option)"
:label="getOptionLabel(option)" :value="getOptionValue(option)" />
</el-select> </el-select>
<el-input v-else clearable :model-value="form[item.prop]" :maxlength="item.maxlength" <el-input v-else clearable :model-value="form[item.prop]" :maxlength="item.maxlength"
:placeholder="`请输入${item.label}`" @update:model-value="changeValue($event, item.prop)" /> :placeholder="`请输入${item.label}`" @update:model-value="changeValue($event, item.prop)" />
@ -113,6 +115,20 @@ const unitOptions = computed(() => getOptionNames(medicineUseInfo.value.unitList
const dosageFormList = computed(() => getOptionNames(medicineUseInfo.value.dosageFormList ||[])) const dosageFormList = computed(() => getOptionNames(medicineUseInfo.value.dosageFormList ||[]))
const frequencyOptions = computed(() => getOptionNames(medicineUseInfo.value.frequencyList)) const frequencyOptions = computed(() => getOptionNames(medicineUseInfo.value.frequencyList))
const usageOptions = computed(() => getOptionNames(medicineUseInfo.value.usageList)) const usageOptions = computed(() => getOptionNames(medicineUseInfo.value.usageList))
const antibioticLevelOptions = [
{ label: '0 (无)', value: 0 },
{ label: '1 (非限制使用级)', value: 1 },
{ label: '2 (限制使用级)', value: 2 },
{ label: '3 (特殊使用级)', value: 3 },
]
const tumorUseOptions = [
{ label: '0 (无)', value: 0 },
{ label: '1 (非限制使用级)', value: 1 },
{ label: '2 (限制使用级)', value: 2 },
{ label: '3 (特殊使用级)', value: 3 },
]
const getOptionLabel = option => typeof option === 'object' && option !== null ? option.label : option
const getOptionValue = option => typeof option === 'object' && option !== null ? option.value : option
const repeatTagList = ref([]) const repeatTagList = ref([])
const diagnosisOptions = ref([]) const diagnosisOptions = ref([])
@ -135,6 +151,8 @@ const basicInfo = computed(() => [
{ label: '药品拼音码', prop: "pinyin_code", maxlength: 100 }, { label: '药品拼音码', prop: "pinyin_code", maxlength: 100 },
{ label: '通用名', prop: "generic_name", maxlength: 100 }, { label: '通用名', prop: "generic_name", maxlength: 100 },
{ label: '通用名拼音码', prop: "generic_pinyin", maxlength: 100 }, { label: '通用名拼音码', prop: "generic_pinyin", maxlength: 100 },
{ label: '抗生素级别', prop: "antibiotic_level", options: antibioticLevelOptions },
{ label: '肿瘤使用', prop: "tumor_use", options: tumorUseOptions },
]) ])
// 线 + // 线 +
@ -337,7 +355,7 @@ async function getRepeatTags() {
watch(() => props.visible, async (val) => { watch(() => props.visible, async (val) => {
if (val) { if (val) {
// reset local editForm when opening drawer // reset local editForm when opening drawer
editForm.value = {} editForm.value = props.data._id ? {} : { antibiotic_level: 0, tumor_use: 0 }
diagnosisKeyword.value = '' diagnosisKeyword.value = ''
await Promise.all([attachMedicineConfig(), initializeDiagnoses()]) await Promise.all([attachMedicineConfig(), initializeDiagnoses()])
if (props.libType === 'online') { if (props.libType === 'online') {

View File

@ -57,6 +57,12 @@
<el-common-column prop="manufacturer" label="生产厂家" :width="160" /> <el-common-column prop="manufacturer" label="生产厂家" :width="160" />
<el-common-column prop="barcode" label="条形码" :width="160" /> <el-common-column prop="barcode" label="条形码" :width="160" />
<el-common-column prop="insurance_code" label="医保编码" :width="160" /> <el-common-column prop="insurance_code" label="医保编码" :width="160" />
<el-common-column prop="antibiotic_level" label="抗生素级别" :width="140">
<template #default="{row}">{{ antibioticLevelMap[row.antibiotic_level] ?? '0 (无)' }}</template>
</el-common-column>
<el-common-column prop="tumor_use" label="肿瘤使用" :width="100">
<template #default="{row}">{{ tumorUseMap[row.tumor_use] ?? '0 (无)' }}</template>
</el-common-column>
<el-common-column prop="dosage" label="单次剂量" :width="160" /> <el-common-column prop="dosage" label="单次剂量" :width="160" />
<el-common-column prop="dosage_unit" label="剂量单位" :width="160" /> <el-common-column prop="dosage_unit" label="剂量单位" :width="160" />
<el-common-column prop="frequency" label="频次" :width="160" /> <el-common-column prop="frequency" label="频次" :width="160" />
@ -109,6 +115,8 @@ const { list, page, pageSize, total, changePage, changeSize } = useElPagination(
const { memberInfo } = storeToRefs(memberStore()); const { memberInfo } = storeToRefs(memberStore());
const statusList = [{ label: '上架', value: 1 }, { label: '下架', value: 0 }]; const statusList = [{ label: '上架', value: 1 }, { label: '下架', value: 0 }];
const antibioticLevelMap = { 0: '0 (无)', 1: '1 (非限制使用级)', 2: '2 (限制使用级)', 3: '3 (特殊使用级)' };
const tumorUseMap = { 0: '0 (无)', 1: '1 (非限制使用级)', 2: '2 (限制使用级)', 3: '3 (特殊使用级)' };
const queryForm = ref({ onSale: '', name: '', erpId: '', barcode: '', insuranceCode: '' }) const queryForm = ref({ onSale: '', name: '', erpId: '', barcode: '', insuranceCode: '' })
const params = ref({}); const params = ref({});
const selections = ref([]); const selections = ref([]);

View File

@ -92,7 +92,8 @@ async function confirm() {
async function refund(arr) { async function refund(arr) {
const reason = arr.join(""); const reason = arr.join("");
const { orderSource } = props.order; const { orderSource } = props.order;
const str = `本次问诊已取消,取消原因: ${reason}${orderSource === "MATEPAD" ? "请联系线下退费" : "费用将于48小时内退还您的支付账户"}`; const str = `本次问诊已取消`;
// const str = `: ${reason}${orderSource === "MATEPAD" ? "线退" : "48退"}`;
const { success, message } = await refundConsultation({ orderId: props.order.orderId, reason: str, orderSource }); const { success, message } = await refundConsultation({ orderId: props.order.orderId, reason: str, orderSource });
if (success) { if (success) {
emits("refund"); emits("refund");

View File

@ -58,6 +58,26 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="form.job === 'doctor'">
<el-col :span="12">
<el-form-item label="抗生素级别" prop="antibiotic_level">
<el-select :model-value="form.antibiotic_level ?? 0" placeholder="请选择" class="w-full"
@update:model-value="change($event, 'antibiotic_level')">
<el-option v-for="item in usageLevelOptions" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="肿瘤使用" prop="tumor_use">
<el-select :model-value="form.tumor_use ?? 0" placeholder="请选择" class="w-full"
@update:model-value="change($event, 'tumor_use')">
<el-option v-for="item in usageLevelOptions" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
</template>
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="头像" prop="avatar"> <el-form-item label="头像" prop="avatar">
<el-upload class="avatar-uploader" action="#" :show-file-list="false" :on-success="handleAvatarSuccess" <el-upload class="avatar-uploader" action="#" :show-file-list="false" :on-success="handleAvatarSuccess"
@ -135,6 +155,12 @@ import { getCateTreeData } from '@/utils'
import { jobList } from '@/baseData/hlw-job.js' import { jobList } from '@/baseData/hlw-job.js'
const emits = defineEmits(['close', 'change']) const emits = defineEmits(['close', 'change'])
const usageLevelOptions = [
{ label: '0 (无)', value: 0 },
{ label: '1 (非限制使用级)', value: 1 },
{ label: '2 (限制使用级)', value: 2 },
{ label: '3 (特殊使用级)', value: 3 },
]
const props = defineProps({ const props = defineProps({
visible: { visible: {
type: Boolean, type: Boolean,
@ -169,6 +195,8 @@ const rules = computed(() => ({
return verifyString(val, '院内工号', 1, 50) return verifyString(val, '院内工号', 1, 50)
}, },
title: val => verifyListItem(val, titleList.value.map(item => item.value), false, '职称'), title: val => verifyListItem(val, titleList.value.map(item => item.value), false, '职称'),
antibiotic_level: val => verifyListItem(val, [0, 1, 2, 3], false, '抗生素级别', 0),
tumor_use: val => verifyListItem(val, [0, 1, 2, 3], false, '肿瘤使用', 0),
intro: val => verifyString(val, '个人介绍', 0, 300), intro: val => verifyString(val, '个人介绍', 0, 300),
goodAt: val => verifyString(val, '擅长领域', 0, 300), goodAt: val => verifyString(val, '擅长领域', 0, 300),
clinicTime: val => verifyString(val, '门诊时间', 0, 100), clinicTime: val => verifyString(val, '门诊时间', 0, 100),
@ -211,6 +239,14 @@ function change(value, prop) {
editForm.value.openWestPres = true; editForm.value.openWestPres = true;
editForm.value.openChinesePres = false; editForm.value.openChinesePres = false;
} }
if (prop === 'job' && value === 'doctor') {
if (form.value.antibiotic_level === undefined || form.value.antibiotic_level === null) {
editForm.value.antibiotic_level = 0;
}
if (form.value.tumor_use === undefined || form.value.tumor_use === null) {
editForm.value.tumor_use = 0;
}
}
} }
@ -266,7 +302,9 @@ async function save() {
const params = {}; const params = {};
const keys = Object.keys(rules.value); const keys = Object.keys(rules.value);
const editKeys = Object.keys(editForm.value); const editKeys = Object.keys(editForm.value);
const validKeys = props.data._id ? keys.filter(key => editKeys.includes(key)) : [...keys]; const doctorLevelKeys = ['antibiotic_level', 'tumor_use'];
const validKeys = (props.data._id ? keys.filter(key => editKeys.includes(key)) : [...keys])
.filter(key => form.value.job === 'doctor' || !doctorLevelKeys.includes(key));
for (const key of validKeys) { for (const key of validKeys) {
const [pass, message] = rules.value[key](editForm.value[key]); const [pass, message] = rules.value[key](editForm.value[key]);
if (pass) { if (pass) {
@ -324,6 +362,14 @@ async function getCateList() {
watch(() => props.visible, (val) => { watch(() => props.visible, (val) => {
if (val) { if (val) {
editForm.value = {} editForm.value = {}
if (props.data.job === 'doctor') {
if (props.data.antibiotic_level === undefined || props.data.antibiotic_level === null) {
editForm.value.antibiotic_level = 0
}
if (props.data.tumor_use === undefined || props.data.tumor_use === null) {
editForm.value.tumor_use = 0
}
}
signatureFile.value = null signatureFile.value = null
clearSignaturePreview() clearSignaturePreview()
getCateList() getCateList()