Merge remote-tracking branch 'origin/main'
# Conflicts: # src/components/common/Header.vue # src/components/common/Mask.vue # src/components/inventory/goods/Edit.vue # src/components/inventory/goods/Search.vue # src/components/outpatient/PharmaceuticalConsumables.vue # src/components/outpatient/ServiceItems.vue # src/components/settings/ItemEdit.vue # src/components/settings/Search.vue # src/components/settings/SectionEdit.vue # src/views/inventory/apply.vue # src/views/inventory/check.vue # src/views/inventory/goods.vue # src/views/inventory/supplier.vue
This commit is contained in:
commit
b774eb806b
|
|
@ -10,7 +10,7 @@
|
|||
"dependencies": {
|
||||
"axios": "^1.8.4",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.9.7",
|
||||
"element-plus": "^2.9.9",
|
||||
"pinia": "^3.0.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0"
|
||||
|
|
@ -2511,9 +2511,9 @@
|
|||
"license": "ISC"
|
||||
},
|
||||
"node_modules/element-plus": {
|
||||
"version": "2.9.7",
|
||||
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.9.7.tgz",
|
||||
"integrity": "sha512-6vjZh5SXBncLhUwJGTVKS5oDljfgGMh6J4zVTeAZK3YdMUN76FgpvHkwwFXocpJpMbii6rDYU3sgie64FyPerQ==",
|
||||
"version": "2.9.9",
|
||||
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.9.9.tgz",
|
||||
"integrity": "sha512-gN553+xr7ETkhJhH26YG0fERmd2BSCcQKslbtR8fats0Mc0yCtZOXr00bmoPOt5xGzhuRN1TWc9+f1pCaiA0/Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"dependencies": {
|
||||
"axios": "^1.8.4",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.9.7",
|
||||
"element-plus": "^2.9.9",
|
||||
"pinia": "^3.0.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0"
|
||||
|
|
|
|||
|
|
@ -20,5 +20,10 @@
|
|||
"name": "代理名称",
|
||||
"qrCode": "qrCode.png",
|
||||
"phone": "18888888888"
|
||||
},
|
||||
"user": {
|
||||
"name": "智慧医疗诊所",
|
||||
"logo": "/static/images/default_logo.png",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 223 KiB |
|
|
@ -12,7 +12,7 @@
|
|||
<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>
|
||||
<div class="btn">
|
||||
<el-button :icon="Right" style="float: right;color: #fff" @click="logout">退出登录</el-button>
|
||||
<el-button :icon="Right" style="float: right;color: #fff" @click="logout" text>退出登录</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ _width.value = width == null ? 1200 : width;
|
|||
_height.value = height == null ? 800 : height;
|
||||
_close.value = close == null ? true : close;
|
||||
|
||||
|
||||
watch(() => isShow, (newVal) => {
|
||||
_isShow.value = newVal == null ? false : newVal;
|
||||
});
|
||||
|
|
@ -104,6 +103,7 @@ const closeBtn = () => {
|
|||
border-radius: 16px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
.close-icon {
|
||||
color: #6e6e6e;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,46 @@
|
|||
<script setup lang="ts">
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {onMounted, ref, defineModel} from "vue";
|
||||
import {formatDate} from "@/utils/dateUtils.ts";
|
||||
import {loadConfig} from "@/utils/config.ts";
|
||||
|
||||
const decryptedText = ref<any>({})
|
||||
const ciphertext = ref<any>('')
|
||||
const init = async () => {
|
||||
ciphertext.value = await post("common/auth/get");
|
||||
decryptedText.value = await post("common/auth/check");
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if(localStorage.getItem('logoUrl')){
|
||||
getImageUrl(localStorage.getItem('logoUrl'))
|
||||
}
|
||||
})
|
||||
const userMessage = defineModel<any>()
|
||||
const imageUrl = ref<any>()
|
||||
const getImageUrl = (url: any) => {
|
||||
loadConfig().then(res => {
|
||||
imageUrl.value = res.base_url + 'file/getImage/' + url
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Panel title="药房基本信息" class="info">
|
||||
<div class="info-content">
|
||||
<img class="image" src="/static/images/home/app-head.png" alt="app">
|
||||
<img class="image" :src="imageUrl? imageUrl:userMessage.logo" alt="app">
|
||||
<div class="app_info-content-text">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="'仁德大药房连锁有限公司'"
|
||||
:content="userMessage.name"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<div class="app_info-title">仁德大药房连锁有限公司</div>
|
||||
<div class="app_info-title">{{ userMessage.name }}</div>
|
||||
</el-tooltip>
|
||||
<div>软件版本:V2.5.1</div>
|
||||
<div style="margin: 10px 0">授权到期:2024-12-31</div>
|
||||
<div>版本类型:专业版</div>
|
||||
<div>软件版本:{{ userMessage.version }}</div>
|
||||
<div style="margin: 10px 0">授权到期:{{ formatDate(decryptedText.expiryDate) }}</div>
|
||||
<div>版本类型: {{ decryptedText.rule == 1 ? "禁用医保" : decryptedText.rule == 2 ? "全部开放" : "暂无" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<Mask :width="1200" :height="600" :top="100" :is-show="isShow" @close="exit" title="新增领用" :show-footer="true">
|
||||
<div class="add-panel">
|
||||
<div class="top">
|
||||
<el-form :inline=true label-position="top" :model="formData" label-width="auto">
|
||||
|
|
@ -111,23 +112,29 @@
|
|||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref, unref} from "vue";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
|
||||
const isShow = ref<any>(false)
|
||||
const emit = defineEmits(['close'])
|
||||
const exit = () => {
|
||||
isShow.value = false
|
||||
emit('close')
|
||||
|
||||
}
|
||||
|
||||
const formData = ref({
|
||||
|
|
@ -162,7 +169,7 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
if (findIndexForTableList(inventory.goodId) != -1) {
|
||||
return
|
||||
}
|
||||
post("inventory/goods/getByGoodsId", {goodsId: inventory.goodId}).then((res: any) => {
|
||||
post("inventory/goods/getByGoodsId", {goodsId: inventory.goodId,isZero:false}).then((res: any) => {
|
||||
inventory.batchList = res.inventoryGoodsList
|
||||
inventory.minPackagingUnit = res.minPackagingUnit
|
||||
inventory.trdnFlag = res.trdnFlag
|
||||
|
|
@ -173,7 +180,6 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
inventory.packagingUnit = res.packagingUnit
|
||||
tableList.value.push(inventory)
|
||||
})
|
||||
console.log(inventory)
|
||||
}
|
||||
|
||||
interface childCheck {
|
||||
|
|
@ -228,7 +234,6 @@ const addLine = (row: any) => {
|
|||
}
|
||||
|
||||
row.children = children;
|
||||
console.log("row", row)
|
||||
})
|
||||
}
|
||||
const changeOutNumber = (row: any) => {
|
||||
|
|
@ -244,25 +249,6 @@ const changeOutNumber = (row: any) => {
|
|||
console.log(row)
|
||||
}
|
||||
const save = () => {
|
||||
let children = [];
|
||||
console.log(tableList.value)
|
||||
// for (let i = 0; i < tableList.value.length; i++) {
|
||||
// let item = tableList.value[i];
|
||||
// for (let j = 0; j < item.children.length; j++) {
|
||||
// let child = item.children[j];
|
||||
// if (child && (child.outWholeNumber > 0 || child.outFragmentNumber > 0)) {
|
||||
// let childrenItem = {
|
||||
// id: child.id,
|
||||
// outWholeNumber: child.outWholeNumber,
|
||||
// outFragmentNumber: child.outFragmentNumber,
|
||||
// }
|
||||
// children.push(childrenItem);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// let dataJson = JSON.stringify(tableList.value);
|
||||
post("inventory/apply/create", {useInfo: formData.value, data: tableList.value}).then((res: any) => {
|
||||
exit()
|
||||
})
|
||||
|
|
@ -270,15 +256,14 @@ const save = () => {
|
|||
|
||||
}
|
||||
const getUserInfo = () => {
|
||||
isShow.value = true
|
||||
post("manager/user/verify", null).then((res: any) => {
|
||||
formData.value.useUserId = res.id;
|
||||
formData.value.name = res.name;
|
||||
formData.value.username = res.username;
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
getUserInfo()
|
||||
})
|
||||
defineExpose({getUserInfo})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.simple-table {
|
||||
|
|
@ -366,6 +351,7 @@ onMounted(() => {
|
|||
position: relative;
|
||||
margin-top: 24px;
|
||||
height: 100%;
|
||||
padding: 0 24px;
|
||||
|
||||
.table_content {
|
||||
margin-top: 24px;
|
||||
|
|
@ -397,10 +383,10 @@ onMounted(() => {
|
|||
|
||||
|
||||
.bottom {
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 175%;
|
||||
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
<template>
|
||||
<Mask :width="1200" :height="600" :top="100" :is-show="isShow" @close="exit" title="查看领用" :show-footer="true">
|
||||
<div style="margin-top: 24px;padding: 0 24px">
|
||||
<el-descriptions border label-width="100">
|
||||
<el-descriptions-item label="领用人" width="200">
|
||||
<el-input v-model="formData.name" disabled></el-input>
|
||||
|
|
@ -94,14 +96,19 @@
|
|||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref, defineProps} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
|
||||
const props = defineProps({
|
||||
id: {
|
||||
|
|
@ -109,11 +116,17 @@ const props = defineProps({
|
|||
default: null
|
||||
}
|
||||
})
|
||||
|
||||
const isShow = ref<any>(false)
|
||||
const emit = defineEmits(['close'])
|
||||
const exit = () => {
|
||||
formData.value = {
|
||||
useUserId: null,
|
||||
name: '',
|
||||
username: "",
|
||||
remark: ''
|
||||
}
|
||||
isShow.value = false
|
||||
emit('close')
|
||||
|
||||
}
|
||||
|
||||
const formData = ref({
|
||||
|
|
@ -194,22 +207,27 @@ const addLine = (row: any) => {
|
|||
})
|
||||
}
|
||||
const getUserInfo = () => {
|
||||
post("manager/user/verify", null).then((res: any) => {
|
||||
post("manager/user/verify").then((res: any) => {
|
||||
formData.value.useUserId = res.id;
|
||||
formData.value.name = res.name;
|
||||
formData.value.username = res.username;
|
||||
})
|
||||
}
|
||||
const detail = () => {
|
||||
post("inventory/apply/getApplyDetail", {id: props.id}).then((res: any) => {
|
||||
const detail = (id: any) => {
|
||||
isShow.value = true
|
||||
post("inventory/apply/getApplyDetail", {id}).then((res: any) => {
|
||||
formData.value = res.useInfo;
|
||||
tableList.value = JSON.parse(res);
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
getUserInfo()
|
||||
detail()
|
||||
|
||||
})
|
||||
const init=(id: any) => {
|
||||
getUserInfo()
|
||||
detail(id)
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.simple-table {
|
||||
|
|
@ -231,6 +249,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr:hover {
|
||||
background-color: #f5f7fa; /* 悬停效果 */
|
||||
|
|
@ -287,15 +306,17 @@ tbody {
|
|||
background-color: #fffdec;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
.bottom {
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<Mask :width="1200" :height="540" :is-show="isShow" :top="100" @close="exit" title="新增盘点" :show-footer="true">
|
||||
<div class="body_wrapper">
|
||||
<div class="top" style="width: 100%">
|
||||
<el-form :model="form" style="width: 100%" label-width="auto" class="demo-ruleForm" label-position="top">
|
||||
|
|
@ -121,7 +122,7 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<div class="btn">
|
||||
<el-button @click="save" type="primary">保存</el-button>
|
||||
|
|
@ -129,16 +130,206 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ref} from "vue";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const form = ref<any>({
|
||||
remark: ""
|
||||
})
|
||||
const state = ref([])
|
||||
const goodsSelectCallBack = (item: any) => {
|
||||
|
||||
if (findIndexForTableList(item.goodId) != -1) {
|
||||
return
|
||||
}
|
||||
addRow(item.goodId);
|
||||
state.value = []
|
||||
}
|
||||
const findIndexForTableList = (goodId: any) => {
|
||||
return list.value.findIndex((item: any) => item.goodsId === goodId);
|
||||
}
|
||||
|
||||
|
||||
interface Check {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingUnit: string,
|
||||
packagingUnit: string,
|
||||
minPackagingNumber: number,
|
||||
listSize: number,
|
||||
trdnFlag: number,
|
||||
childIdList: number[],
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
children: childCheck[],
|
||||
selectList: seletcType[],
|
||||
}
|
||||
|
||||
interface seletcType {
|
||||
id: number,
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
productionBatchCode: string,
|
||||
productionDate: string,
|
||||
expiryDate: string,
|
||||
purchaseUnitPrice: string
|
||||
}
|
||||
|
||||
interface childCheck {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingNumber: number,
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const list = ref<Check[]>([])
|
||||
const emit = defineEmits(['close'])
|
||||
let setChange = function (row: any) {
|
||||
let totalBefore = row.before.wholeNumber * row.minPackagingNumber + row.before.fragmentNumber; // 使用原始数据
|
||||
let totalAfter = row.after.wholeNumber * row.minPackagingNumber + row.after.fragmentNumber; // 使用原始数据
|
||||
console.log(totalBefore, totalAfter)
|
||||
let diff = totalAfter - totalBefore;
|
||||
|
||||
row.change.wholeNumber = Math.trunc(diff / row.minPackagingNumber);
|
||||
row.change.fragmentNumber = diff % row.minPackagingNumber
|
||||
}
|
||||
let addLine = (row: any) => {
|
||||
post("inventory/goods/getListByIds", {idList: row.childIdList}).then((list: any) => {
|
||||
let children = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let inventoryGoods = list[i];
|
||||
let index = row.children.findIndex((item: any) => item.id === inventoryGoods.id);
|
||||
if (index > -1) {
|
||||
children.push(row.children[index]);
|
||||
} else {
|
||||
let childCheck: childCheck = {
|
||||
name: inventoryGoods.name,
|
||||
id: inventoryGoods.id,
|
||||
goodsId: inventoryGoods.goodId,
|
||||
minPackagingNumber: row.minPackagingNumber,
|
||||
before: {
|
||||
wholeNumber: inventoryGoods.wholeNumber,
|
||||
fragmentNumber: inventoryGoods.fragmentNumber,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: inventoryGoods.wholeNumber,
|
||||
fragmentNumber: inventoryGoods.fragmentNumber,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: 0,
|
||||
fragmentNumber: 0,
|
||||
}
|
||||
}
|
||||
children.push(childCheck);
|
||||
}
|
||||
}
|
||||
|
||||
row.children = children;
|
||||
})
|
||||
}
|
||||
let addRow = (goodsId: number) => {
|
||||
post("inventory/goods/getByGoodsId", {goodsId, isZero: true}).then((res: any) => {
|
||||
let check: Check = {
|
||||
goodsId: res.id,
|
||||
name: res.name,
|
||||
listSize: res.listSize,
|
||||
childIdList: [],
|
||||
minPackagingNumber: res.minPackagingNumber,
|
||||
packagingUnit: res.packagingUnit,
|
||||
minPackagingUnit: res.minPackagingUnit,
|
||||
trdnFlag: res.trdnFlag,
|
||||
before: {
|
||||
wholeNumber: res.wholeNumber,
|
||||
fragmentNumber: res.fragmentNumber,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: res.wholeNumber,
|
||||
fragmentNumber: res.fragmentNumber,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: 0,
|
||||
fragmentNumber: 0,
|
||||
},
|
||||
children: [],
|
||||
selectList: [],
|
||||
}
|
||||
let inventoryGoodsList = res.inventoryGoodsList
|
||||
|
||||
for (let i = 0; i < inventoryGoodsList.length; i++) {
|
||||
let inventoryGoods = inventoryGoodsList[i];
|
||||
let childCheck: seletcType = {
|
||||
id: inventoryGoods.id,
|
||||
wholeNumber: inventoryGoods.wholeNumber,
|
||||
fragmentNumber: inventoryGoods.fragmentNumber,
|
||||
productionBatchCode: inventoryGoods.productionBatchCode,
|
||||
productionDate: inventoryGoods.productionDate,
|
||||
expiryDate: inventoryGoods.expiryDate,
|
||||
purchaseUnitPrice: inventoryGoods.purchaseUnitPrice,
|
||||
}
|
||||
check.selectList.push(childCheck)
|
||||
}
|
||||
list.value.push(check)
|
||||
})
|
||||
}
|
||||
let save = () => {
|
||||
post("inventory/check/save", {list: list.value, remark: form.value.remark}).then((res: any) => {
|
||||
ElMessage.success('保存成功')
|
||||
exit()
|
||||
})
|
||||
}
|
||||
let exit = () => {
|
||||
form.value = {
|
||||
remark: ""
|
||||
}
|
||||
list.value=[]
|
||||
isShow.value = false
|
||||
emit('close');
|
||||
}
|
||||
const isShow = ref<any>(false)
|
||||
const init = () => {
|
||||
isShow.value = true
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.body_wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
flex-direction: column;
|
||||
margin-top: 24px;
|
||||
padding: 0 24px;
|
||||
|
||||
.top {
|
||||
position: relative;
|
||||
|
|
@ -286,203 +477,10 @@
|
|||
}
|
||||
|
||||
.bottom {
|
||||
height: 86px;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
border-top: 1px solid #EAEAEC;
|
||||
.btn{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
<script setup lang="ts">
|
||||
import {onMounted} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ref} from "vue";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
|
||||
const form = ref<any>({
|
||||
remark: ""
|
||||
})
|
||||
const state = ref([])
|
||||
const options = ref([])
|
||||
|
||||
|
||||
const goodsSelectCallBack = (item: any) => {
|
||||
|
||||
if (findIndexForTableList(item.goodId) != -1) {
|
||||
return
|
||||
}
|
||||
addRow(item.goodId);
|
||||
state.value = []
|
||||
}
|
||||
const findIndexForTableList = (goodId: any) => {
|
||||
return list.value.findIndex((item: any) => item.goodsId === goodId);
|
||||
}
|
||||
|
||||
|
||||
interface Check {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingUnit: string,
|
||||
packagingUnit: string,
|
||||
minPackagingNumber: number,
|
||||
listSize: number,
|
||||
trdnFlag: number,
|
||||
childIdList: number[],
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
children: childCheck[],
|
||||
selectList: seletcType[],
|
||||
}
|
||||
|
||||
interface seletcType {
|
||||
id: number,
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
productionBatchCode: string,
|
||||
productionDate: string,
|
||||
expiryDate: string,
|
||||
purchaseUnitPrice: string
|
||||
}
|
||||
|
||||
interface childCheck {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingNumber: number,
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const list = ref<Check[]>([])
|
||||
const emit = defineEmits(['close'])
|
||||
onMounted(() => {
|
||||
//addRow(1);
|
||||
})
|
||||
let setChange = function (row: any) {
|
||||
let totalBefore = row.before.wholeNumber * row.minPackagingNumber + row.before.fragmentNumber; // 使用原始数据
|
||||
let totalAfter = row.after.wholeNumber * row.minPackagingNumber + row.after.fragmentNumber; // 使用原始数据
|
||||
console.log(totalBefore, totalAfter)
|
||||
let diff = totalAfter - totalBefore;
|
||||
|
||||
row.change.wholeNumber = Math.trunc(diff / row.minPackagingNumber);
|
||||
row.change.fragmentNumber = diff % row.minPackagingNumber
|
||||
}
|
||||
let addLine = (row: any) => {
|
||||
post("inventory/goods/getListByIds", {idList: row.childIdList}).then((list: any) => {
|
||||
let children = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let inventoryGoods = list[i];
|
||||
let index = row.children.findIndex((item: any) => item.id === inventoryGoods.id);
|
||||
if (index > -1) {
|
||||
children.push(row.children[index]);
|
||||
} else {
|
||||
let childCheck: childCheck = {
|
||||
name: inventoryGoods.name,
|
||||
id: inventoryGoods.id,
|
||||
goodsId: inventoryGoods.goodId,
|
||||
minPackagingNumber: row.minPackagingNumber,
|
||||
before: {
|
||||
wholeNumber: inventoryGoods.wholeNumber,
|
||||
fragmentNumber: inventoryGoods.fragmentNumber,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: inventoryGoods.wholeNumber,
|
||||
fragmentNumber: inventoryGoods.fragmentNumber,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: 0,
|
||||
fragmentNumber: 0,
|
||||
}
|
||||
}
|
||||
children.push(childCheck);
|
||||
}
|
||||
}
|
||||
|
||||
row.children = children;
|
||||
})
|
||||
}
|
||||
let addRow = (goodsId: number) => {
|
||||
post("inventory/goods/getByGoodsId", {goodsId}).then((res: any) => {
|
||||
let check: Check = {
|
||||
goodsId: res.id,
|
||||
name: res.name,
|
||||
listSize: res.listSize,
|
||||
childIdList: [],
|
||||
minPackagingNumber: res.minPackagingNumber,
|
||||
packagingUnit: res.packagingUnit,
|
||||
minPackagingUnit: res.minPackagingUnit,
|
||||
trdnFlag: res.trdnFlag,
|
||||
before: {
|
||||
wholeNumber: res.wholeNumber,
|
||||
fragmentNumber: res.fragmentNumber,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: res.wholeNumber,
|
||||
fragmentNumber: res.fragmentNumber,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: 0,
|
||||
fragmentNumber: 0,
|
||||
},
|
||||
children: [],
|
||||
selectList: [],
|
||||
}
|
||||
let inventoryGoodsList = res.inventoryGoodsList
|
||||
|
||||
for (let i = 0; i < inventoryGoodsList.length; i++) {
|
||||
let inventoryGoods = inventoryGoodsList[i];
|
||||
let childCheck: seletcType = {
|
||||
id: inventoryGoods.id,
|
||||
wholeNumber: inventoryGoods.wholeNumber,
|
||||
fragmentNumber: inventoryGoods.fragmentNumber,
|
||||
productionBatchCode: inventoryGoods.productionBatchCode,
|
||||
productionDate: inventoryGoods.productionDate,
|
||||
expiryDate: inventoryGoods.expiryDate,
|
||||
purchaseUnitPrice: inventoryGoods.purchaseUnitPrice,
|
||||
}
|
||||
check.selectList.push(childCheck)
|
||||
}
|
||||
list.value.push(check)
|
||||
})
|
||||
}
|
||||
let save = () => {
|
||||
post("inventory/check/save", {list: list.value, remark: form.value.remark}).then((res: any) => {
|
||||
emit('close');
|
||||
})
|
||||
// emit('close');
|
||||
}
|
||||
let exit = () => {
|
||||
emit('close');
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<Mask :width="1200" :height="540" :is-show="isShow" :top="100" @close="exit" title="查看盘点" :show-footer="true">
|
||||
<div class="body_wrapper">
|
||||
<div class="top">
|
||||
<el-form :model="form" style="width: 100%" label-width="auto" class="demo-ruleForm" label-position="top">
|
||||
|
|
@ -108,23 +109,118 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<div class="btn">
|
||||
<el-button @click="exit" type="primary">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import {onMounted,defineProps} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ref} from "vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
})
|
||||
const form=ref<any>({
|
||||
remark: "",
|
||||
})
|
||||
interface Check {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingUnit: string,
|
||||
packagingUnit: string,
|
||||
minPackagingNumber: number,
|
||||
listSize: number,
|
||||
trdnFlag: number,
|
||||
childIdList: number[],
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
children: childCheck[],
|
||||
selectList: seletcType[],
|
||||
}
|
||||
|
||||
interface seletcType {
|
||||
id: number,
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
productionBatchCode: string,
|
||||
productionDate: string,
|
||||
expiryDate: string,
|
||||
purchaseUnitPrice: string
|
||||
}
|
||||
|
||||
interface childCheck {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingNumber: number,
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const list = ref<Check[]>([])
|
||||
const emit = defineEmits(['close'])
|
||||
let exit = () => {
|
||||
form.value = {
|
||||
remark: ""
|
||||
}
|
||||
list.value=[]
|
||||
isShow.value = false
|
||||
emit('close');
|
||||
}
|
||||
const detail = (id: any) => {
|
||||
isShow.value = true
|
||||
post("inventory/check/getCheckDetail",{id}).then((res: any) => {
|
||||
list.value = JSON.parse(res);
|
||||
})
|
||||
}
|
||||
const isShow = ref(false)
|
||||
defineExpose({detail})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.body_wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
flex-direction: column;
|
||||
margin-top: 24px;
|
||||
padding: 0 24px;
|
||||
|
||||
.top {
|
||||
position: relative;
|
||||
|
|
@ -258,104 +354,10 @@
|
|||
}
|
||||
|
||||
.bottom {
|
||||
height: 86px;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
border-top: 1px solid #EAEAEC;
|
||||
.btn{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
<script setup lang="ts">
|
||||
import {onMounted,defineProps} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ref} from "vue";
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
})
|
||||
const form=ref<any>({
|
||||
remark: "",
|
||||
})
|
||||
interface Check {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingUnit: string,
|
||||
packagingUnit: string,
|
||||
minPackagingNumber: number,
|
||||
listSize: number,
|
||||
trdnFlag: number,
|
||||
childIdList: number[],
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
children: childCheck[],
|
||||
selectList: seletcType[],
|
||||
}
|
||||
|
||||
interface seletcType {
|
||||
id: number,
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
productionBatchCode: string,
|
||||
productionDate: string,
|
||||
expiryDate: string,
|
||||
purchaseUnitPrice: string
|
||||
}
|
||||
|
||||
interface childCheck {
|
||||
id?: number,
|
||||
goodsId: number,
|
||||
name: string,
|
||||
minPackagingNumber: number,
|
||||
before: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
after: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
},
|
||||
change: {
|
||||
wholeNumber: number,
|
||||
fragmentNumber: number,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const list = ref<Check[]>([])
|
||||
const emit = defineEmits(['close'])
|
||||
onMounted(() => {
|
||||
detail()
|
||||
})
|
||||
let exit = () => {
|
||||
emit('close');
|
||||
}
|
||||
const detail = () => {
|
||||
post("inventory/check/getCheckDetail",{id: props.id}).then((res: any) => {
|
||||
list.value = JSON.parse(res);
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({detail})
|
||||
</script>
|
||||
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
|
||||
<template>
|
||||
<CloseBtn @click="close"></CloseBtn>
|
||||
<!-- <div class="close" @click="close"><el-icon><Close /></el-icon></div>-->
|
||||
<Mask :width="400" :height="600" :top="100" :is-show="isShow" @close="isShow=false" :show-fotter="true" title="药品列表">
|
||||
<el-table
|
||||
:data="cateList"
|
||||
style="width: 100%"
|
||||
|
|
@ -32,20 +29,28 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-divider/>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="add" id="add">添加</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, onUnmounted, ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
import {ArrowUpBold, ArrowDownBold, Delete, Edit} from "@element-plus/icons-vue";
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
},
|
||||
})
|
||||
|
||||
interface CateItem {
|
||||
id?: number;
|
||||
name: string;
|
||||
|
|
@ -54,6 +59,7 @@ interface CateItem {
|
|||
isAdd: boolean;
|
||||
sort: number;
|
||||
}
|
||||
|
||||
const cateList = ref<CateItem[]>([]);
|
||||
const getCateList = () => {
|
||||
post("goods/cate/list", {type: props.type}).then((res: any) => {
|
||||
|
|
@ -77,12 +83,13 @@ const handleClickOutside = (event: MouseEvent) => {
|
|||
};
|
||||
const emit = defineEmits(['close'])
|
||||
const close = () => {
|
||||
isShow.value = false
|
||||
emit('close')
|
||||
}
|
||||
const isShow = ref<any>(false)
|
||||
const getCountByCateId = (cateId: any) => {
|
||||
let count = 0;
|
||||
post("goods/goods/getByCateId",{cateId:cateId}).
|
||||
then((res:any)=>{
|
||||
post("goods/goods/getByCateId", {cateId: cateId}).then((res: any) => {
|
||||
count = res
|
||||
ElMessageBox.confirm(
|
||||
`有${count}个西药属于该二级分类,删除后将一同清空西药的分类。是否确定删除?`,
|
||||
|
|
@ -98,7 +105,6 @@ const getCountByCateId = (cateId:any)=>{
|
|||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
const del = async (id: any) => {
|
||||
await post("goods/cate/del", {id})
|
||||
|
|
@ -165,8 +171,17 @@ const cancelAdd = ()=>{
|
|||
font-size: 24px;
|
||||
z-index: 1999;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
|
||||
<div class="header">
|
||||
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0" plain>
|
||||
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0"
|
||||
plain>
|
||||
一键建档
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -331,27 +333,26 @@
|
|||
</el-descriptions>
|
||||
<el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px">
|
||||
<el-descriptions-item label="医保对码">
|
||||
<SocialInfo v-model="edit_data.hilistCode" v-if="edit_data.hilistCode" @openSearch="openContrastCodeSearch"></SocialInfo>
|
||||
<SocialInfo v-model="edit_data.hilistCode" v-if="edit_data.hilistCode"
|
||||
@openSearch="openContrastCodeSearch"></SocialInfo>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
</div>
|
||||
|
||||
<!-- 新增关闭按钮 -->
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
<el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button>
|
||||
<el-button @click="save" type="primary">保存</el-button>
|
||||
<el-button @click="exit" plain>关闭</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</Mask>
|
||||
<!-- 新增关闭按钮 -->
|
||||
<Search ref="createSearchRef" @confirm="createConfirm"/>
|
||||
<Search ref="contrastCodeSearch" @confirm="contrastCodeConfirm"/>
|
||||
<Mask :width="400" :height="600" :is-show="show_cate">
|
||||
<Cate :type="_type" @close="cateCloseCallBack"/>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
|
|
@ -370,6 +371,7 @@ import SocialInfo from "@/components/inventory/goods/SocialInfo.vue";
|
|||
let _type = ref(0);
|
||||
let type = ref(0);
|
||||
let show_cate = ref(false)
|
||||
const isShow = ref<any>(false)
|
||||
const imported = [{
|
||||
label: '进口',
|
||||
}, {label: '国产'}]
|
||||
|
|
@ -458,6 +460,7 @@ const removeIdCode = (item: string) => {
|
|||
showPopover.value = idCodeList.value.length > 0;
|
||||
}
|
||||
const init = (type: number, id: number) => {
|
||||
isShow.value = true
|
||||
_type.value = type;
|
||||
if (id != null && id != 0) {
|
||||
post("goods/goods/get", {id: id}).then((res: any) => {
|
||||
|
|
@ -525,6 +528,7 @@ const cateCloseCallBack = () => {
|
|||
}
|
||||
let exit = () => {
|
||||
document.addEventListener("click", handleClickOutside);
|
||||
isShow.value = false
|
||||
emit('close');
|
||||
}
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
|
|
@ -606,8 +610,6 @@ const drugCategoryOptions = [
|
|||
]
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.header {
|
||||
|
|
@ -626,6 +628,7 @@ const drugCategoryOptions = [
|
|||
|
||||
.common-layout {
|
||||
margin-top: 10px;
|
||||
padding: 0 24px 24px;
|
||||
}
|
||||
|
||||
.item {
|
||||
|
|
@ -661,14 +664,13 @@ const drugCategoryOptions = [
|
|||
}
|
||||
|
||||
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Mask :width="800" :height="600" :is-show="show">
|
||||
<Mask :width="800" :height="720" :is-show="show" :top="100" @close="show=false" title="药品" :show-footer="true">
|
||||
<div class="search_content_wrapper">
|
||||
<div class="search_wrapper">
|
||||
<span>药品名称:</span>
|
||||
|
|
@ -9,12 +9,12 @@
|
|||
placeholder="请输入药品名称或者编号"
|
||||
@keydown.enter="search_social"
|
||||
clearable/>
|
||||
<button @click="search_social" >搜索</button>
|
||||
<el-button @click="search_social">搜索</el-button>
|
||||
</div>
|
||||
<div class="search_result">
|
||||
|
||||
<div class="result_table" style="width: 100%; height: 100%;overflow: hidden">
|
||||
<el-table v-loading="isloading" :data="search_result.list" style="width: 100%;height: 350px"
|
||||
<el-scrollbar>
|
||||
<el-table v-loading="isloading" :data="search_result.list" style="width: 100%"
|
||||
highlight-current-row @current-change="change_current_search_data_index"
|
||||
:row-class-name="tableRowClassName">
|
||||
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/>
|
||||
|
|
@ -31,18 +31,22 @@
|
|||
<el-table-column prop="code" label="医保编码" width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="enddate" label="有效期至" width="180" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<div class="page_btn_list">
|
||||
<el-pagination background layout="prev, pager, next" :page-count="search_result.totalPage"
|
||||
<el-pagination background layout="prev, pager, next" :page-count="search_result.total_page"
|
||||
v-model:current-page="current_page" @current-change="change_page"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="search_bottom">
|
||||
<div class="btn">
|
||||
<el-button type="primary" @click="confirm">确认</el-button>
|
||||
<el-button type="primary" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -60,9 +64,9 @@ const show = ref(false);
|
|||
const emit = defineEmits(["confirm"])
|
||||
|
||||
let search_result = ref({
|
||||
totalPage: 0,
|
||||
total_page: 0,
|
||||
list: [],
|
||||
pageNum: 1,
|
||||
page: 1,
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -76,8 +80,6 @@ let tableRowClassName = (res: any) => {
|
|||
let change_page = (page: number) => {
|
||||
search_social()
|
||||
}
|
||||
onMounted(() => {
|
||||
})
|
||||
const change_current_search_data_index = (val: any) => {
|
||||
current_search_data = JSON.parse(JSON.stringify(val));
|
||||
// proos.changeData(current_search_data)
|
||||
|
|
@ -86,12 +88,6 @@ const init = (_type: number,_name:string) => {
|
|||
type.value = _type;
|
||||
keyword.value = _name;
|
||||
show.value = true;
|
||||
init_search_data()
|
||||
debugger
|
||||
if (keyword.value && keyword.value != ""){
|
||||
search_social()
|
||||
}
|
||||
|
||||
};
|
||||
defineExpose({init});
|
||||
|
||||
|
|
@ -100,9 +96,9 @@ function init_search_data() {
|
|||
current_search_data = null;
|
||||
// proos.changeData(null)
|
||||
search_result.value = {
|
||||
totalPage: 0,
|
||||
total_page: 0,
|
||||
list: [],
|
||||
pageNum: 1,
|
||||
page: 1,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +136,13 @@ let confirm = () => {
|
|||
let isloading = ref(false);
|
||||
let search_social = () => {
|
||||
isloading.value = true;
|
||||
post("social/directory/search", {keyword: keyword.value,produce:produce.value, page: current_page.value, size: 20, type: type.value}, {catch_error: true}).then((res: any) => {
|
||||
post("social/directory/search", {
|
||||
keyword: keyword.value,
|
||||
produce: produce.value,
|
||||
page: current_page.value,
|
||||
size: 20,
|
||||
type: type.value
|
||||
}, {catch_error: true}).then((res: any) => {
|
||||
init_search_data()
|
||||
let list = res.list;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
|
@ -158,9 +160,9 @@ let search_social = () => {
|
|||
|
||||
}
|
||||
search_result.value = {
|
||||
totalPage: res.total_page,
|
||||
total_page: res.total_page,
|
||||
list: list,
|
||||
pageNum: 1,
|
||||
page: 1,
|
||||
}
|
||||
}).catch(() => {
|
||||
isloading.value = false;
|
||||
|
|
@ -171,22 +173,22 @@ const close = () => {
|
|||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.search_bottom {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
.bottom {
|
||||
display: flex;
|
||||
padding: 0 24px;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.search_content_wrapper {
|
||||
height: 522px;
|
||||
background-color: #FFF;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
padding: 0 24px;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.search_wrapper {
|
||||
position: relative;
|
||||
|
|
@ -194,6 +196,7 @@ const close = () => {
|
|||
display: flex;
|
||||
margin: 0 auto;
|
||||
height: 60px;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
display: block;
|
||||
|
|
@ -218,6 +221,14 @@ const close = () => {
|
|||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.search_result {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
:deep(.invalid) {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="add-supplier" style="width:100%;margin-top: 24px">
|
||||
<Mask :width="540" :height="603" :is-show="isShow" :top="100" @close="close" :title="id?'编辑':'添加供应商'" :show-footer="true">
|
||||
<div class="add-supplier" style="width:100%;margin-top: 24px;padding: 0 24px">
|
||||
<div class="form">
|
||||
<el-form style="width: 100%" ref="ruleFormRef" :model="formData" :inline=true label-position="top">
|
||||
<el-form-item label="供货商名称" style="width: 100%;margin-right: 0">
|
||||
|
|
@ -45,27 +46,32 @@
|
|||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save">确定</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
|
||||
const formData = ref({
|
||||
name: null,
|
||||
turn: 1,
|
||||
turn: 0,
|
||||
contactName: null,
|
||||
contactTel: null,
|
||||
reamark: null,
|
||||
licenseCode: null,
|
||||
})
|
||||
const errorMsg = ref('')
|
||||
const emit = defineEmits(['close', 'saveSuccess'])
|
||||
const isShow = ref(false)
|
||||
const emit = defineEmits(['close'])
|
||||
|
||||
const save = () => {
|
||||
if (formData.value.name === '' || formData.value.name === null) {
|
||||
|
|
@ -73,15 +79,19 @@ const save = () => {
|
|||
return
|
||||
}
|
||||
post("inventory/supplier/save", {inventorySupplier: formData.value}).then((res: any) => {
|
||||
emit('saveSuccess')
|
||||
close()
|
||||
})
|
||||
}
|
||||
|
||||
const edit = (supplierData: any) => {
|
||||
const id = ref<any>(null)
|
||||
const editInit = (supplierData: any) => {
|
||||
isShow.value = true
|
||||
id.value = supplierData.id
|
||||
formData.value = supplierData
|
||||
}
|
||||
defineExpose({edit})
|
||||
const addInit = () => {
|
||||
isShow.value = true
|
||||
}
|
||||
defineExpose({addInit, editInit})
|
||||
|
||||
const close = () => {
|
||||
formData.value = {
|
||||
|
|
@ -93,14 +103,19 @@ const close = () => {
|
|||
licenseCode: null,
|
||||
}
|
||||
errorMsg.value = ''
|
||||
isShow.value = false
|
||||
id.value = null
|
||||
emit('close')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,10 @@
|
|||
<li class="item" v-for="(item, index) in list" :key="index">
|
||||
<span class="index">{{ index + 1 }}</span>
|
||||
<span class="name">{{ item.itemName }}</span>
|
||||
<span class="price">¥{{ item.unitPrice }}元</span>
|
||||
<span class="code">{{ item.itemSocialCode }}</span>
|
||||
<span class="unit">
|
||||
<el-input-number v-model="item.selectedNum" min="1"></el-input-number>
|
||||
<span style="line-height: 30px;margin-left: 10px">{{ item.unit }}</span>
|
||||
</span>
|
||||
<span class="price">¥{{ item.unitPrice }}元</span>
|
||||
<span class="delete">
|
||||
<el-button @click="deleteItem(item.id)">
|
||||
<el-button text @click="deleteItem(item.id)">
|
||||
<el-icon><CircleClose/></el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
@ -30,7 +26,7 @@
|
|||
>
|
||||
</SearchInput>
|
||||
</div>
|
||||
<span style="margin-right: 24px">¥{{ list.reduce((acc, cur) => acc + cur.unitPrice*cur.selectedNum, 0) }}元</span></div>
|
||||
<span style="margin-right: 24px">¥{{ list.reduce((acc, cur) => acc + cur.unitPrice, 0) }}元</span></div>
|
||||
</div>
|
||||
</Panel>
|
||||
</template>
|
||||
|
|
@ -55,7 +51,6 @@ const serviceShowConfig = [
|
|||
},
|
||||
]
|
||||
const serviceSelect = (row: any) => {
|
||||
row.selectedNum = 1
|
||||
list.value.push(row)
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +75,6 @@ const deleteItem = (id: any) => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.index{
|
||||
height: 100%;
|
||||
width: 50px;
|
||||
|
|
@ -88,7 +82,6 @@ const deleteItem = (id: any) => {
|
|||
border-right: 1px solid #EAEAEC;
|
||||
line-height: 64px;
|
||||
}
|
||||
|
||||
.name{
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
|
|
@ -96,7 +89,6 @@ const deleteItem = (id: any) => {
|
|||
height: 100%;
|
||||
line-height: 64px;
|
||||
}
|
||||
|
||||
.code{
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
|
|
@ -104,7 +96,6 @@ const deleteItem = (id: any) => {
|
|||
height: 100%;
|
||||
line-height: 64px;
|
||||
}
|
||||
|
||||
.price{
|
||||
height: 100%;
|
||||
width: 200px;
|
||||
|
|
@ -112,7 +103,6 @@ const deleteItem = (id: any) => {
|
|||
border-right: 1px solid #EAEAEC;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.delete{
|
||||
height: 100%;
|
||||
width: 50px;
|
||||
|
|
@ -127,7 +117,6 @@ const deleteItem = (id: any) => {
|
|||
border-top: 1px solid #EAEAEC;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<el-form-item>
|
||||
<el-input v-model="form.purchaseUnitPrice">
|
||||
<template #append>
|
||||
<el-button @click="imageURL">¥</el-button>
|
||||
<el-button text @click="imageURL">¥</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
<el-form-item>
|
||||
<el-input v-model="form.unitPrice">
|
||||
<template #append>
|
||||
<el-button @click="imageURL">¥</el-button>
|
||||
<el-button type="text" @click="imageURL">¥</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -56,12 +56,12 @@
|
|||
</el-form>
|
||||
|
||||
</div>
|
||||
<ItemSearch ref="createSearchRef" @confirm="selectedCallBack"/>
|
||||
<Search ref="createSearchRef" @confirm="createConfirm"/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {defineProps, defineEmits, ref, nextTick, onMounted} from 'vue'
|
||||
import {post} from "@/utils/request.ts";
|
||||
import ItemSearch from "./ItemSearch.vue";
|
||||
import Search from "./Search.vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -130,11 +130,11 @@ const openCreateSearch = () => {
|
|||
createSearchRef.value?.init(form.value.itemName);
|
||||
});
|
||||
}
|
||||
const selectedCallBack = (searchResult: any) => {
|
||||
console.log(searchResult, 'data')
|
||||
form.value.itemName = searchResult.name;
|
||||
form.value.itemSocialCode = searchResult.code;
|
||||
form.value.unit = searchResult.unit;
|
||||
const createConfirm = (data: any) => {
|
||||
console.log(data, 'data')
|
||||
form.value = data
|
||||
form.value.itemName = data.name
|
||||
form.value.itemSocialCode = data.hilistCode
|
||||
}
|
||||
const deleteDetail = () => {
|
||||
post("item/delete", {id: props.id}).then((res: any) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" @close="exit" :width="800" :height="600" title="成员管理" :show-footer="true">
|
||||
<div style="padding: 24px">
|
||||
<el-form :model="userInfo" label-width="auto" :rules="rules" ref="ruleFormRef">
|
||||
<el-descriptions
|
||||
title="基本信息"
|
||||
|
|
@ -37,7 +39,17 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item>
|
||||
<el-input v-model="memberInfo.gender"/>
|
||||
<el-select
|
||||
v-model="memberInfo.gender"
|
||||
placeholder="选择性别"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in ['男', '女']"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄">
|
||||
|
|
@ -98,24 +110,30 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电子签名">
|
||||
<el-form-item>
|
||||
<UpLoad v-model="uploadURL" ref="uploadRef" @uploadSuccess="(url)=>{memberInfo.electronicSignature=url}"></UpLoad>
|
||||
<UpLoad v-model="uploadURL" ref="uploadRef"
|
||||
@uploadSuccess="(url)=>{memberInfo.electronicSignature=url}"></UpLoad>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="demo-button">
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save()">保存</el-button>
|
||||
<el-button @click="onSubmit">取消</el-button>
|
||||
<el-button @click="exit">取消</el-button>
|
||||
<el-button v-if="props.id" type="danger" @click="deleteDetail">删除</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {defineProps, defineEmits, ref, onMounted} from 'vue'
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {loadConfig} from "@/utils/config.ts";
|
||||
import depts from "@/assets/config/directory/depts.json"
|
||||
import UpLoad from "@/components/UpLoad.vue";
|
||||
import {ElMessage} from 'element-plus'
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
|
||||
const props = defineProps({
|
||||
id: {
|
||||
|
|
@ -183,9 +201,13 @@ const rules= {
|
|||
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||
],
|
||||
}
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const onSubmit = () => {
|
||||
emit('onSubmit')
|
||||
const isShow = ref(false)
|
||||
const emit = defineEmits(['close'])
|
||||
const exit = () => {
|
||||
memberInfo.value = {}
|
||||
userInfo.value = {}
|
||||
isShow.value = false
|
||||
emit('close')
|
||||
}
|
||||
const ruleFormRef = ref<any>('')
|
||||
const save = () => {
|
||||
|
|
@ -196,40 +218,25 @@ const save = () => {
|
|||
ruleFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
if (props.id) {
|
||||
post("organization/member/edit", {data: form}).then((res) => {
|
||||
onSubmit()
|
||||
memberInfo.value = {}
|
||||
userInfo.value = {}
|
||||
post("organization/member/edit", {data: form}).then(() => {
|
||||
exit()
|
||||
ElMessage.success('已修改')
|
||||
})
|
||||
} else {
|
||||
post("organization/member/add", {data: form}).then((res) => {
|
||||
onSubmit()
|
||||
memberInfo.value = {}
|
||||
post("organization/member/add", {data: form}).then(() => {
|
||||
exit()
|
||||
ElMessage.success('已添加')
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const options = Object.entries(depts).map(([key, value]) => {
|
||||
if (typeof value === 'string') {
|
||||
return {value: key, label: value};
|
||||
} else {
|
||||
return {
|
||||
value: key,
|
||||
label: value.name,
|
||||
children: Object.entries(value.children).map(([childKey, childValue]) => ({
|
||||
value: childKey,
|
||||
label: childValue,
|
||||
})),
|
||||
};
|
||||
}
|
||||
});
|
||||
const uploadRef = ref<any>('')
|
||||
const init = (id: any) => {
|
||||
const getById = () => {
|
||||
memberInfo.value = {}
|
||||
userInfo.value = {}
|
||||
post("organization/member/getById", {id}).then((res: any) => {
|
||||
post("organization/member/getById", {id: props.id}).then((res: any) => {
|
||||
memberInfo.value = res.memberInfo
|
||||
if (res.userInfo) {
|
||||
userInfo.value = res.userInfo
|
||||
|
|
@ -240,7 +247,6 @@ const init = (id: any) => {
|
|||
})
|
||||
}
|
||||
const uploadURL = ref('')
|
||||
const imageURL= ref('')
|
||||
onMounted(() => {
|
||||
loadConfig().then((res: any) => {
|
||||
uploadURL.value = res.base_url + "file/upload";
|
||||
|
|
@ -254,17 +260,25 @@ const list = () => {
|
|||
})
|
||||
}
|
||||
const deleteDetail = () => {
|
||||
post("organization/member/delete", {id: props.id}).then((res: any) => {
|
||||
onSubmit()
|
||||
post("organization/member/delete", {id: props.id}).then(() => {
|
||||
exit()
|
||||
ElMessage.error('已删除');
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
isShow.value = true
|
||||
if(props.id){
|
||||
getById()
|
||||
}
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped>
|
||||
.demo-button {
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
<template>
|
||||
<Mask :width="800" :height="600" :is-show="show" :top="100">
|
||||
<div class="search_content_wrapper">
|
||||
<div class="search_wrapper">
|
||||
<span>项目名称:</span>
|
||||
<el-input
|
||||
class="input"
|
||||
v-model="keyword"
|
||||
placeholder="请输入药品名称或者编号"
|
||||
@keydown.enter="search_social"
|
||||
clearable/>
|
||||
<button @click="search_social">搜索</button>
|
||||
</div>
|
||||
<div class="search_result">
|
||||
|
||||
<div class="result_table" style="width: 100%; height: 100%;overflow: hidden">
|
||||
<el-table v-loading="isloading" :data="search_result.list" style="width: 100%;height: 350px"
|
||||
highlight-current-row @current-change="change_current_search_data_index"
|
||||
:row-class-name="tableRowClassName">
|
||||
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="json.approval_number" fixed label="国药准字" width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="producer" label="生产企业" width="180" show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.reg_specifications" label="注册规格" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_packaging_unit" label="包装单位" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_packaging_number" label="包装数量" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_preparation_unit" label="制剂单位" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="code" label="医保编码" width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="enddate" label="有效期至" width="180" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
<div class="page_btn_list">
|
||||
<el-pagination background layout="prev, pager, next" :page-count="search_result.total_page"
|
||||
v-model:current-page="current_page" @current-change="change_page"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="search_bottom">
|
||||
<el-button type="primary" @click="confirm">确认</el-button>
|
||||
<el-button type="primary" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref, defineProps} from "vue";
|
||||
import {post} from '@/utils/request.ts'
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
|
||||
let current_search_data: any = null;
|
||||
let keyword = ref('');
|
||||
let produce = ref("");
|
||||
let type = ref(0);
|
||||
let current_page = ref(1)
|
||||
const show = ref(false);
|
||||
|
||||
const emit = defineEmits(["confirm"])
|
||||
|
||||
let search_result = ref({
|
||||
total_page: 0,
|
||||
list: [],
|
||||
page: 1,
|
||||
});
|
||||
|
||||
|
||||
let tableRowClassName = (res: any) => {
|
||||
if (current_search_data != null && current_search_data.id == res.row.id) {
|
||||
return 'invalid';
|
||||
}
|
||||
return 'valid'
|
||||
}
|
||||
|
||||
let change_page = (page: number) => {
|
||||
search_social()
|
||||
}
|
||||
// onMounted(() => {
|
||||
// search_social()
|
||||
// })
|
||||
const change_current_search_data_index = (val: any) => {
|
||||
current_search_data = JSON.parse(JSON.stringify(val));
|
||||
console.log(current_search_data.id)
|
||||
// proos.changeData(current_search_data)
|
||||
}
|
||||
const init = (_name: string) => {
|
||||
keyword.value = _name;
|
||||
show.value = true;
|
||||
init_search_data()
|
||||
search_social()
|
||||
};
|
||||
defineExpose({init});
|
||||
|
||||
function init_search_data() {
|
||||
isloading.value = false;
|
||||
current_search_data = null;
|
||||
search_result.value = {
|
||||
total_page: 0,
|
||||
list: [],
|
||||
page: 1,
|
||||
}
|
||||
}
|
||||
|
||||
let confirm = () => {
|
||||
let jsondata = current_search_data.json;
|
||||
let data = {
|
||||
id: null,
|
||||
type: null,
|
||||
name: jsondata.name,
|
||||
commonName: jsondata.common_name,
|
||||
hilistCode: jsondata.code,
|
||||
unitPrice: null,
|
||||
purchaseUnitPrice: null,
|
||||
producer: jsondata.producer,
|
||||
barcode: null,
|
||||
minPackagingNumber: jsondata.min_packaging_number,
|
||||
packagingUnit: jsondata.min_packaging_unit,
|
||||
minPackagingUnit: jsondata.min_preparation_unit,
|
||||
expiryTime: 10,
|
||||
approvalCode: jsondata.approval_number || jsondata.reg_number || '',
|
||||
medicineDosageUnit: jsondata.min_measure_unit,
|
||||
medicineDosageNum: jsondata.specification,
|
||||
extra: {
|
||||
regType: jsondata.reg_type,
|
||||
approvalNumber: jsondata.approval_number,
|
||||
category: jsondata.category
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
console.log("data", data)
|
||||
emit('confirm', data)
|
||||
show.value = false;
|
||||
|
||||
}
|
||||
let isloading = ref(false);
|
||||
let search_social = () => {
|
||||
isloading.value = true;
|
||||
post("social/directory/search", {
|
||||
keyword: keyword.value,
|
||||
}, {catch_error: true}).then((res: any) => {
|
||||
init_search_data()
|
||||
let list = res.list;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let end_datetime = list[i].enddate;
|
||||
//和当前时间比较
|
||||
if (new Date().getTime() < new Date(end_datetime).getTime() || end_datetime == "" || end_datetime == null) {
|
||||
let time_diff = new Date(end_datetime).getTime() - new Date().getTime();
|
||||
// list[i].data.is_valid = true
|
||||
} else {
|
||||
// list[i].data.is_valid = false
|
||||
}
|
||||
if (end_datetime == "" || end_datetime == null) {
|
||||
list[i].enddate = "长期有效";
|
||||
}
|
||||
|
||||
}
|
||||
search_result.value = {
|
||||
total_page: res.total_page,
|
||||
list: list,
|
||||
page: 1,
|
||||
}
|
||||
}).catch(() => {
|
||||
isloading.value = false;
|
||||
})
|
||||
}
|
||||
const close = () => {
|
||||
show.value = false;
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.search_bottom {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.search_content_wrapper {
|
||||
background-color: #FFF;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
margin-top: 24px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.search_wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
height: 60px;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.input {
|
||||
display: block;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
button {
|
||||
width: 80px;
|
||||
line-height: 40px;
|
||||
color: #FFF;
|
||||
margin-left: 10px;
|
||||
height: 40px;
|
||||
background-color: #409EFF;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.invalid) {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.search_result {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" @close="exit" :height="570" :title="props.id?'编辑':'新增'" :show-footer="true">
|
||||
<div style="padding: 24px">
|
||||
<el-form :model="form" label-width="auto">
|
||||
<el-descriptions
|
||||
:column="4"
|
||||
|
|
@ -51,7 +53,7 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="简介">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.info" :show-word-limit="true" :clearable="true" :size="'large'"/>
|
||||
<el-input v-model="form.info" type="text" :show-word-limit="true" :clearable="true" :size="'large'"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责人姓名">
|
||||
|
|
@ -101,21 +103,28 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.memo" :show-word-limit="true" :clearable="true" />
|
||||
<el-input v-model="form.memo" type="text" :show-word-limit="true" :clearable="true"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="demo-button">
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save()">保存</el-button>
|
||||
<el-button @click="onSubmit">取消</el-button>
|
||||
<el-button @click="exit">取消</el-button>
|
||||
<el-button v-if="props.id" @click="deleteDetail" type="danger">删除</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {defineProps, onMounted, ref} from 'vue'
|
||||
import {post} from "@/utils/request.ts";
|
||||
import depts from "@/assets/config/directory/depts.json"
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
// do not use same name with ref
|
||||
const props = defineProps({
|
||||
|
|
@ -142,21 +151,29 @@ const form = ref<any>({
|
|||
tecnPsncnt: '',
|
||||
memo: '',
|
||||
})
|
||||
const isShow = ref<any>(false)
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const onSubmit = () => {
|
||||
const exit = () => {
|
||||
form.value = {}
|
||||
isShow.value = false
|
||||
emit('onSubmit')
|
||||
}
|
||||
|
||||
const openDialog= () => {
|
||||
isShow.value = true
|
||||
if (props.id) {
|
||||
init(props.id)
|
||||
}
|
||||
}
|
||||
const save = () => {
|
||||
if (props.id) {
|
||||
post("organization/section/edit", {data: form.value}).then((res) => {
|
||||
onSubmit()
|
||||
form.value = {}
|
||||
exit()
|
||||
ElMessage.success('已修改')
|
||||
})
|
||||
} else {
|
||||
post("organization/section/add", {data: form.value}).then((res) => {
|
||||
onSubmit()
|
||||
form.value = {}
|
||||
exit()
|
||||
ElMessage.success('已添加')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -182,16 +199,18 @@ const init = (id: any) => {
|
|||
}
|
||||
const deleteDetail = () => {
|
||||
post("organization/section/delete", {id: props.id}).then((res: any) => {
|
||||
onSubmit()
|
||||
exit()
|
||||
ElMessage.error('已删除');
|
||||
})
|
||||
}
|
||||
defineExpose({init})
|
||||
defineExpose({openDialog})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.demo-button{
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,10 +1,15 @@
|
|||
import { ref, computed } from 'vue'
|
||||
|
||||
import { ref } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const singStatus = defineStore('counter', () => {
|
||||
const singShow = ref<any>(null)
|
||||
function setSingShow(val:any){
|
||||
singShow.value = val
|
||||
export const useLogoStore = defineStore('logo', () => {
|
||||
const logoUrl = ref<string>("")
|
||||
function setLogoUrl(url: string) {
|
||||
logoUrl.value = url
|
||||
}
|
||||
return { singShow,setSingShow}
|
||||
function getLogoUrl() {
|
||||
return logoUrl.value
|
||||
}
|
||||
// 返回需要暴露的方法和变量
|
||||
return { logoUrl, setLogoUrl, getLogoUrl }
|
||||
})
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<PaymentDetails></PaymentDetails>
|
||||
</div>
|
||||
<div class="right">
|
||||
<Card></Card>
|
||||
<Card v-model="userMessage"></Card>
|
||||
<CustomerService v-model="proxyMessage"></CustomerService>
|
||||
<SystemMessage v-model="systemMessage"></SystemMessage>
|
||||
<Banner></Banner>
|
||||
|
|
@ -40,6 +40,7 @@ onMounted(() => {
|
|||
})
|
||||
const systemMessage = ref("")
|
||||
const proxyMessage = ref("")
|
||||
const userMessage = ref("")
|
||||
let appConfig: any = null;
|
||||
|
||||
async function getData() {
|
||||
|
|
@ -47,6 +48,7 @@ async function getData() {
|
|||
appConfig = await response.json();
|
||||
systemMessage.value = appConfig.systemMessage
|
||||
proxyMessage.value = appConfig.proxy
|
||||
userMessage.value = appConfig.user
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="container-wrapper">
|
||||
<div class="top">
|
||||
<el-button type="primary" :icon="Plus" @click="is_add = true">新增领用</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="clickApply">新增领用</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<el-table :data="dataList" style="width: 100%" @row-click="rowClick">
|
||||
|
|
@ -28,33 +28,29 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :width="1200" :height="600" :is-show="is_add" @close="is_add=false" title="新增领用">
|
||||
<AddApply @close="closeAddApply"/>
|
||||
</Mask>
|
||||
<Mask :width="1200" :height="600" :is-show="is_detail" @close="is_detail=false" title="查看领用">
|
||||
<DetailApply :id="id" @close="closeDetailApply"/>
|
||||
</Mask>
|
||||
<AddApply ref="addApplyRef" @close="closeAddApply"/>
|
||||
<DetailApply ref="detailApplyRef" @close="closeDetailApply"/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
import AddApply from "@/components/inventory/apply/AddApply.vue";
|
||||
import {onMounted, ref} from "vue";
|
||||
import {nextTick, onMounted, ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import DetailApply from "@/components/inventory/apply/DetailApply.vue";
|
||||
import {Plus} from "@element-plus/icons-vue";
|
||||
|
||||
const is_add = ref(false)
|
||||
const is_detail = ref(false)
|
||||
const id = ref('')
|
||||
const dataList = ref([])
|
||||
const getList = () => {
|
||||
const query = {
|
||||
pageNum: 1,
|
||||
pageNum: page.value,
|
||||
pageSize: 20,
|
||||
}
|
||||
post("inventory/apply/list", {query: query}).then((res: any) => {
|
||||
dataList.value = res.list
|
||||
total.value = res.total_count
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
|
|
@ -66,14 +62,7 @@ let total = ref(0)
|
|||
let page = ref(1)
|
||||
let changePage = (value: number) => {
|
||||
page.value = value
|
||||
const query = {
|
||||
pageNum: value,
|
||||
pageSize: pageSize.value,
|
||||
}
|
||||
post("inventory/apply/list", {query: query}).then((res: any) => {
|
||||
dataList.value = res.list
|
||||
total.value = res.total_count
|
||||
})
|
||||
getList()
|
||||
}
|
||||
const closeAddApply = () => {
|
||||
is_add.value = false
|
||||
|
|
@ -87,14 +76,23 @@ const formatDate = (isoStr: any) => {
|
|||
const date = new Date(isoStr);
|
||||
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
|
||||
}
|
||||
const detailApplyRef = ref()
|
||||
const rowClick = (row: any) => {
|
||||
id.value = row.id
|
||||
is_detail.value = true
|
||||
nextTick(()=>{
|
||||
detailApplyRef.value?.init(row.id)
|
||||
})
|
||||
}
|
||||
const addApplyRef = ref()
|
||||
const clickApply = () => {
|
||||
nextTick(() => {
|
||||
addApplyRef.value?.getUserInfo()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "@/assets/scss/base.scss";
|
||||
|
||||
.container-wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 24px;
|
||||
|
|
@ -102,12 +100,14 @@ const rowClick = (row: any) => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-top: base.$margin-base;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
</el-dropdown>
|
||||
</div>
|
||||
<div class="content_list">
|
||||
<el-scrollbar>
|
||||
<el-table :data="tableData" @cell-click="editCheck">
|
||||
<el-table-column label="订单号" prop="code" width="250">
|
||||
</el-table-column>
|
||||
|
|
@ -17,6 +18,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="page_btn_list">
|
||||
|
|
@ -31,15 +33,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :width="1200" :height="540" :is-show="showAdd" @close="showAdd = false" title="新增盘点">
|
||||
<Add @close="showAdd = false;getCheck()"/>
|
||||
</Mask>
|
||||
<Mask :width="1200" :height="540" :is-show="showDetail" @close="showDetail = false" title="查看盘点">
|
||||
<Detail :id="id" @close="showDetail = false;getCheck()"/>
|
||||
</Mask>
|
||||
<Add ref="addRef" @close="getCheck()"/>
|
||||
<Detail ref="detailRef" @close="getCheck()"/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref} from "vue";
|
||||
import {nextTick, onMounted, ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
import Add from "@/components/inventory/check/Add.vue";
|
||||
|
|
@ -49,12 +47,13 @@ import {Plus} from "@element-plus/icons-vue";
|
|||
const tableData = ref([])
|
||||
const getCheck = () => {
|
||||
const query = {
|
||||
pageNum: 1,
|
||||
pageNum: page.value,
|
||||
pageSize: 20
|
||||
}
|
||||
post("inventory/check/list", {query: query}).then(
|
||||
(res: any) => {
|
||||
tableData.value = res.list
|
||||
total.value = res.total_count
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
@ -62,12 +61,17 @@ const detailCheckRef = ref<any>('');
|
|||
const showAdd = ref(false)
|
||||
const showDetail = ref(false)
|
||||
const id = ref('')
|
||||
const addRef = ref<any>('');
|
||||
const openAdd = () => {
|
||||
showAdd.value = true
|
||||
nextTick(() => {
|
||||
addRef.value?.init()
|
||||
})
|
||||
}
|
||||
const detailRef = ref<any>('');
|
||||
const editCheck = (row: any) => {
|
||||
id.value = row.id
|
||||
showDetail.value = true
|
||||
nextTick(() => {
|
||||
detailRef.value?.detail(row.id)
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
@ -79,14 +83,7 @@ let total = ref(0)
|
|||
let page = ref(1)
|
||||
let changePage = (value: number) => {
|
||||
page.value = value
|
||||
const query = {
|
||||
pageNum: value,
|
||||
pageSize: pageSize.value,
|
||||
}
|
||||
post("goods/goods/searchDetail", {query: query}).then((res: any) => {
|
||||
tableData.value = res.list
|
||||
total.value = res.total_count
|
||||
})
|
||||
getCheck()
|
||||
}
|
||||
// 转成YYYY-MM-DD格式
|
||||
const formatDate = (isoStr: any) => {
|
||||
|
|
@ -105,8 +102,8 @@ const formatDate = (isoStr: any) => {
|
|||
|
||||
.content_list {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-top: base.$margin-base;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
|
|
|
|||
|
|
@ -161,10 +161,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="is_add" :height="900" @close="is_add = false" title="新增">
|
||||
<Edit ref="editRef" @close="is_add = false;init()"/>
|
||||
</Mask>
|
||||
<Mask :is-show="open" :height="600" @close="open = false" title="编辑">
|
||||
<Mask :is-show="open" :top="50" :height="600" @close="open = false" title="编辑">
|
||||
<el-tabs v-model="activeName" @tab-change="changeTab">
|
||||
<el-tab-pane label="商品信息" name="first">
|
||||
<Edit ref="editRef" @close="open = false;init()"/>
|
||||
|
|
@ -289,7 +287,6 @@ let init = () => {
|
|||
}
|
||||
|
||||
let open_edit = (type: number, id: number) => {
|
||||
is_add.value = true
|
||||
nextTick(() => {
|
||||
editRef.value?.init(type, id);
|
||||
});
|
||||
|
|
@ -415,11 +412,13 @@ const resetSearch = () => {
|
|||
.search {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-right: 24px;
|
||||
|
||||
.el-form-item {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
</el-dropdown>
|
||||
</div>
|
||||
<div class="content_list">
|
||||
<el-scrollbar>
|
||||
<el-table :data="tableData" style="width: 100%" @row-click="open_edit">
|
||||
<el-table-column fixed label="进货单号" width="250" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="page_btn_list">
|
||||
|
|
@ -83,11 +85,12 @@ let open_edit = (row: any) => {
|
|||
|
||||
let init = () => {
|
||||
const query = {
|
||||
page: 1,
|
||||
page: page.value,
|
||||
pageSize: 20,
|
||||
}
|
||||
post("inventory/order/list", {query: query}).then((res: any) => {
|
||||
tableData.value = res.list
|
||||
total.value = res.total_count
|
||||
})
|
||||
|
||||
}
|
||||
|
|
@ -105,14 +108,7 @@ let total = ref(0)
|
|||
let page = ref(1)
|
||||
let changePage = (value: number) => {
|
||||
page.value = value
|
||||
const query = {
|
||||
pageNum: value,
|
||||
pageSize: pageSize.value,
|
||||
}
|
||||
post("goods/goods/searchDetail", {query: query}).then((res: any) => {
|
||||
tableData.value = res.list
|
||||
total.value = res.total_count
|
||||
})
|
||||
init()
|
||||
}
|
||||
// 转成YYYY-MM-DD格式
|
||||
const formatDate = (isoStr: any) => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container-wrapper">
|
||||
<div class="top">
|
||||
<el-dropdown>
|
||||
<el-button type="primary" :icon="Plus" @click="openAdd">添加供应商</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="addSupplier(null)">添加供应商</el-button>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="content_list">
|
||||
|
|
@ -33,9 +33,7 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :width="540" :height="603" :is-show="showAdd" @close="showAdd = false" :title="id?'编辑':'添加供应商'">
|
||||
<AddSupplier @close="showAdd = false" @saveSuccess="getSupplier()" ref="addSupplierRef"></AddSupplier>
|
||||
</Mask>
|
||||
<AddSupplier ref="addSupplierRef" @close="getSupplier()"></AddSupplier>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -48,29 +46,28 @@ import {Plus} from "@element-plus/icons-vue";
|
|||
const tableData = ref([])
|
||||
const getSupplier = () => {
|
||||
const query = {
|
||||
page: 1,
|
||||
page: page.value,
|
||||
pageSize: 20,
|
||||
}
|
||||
post("inventory/supplier/list", {query: query}, null).then(
|
||||
(res: any) => {
|
||||
tableData.value = res.list
|
||||
total.value = res.total_count
|
||||
}
|
||||
)
|
||||
}
|
||||
const addSupplierRef = ref();
|
||||
|
||||
const openAdd = () => {
|
||||
showAdd.value = true
|
||||
}
|
||||
const id = ref('')
|
||||
const editSupplier = (row: any) => {
|
||||
id.value = row.id
|
||||
openAdd()
|
||||
nextTick(() => {
|
||||
addSupplierRef.value.edit(row)
|
||||
addSupplierRef.value.editInit(row)
|
||||
})
|
||||
}
|
||||
const addSupplier = (row: any) => {
|
||||
nextTick(() => {
|
||||
addSupplierRef.value.addInit()
|
||||
})
|
||||
}
|
||||
const showAdd = ref(false)
|
||||
onMounted(() => {
|
||||
getSupplier()
|
||||
})
|
||||
|
|
@ -80,14 +77,7 @@ let total = ref(0)
|
|||
let page = ref(1)
|
||||
let changePage = (value: number) => {
|
||||
page.value = value
|
||||
const query = {
|
||||
pageNum: value,
|
||||
pageSize: pageSize.value,
|
||||
}
|
||||
post("goods/goods/searchDetail", {query: query}).then((res: any) => {
|
||||
tableData.value = res.list
|
||||
total.value = res.total_count
|
||||
})
|
||||
getSupplier()
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -44,11 +44,16 @@
|
|||
<el-input v-model="ruleForm.social_certUrl"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上传logo">
|
||||
<UpLoad v-model="uploadURL" ref="uploadRef" @uploadSuccess="(url)=>{ruleForm.logourl=url}"></UpLoad>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="数字签名" prop="social_cainfo">
|
||||
<el-input v-model="ruleForm.social_cainfo" type="textarea" :rows="5"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -64,6 +69,8 @@ import {onMounted, reactive, ref} from 'vue'
|
|||
import {ElMessage, type FormInstance, type FormRules} from 'element-plus'
|
||||
import {post} from "@/utils/request.ts";
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
import UpLoad from "@/components/UpLoad.vue";
|
||||
import {loadConfig} from "@/utils/config.ts";
|
||||
|
||||
const ruleFormRef = ref<FormInstance>()
|
||||
const ruleForm = reactive<any>({
|
||||
|
|
@ -74,12 +81,17 @@ const ruleForm = reactive<any>({
|
|||
social_insuplcAdmdvs: '',
|
||||
social_cainfo: '',
|
||||
social_url: "",
|
||||
social_certUrl: ""
|
||||
social_certUrl: "",
|
||||
logoUrl: "",
|
||||
})
|
||||
const uploadRef = ref<any>()
|
||||
onMounted(() => {
|
||||
loadConfig().then((res: any) => {
|
||||
uploadURL.value = res.base_url + "file/upload";
|
||||
})
|
||||
uploadRef.value?.getImageUrl(localStorage.getItem('logoUrl'))
|
||||
post("common/config/list", null).then((list: any) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
console.log(list[i].k)
|
||||
ruleForm[list[i].k] = list[i].val
|
||||
}
|
||||
})
|
||||
|
|
@ -94,16 +106,16 @@ const rules = reactive<FormRules<any>>({
|
|||
social_url: {required: true, message: '医保接口不能为空', trigger: 'blur'},
|
||||
social_certUrl: {required: true, message: '电子平转增接口不能为空', trigger: 'blur'},
|
||||
})
|
||||
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
post("common/config/edit", ruleForm).then((res: any) => {
|
||||
ElMessage.success("保存成功")
|
||||
if (ruleForm.logourl) {
|
||||
localStorage.setItem('logoUrl', ruleForm.logourl)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!', fields)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -117,12 +129,16 @@ const options = Array.from({length: 10000}).map((_, idx) => ({
|
|||
value: `${idx + 1}`,
|
||||
label: `${idx + 1}`,
|
||||
}))
|
||||
//上传图片
|
||||
const uploadURL = ref<any>()
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container-wrapper {
|
||||
padding: 0 24px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.form {
|
||||
width: 100%;
|
||||
padding: 0 24px;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="title-btn">
|
||||
<el-button type="primary" @click="init()">查询</el-button>
|
||||
<el-button type="primary" @click="resetSearch">重置</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="isShow=true">新增</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="openDialog">新增</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -72,14 +72,11 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="isShow" @close="isShow=false" :width="800" :height="600" title="成员管理">
|
||||
<MemberEdit :id="id" ref="memberEditRef" @onSubmit="init()"></MemberEdit>
|
||||
</Mask>
|
||||
<MemberEdit :id="id" ref="memberEditRef" @close="init()"></MemberEdit>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref, nextTick} from "vue"
|
||||
import Mask from '@/components/common/Mask.vue'
|
||||
import MemberEdit from "@/components/settings/MemberEdit.vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {formatDate} from "@/utils/dateUtils.ts";
|
||||
|
|
@ -91,9 +88,11 @@ const tableData = ref<any>([]);
|
|||
const memberEditRef = ref<any>(null)
|
||||
const rowClick = (row: any) => {
|
||||
id.value = row.memberInfo.id
|
||||
isShow.value = true
|
||||
openDialog()
|
||||
}
|
||||
const openDialog= () => {
|
||||
nextTick(() => {
|
||||
memberEditRef.value?.init(id.value)
|
||||
memberEditRef.value?.init()
|
||||
})
|
||||
}
|
||||
const roleList = [
|
||||
|
|
|
|||
|
|
@ -12,14 +12,15 @@
|
|||
<el-input v-model="search.resperName" placeholder="负责人姓名" style="width: 200px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-cascader :props="{ checkStrictly: true }" v-model="search.caty" :options="options" placeholder="科室类别"/>
|
||||
<el-cascader :props="{ checkStrictly: true }" v-model="search.caty" :options="options"
|
||||
placeholder="科室类别"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="title-btn">
|
||||
<el-button type="primary" @click="init()">查询</el-button>
|
||||
<el-button type="primary" @click="resetSearch">重置</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="isShow=true">新增</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="openDialog">新增</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
|
|
@ -62,9 +63,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="isShow" @close="init()" :height="570" :title="id?'编辑':'新增'">
|
||||
<SectionEdit :id="id" ref="sectionRef" @onSubmit="init()"></SectionEdit>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {nextTick, onMounted, ref} from "vue"
|
||||
|
|
@ -77,28 +76,15 @@ import depts from "@/assets/config/directory/depts.json";
|
|||
import {Plus} from "@element-plus/icons-vue";
|
||||
|
||||
const id = ref<any>("")
|
||||
const isShow = ref(false)
|
||||
const ChildMenuList = ref([
|
||||
{
|
||||
name: '首页',
|
||||
path: '/settings/index',
|
||||
},
|
||||
{
|
||||
name: '科室',
|
||||
path: '/settings/section',
|
||||
},
|
||||
{
|
||||
name: '成员',
|
||||
path: '/settings/member',
|
||||
}
|
||||
])
|
||||
const tableData = ref<any>([])
|
||||
const sectionRef = ref<any>()
|
||||
const rowClick = (row: any) => {
|
||||
id.value = row.id
|
||||
isShow.value = true
|
||||
openDialog()
|
||||
}
|
||||
const openDialog = () => {
|
||||
nextTick(() => {
|
||||
sectionRef.value?.init(row.id)
|
||||
sectionRef.value?.openDialog()
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
|
|
@ -110,7 +96,6 @@ interface Dept {
|
|||
}
|
||||
|
||||
const init = () => {
|
||||
isShow.value = false
|
||||
post('organization/section/list', {page: page.value, size: pageSize.value, ...search.value}).then((res: any) => {
|
||||
tableData.value = res.list
|
||||
tableData.value.forEach((item: any) => {
|
||||
|
|
@ -155,6 +140,7 @@ const resetSearch = () => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
.title {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue