Merge branch 'master' of codeup.aliyun.com:61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -12,6 +12,8 @@ let downloadLoadingInstance;
|
||||
export let isRelogin = { show: false };
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
axios.defaults.headers['X-Tenant-ID'] = '1'
|
||||
axios.defaults.headers['Request-Method-Name'] = 'login'
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
|
||||
@@ -70,3 +70,12 @@ export function getSupplierInit() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树结构
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
@@ -7,27 +7,18 @@
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="厂家编码:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="厂家编码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="厂家名称"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商种类:" prop="status">
|
||||
<el-form-item label="厂商种类:" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder="生产商/供应商"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@@ -121,8 +112,8 @@
|
||||
<el-table-column
|
||||
label="类型 "
|
||||
align="center"
|
||||
key="typeEnum"
|
||||
prop="typeEnum"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -153,10 +144,10 @@
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="机构编号"
|
||||
label="机构"
|
||||
align="center"
|
||||
key="orgId"
|
||||
prop="orgId"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -236,7 +227,20 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="typeEnum">
|
||||
<el-input v-model="form.typeEnum" maxlength="11" />
|
||||
<!-- <el-input v-model="form.typeEnum" maxlength="11" /> -->
|
||||
<el-select
|
||||
v-model="form.typeEnum"
|
||||
placeholder="生产商/供应商"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in supplierTypeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -260,12 +264,22 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动标识" prop="activeFlag">
|
||||
<el-input v-model="form.activeFlag" maxlength="11" />
|
||||
<el-checkbox v-model="form.activeFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="机构编号" prop="orgId">
|
||||
<el-input v-model="form.orgId" maxlength="11" />
|
||||
<!-- <el-form-item label="机构编号" prop="orgId"> -->
|
||||
<!-- <el-input v-model="form.orgId" maxlength="11" /> -->
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -289,6 +303,7 @@ import {
|
||||
stopSupplier,
|
||||
startSupplier,
|
||||
getSupplierInit,
|
||||
deptTreeSelect,
|
||||
} from "./components/supplier";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -308,6 +323,7 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const supplierTypeOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
@@ -320,9 +336,9 @@ const data = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
// busNo: undefined, // 编码
|
||||
typeEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
// sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
@@ -349,6 +365,16 @@ function getsupplierTypeList() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
console.log("查询部门下拉树结构");
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询厂商/产地目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
@@ -356,7 +382,7 @@ function getList() {
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
getSupplierList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res",res.data.records);
|
||||
console.log(res, "res", res.data.records);
|
||||
supplierList.value = res.data.records;
|
||||
console.log(supplierList.value, "supplierList.value");
|
||||
total.value = res.data.total;
|
||||
@@ -458,6 +484,8 @@ function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.activeFlag == 1 ? (form.value.activeFlag = true) : (form.value.activeFlag = false); //是否为活性
|
||||
// console.log(form.value.ty, "form.value");
|
||||
open.value = true;
|
||||
title.value = "厂商/产地编辑";
|
||||
}
|
||||
@@ -465,6 +493,7 @@ function handleUpdate(row) {
|
||||
function submitForm() {
|
||||
proxy.$refs["supplierRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
form.activeFlag == true ? (form.activeFlag = 1) : (form.activeFlag = 0); //是否为活性
|
||||
if (form.value.id != undefined) {
|
||||
console.log(form.value, "editSupplier", form.value.statusEnum);
|
||||
editSupplier(form.value).then((response) => {
|
||||
@@ -495,6 +524,7 @@ function handleView(row) {
|
||||
}
|
||||
getsupplierTypeList();
|
||||
getList();
|
||||
getDeptTree();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
v-for="dict in yb_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@@ -449,13 +449,15 @@ const {
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
financial_type_code,
|
||||
yb_type
|
||||
} = proxy.useDict(
|
||||
"adm_location",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"med_chrgitm_type",
|
||||
"financial_type_code"
|
||||
"financial_type_code",
|
||||
"yb_type"
|
||||
);
|
||||
|
||||
const registrationfeeList = ref([]);
|
||||
|
||||
@@ -71,4 +71,22 @@ export function startDevice(ids) {
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<el-input v-model="form.name" placeholder="请输入器材名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item
|
||||
label="拼音码(器材名称)"
|
||||
prop="pyStr"
|
||||
@@ -32,29 +32,74 @@
|
||||
>
|
||||
<el-input v-model="form.pyStr" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="器材五笔拼音" prop="wbStr">
|
||||
<el-input v-model="form.wbStr" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材分类" prop="categoryEnum">
|
||||
<el-input v-model="form.categoryEnum" placeholder="" />
|
||||
<el-tree-select
|
||||
v-model="form.categoryEnum"
|
||||
:data="deviceCategories"
|
||||
:props="{ value: 'value', label: 'info', children: 'children' }"
|
||||
value-key="value"
|
||||
placeholder=""
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材种类" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder="" />
|
||||
<el-select v-model="form.typeCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in device_type_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-input v-model="form.unitCode" placeholder="" />
|
||||
<el-select v-model="form.unitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -64,7 +109,14 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-input v-model="form.minUnitCode" placeholder="" />
|
||||
<el-select v-model="form.minUnitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -93,7 +145,14 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售单位" prop="salesUnitCode">
|
||||
<el-input v-model="form.salesUnitCode" placeholder="" />
|
||||
<el-select v-model="form.salesUnitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -121,19 +180,39 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-input v-model="form.statusEnum" placeholder="" />
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="manufacturerId">
|
||||
<el-input v-model="form.manufacturerId" placeholder="" />
|
||||
<el-form-item label="生产厂家" prop="manufacturerText">
|
||||
<el-input v-model="form.manufacturerText" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="supplyId">
|
||||
<el-input v-model="form.supplyId" placeholder="" />
|
||||
<!-- <el-input v-model="form.supplyId" placeholder="" /> -->
|
||||
<el-select
|
||||
v-model="form.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -143,11 +222,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="执行科室" prop="ruleId">
|
||||
<el-input v-model="form.ruleId" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
@@ -196,18 +275,25 @@ import {
|
||||
addDevice,
|
||||
getDiseaseTreatmentInit,
|
||||
getDeviceOne,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
} from "./device";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
const { device_type_code, unit_code } = proxy.useDict(
|
||||
"device_type_code",
|
||||
"unit_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(["submit"]); // 声明自定义事件
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const deviceCategories = ref([]); // 器材分类
|
||||
const statusFlagOptions = ref([]); // 状态标记
|
||||
const supplierListOptions = ref([]); // 供应商列表
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -264,6 +350,8 @@ const data = reactive({
|
||||
allergenFlag: [
|
||||
{ required: true, message: "过敏标记不能为空", trigger: "blur" },
|
||||
],
|
||||
orgId: [{ required: true, message: "提供部门不能为空", trigger: "blur" }],
|
||||
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -278,6 +366,14 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
deviceCategories: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusFlagOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
@@ -287,9 +383,30 @@ function show() {
|
||||
// getList();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
console.log(props, "22222", title.value);
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
console.log(props, "22222", title.value, props.deviceCategories);
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
@@ -298,6 +415,10 @@ function edit() {
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
@@ -330,6 +451,8 @@ function reset() {
|
||||
version: undefined, // 器材版本
|
||||
substanceText: undefined, // 主要成分
|
||||
allergenFlag: undefined, // 过敏标记
|
||||
orgId: undefined, // 科室ID
|
||||
locationId: undefined, // 地点ID
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -231,8 +231,8 @@
|
||||
<el-table-column
|
||||
label="高值器材标志"
|
||||
align="center"
|
||||
key="hvcmFlag"
|
||||
prop="hvcmFlag"
|
||||
key="hvcmFlag_enumText"
|
||||
prop="hvcmFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
@@ -254,8 +254,8 @@
|
||||
<el-table-column
|
||||
label="医保标记"
|
||||
align="center"
|
||||
key="ybFlag"
|
||||
prop="ybFlag"
|
||||
key="ybFlag_enumText"
|
||||
prop="ybFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
@@ -270,8 +270,8 @@
|
||||
<el-table-column
|
||||
label="医保对码标记"
|
||||
align="center"
|
||||
key="ybMatchFlag"
|
||||
prop="ybMatchFlag"
|
||||
key="ybMatchFlag_enumText"
|
||||
prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -338,8 +338,8 @@
|
||||
<el-table-column
|
||||
label="过敏标记"
|
||||
align="center"
|
||||
key="allergenFlag"
|
||||
prop="allergenFlag"
|
||||
key="allergenFlag_enumText"
|
||||
prop="allergenFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
@@ -383,6 +383,8 @@
|
||||
ref="deviceRef"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
:deviceCategories="deviceCategories"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<!-- <device-view-dialog
|
||||
|
||||
@@ -59,10 +59,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否停用" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-select v-model="queryParams.statusEnum" style="width: 240px">
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
@@ -270,16 +267,76 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder="" /> -->
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="ybNo">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="医保对码标记"
|
||||
prop="ybMatchFlag"
|
||||
label-width="100"
|
||||
>
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="拼音" prop="pyStr">
|
||||
<el-input v-model="form.pyStr" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="停用" prop="status">
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="说明" prop="description">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -299,7 +356,7 @@ import {
|
||||
getDiseaseCategory,
|
||||
getDiseaseOne,
|
||||
stopDisease,
|
||||
startDisease
|
||||
startDisease,
|
||||
} from "./components/disease";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -319,6 +376,7 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
const conditionDefinition = ref(undefined);
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
@@ -339,6 +397,15 @@ const data = reactive({
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// typeCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// description: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -359,7 +426,6 @@ function getDiseaseCategoryList() {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data.diseaseCategoryList;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
@@ -378,6 +444,7 @@ function getList() {
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.sourceEnum = data.value;
|
||||
conditionDefinition.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
@@ -447,7 +514,7 @@ function handleExport() {
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map(item => item.id);
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
@@ -468,6 +535,12 @@ function reset() {
|
||||
pyStr: undefined,
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
sourceEnum: undefined,
|
||||
typeCode: undefined,
|
||||
description: undefined,
|
||||
ybFlag: undefined,
|
||||
ybNo: undefined,
|
||||
ybMatchFlag: undefined,
|
||||
};
|
||||
proxy.resetForm("diseaseRef");
|
||||
}
|
||||
@@ -478,6 +551,9 @@ function cancel() {
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (conditionDefinition.value === undefined) {
|
||||
return proxy.$modal.msgError("请选择病种目录分类");
|
||||
}
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "新增";
|
||||
@@ -487,6 +563,12 @@ function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.ybFlag == 1
|
||||
? (form.value.ybFlag = true)
|
||||
: (form.value.ybFlag = false);
|
||||
form.value.ybMatchFlag == 1
|
||||
? (form.value.ybMatchFlag = true)
|
||||
: (form.value.ybMatchFlag = false);
|
||||
open.value = true;
|
||||
title.value = "病种编辑";
|
||||
}
|
||||
@@ -494,6 +576,11 @@ function handleUpdate(row) {
|
||||
function submitForm() {
|
||||
proxy.$refs["diseaseRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.sourceEnum = conditionDefinition.value;
|
||||
form.value.ybFlag ? (form.value.ybFlag = 1) : (form.value.ybFlag = 0);
|
||||
form.value.ybMatchFlag
|
||||
? (form.value.ybMatchFlag = 1)
|
||||
: (form.value.ybMatchFlag = 0);
|
||||
if (form.value.id != undefined) {
|
||||
// form.value.status
|
||||
// ? (form.value.statusEnum = "3")
|
||||
|
||||
@@ -51,10 +51,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="通用名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -125,7 +122,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_category"
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -173,7 +170,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -209,7 +206,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -241,7 +238,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -259,7 +256,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -425,6 +422,23 @@
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in yb_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
@@ -653,28 +667,30 @@ const {
|
||||
medicine_category,
|
||||
system_categories,
|
||||
medicine_properties,
|
||||
medicine_unit,
|
||||
unit_code,
|
||||
medicine_formulation,
|
||||
medical_insurance_types,
|
||||
yb_type,
|
||||
medicine_default_usage,
|
||||
medicine_default_frequency,
|
||||
medicine_basic_flag,
|
||||
sys_normal_disable,
|
||||
rate_code,
|
||||
method_code,
|
||||
fin_type_code
|
||||
} = proxy.useDict(
|
||||
"medicine_category",
|
||||
"system_categories",
|
||||
"medicine_properties",
|
||||
"medicine_unit",
|
||||
"unit_code",
|
||||
"medicine_formulation",
|
||||
"medical_insurance_types",
|
||||
"yb_type",
|
||||
"medicine_default_usage",
|
||||
"medicine_default_frequency",
|
||||
"medicine_basic_flag",
|
||||
"sys_normal_disable",
|
||||
"rate_code",
|
||||
"method_code"
|
||||
"method_code",
|
||||
"fin_type_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
label-width="68px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="药品" prop="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
@@ -47,70 +47,34 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="5">
|
||||
<el-form-item
|
||||
label="是否系统预置"
|
||||
prop="status"
|
||||
label="状态"
|
||||
prop="statusEnum"
|
||||
label-width="100"
|
||||
>
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item
|
||||
label="医保是否对码"
|
||||
prop="status"
|
||||
label-width="100"
|
||||
>
|
||||
<el-form-item label="医保对码" prop="ybMatchFlag" label-width="80">
|
||||
<el-select
|
||||
v-model="queryParams.ybMatchFlag"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="已发生业务" prop="status" label-width="100">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-form-item label="医保等级" prop="status" label-width="80">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="domainEnum in domainEnumOptions"
|
||||
:key="domainEnum.value"
|
||||
:label="domainEnum.info"
|
||||
:value="domainEnum.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -630,6 +594,7 @@ const title = ref("");
|
||||
const medicationOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const domainEnumOptions = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
// 使用 ref 定义当前药品数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
@@ -671,9 +636,10 @@ const filterNode = (value, data) => {
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, "response药品目录分类查询下拉树结构");
|
||||
medicationOptions.value = response.data.medicationOptions;
|
||||
medicationOptions.value = response.data.medicationListOptions;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
domainEnumOptions.value = response.data.domainFlagOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container-infusion">
|
||||
<div class="app-container">
|
||||
<div class="left">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item label="医嘱执行时间">
|
||||
@@ -21,14 +21,14 @@
|
||||
</el-form>
|
||||
|
||||
<el-table :data="patientList" border style="width: 100%" highlight-current-row @current-change="handleCurrentChange" >
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="150" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="120" />
|
||||
<el-table-column prop="patientName" label="姓名" width="100" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||
<el-table-column prop="ageString" label="年龄" width="80" />
|
||||
<el-table-column prop="status" label="身份证号" width="140" />
|
||||
<el-table-column prop="idCard" label="身份证号" width="140" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList"/>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
@@ -41,7 +41,6 @@
|
||||
<el-button type="primary" icon="Search" @click="handleQueryRight" style="margin-left: 10px;">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQueryRight">重置</el-button>
|
||||
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit">确认执行</el-button>
|
||||
<!-- <el-button type="primary" icon="SuccessFilled" @click="handleSubmitCanel">取消执行</el-button> -->
|
||||
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印患者卡</el-button>
|
||||
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印瓶签</el-button>
|
||||
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印输液单</el-button>
|
||||
@@ -49,10 +48,15 @@
|
||||
</el-form>
|
||||
<div>
|
||||
<p style="margin: 0px 0px 10px 0px;">院注医嘱</p>
|
||||
<el-table :data="infusionList" border style="width: 100%;height: 300px;" :row-class-name="rowClassName"
|
||||
<el-table :data="infusionList" border style="width: 100%;height: 300px;" :row-style="rowStyle"
|
||||
@selection-change="handleSelectionChange" ref="tableRef">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="groupId" label="组" width="60" />
|
||||
<el-table-column label="组" width="50">
|
||||
<template #default="scope">
|
||||
<span>{{ markers[scope.$index] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="groupId" label="组" width="60" /> -->
|
||||
<el-table-column prop="executeNum" label="总执行次数" width="90" />
|
||||
<el-table-column prop="doneNum" label="已执行次数" width="90" />
|
||||
<el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
|
||||
@@ -72,7 +76,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<p style="margin: 13px 0px 10px 0px;">院注执行历史</p>
|
||||
<el-table :data="historyRecordsList" border style="width: 100%;height: 250px;">
|
||||
<el-table :data="historyRecordsList" border style="width: 100%;height: 300px;">
|
||||
<el-table-column prop="occurrenceEndTime" label="执行时间" width="180" >
|
||||
<template #default="scope">
|
||||
<el-date-picker v-model="scope.row.occurrenceEndTime" type="datetime"
|
||||
@@ -80,6 +84,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="performerId_dictText" label="执行人" width="80" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="100" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="100" />
|
||||
<el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
|
||||
<el-table-column prop="medicationInformation" label="药品信息" width="180" />
|
||||
@@ -126,9 +131,11 @@ const dateRangeRight = ref([]);
|
||||
const historyRecordsList = ref([]);
|
||||
const patientList = ref([]);
|
||||
const infusionList = ref([]);
|
||||
// const timeRightStart = ref([]);
|
||||
// const timeRightEnd = ref([]);
|
||||
const ids = ref([]);
|
||||
const timeRightStart = ref([]);
|
||||
const timeRightEnd = ref([]);
|
||||
|
||||
const groupColors = ref(new Map());
|
||||
const markers = ref([]);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -145,32 +152,30 @@ const { queryParams } = toRefs(data);
|
||||
/** 查询门诊输液列表 */
|
||||
function getList() {
|
||||
listInfusionRecord(queryParams.value).then(response => {
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data;
|
||||
// 为每个 groupId 分配随机颜色
|
||||
groupColors.value = assignRandomColorsToGroups(infusionList.value);
|
||||
// 统计每个 groupId 的行数
|
||||
const groupCounts = countGroupRows(infusionList.value);
|
||||
// 设置每行的标记
|
||||
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
||||
});
|
||||
listPatients().then(response => {
|
||||
console.log('Full response2:', response);
|
||||
patientList.value = response.data.records;
|
||||
});
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
if (dateRange.value) {
|
||||
queryParams.value.createTimeSTime = dateRange.value[0];
|
||||
queryParams.value.createTimeETime = dateRange.value[1];
|
||||
} else {
|
||||
queryParams.value.createTimeSTime = null;
|
||||
queryParams.value.createTimeETime = null;
|
||||
}
|
||||
console.log("111",queryParams.value)
|
||||
queryParams.value.pageNo = 1;
|
||||
listPatients(queryParams.value).then(response => {
|
||||
console.log('Full response2:', response);
|
||||
queryParams.value.createTimeSTime = dateRange.value[0];
|
||||
queryParams.value.createTimeETime = dateRange.value[1];
|
||||
} else {
|
||||
queryParams.value.createTimeSTime = null;
|
||||
queryParams.value.createTimeETime = null;
|
||||
}
|
||||
queryParams.value.pageNo = 1;
|
||||
listPatients(queryParams.value).then(response => {
|
||||
patientList.value = response.data.records;
|
||||
});
|
||||
}
|
||||
@@ -178,15 +183,12 @@ function handleQuery() {
|
||||
function handleQueryRight() {
|
||||
const createTimeSTime = dateRangeRight.value[0];
|
||||
const createTimeETime = dateRangeRight.value[1];
|
||||
// timeRightStart.value = createTimeSTime;
|
||||
// timeRightEnd.value = createTimeETime;
|
||||
console.log("111",createTimeSTime,createTimeETime)
|
||||
timeRightStart.value = createTimeSTime;
|
||||
timeRightEnd.value = createTimeETime;
|
||||
listInfusionRecord(createTimeSTime,createTimeETime).then(response => {
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord(createTimeSTime,createTimeETime).then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
@@ -195,35 +197,129 @@ function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
// listPatients().then(response => {
|
||||
// console.log('Full response2:', response);
|
||||
// patientList.value = response.data.records;
|
||||
// });
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
/** 右边重置按钮操作 */
|
||||
function resetQueryRight() {
|
||||
dateRangeRight.value = [];
|
||||
if(historyRecordsList.value.length>0){
|
||||
dateRangeRight.value = [];
|
||||
listInfusionRecord().then(response => {
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}else{
|
||||
// 清空选中状态
|
||||
selectedItems.value.clear();
|
||||
selectedGroupIds.value.clear();
|
||||
dateRangeRight.value = [];
|
||||
// 取消表格所有行的选中状态
|
||||
infusionList.value.forEach(row => {
|
||||
tableRef.value.toggleRowSelection(row, false);
|
||||
});
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getRandomColor() {
|
||||
const letters = 'CDEF';
|
||||
let color = '#';
|
||||
for (let i = 0; i < 6; i++) {
|
||||
color += letters[Math.floor(Math.random() * letters.length)];
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
function assignRandomColorsToGroups(data) {
|
||||
const colors = new Map();
|
||||
data.forEach((item) => {
|
||||
if (!colors.has(item.groupId)) {
|
||||
colors.set(item.groupId, getRandomColor());
|
||||
}
|
||||
});
|
||||
return colors;
|
||||
}
|
||||
|
||||
// 计算颜色的亮度
|
||||
function calculateBrightness(color) {
|
||||
const r = parseInt(color.slice(1, 3), 16);
|
||||
const g = parseInt(color.slice(3, 5), 16);
|
||||
const b = parseInt(color.slice(5, 7), 16);
|
||||
const brightness = 0.299 * r + 0.587 * g + 0.114 * b;
|
||||
return brightness;
|
||||
}
|
||||
|
||||
// 根据亮度设置字体颜色
|
||||
function getTextColor(color) {
|
||||
const brightness = calculateBrightness(color);
|
||||
return brightness < 128 ? '#FFFFFF' : '#000000';
|
||||
}
|
||||
|
||||
function getRowMarkers(groupCounts, data) {
|
||||
const markers = new Array(data.length).fill('');
|
||||
|
||||
groupCounts.forEach((groupInfo, groupId) => {
|
||||
const { count, indices } = groupInfo;
|
||||
if (count === 1) {
|
||||
// 如果只有一行,不显示标记
|
||||
return;
|
||||
} else if (count === 2) {
|
||||
// 如果有两行,分别显示左右括号
|
||||
markers[indices[0]] = '﹁';
|
||||
markers[indices[1]] = '﹂';
|
||||
} else {
|
||||
// 如果有两行以上,第一条显示左括号,中间用竖线,最后一条显示右括号
|
||||
markers[indices[0]] = '﹁';
|
||||
for (let i = 1; i < indices.length - 1; i++) {
|
||||
markers[indices[i]] = '|';
|
||||
}
|
||||
markers[indices[indices.length - 1]] = '﹂';
|
||||
}
|
||||
});
|
||||
|
||||
return markers;
|
||||
}
|
||||
|
||||
function countGroupRows(data) {
|
||||
const groupCounts = new Map();
|
||||
data.forEach((item, index) => {
|
||||
if (!groupCounts.has(item.groupId)) {
|
||||
groupCounts.set(item.groupId, { count: 0, indices: [] });
|
||||
}
|
||||
const groupInfo = groupCounts.get(item.groupId);
|
||||
groupInfo.count++;
|
||||
groupInfo.indices.push(index);
|
||||
});
|
||||
return groupCounts;
|
||||
}
|
||||
|
||||
// 执行输液
|
||||
function handleSubmit(){
|
||||
// 将 Set 转换为数组
|
||||
const itemsList = Array.from(selectedItems.value);
|
||||
|
||||
// 如果没有有效数据,直接返回
|
||||
if (itemsList.length === 0) {
|
||||
console.error("No valid items to process");
|
||||
proxy.$modal.msgError("没有有效的数据可供提交");
|
||||
return;
|
||||
}
|
||||
const allCompleted = itemsList.every(item => item.medicationStatusEnum_enumText === "已完成");
|
||||
|
||||
if (!allCompleted) {
|
||||
// 如果存在未完成的药品,提示用户
|
||||
proxy.$modal.msgError("存在未完成的药品,请检查后再提交");
|
||||
return;
|
||||
}
|
||||
const allExecuted = itemsList.every(item => item.executeNum === item.doneNum);
|
||||
|
||||
if (allExecuted) {
|
||||
// 如果所有药品的 executeNum 和 doneNum 都相等,提示用户
|
||||
proxy.$modal.msgError("已执行完总次数");
|
||||
return;
|
||||
}
|
||||
updateInfusionRecord(itemsList).then(response => {
|
||||
proxy.$modal.msgSuccess("执行成功");
|
||||
clearSelections();
|
||||
@@ -241,52 +337,55 @@ function handleSelectionChange(selection) {
|
||||
selection.forEach(item => {
|
||||
const groupId = item.groupId;
|
||||
const prescriptionNo = item.prescriptionNo;
|
||||
// 检查 groupId 和 prescriptionNo 是否同时存在
|
||||
if ( selectedGroupIds.value.has(groupId)) { //selectedPrescriptionNos.value.has(prescriptionNo) &&
|
||||
// 检查 groupId 是否同时存在
|
||||
if ( selectedGroupIds.value.has(groupId)) {
|
||||
// 如果都存在,则移除它们
|
||||
selectedGroupIds.value.delete(groupId);
|
||||
selectedPrescriptionNos.value.delete(prescriptionNo);
|
||||
} else {
|
||||
// 否则添加它们
|
||||
selectedGroupIds.value.add(groupId);
|
||||
selectedPrescriptionNos.value.add(prescriptionNo);
|
||||
}
|
||||
});
|
||||
// 动态更新表格行的选中状态
|
||||
infusionList.value.forEach(row => {
|
||||
// 检查当前行的 groupId 和 prescriptionNo 是否同时在 selectedGroupIds 和 selectedPrescriptionNos 中
|
||||
// 检查当前行的 groupId 是否同时在 selectedGroupIds 中
|
||||
const isSelected = selectedGroupIds.value.has(row.groupId);
|
||||
tableRef.value.toggleRowSelection(row, isSelected);
|
||||
});
|
||||
console.log('Current selectedGroupIds:', selectedGroupIds.value);
|
||||
console.log('Current selectedPrescriptionNos:', selectedPrescriptionNos.value);
|
||||
console.log('Current selectedItems:', selectedItems.value);
|
||||
}
|
||||
function clearSelections() {
|
||||
// 清空选中状态
|
||||
selectedItems.value.clear();
|
||||
selectedGroupIds.value.clear();
|
||||
selectedPrescriptionNos.value.clear();
|
||||
|
||||
// 取消表格所有行的选中状态
|
||||
infusionList.value.forEach(row => {
|
||||
tableRef.value.toggleRowSelection(row, false);
|
||||
});
|
||||
dateRangeRight.value = [];
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
// 检查 currentRow.value 是否存在
|
||||
if (!currentRow.value) {
|
||||
const createTimeSTime = timeRightStart.value || null;
|
||||
const createTimeETime = timeRightEnd.value || null;
|
||||
listInfusionRecord(createTimeSTime,createTimeETime).then(response => {
|
||||
infusionList.value = response.data;
|
||||
})
|
||||
}else{
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
function rowClassName({ row }) {
|
||||
if (selectedGroupIds.value.has(row.groupId)) {
|
||||
return 'selected-row';
|
||||
}
|
||||
return '';
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
// 动态设置行的内联样式
|
||||
function rowStyle({ row }) {
|
||||
const color = groupColors.value.get(row.groupId);
|
||||
const textColor = getTextColor(color);
|
||||
return { backgroundColor: color, color: textColor };
|
||||
}
|
||||
function handleUpdateTime(row){
|
||||
console.log("row",row)
|
||||
@@ -301,7 +400,6 @@ function handleCurrentChange(row) {
|
||||
currentRow.value = row; // 更新当前选中行的数据
|
||||
console.log("当前选中行的数据:", currentRow.value);
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
console.log('Full response4:', response);
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
}
|
||||
@@ -310,8 +408,8 @@ getList();
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-container-infusion {
|
||||
<style scoped>
|
||||
.app-container{
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
}
|
||||
@@ -322,8 +420,5 @@ getList();
|
||||
margin-left: 2%;
|
||||
width: 70%;
|
||||
}
|
||||
.selected-row {
|
||||
background-color: #effae8 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -205,6 +205,8 @@
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
ref="tableRef"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
@@ -591,8 +593,6 @@ import {
|
||||
getPurchaseinventoryList,
|
||||
addPurchaseinventory,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
delPurchaseinventory,
|
||||
} from "./purchaseinventory";
|
||||
|
||||
@@ -748,8 +748,21 @@ const practitionerListOptions = ref(undefined); // 查询经手人列表
|
||||
const supplierListOptions = ref(undefined); // 供应商列表
|
||||
const selectedRows = ref([]); // 用于存储选中的行
|
||||
const emit = defineEmits(["new-item-added"]);
|
||||
const tableRef = ref(undefined); // 表格引用
|
||||
const currentRow = ref(undefined); // 当前操作的行
|
||||
|
||||
const addNewRow = () => {
|
||||
|
||||
// 挂载时绑定事件
|
||||
onMounted(() => {
|
||||
document.addEventListener('click', handleClickOutside);
|
||||
});
|
||||
|
||||
// 卸载时移除事件
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('click', handleClickOutside);
|
||||
});
|
||||
|
||||
function addNewRow() {
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning("请先保存当前行后再新增!");
|
||||
return;
|
||||
@@ -778,8 +791,9 @@ const addNewRow = () => {
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
purchaseinventoryList.value.push(newRow);
|
||||
total.value = purchaseinventoryList.value.length;
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
};
|
||||
}
|
||||
|
||||
function handleBlur(row, index) {
|
||||
let hasError = false;
|
||||
@@ -832,7 +846,22 @@ function handleBlur(row, index) {
|
||||
// }
|
||||
}
|
||||
|
||||
const saveRow = (row, index) => {
|
||||
// 点击行时记录当前行
|
||||
function handleRowClick(row) {
|
||||
currentRow.value = row;
|
||||
}
|
||||
|
||||
// 监听表格外的点击事件
|
||||
function handleClickOutside(event) {
|
||||
if (tableRef.value && !tableRef.value.$el.contains(event.target)) {
|
||||
if (currentRow.value) {
|
||||
handleSave(currentRow.value);
|
||||
currentRow.value = null; // 清空当前行
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function saveRow(row, index) {
|
||||
console.log(row, "saveRowsaveRowsaveRowsaveRowsaveRowsaveRow");
|
||||
// 保存当前行的逻辑...
|
||||
// 例如:调用 API 保存数据
|
||||
@@ -865,15 +894,15 @@ const saveRow = (row, index) => {
|
||||
}
|
||||
|
||||
// proxy.$message.success("保存成功!");
|
||||
};
|
||||
}
|
||||
|
||||
function handleSave( row , index ) {
|
||||
function handleSave(row, index) {
|
||||
let hasError = false;
|
||||
// this.purchaseinventoryList.forEach((row) => {
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
}
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
}
|
||||
// });
|
||||
|
||||
if (hasError) {
|
||||
@@ -918,7 +947,7 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
const deleteSelectedRows = () => {
|
||||
function deleteSelectedRows() {
|
||||
if (selectedRows.value.length === 0) {
|
||||
alert("请先选择要删除的行");
|
||||
return;
|
||||
@@ -929,7 +958,7 @@ const deleteSelectedRows = () => {
|
||||
);
|
||||
|
||||
selectedRows.value = []; // 清空选中行
|
||||
};
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
@@ -994,6 +1023,7 @@ function edit() {
|
||||
receiptHeaderForm.value = props.item.length > 0 ? props.item[0] : {};
|
||||
// receiptHeaderForm.value.busNo = props.item.supplyBusNo;
|
||||
purchaseinventoryList.value = props.item;
|
||||
total.value = purchaseinventoryList.value.length;
|
||||
console.log(purchaseinventoryList.value, "purchaseinventoryList.value");
|
||||
console.log(receiptHeaderForm.value, "receiptHeaderForm.value");
|
||||
loading.value = false;
|
||||
|
||||
@@ -29,7 +29,7 @@ export function addPurchaseinventory(data) {
|
||||
}
|
||||
|
||||
|
||||
// 查询厂商类型
|
||||
// 查询采购入库单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/init',
|
||||
@@ -37,30 +37,31 @@ export function getInit() {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 删除收费挂号项目
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
console.log(param,'aaaa')
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'delete',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: { busNo }
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: { busNo }
|
||||
})
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="140"
|
||||
width="180"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -202,9 +202,19 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</el-button
|
||||
v-if="scope.row.statusEnum == '1'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -234,8 +244,8 @@ import {
|
||||
addPurchaseinventory,
|
||||
getpurchaseInventoryDetail,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delPurchaseinventory,
|
||||
} from "./components/purchaseinventory";
|
||||
|
||||
@@ -244,21 +254,6 @@ import inventoryReceiptDialog from "./components/inventoryReceiptDialog";
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const {
|
||||
adm_location,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
financial_type_code,
|
||||
} = proxy.useDict(
|
||||
"adm_location",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"med_chrgitm_type",
|
||||
"financial_type_code"
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -269,10 +264,6 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const activeFlagOptions = ref(undefined);
|
||||
const appointmentRequiredFlagOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const dateRange = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const itemTypeOptions = ref(undefined); // 入库项目类型
|
||||
@@ -312,25 +303,6 @@ function getPurchaseinventoryTypeList() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询采购入库项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
@@ -348,8 +320,14 @@ function getList() {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.S_TIME = dateRange.value[0] + " 00:00:00";
|
||||
queryParams.value.E_TIME = dateRange.value[1] + " 23:59:59";
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
dateRange.value && dateRange.value.length == 2
|
||||
? dateRange.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
dateRange.value && dateRange.value.length == 2
|
||||
? dateRange.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
@@ -363,8 +341,6 @@ function handleClear() {
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
@@ -372,43 +348,16 @@ function handleSelectionChange(selection) {
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddInventoryReceiptDialog() {
|
||||
proxy.$refs["inventoryReceiptRef"].show();
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
categoryCode: undefined,
|
||||
cwTypeCode: undefined,
|
||||
fwTypeCode: undefined,
|
||||
specialtyCode: undefined,
|
||||
locationId: undefined,
|
||||
offeredOrgId: undefined,
|
||||
activeFlag: undefined,
|
||||
extraDetails: undefined,
|
||||
contact: undefined,
|
||||
appointmentRequiredFlag: undefined,
|
||||
chargeName: undefined,
|
||||
price: undefined,
|
||||
description: undefined,
|
||||
ybType: undefined,
|
||||
title: undefined,
|
||||
comment: undefined,
|
||||
};
|
||||
proxy.resetForm("purchaseinventoryRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
getPurchaseinventoryTypeList();
|
||||
nextTick(() => {
|
||||
proxy.$refs["inventoryReceiptRef"].show();
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
console.log(typeof(row.supplyBusNo), "row",row);
|
||||
console.log(typeof row.supplyBusNo, "row", row);
|
||||
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||
|
||||
currentData.value = response.data;
|
||||
console.log(response, "response采购入库编辑按钮", currentData.value);
|
||||
nextTick(() => {
|
||||
@@ -417,70 +366,23 @@ function handleUpdate(row) {
|
||||
getList();
|
||||
});
|
||||
}
|
||||
// /** 提交按钮 */
|
||||
// function submitForm() {
|
||||
// // // 调用转换函数
|
||||
// // const transformedData = transformFormData(form);
|
||||
// // console.log(transformedData, "transformedData");
|
||||
// // addPurchaseinventory(transformedData).then((response) => {
|
||||
// // proxy.$modal.msgSuccess("新增成功");
|
||||
// // open.value = false;
|
||||
// getList();
|
||||
// // });
|
||||
// }
|
||||
|
||||
// 获取完整地址字符串
|
||||
function getName() {
|
||||
console.log(service_type_code.value, "service_type_code.value");
|
||||
// 服务类型
|
||||
const serviceTypeText = proxy.selectDictLabel(
|
||||
service_type_code.value,
|
||||
form.value.fwTypeCode
|
||||
);
|
||||
// 服务分类
|
||||
const categoryCodeText = proxy.selectDictLabel(
|
||||
category_code.value,
|
||||
form.value.categoryCode
|
||||
);
|
||||
// 服务专业
|
||||
const specialtyCodeText = proxy.selectDictLabel(
|
||||
specialty_code.value,
|
||||
form.value.specialtyCode
|
||||
);
|
||||
console.log(
|
||||
serviceTypeText,
|
||||
"serviceTypeText",
|
||||
categoryCodeText,
|
||||
specialtyCodeText
|
||||
);
|
||||
const nameParts = [
|
||||
serviceTypeText,
|
||||
form.value.addressCity,
|
||||
categoryCodeText,
|
||||
specialtyCodeText,
|
||||
];
|
||||
|
||||
// 使用 reduce 方法拼接地址,非空字段之间用 '-' 连接
|
||||
return nameParts.reduce((acc, part) => {
|
||||
if (part) {
|
||||
if (acc) {
|
||||
acc += " - "; // 在非空字段之间添加 '-'
|
||||
}
|
||||
acc += part;
|
||||
}
|
||||
return acc;
|
||||
}, "");
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
// /** 详细按钮操作 */
|
||||
// function handleView(row) {
|
||||
// reset();
|
||||
// title.value = "查看";
|
||||
// open.value = true;
|
||||
// getPurchaseinventoryOne(row.id).then((response) => {
|
||||
// console.log(response, "responsebbbb", row.id);
|
||||
// form.value = response.data;
|
||||
// });
|
||||
// }
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
@@ -496,102 +398,8 @@ function handleDelete(row) {
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
// 转换insert参数函数
|
||||
const transformFormData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
chargeItemDefinitionFormData: {
|
||||
id,
|
||||
chargeName,
|
||||
title,
|
||||
orgId: offeredOrgId,
|
||||
description,
|
||||
typeCode: cwTypeCode,
|
||||
ybType,
|
||||
price,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
// 转换insert参数函数
|
||||
const transformFormEditData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
};
|
||||
};
|
||||
getPurchaseinventoryTypeList();
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@@ -32,7 +32,7 @@ export default defineConfig (({mode, command}) => {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
'/dev-api': {
|
||||
target: 'http://localhost:18080/openhis',
|
||||
// target: 'http://192.168.31.221:18080/openhis',
|
||||
// target: 'http://192.168.31.221:18081/openhis',
|
||||
changeOrigin: true,
|
||||
rewrite: p => p.replace (/^\/dev-api/, ''),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user