Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

This commit is contained in:
LiJianZhao 2025-05-15 13:20:53 +08:00
commit 3ea97ef532
12 changed files with 172 additions and 60 deletions

82
package-lock.json generated
View File

@ -20,7 +20,10 @@
"@types/node": "^22.14.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vue/tsconfig": "^0.7.0",
"autoprefixer": "^10.4.21",
"npm-run-all2": "^7.0.2",
"postcss": "^8.5.3",
"postcss-pxtorem": "^6.1.0",
"sass": "^1.86.3",
"typescript": "~5.8.0",
"vite": "^6.2.4",
@ -2154,6 +2157,44 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/autoprefixer": {
"version": "10.4.21",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz",
"integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"dependencies": {
"browserslist": "^4.24.4",
"caniuse-lite": "^1.0.30001702",
"fraction.js": "^4.3.7",
"normalize-range": "^0.1.2",
"picocolors": "^1.1.1",
"postcss-value-parser": "^4.2.0"
},
"bin": {
"autoprefixer": "bin/autoprefixer"
},
"engines": {
"node": "^10 || ^12 || >=14"
},
"peerDependencies": {
"postcss": "^8.1.0"
}
},
"node_modules/axios": {
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz",
@ -2758,6 +2799,20 @@
"node": ">= 6"
}
},
"node_modules/fraction.js": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
"dev": true,
"license": "MIT",
"engines": {
"node": "*"
},
"funding": {
"type": "patreon",
"url": "https://github.com/sponsors/rawify"
}
},
"node_modules/fs-extra": {
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz",
@ -3368,6 +3423,16 @@
"dev": true,
"license": "MIT"
},
"node_modules/normalize-range": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/normalize-wheel-es": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
@ -3584,6 +3649,23 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/postcss-pxtorem": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/postcss-pxtorem/-/postcss-pxtorem-6.1.0.tgz",
"integrity": "sha512-ROODSNci9ADal3zUcPHOF/K83TiCgNSPXQFSbwyPHNV8ioHIE4SaC+FPOufd8jsr5jV2uIz29v1Uqy1c4ov42g==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"postcss": "^8.0.0"
}
},
"node_modules/postcss-value-parser": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"dev": true,
"license": "MIT"
},
"node_modules/pretty-ms": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz",

View File

@ -23,7 +23,10 @@
"@types/node": "^22.14.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vue/tsconfig": "^0.7.0",
"autoprefixer": "^10.4.21",
"npm-run-all2": "^7.0.2",
"postcss": "^8.5.3",
"postcss-pxtorem": "^6.1.0",
"sass": "^1.86.3",
"typescript": "~5.8.0",
"vite": "^6.2.4",

11
postcss.config.js Normal file
View File

@ -0,0 +1,11 @@
export default {
plugins: {
'postcss-pxtorem': {
rootValue: 16, // 根元素字体大小,或根据设计稿来设置
propList: ['*'], // 可以从px更改为rem的属性
selectorBlackList: ['html', '.no-rem', '.ignore-rem'], // 要忽略的选择器
minPixelValue: 2 // 设置要替换的最小像素值
},
autoprefixer: {}
}
}

View File

