This commit is contained in:
ChenQiuYu 2025-04-27 15:40:51 +08:00
parent 8217b3a44f
commit e07b429f3d
5 changed files with 103 additions and 43 deletions

View File

@ -11,8 +11,8 @@
<router-link to="/social" class="menu-item" active-class="active active7">医保</router-link> <router-link to="/social" class="menu-item" active-class="active active7">医保</router-link>
<router-link to="/statistics" class="menu-item" active-class="active active8">统计</router-link> <router-link to="/statistics" class="menu-item" active-class="active active8">统计</router-link>
<router-link to="/settings" class="menu-item" active-class="active active9">设置</router-link> <router-link to="/settings" class="menu-item" active-class="active active9">设置</router-link>
<div style="float: right;color: #fff"> <div class="btn">
<el-button style="float: right;color: #fff" @click="logout" type="text">退出登录</el-button> <el-button :icon="Right" style="float: right;color: #fff" @click="logout" type="text">退出登录</el-button>
</div> </div>
</div> </div>
@ -145,26 +145,45 @@ header {
background-color: base.$background-color-main; background-color: base.$background-color-main;
padding: 15px 0; padding: 15px 0;
} }
.btn {
color: #FFF;
font-size: 18px;
float: right;
margin-right: 24px;
margin-top: 10px;
}
</style> </style>
<script setup lang="ts"> <script setup lang="ts">
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import {ElMessage} from 'element-plus' import {type Action, ElMessage, ElMessageBox} from 'element-plus'
import {apiConfig} from "@/assets/config/apiConfig.ts"; import {apiConfig} from "@/assets/config/apiConfig.ts";
import {post} from "@/utils/request"; import {post} from "@/utils/request";
import {singStatus} from "@/stores/counter.ts"; import {singStatus} from "@/stores/counter.ts";
import {Right} from "@element-plus/icons-vue";
let logout = function () { let logout = function () {
localStorage.removeItem('token') ElMessageBox.confirm(
ElMessage({ '退出成功并退出签到,即将为您跳转到登录页面,确定吗?',
message: "退出成功并退出签到,即将为您跳转到登录页面", '退出提示',
type: 'success', {
duration: 1000, confirmButtonText: '确定',
onClose: () => { cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
localStorage.removeItem('token')
post(apiConfig.signOut).then((res: any) => { post(apiConfig.signOut).then((res: any) => {
useRouter().push("/manager/login") useRouter().push("/manager/login")
}) })
} ElMessage({
}) type: 'success',
message: '退出登录并退出签到',
})
})
.catch(() => {
useRouter().push("/")
})
} }
const status = singStatus()
</script> </script>

View File

@ -86,7 +86,6 @@ const handleSelect = (item: any) => {
.search_box { .search_box {
//background-color: rgb(148.6, 212.3, 117.1); //background-color: rgb(148.6, 212.3, 117.1);
background-color: #fff; background-color: #fff;
padding: 10px;
border-radius: 10px; border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 10px; margin-top: 10px;

View File

@ -1,17 +1,19 @@
<template> <template>
<div class="body_wrapper"> <div class="body_wrapper">
<div class="top"> <div class="top" style="width: 100%">
<el-descriptions <el-form :model="form" style="width: 100%" label-width="auto" class="demo-ruleForm" label-position="top">
title="盘点单" <el-form-item label="备注" style="width: 100%;margin-right: 0">
direction="vertical" <el-input v-model="form.remark" placeholder="请输入单据编号"></el-input>
:column="1" </el-form-item>
/> </el-form>
<el-input class="remark" v-model="remark">
<template #prepend>备注</template>
</el-input>
</div> </div>
<div class="content"> <div class="content">
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch> <div class="add_goods">
<span>盘点药品</span>
<div class="search">
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
</div>
</div>
<table class="simple-table" style="margin-top: 15px;"> <table class="simple-table" style="margin-top: 15px;">
<thead> <thead>
<tr> <tr>
@ -121,8 +123,10 @@
</div> </div>
<div class="bottom"> <div class="bottom">
<el-button @click="save" type="primary">保存</el-button> <div class="btn">
<el-button @click="exit" type="primary">关闭</el-button> <el-button @click="save" type="primary">保存</el-button>
<el-button @click="exit" type="primary">关闭</el-button>
</div>
</div> </div>
</template> </template>
@ -134,17 +138,32 @@
display: flex; display: flex;
min-height: 0; min-height: 0;
flex-direction: column; flex-direction: column;
margin-top: 24px;
.top { .top {
position: relative; position: relative;
width: 100%; width: 100%;
height: 60px;
} }
.content { .content {
display: block; display: block;
width: 100%; width: 100%;
flex: 1; flex: 1;
.add_goods {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 800;
font-size: 18px;
color: #333333;
font-style: normal;
.search {
width: 50%;
}
}
//min-height: 0; //min-height: 0;
table { table {
@ -267,10 +286,20 @@
} }
.bottom { .bottom {
height: 86px;
width: 100%;
margin-top: 10px; margin-top: 10px;
position: absolute; position: absolute;
right: 10px; right: 10px;
bottom: 10px; bottom: 0;
border-top: 1px solid #EAEAEC;
.btn{
width: 100%;
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
}
} }
</style> </style>
<script setup lang="ts"> <script setup lang="ts">
@ -279,7 +308,9 @@ import {post} from "@/utils/request.ts";
import {ref} from "vue"; import {ref} from "vue";
import GoodsSearch from "@/components/inventory/GoodsSearch.vue"; import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
const remark = ref(""); const form = ref<any>({
remark: ""
})
const state = ref([]) const state = ref([])
const options = ref([]) const options = ref([])
@ -446,7 +477,7 @@ let addRow = (goodsId: number) => {
}) })
} }
let save = () => { let save = () => {
post("inventory/check/save", {list: list.value, remark: remark.value}).then((res: any) => { post("inventory/check/save", {list: list.value, remark: form.value.remark}).then((res: any) => {
emit('close'); emit('close');
}) })
// emit('close'); // emit('close');

View File

@ -1,14 +1,11 @@
<template> <template>
<div class="body_wrapper"> <div class="body_wrapper">
<div class="top"> <div class="top">
<el-descriptions <el-form :model="form" style="width: 100%" label-width="auto" class="demo-ruleForm" label-position="top">
title="盘点详情" <el-form-item label="备注" style="width: 100%;margin-right: 0">
direction="vertical" <el-input disabled v-model="form.remark"></el-input>
:column="1" </el-form-item>
/> </el-form>
<el-input class="remark" v-model="remark">
<template #prepend>备注</template>
</el-input>
</div> </div>
<div class="content"> <div class="content">
<table class="simple-table" style="margin-top: 15px;"> <table class="simple-table" style="margin-top: 15px;">
@ -113,7 +110,9 @@
</div> </div>
<div class="bottom"> <div class="bottom">
<el-button @click="exit" type="primary">关闭</el-button> <div class="btn">
<el-button @click="exit" type="primary">关闭</el-button>
</div>
</div> </div>
</template> </template>
@ -125,6 +124,7 @@
display: flex; display: flex;
min-height: 0; min-height: 0;
flex-direction: column; flex-direction: column;
margin-top: 24px;
.top { .top {
position: relative; position: relative;
@ -258,10 +258,20 @@
} }
.bottom { .bottom {
height: 86px;
width: 100%;
margin-top: 10px; margin-top: 10px;
position: absolute; position: absolute;
right: 10px; right: 10px;
bottom: 10px; bottom: 0;
border-top: 1px solid #EAEAEC;
.btn{
width: 100%;
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
}
} }
</style> </style>
<script setup lang="ts"> <script setup lang="ts">
@ -274,8 +284,9 @@ const props = defineProps({
default: null default: null
} }
}) })
const form=ref<any>({
const remark = ref(""); remark: "",
})
interface Check { interface Check {
id?: number, id?: number,
goodsId: number, goodsId: number,

View File

@ -31,10 +31,10 @@
</div> </div>
</div> </div>
</div> </div>
<Mask :width="1200" :height="500" :is-show="showAdd" :top="100" @close="showAdd = false"> <Mask :width="1200" :height="540" :is-show="showAdd" :top="100" @close="showAdd = false" title="新增盘点">
<Add @close="showAdd = false;getCheck()"/> <Add @close="showAdd = false;getCheck()"/>
</Mask> </Mask>
<Mask :width="1200" :height="500" :is-show="showDetail" :top="100" @close="showDetail = false"> <Mask :width="1200" :height="540" :is-show="showDetail" :top="100" @close="showDetail = false" title="查看盘点">
<Detail :id="id" @close="showDetail = false;getCheck()"/> <Detail :id="id" @close="showDetail = false;getCheck()"/>
</Mask> </Mask>
</template> </template>