代码提交 项目定价修改

This commit is contained in:
Zhuangxingyu
2025-02-26 16:29:10 +08:00
parent 3ebeb1a013
commit 0a272d164a
5 changed files with 83 additions and 63 deletions

View File

@@ -68,6 +68,7 @@ public class ItemDefinitionController {
*/
@GetMapping(value = "/init")
public R<?> getInitDefinitionOptions(ItemDefSearchParam itemDefSearchParam) {
/// TODO: 2025/2/26 收费项目下拉框 暂未做成用枚举代替,后续替换
List<ChargeItemOptionDto> chargeItemOptions = new ArrayList<>();
if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
// 西药

View File

@@ -38,6 +38,9 @@ public class ChargeItemDefPageDto {
/** 状态 */
private PublicationStatus statusEnum;
/** 状态值 */
private String statusEnumText;
/** 单位 */
private String unitCode;

View File

@@ -6,6 +6,7 @@
T5.id,
T5.charge_name,
T5.status_enum,
T5.status_enum_text,
T5.description,
T5.effective_start,
T5.effective_end,
@@ -32,6 +33,12 @@
T1.id,
T1.charge_name,
T1.status_enum,
CASE
WHEN T1.status_enum = 1 THEN '草稿'
WHEN T1.status_enum = 2 THEN '有效'
WHEN T1.status_enum = 3 THEN '停用'
WHEN T1.status_enum = 4 THEN '未知'
END AS status_enum_text,
T1.description,
T1.effective_start,
T1.effective_end,
@@ -69,6 +76,7 @@
T5.id,
T5.charge_name,
T5.status_enum,
T5.status_enum_text,
T5.description,
T5.effective_start,
T5.effective_end,
@@ -94,6 +102,12 @@
T1.id,
T1.charge_name,
T1.status_enum,
CASE
WHEN T1.status_enum = 1 THEN '草稿'
WHEN T1.status_enum = 2 THEN '有效'
WHEN T1.status_enum = 3 THEN '停用'
WHEN T1.status_enum = 4 THEN '未知'
END AS status_enum_text,
T1.description,
T1.effective_start,
T1.effective_end,
@@ -130,6 +144,7 @@
T5.id,
T5.charge_name,
T5.status_enum,
T5.status_enum_text,
T5.description,
T5.effective_start,
T5.effective_end,
@@ -153,6 +168,12 @@
T1.id,
T1.charge_name,
T1.status_enum,
CASE
WHEN T1.status_enum = 1 THEN '草稿'
WHEN T1.status_enum = 2 THEN '有效'
WHEN T1.status_enum = 3 THEN '停用'
WHEN T1.status_enum = 4 THEN '未知'
END AS status_enum_text,
T1.description,
T1.effective_start,
T1.effective_end,

View File

@@ -42,6 +42,8 @@
:max="999999.99"
:step="0.01"
:precision="2"
controls-position="right"
:controls="false"
disabled="true"
/>
</el-form-item>
@@ -58,6 +60,8 @@
:max="999999.99"
:step="0.01"
:precision="2"
controls-position="right"
:controls="false"
disabled="true"
/>
</el-form-item>
@@ -70,6 +74,8 @@
:max="999999.99"
:step="0.01"
:precision="2"
controls-position="right"
:controls="false"
/>
</el-form-item>
</el-col>
@@ -94,6 +100,8 @@
:max="999999.99"
:step="0.01"
:precision="2"
controls-position="right"
:controls="false"
disabled="true"
/>
</el-form-item>
@@ -106,6 +114,8 @@
:max="999999.99"
:step="0.01"
:precision="2"
:controls="false"
controls-position="right"
/>
</el-form-item>
</el-col>
@@ -149,14 +159,12 @@
</el-dialog>
</template>
<script setup>
import { getOptions } from "./definition";
const { proxy } = getCurrentInstance();
const { charge_item_status } = proxy.useDict("charge_item_status");
const emit = defineEmits(["submit", "update:open"]);
const props = defineProps({
title: String,
open: Boolean,
formData: Object,
statusOptions: Object
});
const localOpen = ref(props.open);
const definitionRef = ref(null);
@@ -181,14 +189,6 @@ const submitForm = () => {
});
};
/**获取状态下拉列表 */
const getStatusOptions = () => {
getOptions({}).then((response) => {
options.value = response.data;
console.log(options.value);
});
};
/**
* 取消操作的函数
*/
@@ -201,9 +201,8 @@ watch(
() => props.open,
(newVal) => {
localOpen.value = newVal;
console.log(props.form);
fromModel.value = props.formData;
getStatusOptions();
options.value = props.statusOptions
if (!newVal) {
// 如果对话框关闭,重置表单
definitionRef.value.resetFields();
@@ -211,5 +210,11 @@ watch(
}
);
</script>
<style>
<style lang="scss" scoped>
:deep(.el-input-number .el-input__inner){
-webkit-appearance: none;
-moz-appearance: textfield;
text-align: left;
line-height: 1;
}
</style>

View File

@@ -109,7 +109,7 @@
align="center"
>
<template #default="scope">
{{ scope.row.partPercent ? scope.row.partPercent : "-" }}
{{ scope.row.partPercent ? thousandNumber(scope.row.partPercent) : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -120,20 +120,10 @@
>
<template #default="scope">
{{
scope.row.conditionYbCode ? scope.row.conditionYbCode : "-"
scope.row.conditionYbCode ? thousandNumber(scope.row.conditionYbCode) : "-"
}}
</template>
</el-table-column>
<el-table-column
label="基础价格"
width="150"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.price ? scope.row.price : "-" }}
</template>
</el-table-column>
<el-table-column
label="实际价格"
width="150"
@@ -141,7 +131,7 @@
align="center"
>
<template #default="scope">
{{ scope.row.amount ? scope.row.amount : "-" }}
{{ scope.row.amount ? thousandNumber(scope.row.amount) : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -165,7 +155,7 @@
<template #default="scope">
{{
scope.row.partConditionPrice
? scope.row.partConditionPrice
? thousandNumber(scope.row.partConditionPrice)
: "-"
}}
</template>
@@ -173,11 +163,11 @@
<el-table-column
label="拆零价格"
width="150"
prop="partPrice"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.partPrice ? scope.row.partPrice : "-" }}
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -192,26 +182,22 @@
</el-table-column>
<el-table-column
label="调价时间"
width="150"
width="200"
prop="updateTime"
align="center"
>
<template #default="scope">
{{ scope.row.updateTime ? scope.row.updateTime : "-" }}
{{ scope.row.updateTime ? moment(scope.row.updateTime).format("YYYY-MM-DD HH:mm:ss") : "-" }}
</template>
</el-table-column>
<el-table-column
label="状态"
width="150"
prop="statusEnum"
prop="statusEnumText"
align="center"
>
<template #default="scope">
{{ scope.row.statusEnum ? "" : "-" }}
<dict-tag
:options="charge_item_status"
:value="scope.row.statusEnum"
/>
{{ scope.row.statusEnumText ? scope.row.statusEnumText : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -386,11 +372,11 @@
<el-table-column
label="拆零价格"
width="150"
prop="partPrice"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.partPrice ? thousandNumber(scope.row.partPrice) : "-" }}
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -405,26 +391,22 @@
</el-table-column>
<el-table-column
label="调价时间"
width="150"
width="200"
prop="updateTime"
align="center"
>
<template #default="scope">
{{ scope.row.updateTime ? scope.row.updateTime : "-" }}
{{ scope.row.updateTime ? moment(scope.row.updateTime).format("YYYY-MM-DD HH:mm:ss") : "-" }}
</template>
</el-table-column>
<el-table-column
label="状态"
width="150"
prop="statusEnum"
prop="statusEnumText"
align="center"
>
<template #default="scope">
{{ scope.row.statusEnum ? "" : "-" }}
<dict-tag
:options="charge_item_status"
:value="scope.row.statusEnum"
/>
{{ scope.row.statusEnumText ? scope.row.statusEnumText : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -599,11 +581,11 @@
<el-table-column
label="拆零价格"
width="150"
prop="partPrice"
prop="price"
align="center"
>
<template #default="scope">
{{ scope.row.partPrice ? thousandNumber(scope.row.partPrice) : "-" }}
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -618,22 +600,22 @@
</el-table-column>
<el-table-column
label="调价时间"
width="150"
width="200"
prop="updateTime"
align="center"
>
<template #default="scope">
{{ scope.row.updateTime ? moment(new Date(scope.row.updateTime)).format("YYYY-MM-DD HH:mm:ss") : "-" }}
{{ scope.row.updateTime ? moment(scope.row.updateTime).format("YYYY-MM-DD HH:mm:ss") : "-" }}
</template>
</el-table-column>
<el-table-column
label="状态"
width="150"
prop="statusEnum"
prop="statusEnumText"
align="center"
>
<template #default="scope">
{{ scope.row.statusEnum ? scope.row.statusEnum : "-" }}
{{ scope.row.statusEnumText ? scope.row.statusEnumText : "-" }}
</template>
</el-table-column>
<el-table-column
@@ -655,13 +637,12 @@
</el-tab-pane>
</el-tabs>
</el-form>
<edit :title="title" :open="open" :formData="form"
:charge_item_status="charge_item_status" @submit="submitForm" @update:open="handleOpenChange"
<edit :title="title" :open="open" :statusOptions="statusOptions" :formData="form" @submit="submitForm" @update:open="handleOpenChange"
@update:form="handleFormChange" />
</div>
</template>
<script setup>
import { listDefinition, initOption, updateDefinition } from "./components/definition";
import { listDefinition, initOption, updateDefinition, getOptions } from "./components/definition";
import Edit from './components/edit.vue'
import moment from 'moment'
import { thousandNumber } from '@/utils/his.js'
@@ -673,8 +654,8 @@ const definitionList = ref([]);
const total = ref(0);
const { proxy } = getCurrentInstance();
const { charge_item_status } = proxy.useDict("charge_item_status");
const options = ref([]);
const statusOptions = ref([]);
const title = ref("");
const open = ref(false);
@@ -708,6 +689,7 @@ function getList() {
total.value = response.data.total;
loading.value = false;
});
getStatusOptions()
}
/** 搜索按钮操作 */
@@ -769,22 +751,30 @@ function submitForm(form) {
getList();
});
}
/**获取状态下拉列表 */
const getStatusOptions = () => {
getOptions({}).then((response) => {
statusOptions.value = response.data;
});
};
handleInit();
getList();
</script>
<style>
.demo-tabs > .el-tabs__content {
<style lang="scss" scoped>
:deep(.demo-tabs > .el-tabs__content) {
color: #6b778c;
font-size: 32px;
font-weight: 600;
}
.el-input__wrapper {
:deep(.el-input__wrapper) {
height: 32px;
}
.el-input__inner {
:deep(.el-input__inner) {
height: 30px;
}
.el-tabs__content{
:deep(.el-tabs__content) {
height: 80vh;
}
</style>