@ -14,16 +14,33 @@ ul, li {
outline: none!important;
}
html, body {
body {
height: 100%;
font-family: PingFangSC, PingFang SC, sans-serif;
font-size: 16px;
color: base.$text-primary;
background-color: base.$background-color-base;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html{
font-size: 16px;
}
@media screen and (max-width: 1920px) {
html {
font-size: 16px; // 适配 1920px 宽度的标准稿
}
}
@media screen and (max-width: 1600px) {
html {
font-size: 12px; // 更小的字体以适配较小屏幕
}
}
@media screen and (max-width: 1440px) {
html {
font-size: 10px; // 更小的字体以适配较小屏幕
}
}
#app {
height: 100vh;
width: 100vw;

View File

@ -1,8 +1,14 @@
<template>
<Mask :height="650" :width="900" :is-show="show" title="追溯码采集" @close="show = false" :show-footer="true">
<el-card>
<template #default>
<div class="detail">
<el-input placeholder="请输入追溯码" v-model="inputIdCode" clearable @keydown.enter="openAssociationIdCode()">
<el-input
placeholder="请输入追溯码"
v-model="inputIdCode"
clearable
@keydown.enter="openAssociationIdCode()"
style="height: 42px;background: #FFFFFF;border-radius: 6px;border: 1px solid #EAEAEC;"
>
<template #prefix>
<el-icon>
<Monitor/>
@ -36,22 +42,20 @@
</tr>
</tbody>
</table>
</div>
</div>
</el-card>
<template #footer>
<div class="bottom-btn">
<el-button @click="saveRetail()" type="primary">确定</el-button>
<el-button @click="show = false">关闭</el-button>
</div>
</template>
<template #footer>
<div class="bottom">
<div class="default-btn" @click="show = false">关闭</div>
<div class="default-btn" @click="saveRetail()" style="margin-left: 24px">确定</div>
</div>
</template>
</Mask>
<AssociationIdCode
ref="associationIdCodeRef"
@addIdCode="cleanInputIdCode"
@addTraceabilityCode="addTraceAbilityCodeHandler"></AssociationIdCode>
</Mask>
</template>
<script setup lang="ts">
import Mask from "@/components/common/Mask.vue";
@ -106,7 +110,7 @@ const checkTraceCode = () => {
const inputIdCode = ref()
const associationIdCodeRef = ref()
const openAssociationIdCode = () => {
if(!inputIdCode.value || inputIdCode.value.length <20){
if (!inputIdCode.value || inputIdCode.value.length < 20) {
ElMessage({
message: '追溯码长度不足20位',
type: 'info',
@ -140,7 +144,7 @@ const addTraceabilityCodeDo = (item: any, inputStr: any) => {
item.traceAbilityCodeList = []
}
let traceAbilityCodeListList = item.traceAbilityCodeList.length
if(!inputStr || inputStr.length <20){
if (!inputStr || inputStr.length < 20) {
ElMessage({
message: '追溯码长度不足20位',
type: 'info',
@ -184,8 +188,18 @@ const addTraceAbilityCodeHandler = (item: any, code: any) => {
}
.detail {
padding: 24px 24px 0;
.list {
height: 400px;
}
}
.bottom {
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 24px;
}
</style>

View File

@ -24,13 +24,12 @@ const openSettlement =()=>{
<div class="footer">
<div>总金额<span class="text icon"></span><span class="text">{{ totalAmount || '0' }}</span></div>
<div class="btn-group" v-if="status">
<span type="primary" @click="openCheckOut">追溯码</span>
<span type="primary" @click="openSettlement">收费</span>
<span class="default-btn" @click="openCheckOut">追溯码</span>
<span class="default-btn" @click="openSettlement" style="margin-left: 24px">收费</span>
</div>
</div>
</Panel>
</template>
<style scoped lang="scss">
.footer {
height: 86px;
@ -53,14 +52,6 @@ const openSettlement =()=>{
span{
display: inline-block;
width: 119px;
height: 48px;
background: #4D6DE4;
border-radius: 8px;
margin-left: 24px;
color: #fff;
line-height: 48px;
text-align: center;
cursor: pointer;
}
}
</style>

View File

@ -16,7 +16,7 @@
<th>批次</th>
<th>生产批号</th>
<th>有效期</th>
<th>当前库存</th>
<th>变化前</th>
<th>出库数量</th>
</tr>
</thead>

View File

@ -32,7 +32,7 @@
</div>
</div>
<div class="content">
<el-table :data="dataList" style="width: 100%;height: 100%" @row-click="rowClick">
<el-table :data="dataList" style="width: 100%;height: 100%" @row-click="rowClick" :header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column prop="useCode" label="单号" width="180"></el-table-column>
<el-table-column prop="status" label="状态" width="180">
<template #default="scope">
@ -173,7 +173,6 @@ const resetSearch= () => {
<style scoped lang="scss">
@use "@/assets/scss/base.scss";
.container-wrapper {
box-sizing: border-box;
padding: 24px;
@ -181,14 +180,12 @@ const resetSearch= () => {
display: flex;
flex-direction: column;
height: 100%;
.content {
width: 100%;
flex: 1;
overflow: hidden;
margin-top: base.$margin-base;
}
.bottom {
width: 100%;
height: 60px;

View File

@ -33,7 +33,7 @@
</div>
<div class="content_list">
<el-scrollbar>
<el-table :data="tableData" @cell-click="editCheck" style="height: 100%">
<el-table :data="tableData" @cell-click="editCheck" style="height: 100%" :header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column label="订单号" prop="code" width="250">
</el-table-column>
<el-table-column label="状态" prop="state" width="250">

View File

@ -82,8 +82,8 @@
<span @click="open_edit(0,0)">新增其他商品</span>
</div>
</div>
<div class="content_goods" ref="content">
<el-table :data="tableData" style="width: 100%;height: 100%;padding: 0 24px" @row-click="openMack"
<div class="content_goods">
<el-table :data="tableData" style="height: 100%;padding: 0 24px;" @row-click="openMack"
:header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column fixed prop="name" label="名称" width="200" show-overflow-tooltip>
<template #default="scope">
@ -128,7 +128,6 @@
</template>
</el-table-column>
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="150"></el-table-column>
<el-table-column label="进价" width="120">
<template #default="scope">
{{ scope.row.purchaseUnitPrice.toFixed(2) }}
@ -168,11 +167,11 @@
</div>
<div class="bottom">
<div class="statistics">
<div class="">总成本:{{ statisticsData.totalCost }}</div>
<div class="">总售价:{{ statisticsData.totalPrice }}</div>
<div class="">医保药品:{{ statisticsData.totalSocialCount }}</div>
<div v-for="item in statisticsData.chrgitmLvInfoList">
{{ item.name }}:{{ item.ratio }}({{ item.count }})
<div style="margin-right: 40px">总成本{{ statisticsData.totalCost }}</div>
<div style="margin-right: 40px">总售价{{ statisticsData.totalPrice }}</div>
<div style="margin-right: 40px">医保药品{{ statisticsData.totalSocialCount }}</div>
<div v-for="item in statisticsData.chrgitmLvInfoList" style="margin-right: 40px">
{{ item.name }}{{ item.ratio }}({{ item.count }})
</div>
</div>
<div class="page_btn_list">
@ -485,13 +484,11 @@ const getStatisticsData = () => {
}
}
}
.content_goods {
width: 100%;
flex: 1;
overflow: hidden;
min-height: 0;
}
.bottom {
width: 100%;
height: 60px;
@ -501,7 +498,7 @@ const getStatisticsData = () => {
position: relative;
border-top: 1px solid #EEE;
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
.statistics {

View File

@ -27,8 +27,8 @@
<span @click="addSupplier(null)">添加供应商</span>
</div>
</div>
<div class="content_list">
<el-table :data="tableData" @row-click="editSupplier" style="height: 100%">
<div class="content">
<el-table :data="tableData" style="width: 100%;height: 100%" @row-click="editSupplier" :header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column label="供应商名称" prop="name" width="250">
</el-table-column>
<el-table-column label="启用状态" prop="turn" width="80">
@ -40,7 +40,7 @@
<el-table-column label="许可证号" prop="licenseCode"></el-table-column>
<el-table-column label="联系人" prop="contactName" width="100"></el-table-column>
<el-table-column label="联系方式" prop="contactTel" width="150"></el-table-column>
<el-table-column label="备注" prop="reamark"/>
<el-table-column label="备注" prop="remark"/>
</el-table>
</div>
<div class="bottom">
@ -61,11 +61,10 @@
<script setup lang="ts">
import {nextTick, onMounted, ref, watch} from "vue";
import {post} from "@/utils/request.ts";
import Mask from "@/components/common/Mask.vue";
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
import {Plus, Refresh, Search} from "@element-plus/icons-vue";
import {Search} from "@element-plus/icons-vue";
const tableData = ref([])
const tableData = ref<any>([])
const getSupplier = () => {
const query = {
page: page.value,
@ -122,9 +121,9 @@ const resetSearch = () => {
}
}
</script>
<style scoped lang="scss">
@use "@/assets/scss/base.scss";
.container-wrapper {
box-sizing: border-box;
padding: 24px;
@ -132,14 +131,11 @@ const resetSearch = () => {
display: flex;
flex-direction: column;
height: 100%;
.content_list {
.content {
width: 100%;
flex: 1;
overflow: hidden;
margin-top: base.$margin-base;
}
.bottom {
width: 100%;
height: 60px;
@ -153,6 +149,7 @@ const resetSearch = () => {
align-items: center;
}
}
.top {
height: 110px;
background: #fff;

View File

@ -10,6 +10,9 @@ export default defineConfig({
vue(),
vueDevTools(),
],
css: {
postcss: './postcss.config.js' // 指向你的PostCSS配置文件
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))