Merge remote-tracking branch 'origin/main'

This commit is contained in:
LiJianZhao 2025-04-27 15:47:32 +08:00
commit e4b42268e5
11 changed files with 469 additions and 360 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 () {
ElMessageBox.confirm(
'退出成功并退出签到,即将为您跳转到登录页面,确定吗?',
'退出提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
localStorage.removeItem('token') localStorage.removeItem('token')
ElMessage({
message: "退出成功并退出签到,即将为您跳转到登录页面",
type: 'success',
duration: 1000,
onClose: () => {
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

@ -52,7 +52,6 @@ const handleSelect = (item: any) => {
:remote-method="querySearchAsync" :remote-method="querySearchAsync"
:options="options" :options="options"
placeholder="输入关键字搜索药品" placeholder="输入关键字搜索药品"
:fit-input-width="800"
> >
<template #header> <template #header>
<div class="header"> <div class="header">
@ -87,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,14 +1,23 @@
<template> <template>
<el-descriptions border label-width="100"> <div class="add-panel">
<el-descriptions-item label="领用人" width="200"> <div class="top">
<el-form :inline=true label-position="top" :model="formData" label-width="auto">
<el-form-item label="领用人">
<el-input v-model="formData.name" disabled></el-input> <el-input v-model="formData.name" disabled></el-input>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="备注"> <el-form-item label="备注" style="width: 50%">
<el-input v-model="formData.remark"></el-input> <el-input v-model="formData.remark"></el-input>
</el-descriptions-item> </el-form-item>
</el-descriptions> </el-form>
</div>
<div class="table_content">
<div class="add_apply">
<span>领用药品</span>
<div class="search">
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch> <GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
<table class="simple-table" style="margin-top: 15px"> </div>
</div>
<table class="simple-table" style="margin-top: 15px;width: 100% ;height:300px ;max-height:550px">
<thead> <thead>
<tr> <tr>
<th>名称</th> <th>名称</th>
@ -84,7 +93,8 @@
</td> </td>
<td> <td>
<el-input v-model.number="subItem.outWholeNumber" size="small" style="width: 50px" @change="changeOutNumber(item)"> <el-input v-model.number="subItem.outWholeNumber" size="small" style="width: 50px"
@change="changeOutNumber(item)">
<template #suffix> <template #suffix>
{{ item.packagingUnit }} {{ item.packagingUnit }}
</template> </template>
@ -105,7 +115,8 @@
<el-button type="primary" @click="save">保存</el-button> <el-button type="primary" @click="save">保存</el-button>
<el-button type="primary" @click="exit">关闭</el-button> <el-button type="primary" @click="exit">关闭</el-button>
</div> </div>
</div>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onMounted, ref, unref} from "vue"; import {onMounted, ref, unref} from "vue";
@ -288,6 +299,7 @@ onMounted(() => {
border-bottom: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5;
} }
} }
tbody { tbody {
tr:hover { tr:hover {
background-color: #f5f7fa; /* 悬停效果 */ background-color: #f5f7fa; /* 悬停效果 */
@ -345,15 +357,50 @@ onMounted(() => {
background-color: #fffdec; background-color: #fffdec;
} }
} }
.btn { .btn {
margin-top: 5px; margin-top: 5px;
} }
.add-panel {
position: relative;
margin-top: 24px;
height: 100%;
.table_content {
margin-top: 24px;
display: flex;
flex-direction: column;
.add_apply {
height: 80px;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 800;
font-size: 18px;
color: #333333;
font-style: normal;
.search {
width: 50%;
}
}
.simple-table {
flex: 1;
}
}
}
.bottom { .bottom {
margin-top: 10px; margin-top: 10px;
position: absolute; position: absolute;
right: 10px; right: 10px;
bottom: 10px; top: 175%;
} }
</style> </style>

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">
<div class="add_goods">
<span>盘点药品</span>
<div class="search">
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch> <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,9 +123,11 @@
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="btn">
<el-button @click="save" type="primary">保存</el-button> <el-button @click="save" type="primary">保存</el-button>
<el-button @click="exit" type="primary">关闭</el-button> <el-button @click="exit" type="primary">关闭</el-button>
</div> </div>
</div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
@ -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,8 +110,10 @@
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="btn">
<el-button @click="exit" type="primary">关闭</el-button> <el-button @click="exit" type="primary">关闭</el-button>
</div> </div>
</div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
@ -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

@ -63,7 +63,6 @@
<span>添加商品</span> <span>添加商品</span>
<div class="search"> <div class="search">
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch> <GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
<el-button :icon="Search" type="primary">搜索</el-button>
</div> </div>
</div> </div>
<el-table :data="table_list" style="width: 100%" height="300" max-height="550"> <el-table :data="table_list" style="width: 100%" height="300" max-height="550">
@ -139,16 +138,17 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="totalPrice">
订单总金额{{ inventory_order_data.totalPrice.toFixed(2) }}
</div>
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="totalPrice">
订单总金额<span style="color: #FF282E;font-size: 12px"></span><span style="color: #FF282E">{{ inventory_order_data.totalPrice.toFixed(2) }}</span>
</div>
<div class="btn">
<el-button type="primary" @click="confirm">确认</el-button> <el-button type="primary" @click="confirm">确认</el-button>
<el-button type="primary" @click="exit">关闭</el-button> <el-button type="primary" @click="exit">关闭</el-button>
</div> </div>
</div> </div>
</div>
<Mask :is-show="is_add" :top="100"> <Mask :is-show="is_add" :top="100">
<Edit ref="editRef" @close="is_add = false;"/> <Edit ref="editRef" @close="is_add = false;"/>
@ -339,21 +339,6 @@ onMounted(() => {
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.order_table {
position: relative;
width: 100%;
//background-color: rgb(148.6, 212.3, 117.1);
background-color: #fff;
border-radius: 10px;
box-sizing: border-box;
padding: 10px;
tr {
height: 40px;
}
}
.link { .link {
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 12px;
@ -394,10 +379,17 @@ onMounted(() => {
} }
.bottom { .bottom {
margin-top: 10px; height: 86px;
position: absolute; display: flex;
right: 10px; justify-content: space-between;
bottom: 10px; align-items: center;
font-weight: 400;
font-size: 22px;
color: #333333;
font-style: normal;
background: #fff;
box-shadow: 0px -2 4px 0px rgba(0,0,0,0.1);
border-radius: 0 0 8px 8px;
} }
.error { .error {
@ -408,7 +400,6 @@ onMounted(() => {
} }
.table_content{ .table_content{
margin-top: 24px; margin-top: 24px;
background: #F9FAFC;
.add_goods{ .add_goods{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -418,8 +409,7 @@ onMounted(() => {
color: #333333; color: #333333;
font-style: normal; font-style: normal;
.search{ .search{
display: flex; width: 50%;
align-items: center;
} }
} }
} }

View File

@ -1,14 +1,22 @@
<template> <template>
<div class="edit-panel" v-loading="isLoading" element-loading-text="正在保存......"> <div class="edit-panel" v-loading="isLoading" element-loading-text="正在保存......">
<div class="top"> <div class="top">
<el-descriptions title="采购订单" border> <el-form :model="inventory_order_data" label-position="top" ref="orderForm">
<el-descriptions-item label="订单编号" width="200"> <el-row>
<el-col :span="6">
<el-form-item label="订单编号">
<div style="width: 234px;">
<span class="order-info">{{ inventory_order_data.code }}</span> <span class="order-info">{{ inventory_order_data.code }}</span>
</el-descriptions-item> </div>
<el-descriptions-item label="采购人" width="150"> </el-form-item>
<span class="order-info">{{ inventory_order_data.managerUserName }}</span> </el-col>
</el-descriptions-item> <el-col :span="6">
<el-descriptions-item label="采购日期"> <el-form-item label="采购人">
<span style="width: 234px;" class="order-info">{{ inventory_order_data.managerUserName }}</span>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item prop="purchaseDate" label="采购日期">
<el-date-picker <el-date-picker
v-model="inventory_order_data.purchaseDate" v-model="inventory_order_data.purchaseDate"
type="date" type="date"
@ -16,24 +24,34 @@
size="default" size="default"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-if="orderInfoIsEdit" v-if="orderInfoIsEdit"
style="width: 234px;"
/> />
<span class="order-info" v-else>{{ inventory_order_data.purchaseDate }}</span> <span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.purchaseDate }}</span>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="货单号"> </el-col>
<el-col :span="6">
<el-form-item prop="shippingCode" label="货单号">
<el-input v-model="inventory_order_data.shippingCode" v-if="orderInfoIsEdit"></el-input> <el-input v-model="inventory_order_data.shippingCode" v-if="orderInfoIsEdit"></el-input>
<span class="order-info" v-else>{{ inventory_order_data.shippingCode }}</span> <span class="order-info" v-else>{{ inventory_order_data.shippingCode }}</span>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="发票号"> </el-col>
</el-row>
<el-input v-model="inventory_order_data.invoiceCode" v-if="orderInfoIsEdit"></el-input> <el-row>
<span class="order-info" v-else>{{ inventory_order_data.invoiceCode }}</span> <el-col :span="6">
</el-descriptions-item> <el-form-item prop="invoiceCode" label="发票号">
<el-descriptions-item label="供应商"> <el-input style="width: 234px;" v-model="inventory_order_data.invoiceCode"
v-if="orderInfoIsEdit"></el-input>
<span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.invoiceCode }}</span>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item prop="supplierId" label="供应商">
<el-select <el-select
v-model="inventory_order_data.supplierId" v-model="inventory_order_data.supplierId"
placeholder="请选择供应商" placeholder="请选择供应商"
v-if="orderInfoIsEdit"> v-if="orderInfoIsEdit"
style="width: 234px;"
>
<el-option <el-option
v-for="item in supplier_list" v-for="item in supplier_list"
:key="item.id" :key="item.id"
@ -41,26 +59,31 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<span class="order-info" v-else>{{ inventory_order_data.supplierName }}</span> <span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.supplierName }}</span>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="备注"> </el-col>
<el-input v-model="inventory_order_data.remark" v-if="orderInfoIsEdit"/> <el-col :span="6">
<span class="order-info" v-else>{{ inventory_order_data.remark }}</span> <el-form-item label="备注" style="width: 234px">
</el-descriptions-item> <el-input style="width: 234px;" v-model="inventory_order_data.remark" v-if="orderInfoIsEdit"/>
<el-descriptions-item> <span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.remark }}</span>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作">
<el-button type="primary" @click="saveOrderEdit" v-if="orderInfoIsEdit" plain>保存</el-button> <el-button type="primary" @click="saveOrderEdit" v-if="orderInfoIsEdit" plain>保存</el-button>
<el-button type="primary" @click="editOrder" v-else plain>编辑</el-button> <el-button type="primary" @click="editOrder" v-else plain>编辑</el-button>
</el-descriptions-item> </el-form-item>
</el-descriptions> </el-col>
<span class="btn-add-good" style="font-size: 16px" </el-row>
@click="changeShowGoodSearch">{{ showGoodSearch ? '取消' : '添加药品' }} </el-form>
</span>
<GoodsSearch v-if="showGoodSearch" @selectCallBack="goodsSelectCallBack">
</GoodsSearch>
</div> </div>
<div class="table_content"> <div class="table_content">
<div class="add_goods">
<el-button type="primary" @click="changeShowGoodSearch">{{ showGoodSearch ? '取消' : '添加药品' }}</el-button>
<div class="search">
<GoodsSearch v-if="showGoodSearch" @selectCallBack="goodsSelectCallBack"></GoodsSearch>
</div>
</div>
<el-table :data="table_list" style="width: 100%" height="250"> <el-table :data="table_list" style="width: 100%" height="250">
<el-table-column prop="name" label="药品名称" width="180" show-overflow-tooltip/> <el-table-column prop="name" label="药品名称" width="180" show-overflow-tooltip/>
<el-table-column label="售价" prop="unitPrice" width="80"> <el-table-column label="售价" prop="unitPrice" width="80">
@ -151,18 +174,23 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="totalPrice">
订单总金额{{ inventory_order_data.totalPrice.toFixed(2) }}
</div>
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="totalPrice">
订单总金额<span style="color: #FF282E;font-size: 12px"></span><span
style="color: #FF282E">{{ inventory_order_data.totalPrice.toFixed(2) }}</span>
</div>
<div class="btn">
<el-button type="danger" @click="returnableAll()" plain>整单退货</el-button> <el-button type="danger" @click="returnableAll()" plain>整单退货</el-button>
<el-button type="primary" @click="exit" plain>关闭</el-button> <el-button type="primary" @click="exit">关闭</el-button>
</div> </div>
</div> </div>
</div>
<Mask :is-show="is_add" :top="100"> <Mask :is-show="is_add" :top="100">
<Edit ref="editRef" @close="is_add = false;"/> <Edit ref="editRef" @close="is_add = false;"/>
</Mask> </Mask>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -306,7 +334,6 @@ const getOrderDetail = () => {
post("inventory/order/detail", {code: props.code}).then((res: any) => { post("inventory/order/detail", {code: props.code}).then((res: any) => {
inventory_order_data.value = res.inventoryOrder inventory_order_data.value = res.inventoryOrder
table_list.value = res.inventoryOrderGoodsList table_list.value = res.inventoryOrderGoodsList
console.log(res)
}) })
} }
const addOneGoods = (row: any) => { const addOneGoods = (row: any) => {
@ -363,70 +390,12 @@ const goodsSelectCallBack = (inventory: any) => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.order_table {
position: relative;
width: 100%;
//background-color: rgb(148.6, 212.3, 117.1);
background-color: #fff;
border-radius: 10px;
box-sizing: border-box;
padding: 10px;
tr {
height: 40px;
}
}
.order-info {
line-height: 32px;
}
.search_box {
//background-color: rgb(148.6, 212.3, 117.1);
background-color: #fff;
padding: 10px;
border-radius: 10px;
box-sizing: border-box;
margin-top: 10px;
margin-bottom: 10px;
}
.header {
display: flex;
.text {
font-size: 16px;
width: 200px;
color: #6a6a6a;
}
}
.link { .link {
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 12px;
color: #2e7eb3; color: #2e7eb3;
} }
.btn-add-good {
cursor: pointer;
font-size: 12px;
color: #2e7eb3;
}
.row {
display: flex;
max-height: 500px;
.text {
font-size: 12px;
width: 150px;
margin-left: 10px;
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 显示省略号 */
white-space: nowrap; /* 防止换行 */
}
}
.line { .line {
margin-right: 10px; margin-right: 10px;
@ -461,9 +430,39 @@ const goodsSelectCallBack = (inventory: any) => {
} }
.bottom { .bottom {
margin-top: 10px; height: 86px;
position: absolute; display: flex;
right: 10px; justify-content: space-between;
bottom: 10px; align-items: center;
font-weight: 400;
font-size: 22px;
color: #333333;
font-style: normal;
background: #fff;
box-shadow: 0px -2 4px 0px rgba(0,0,0,0.1);
border-radius: 0 0 8px 8px;
}
.error {
background-color: #F00;
}
.edit-panel{
margin-top: 24px;
}
.table_content{
margin-top: 24px;
.add_goods{
height: 80px;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 800;
font-size: 18px;
color: #333333;
font-style: normal;
.search{
width: 50%;
}
}
} }
</style> </style>

View File

@ -1,45 +1,54 @@
<template> <template>
<el-descriptions <div class="add-supplier" style="width:100%;margin-top: 24px">
direction="vertical" <div class="form">
:column="1" <el-form style="width: 100%" ref="ruleFormRef" :model="formData" :inline=true label-position="top">
> <el-form-item label="供货商名称" style="width: 100%;margin-right: 0">
<el-descriptions-item label="供货商名称"> <el-input style="width: 100%" v-model="formData.name" placeholder="请输入供货商名称"></el-input>
<el-input v-model="formData.name" placeholder="请输入供货商名称"></el-input> </el-form-item>
</el-descriptions-item> <el-row style="width: 100%">
</el-descriptions> <el-col :span="12">
<el-descriptions <el-form-item label="启用状态">
direction="vertical"
:column="2"
>
<el-descriptions-item label="启用状态">
<el-radio-group v-model="formData.turn" size="large"> <el-radio-group v-model="formData.turn" size="large">
<el-radio-button label="禁用" :value="0"/> <el-radio-button label="禁用" :value="0"/>
<el-radio-button label="启用" :value="1"/> <el-radio-button label="启用" :value="1"/>
</el-radio-group> </el-radio-group>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="许可证号"> </el-col>
<el-col :span="12">
<el-form-item label="许可证号" style="margin-right: 0">
<el-input v-model="formData.licenseCode" placeholder="请输入许可证号"></el-input> <el-input v-model="formData.licenseCode" placeholder="请输入许可证号"></el-input>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="联系人"> </el-col>
</el-row>
<el-row style="width: 100%">
<el-col :span="12">
<el-form-item label="联系人">
<el-input v-model="formData.contactName" placeholder="请输入联系人名称"></el-input> <el-input v-model="formData.contactName" placeholder="请输入联系人名称"></el-input>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="联系方式"> </el-col>
<el-col :span="12">
<el-form-item label="联系方式" style="margin-right: 0">
<el-input v-model="formData.contactTel" placeholder="请输入联系方式"></el-input> <el-input v-model="formData.contactTel" placeholder="请输入联系方式"></el-input>
</el-descriptions-item> </el-form-item>
<el-descriptions-item label="备注"> </el-col>
</el-row>
<el-form-item label="备注" style="margin-right: 0;width: 100%">
<el-input v-model="formData.reamark" <el-input v-model="formData.reamark"
type="textarea" rows="5" type="textarea" rows="5"
max="200" max="200"
show-word-limit show-word-limit
placeholder="请输入备注"> placeholder="请输入备注"
style="width: 100%"
>
</el-input> </el-input>
</el-descriptions-item> </el-form-item>
</el-descriptions> </el-form>
</div>
</div>
<div class="btn"> <div class="btn">
<el-button type="primary" @click="save">确定</el-button> <el-button type="primary" @click="save">确定</el-button>
<el-button @click="close">取消</el-button> <el-button @click="close">取消</el-button>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

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>

View File

@ -2,11 +2,11 @@
<div class="container-wrapper"> <div class="container-wrapper">
<div class="top"> <div class="top">
<el-dropdown> <el-dropdown>
<el-button type="primary" :icon="Plus" @click="open_add(null)">新增采购</el-button> <el-button type="primary" :icon="Plus" @click="is_add = true">新增采购</el-button>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="content_list"> <div class="content_list">
<el-table :data="tableData" style="width: 100%" @row-click="open_add"> <el-table :data="tableData" style="width: 100%" @row-click="open_edit">
<el-table-column fixed label="进货单号" width="250" show-overflow-tooltip> <el-table-column fixed label="进货单号" width="250" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<div class="link">{{ scope.row.code }}</div> <div class="link">{{ scope.row.code }}</div>
@ -46,10 +46,13 @@
/> />
</div> </div>
</div> </div>
<Mask :width="1200" :top="100" :is-show="is_add" @close="is_add=false" <Mask v-if="!open_code" :width="1200" :top="100" :is-show="is_add" @close="closeAddOrder"
:title="open_code?'编辑':'新增'"> title="新增" :height="760">
<AddOrder v-if="!open_code" @close="closeAddOrder"/> <AddOrder @close="closeAddOrder"/>
<EditOrder v-else :code="open_code" @close="is_add=false" @updateOrderDetail="init"/> </Mask>
<Mask v-else :width="1200" :top="100" :is-show="is_edit" @close="closeEditOrder"
title="编辑" :height="720">
<EditOrder :code="open_code" @close="closeEditOrder" @updateOrderDetail="init"/>
</Mask> </Mask>
</div> </div>
</template> </template>
@ -65,18 +68,15 @@ import {Plus} from "@element-plus/icons-vue";
let tableData = ref([]) let tableData = ref([])
let is_add = ref(false) let is_add = ref(false)
let is_edit = ref(false)
const route = useRoute() const route = useRoute()
let open_code = ref(null) let open_code = ref(null)
onMounted(() => { onMounted(() => {
init() init()
}) })
let open_add = (row: any) => { let open_edit = (row: any) => {
is_add.value = true is_edit.value = true
if (row!=null) {
open_code.value = row.code open_code.value = row.code
}else{
open_code.value = null
}
} }
@ -94,6 +94,11 @@ const closeAddOrder = () => {
is_add.value = false is_add.value = false
init() init()
} }
const closeEditOrder = () => {
open_code.value = null
is_edit.value = false
init()
}
// //
let pageSize = ref(20) let pageSize = ref(20)
let total = ref(0) let total = ref(0)

View File

@ -33,7 +33,7 @@
/> />
</div> </div>
</div> </div>
<Mask :width="400" :height="600" :is-show="showAdd" :top="100" @close="showAdd = false" :title="id?'编辑':'添加'"> <Mask :width="540" :height="603" :is-show="showAdd" :top="100" @close="showAdd = false" :title="id?'编辑':'添加供应商'">
<AddSupplier @close="showAdd = false" @saveSuccess="getSupplier()" ref="addSupplierRef"></AddSupplier> <AddSupplier @close="showAdd = false" @saveSuccess="getSupplier()" ref="addSupplierRef"></AddSupplier>
</Mask> </Mask>
</div> </div>