Merge remote-tracking branch 'origin/main'
# Conflicts: # src/components/inventory/purchase/AddOrder.vue
This commit is contained in:
commit
2e844dd98e
|
|
@ -6,9 +6,18 @@ let _width = ref(0);
|
|||
let _height = ref(0);
|
||||
let _isShow = ref(false);
|
||||
let _close = ref(true);
|
||||
const {width, height, isShow, title, close} = defineProps(['width', 'height', 'isShow', 'title', 'close']);
|
||||
let _showFooter = ref(false);
|
||||
const {
|
||||
width,
|
||||
height,
|
||||
isShow,
|
||||
title,
|
||||
close,
|
||||
showFooter
|
||||
} = defineProps(['width', 'height', 'isShow', 'title', 'close', 'showFooter']);
|
||||
|
||||
_isShow.value = isShow == null ? false : isShow;
|
||||
_showFooter.value = showFooter == null ? false : showFooter;
|
||||
_width.value = width == null ? 1200 : width;
|
||||
_height.value = height == null ? 800 : height;
|
||||
_close.value = close == null ? true : close;
|
||||
|
|
@ -28,18 +37,23 @@ const closeBtn = () => {
|
|||
<transition name="el-fade-in">
|
||||
<div class="mask" v-if="_isShow">
|
||||
<div class="mask-wrapper" :style="{ width: _width + 'px', height: _height + 'px' }" v-if="_isShow">
|
||||
<el-scrollbar height="100%">
|
||||
<div class="header">
|
||||
<div class="title">{{ title }}</div>
|
||||
<div class="close" @click="closeBtn" v-if="_close">
|
||||
<el-icon>
|
||||
<el-icon class="close-icon">
|
||||
<CloseBold/>
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" >
|
||||
<el-scrollbar style="height:100%;margin-top: 0">
|
||||
<slot></slot>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="footer" v-if="_showFooter">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</teleport>
|
||||
|
|
@ -60,44 +74,59 @@ const closeBtn = () => {
|
|||
align-items: center;
|
||||
|
||||
.mask-wrapper {
|
||||
position: relative;
|
||||
background-color: #FFF;
|
||||
border-radius: 6px;
|
||||
padding: 0 20px 20px 20px;
|
||||
overflow: hidden;
|
||||
max-height: 90vh;
|
||||
z-index: 1999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
height: 72px;
|
||||
padding: 0 4px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 24px;
|
||||
border-bottom: 1px solid #EAEAEC;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
font-weight: 800;
|
||||
font-size: 20px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: #EBECED;
|
||||
border-radius: 16px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
|
||||
.close-icon {
|
||||
color: #6e6e6e;
|
||||
font-size: 32px;
|
||||
transform: translateY(-50%);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
height: 86px;
|
||||
background: #FFFFFF;
|
||||
border-top: 1px solid #EAEAEC;
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div class="edit-panel" v-loading="isLoading" element-loading-text="正在保存......">
|
||||
<Mask :width="1200" :top="100" :is-show="isShow" @close="exit"
|
||||
title="新增" :height="760" :show-footer="true">
|
||||
<div class="add-panel" v-loading="isLoading" element-loading-text="正在保存......">
|
||||
<div class="top">
|
||||
<el-form :model="inventory_order_data" label-position="top" :rules="formRules" ref="orderForm">
|
||||
<el-row>
|
||||
|
|
@ -65,7 +67,7 @@
|
|||
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="table_list" style="width: 100%" height="300" max-height="550">
|
||||
<el-table :data="table_list" style="width: 100%;flex: 1">
|
||||
<el-table-column prop="name" label="药品名称" width="180" show-overflow-tooltip/>
|
||||
<el-table-column label="售价" prop="unitPrice" width="80">
|
||||
</el-table-column>
|
||||
|
|
@ -136,23 +138,25 @@
|
|||
<el-button size="small" @click="removeTableRow(scope.row)" type="danger" plain>移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<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>
|
||||
订单总金额:<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="exit">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Mask :is-show="is_add">
|
||||
<Edit ref="editRef" @close="is_add = false;"/>
|
||||
</template>
|
||||
</Mask>
|
||||
<!-- <Mask :is-show="is_add" :top="100">-->
|
||||
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
||||
<!-- </Mask>-->
|
||||
|
||||
</template>
|
||||
|
||||
|
|
@ -230,6 +234,21 @@ const getTotalPrice = () => {
|
|||
}
|
||||
const emit = defineEmits(['close'])
|
||||
let exit = () => {
|
||||
isShow.value = false
|
||||
inventory_order_data.value = {
|
||||
code: null,
|
||||
purchaseDate: getFormattedDate(),
|
||||
userId: null,
|
||||
supplierId: null,
|
||||
remark: null,
|
||||
managerUserId: null,
|
||||
kindConut: 0,
|
||||
totalPrice: 0,
|
||||
shippingCode: null,
|
||||
invoiceCode: null,
|
||||
inventoryOrderGoodsList: []
|
||||
}
|
||||
table_list.value = []
|
||||
emit('close')
|
||||
}
|
||||
const table_list: any = ref([])
|
||||
|
|
@ -272,10 +291,10 @@ let confirm = async () => {
|
|||
inventoryOrder: JSON.parse(JSON.stringify(inventory_order_data.value)),
|
||||
inventoryOrderGoodsList: JSON.parse(JSON.stringify(table_list.value))
|
||||
}
|
||||
|
||||
post("inventory/order/create", data).then((res: any) => {
|
||||
exit()
|
||||
isLoading.value = true
|
||||
post("inventory/order/create", data).then((res: any) => {
|
||||
isLoading.value = false
|
||||
exit()
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
|
|
@ -304,7 +323,7 @@ const removeItem = (row: any) => {
|
|||
}
|
||||
|
||||
}
|
||||
const is_add = ref(false)
|
||||
const isShow = ref(false)
|
||||
const editRef = ref<InstanceType<typeof Edit>>();
|
||||
const supplier_list: any = ref([])
|
||||
const getSupplierList = () => {
|
||||
|
|
@ -313,14 +332,9 @@ const getSupplierList = () => {
|
|||
}
|
||||
post("inventory/supplier/list", {query: query}).then((res: any) => {
|
||||
supplier_list.value = res.list
|
||||
supplier_list.value = res.list
|
||||
})
|
||||
}
|
||||
const userInfo = ref({
|
||||
id: null,
|
||||
name: null,
|
||||
username: null,
|
||||
})
|
||||
const userInfo = ref<any>({})
|
||||
const getUserInfo = () => {
|
||||
post("manager/user/verify", null).then((res: any) => {
|
||||
userInfo.value = res
|
||||
|
|
@ -333,10 +347,12 @@ const removeTableRow = (row: any) => {
|
|||
table_list.value.splice(index, 1);
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
const init = () => {
|
||||
isShow.value = true
|
||||
getSupplierList()
|
||||
getUserInfo()
|
||||
})
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.link {
|
||||
|
|
@ -378,29 +394,24 @@ onMounted(() => {
|
|||
background-color: red;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 86px;
|
||||
.add-panel {
|
||||
height: 602px;
|
||||
padding: 24px 24px 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
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;
|
||||
}
|
||||
flex-direction: column;
|
||||
|
||||
.error {
|
||||
background-color: #F00;
|
||||
}
|
||||
.edit-panel{
|
||||
.top {
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.table_content {
|
||||
flex: 1;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.table_content{
|
||||
margin-top: 24px;
|
||||
.add_goods{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.add_goods {
|
||||
height: 90px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
|
@ -408,9 +419,28 @@ onMounted(() => {
|
|||
font-size: 18px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
.search{
|
||||
|
||||
.search {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
padding: 0 24px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 22px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: #F00;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
<template>
|
||||
<Mask :width="1200" :top="100" :is-show="isShow" @close="exit"
|
||||
title="编辑" :height="720" :show-footer="true">
|
||||
<div class="edit-panel" v-loading="isLoading" element-loading-text="正在保存......">
|
||||
<div class="top">
|
||||
<el-form :model="inventory_order_data" label-position="top" ref="orderForm">
|
||||
|
|
@ -175,6 +177,8 @@
|
|||
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<div class="totalPrice">
|
||||
订单总金额:<span style="color: #FF282E;font-size: 12px">¥</span><span
|
||||
|
|
@ -185,7 +189,9 @@
|
|||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
|
||||
<Mask :is-show="is_add" >
|
||||
<Edit ref="editRef" @close="is_add = false;"/>
|
||||
|
|
@ -202,10 +208,10 @@ import {ElMessage, ElMessageBox} from "element-plus";
|
|||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
|
||||
let props = defineProps({
|
||||
const props = defineProps({
|
||||
code: {
|
||||
type: String,
|
||||
default: null
|
||||
default: ""
|
||||
}
|
||||
})
|
||||
const isLoading = ref(false)
|
||||
|
|
@ -291,10 +297,14 @@ const saveOrderEdit = () => {
|
|||
})
|
||||
|
||||
}
|
||||
onMounted(() => {
|
||||
const isShow = ref<any>(false)
|
||||
const code = ref<any>('')
|
||||
const init = (e: any) => {
|
||||
code.value = e
|
||||
isShow.value = true
|
||||
getSupplierList()
|
||||
getOrderDetail()
|
||||
})
|
||||
}
|
||||
const getTotalPrice = () => {
|
||||
let totalPrice = 0;
|
||||
table_list.value.forEach((item: any) => {
|
||||
|
|
@ -304,6 +314,7 @@ const getTotalPrice = () => {
|
|||
}
|
||||
const emit = defineEmits(['close', 'updateOrderDetail'])
|
||||
let exit = () => {
|
||||
isShow.value = false
|
||||
emit('close')
|
||||
}
|
||||
const table_list: any = ref([])
|
||||
|
|
@ -331,7 +342,7 @@ const getSupplierList = () => {
|
|||
})
|
||||
}
|
||||
const getOrderDetail = () => {
|
||||
post("inventory/order/detail", {code: props.code}).then((res: any) => {
|
||||
post("inventory/order/detail", {code: code.value}).then((res: any) => {
|
||||
inventory_order_data.value = res.inventoryOrder
|
||||
table_list.value = res.inventoryOrderGoodsList
|
||||
})
|
||||
|
|
@ -387,7 +398,7 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
}, 200)
|
||||
}
|
||||
|
||||
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.link {
|
||||
|
|
@ -428,7 +439,38 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
.active {
|
||||
background-color: red;
|
||||
}
|
||||
.edit-panel {
|
||||
height: 562px;
|
||||
padding: 24px 24px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.table_content {
|
||||
flex: 1;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.add_goods {
|
||||
height: 90px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
|
||||
.search {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
height: 86px;
|
||||
display: flex;
|
||||
|
|
@ -439,30 +481,23 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
color: #333333;
|
||||
font-style: normal;
|
||||
background: #fff;
|
||||
box-shadow: 0px -2 4px 0px rgba(0,0,0,0.1);
|
||||
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;
|
||||
|
||||
.bottom {
|
||||
padding: 0 24px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
font-size: 22px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
.search{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -15,13 +15,6 @@
|
|||
</div>
|
||||
</el-form>
|
||||
<el-descriptions title="解析后的数据" size="small" :column="2" border>
|
||||
<!-- <el-descriptions-item-->
|
||||
<!-- align="center"-->
|
||||
<!-- label="定点机构编码"-->
|
||||
<!-- :span="2"-->
|
||||
<!-- >-->
|
||||
<!-- {{ decryptedText.fixmedinsCode }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
label="证书创建时间"
|
||||
|
|
@ -34,6 +27,18 @@
|
|||
>
|
||||
{{ formatDate(decryptedText.expiryDate) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
label="权限"
|
||||
>
|
||||
{{ decryptedText.rule == 1 ? "禁用医保" : decryptedText.rule == 2 ? "全部开放" : "暂无" }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
label="定点机构编码"
|
||||
>
|
||||
{{ decryptedText.fixmedinsCode||'无'}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -65,7 +70,8 @@ onMounted(async () => {
|
|||
</script>
|
||||
<style scoped lang="scss">
|
||||
.auth {
|
||||
margin: 0 auto;
|
||||
margin: 24px auto;
|
||||
padding: 0 24px;
|
||||
|
||||
.btn {
|
||||
margin: 24px 0;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const showAuth = () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="isShowAuth" @close="isShowAuth=false" :width="600" :height="450" title="授权">
|
||||
<Mask :is-show="isShowAuth" @close="isShowAuth=false" :width="600" :height="500" title="授权">
|
||||
<Auth></Auth>
|
||||
</Mask>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container-wrapper">
|
||||
<div class="top">
|
||||
<el-dropdown>
|
||||
<el-button type="primary" :icon="Plus" @click="is_add = true">新增采购</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="openAdd">新增采购</el-button>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="content_list">
|
||||
|
|
@ -46,19 +46,13 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask v-if="!open_code" :width="1200" :top="100" :is-show="is_add" @close="closeAddOrder"
|
||||
title="新增" :height="760">
|
||||
<AddOrder @close="closeAddOrder"/>
|
||||
</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>
|
||||
<AddOrder ref="addOrderRef" @close="closeAddOrder"/>
|
||||
<EditOrder ref="editOrderRef" @close="closeEditOrder" @updateOrderDetail="init"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {onMounted, ref, watch} from "vue";
|
||||
import {nextTick, onMounted, ref, watch} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {useRoute} from "vue-router";
|
||||
import AddOrder from "@/components/inventory/purchase/AddOrder.vue";
|
||||
|
|
@ -67,16 +61,23 @@ import EditOrder from "@/components/inventory/purchase/EditOrder.vue";
|
|||
import {Plus} from "@element-plus/icons-vue";
|
||||
|
||||
let tableData = ref([])
|
||||
let is_add = ref(false)
|
||||
let is_edit = ref(false)
|
||||
const route = useRoute()
|
||||
let open_code = ref(null)
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
const addOrderRef = ref<any>('')
|
||||
const openAdd = () => {
|
||||
nextTick(() => {
|
||||
addOrderRef.value.init()
|
||||
})
|
||||
}
|
||||
const editOrderRef = ref<any>('')
|
||||
let open_edit = (row: any) => {
|
||||
is_edit.value = true
|
||||
open_code.value = row.code
|
||||
nextTick(() => {
|
||||
editOrderRef.value.init(row.code)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -91,7 +92,6 @@ let init = () => {
|
|||
|
||||
}
|
||||
const closeAddOrder = () => {
|
||||
is_add.value = false
|
||||
init()
|
||||
}
|
||||
const closeEditOrder = () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue