门诊挂号对应接口调整,采购入库画面接口调用 up by dh
This commit is contained in:
@@ -373,10 +373,10 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
v-for="domainEnum in domainEnumOptions"
|
||||
:key="domainEnum.value"
|
||||
:label="domainEnum.info"
|
||||
:value="domainEnum.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -471,18 +471,17 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生效日期" prop="effectiveDate">
|
||||
<el-date-picker
|
||||
v-model="form.effectiveDate"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="生效日期"
|
||||
:default-time="defaultTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="10">
|
||||
<el-form-item
|
||||
label="到期日期"
|
||||
prop="expirationDate"
|
||||
@@ -493,7 +492,6 @@
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="到期日期"
|
||||
:default-time="defaultTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -720,6 +718,7 @@ function show() {
|
||||
// getList();
|
||||
reset();
|
||||
statusFlagOptions.value = props.status;
|
||||
domainEnumOptions.value = props.domainEnum;
|
||||
// currentData.value.activeFlag == 1
|
||||
// ? (currentData.value.activeFlag = true)
|
||||
// : (currentData.value.activeFlag = false); //是否为活性
|
||||
@@ -751,6 +750,7 @@ function edit() {
|
||||
reset();
|
||||
form.value = props.item;
|
||||
statusFlagOptions.value = props.status;
|
||||
domainEnumOptions.value = props.domainEnum;
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
|
||||
@@ -303,14 +303,22 @@
|
||||
key="effectiveDate"
|
||||
prop="effectiveDate"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.effectiveDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="到期日期"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用法"
|
||||
align="center"
|
||||
@@ -665,6 +673,7 @@ function getMedicationCategoryList() {
|
||||
console.log(response, "response药品目录分类查询下拉树结构");
|
||||
medicationOptions.value = response.data.medicationOptions;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
domainEnumOptions.value = response.data.domainFlagOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
|
||||
@@ -132,4 +132,13 @@ export function listfamilyrelationshiptype() {
|
||||
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -284,12 +284,7 @@
|
||||
import pcas from "china-division/dist/pcas-code.json";
|
||||
import {
|
||||
addPatient,
|
||||
listmaritalstatus,
|
||||
listoccupationtype,
|
||||
lisadministrativegender,
|
||||
listbloodtypeabo,
|
||||
listbloodtypearh,
|
||||
listfamilyrelationshiptype,
|
||||
patientlLists,
|
||||
getOutpatientRegistrationList,
|
||||
} from "./outpatientregistration";
|
||||
|
||||
@@ -355,23 +350,14 @@ const props = defineProps({
|
||||
});
|
||||
/** 查询菜单列表 */
|
||||
function getList() {
|
||||
listmaritalstatus().then((response) => {
|
||||
maritalstatusList.value = response.data;
|
||||
});
|
||||
listoccupationtype().then((response) => {
|
||||
occupationtypeList.value = response.data;
|
||||
});
|
||||
lisadministrativegender().then((response) => {
|
||||
administrativegenderList.value = response.data;
|
||||
});
|
||||
listbloodtypeabo().then((response) => {
|
||||
bloodtypeaboList.value = response.data;
|
||||
});
|
||||
listbloodtypearh().then((response) => {
|
||||
bloodtypearhList.value = response.data;
|
||||
});
|
||||
listfamilyrelationshiptype().then((response) => {
|
||||
familyrelationshiptypeList.value = response.data;
|
||||
patientlLists().then((response) => {
|
||||
console.log(response);
|
||||
occupationtypeList.value = response.data.occupationType;
|
||||
administrativegenderList.value = response.data.administrativeGender;
|
||||
bloodtypeaboList.value = response.data.bloodTypeABO;
|
||||
bloodtypearhList.value = response.data.bloodTypeRH;
|
||||
familyrelationshiptypeList.value = response.data.familyRelationshipType;
|
||||
maritalstatusList.value = response.data.maritalStatus;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="outpatientregistrationRef"
|
||||
ref="outpatientRegistrationRef"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
@@ -151,7 +151,7 @@
|
||||
<el-col :span="4">
|
||||
<el-form-item
|
||||
label="参保类型:"
|
||||
prop="locationId"
|
||||
prop="cb"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-input
|
||||
@@ -455,11 +455,11 @@
|
||||
<el-col :span="4">
|
||||
<el-form-item
|
||||
label="总金额:"
|
||||
prop="pyStr"
|
||||
prop="totalPrice"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.pyStr"
|
||||
v-model="form.totalPrice"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
@@ -678,10 +678,29 @@ const data = reactive({
|
||||
// status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
},
|
||||
rules: {
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
patientId: [{ required: true, message: "病人不能为空", trigger: "blur" }],
|
||||
priorityEnum: [
|
||||
{ required: true, message: "优先级不能为空", trigger: "blur" },
|
||||
],
|
||||
serviceTypeId: [
|
||||
{ required: true, message: "挂号类型不能为空", trigger: "blur" },
|
||||
],
|
||||
organizationId: [
|
||||
{ required: true, message: "优先级不能为空", trigger: "blur" },
|
||||
],
|
||||
locationId: [
|
||||
{ required: true, message: "就诊科室不能为空", trigger: "blur" },
|
||||
],
|
||||
// practitionerId: [
|
||||
// { required: true, message: "医生不能为空", trigger: "blur" },
|
||||
// ],
|
||||
typeCode: [
|
||||
{ required: true, message: "账户类型不能为空", trigger: "blur" },
|
||||
],
|
||||
definitionId: [
|
||||
{ required: true, message: "费用定价不能为空", trigger: "blur" },
|
||||
],
|
||||
totalPrice: [{ required: true, message: "总价不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -797,13 +816,6 @@ function setInfo() {
|
||||
(doctor) => doctor.id === form.value.practitionerId
|
||||
);
|
||||
form.value.doctorName = doctorData.length > 0 ? doctorData[0].name : "";
|
||||
console.log(doctorData, "datayisheng");
|
||||
const healthcareData = healthcareList.value.filter(
|
||||
(healthcare) => healthcare.id === form.value.serviceTypeId
|
||||
);
|
||||
form.value.locationId_dictText =
|
||||
healthcareData.length > 0 ? healthcareData[0].name : "";
|
||||
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : "";
|
||||
}
|
||||
|
||||
// 设定费用项管理表单
|
||||
@@ -811,10 +823,9 @@ function setchargeItem() {
|
||||
const healthcareData = healthcareList.value.filter(
|
||||
(healthcare) => healthcare.id === form.value.serviceTypeId
|
||||
);
|
||||
form.value.definitionId =
|
||||
healthcareData.length > 0 ? healthcareData[0].definitionId : "";
|
||||
form.value.totalPrice =
|
||||
healthcareData.length > 0 ? healthcareData[0].price : "";
|
||||
form.value.locationId_dictText =
|
||||
healthcareData.length > 0 ? healthcareData[0].name : "";
|
||||
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : "";
|
||||
}
|
||||
/** 查询患者信息 */
|
||||
function getList() {
|
||||
@@ -944,10 +955,14 @@ function reset() {
|
||||
function handleAdd() {
|
||||
const transformedData = transformFormData(form.value);
|
||||
console.log(transformedData, "transformedData门诊挂号");
|
||||
addOutpatientRegistration(transformedData).then((response) => {
|
||||
reset();
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
getList();
|
||||
proxy.$refs["outpatientRegistrationRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
addOutpatientRegistration(transformedData).then((response) => {
|
||||
reset();
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -979,7 +994,7 @@ function transformFormData(form) {
|
||||
patientId: form.patientId,
|
||||
definitionId: form.definitionId,
|
||||
serviceId: form.serviceTypeId,
|
||||
totalPrice: form.totalPrice, // 默认值为 99.99
|
||||
totalPrice: form.price, // 默认值为 99.99
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,100 +36,85 @@
|
||||
</el-row>
|
||||
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
v-model="receiptHeaderForm.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="采购部门:"
|
||||
prop="categoryEnum"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.categoryEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in appointmentRequiredFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="部门经手人:"
|
||||
prop="applicantId"
|
||||
label="经手人:"
|
||||
prop="practitionerId"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
v-model="receiptHeaderForm.practitionerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="practitioner in practitionerListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期:">
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTimeStart"
|
||||
v-model="receiptHeaderForm.occurrenceTime"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
type="datetime"
|
||||
start-placeholder="开始日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="回车查询"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品类型:" prop="categoryEnum">
|
||||
<el-select
|
||||
v-model="queryParams.categoryEnum"
|
||||
v-model="receiptHeaderForm.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库类型:" prop="purposeLocationId">
|
||||
<el-form-item label="药品类型:" prop="medicationType">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
v-model="receiptHeaderForm.medicationType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
v-for="itemType in purchase_type"
|
||||
:key="itemType.value"
|
||||
:label="itemType.label"
|
||||
:value="itemType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库类型:" prop="purposeTypeEnum">
|
||||
<el-select
|
||||
v-model="receiptHeaderForm.purposeTypeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in warehous_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@@ -225,18 +210,26 @@
|
||||
<el-table-column
|
||||
label="项目"
|
||||
align="center"
|
||||
key="itemTable"
|
||||
prop="itemTable"
|
||||
key="itemId"
|
||||
prop="itemId"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.itemTable"
|
||||
placeholder="请选择计量单位"
|
||||
>
|
||||
<el-option label="单位1" value="单位1" />
|
||||
<el-option label="单位2" value="单位2" />
|
||||
</el-select>
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-select
|
||||
v-model="scope.row.itemTable"
|
||||
placeholder="请选择"
|
||||
@blur="handleBlur(scope.row, scope.$index)"
|
||||
>
|
||||
<el-option label="单位1" value="单位1" />
|
||||
<el-option label="单位2" value="单位2" />
|
||||
</el-select>
|
||||
<el-tooltip content="该项目必填" placement="top">
|
||||
<el-icon style="color: red; margin-left: 5px"
|
||||
><Warning
|
||||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -247,19 +240,19 @@
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
<el-input v-model="scope.row.guige" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="supplierId"
|
||||
prop="supplierId"
|
||||
key="supplierName"
|
||||
prop="supplierName"
|
||||
:show-overflow-tooltip="true"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
<el-input v-model="scope.row.cahngdi" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -271,31 +264,47 @@
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.unitCode"
|
||||
placeholder="请选择计量单位"
|
||||
>
|
||||
<el-option label="单位1" value="单位1" />
|
||||
<el-option label="单位2" value="单位2" />
|
||||
</el-select>
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-select
|
||||
v-model="scope.row.unitCode"
|
||||
placeholder="请选择计量单位"
|
||||
@blur="handleBlur(scope.row, scope.$index)"
|
||||
>
|
||||
<el-option label="单位1" value="单位1" />
|
||||
<el-option label="单位2" value="单位2" />
|
||||
</el-select>
|
||||
<el-tooltip content="该项目必填" placement="top">
|
||||
<el-icon style="color: red; margin-left: 5px"
|
||||
><Warning
|
||||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="approverId"
|
||||
prop="approverId"
|
||||
key="purposeLocationStoreId"
|
||||
prop="purposeLocationStoreId"
|
||||
:show-overflow-tooltip="true"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.approverId"
|
||||
placeholder="请选择仓库"
|
||||
>
|
||||
<el-option label="仓库1" value="仓库1" />
|
||||
<el-option label="仓库2" value="仓库2" />
|
||||
</el-select>
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-select
|
||||
v-model="scope.row.purposeLocationStoreId"
|
||||
placeholder="请选择仓库"
|
||||
@blur="handleBlur(scope.row, scope.$index)"
|
||||
>
|
||||
<el-option label="仓库1" value="仓库1" />
|
||||
<el-option label="仓库2" value="仓库2" />
|
||||
</el-select>
|
||||
<el-tooltip content="该项目必填" placement="top">
|
||||
<el-icon style="color: red; margin-left: 5px"
|
||||
><Warning
|
||||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -306,13 +315,21 @@
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.approverId"
|
||||
placeholder="请选择货位"
|
||||
>
|
||||
<el-option label="货位1" value="货位1" />
|
||||
<el-option label="货位2" value="货位2" />
|
||||
</el-select>
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-select
|
||||
v-model="scope.row.approverId"
|
||||
placeholder="请选择货位"
|
||||
@blur="handleBlur(scope.row, scope.$index)"
|
||||
>
|
||||
<el-option label="货位1" value="货位1" />
|
||||
<el-option label="货位2" value="货位2" />
|
||||
</el-select>
|
||||
<el-tooltip content="该项目必填" placement="top">
|
||||
<el-icon style="color: red; margin-left: 5px"
|
||||
><Warning
|
||||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -329,23 +346,67 @@
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
key="applyTime"
|
||||
prop="applyTime"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-input
|
||||
v-model="scope.row.itemQuantity"
|
||||
placeholder=""
|
||||
@blur="handleBlur(scope.row, scope.$index)"
|
||||
/>
|
||||
<el-tooltip content="该项目必填" placement="top">
|
||||
<el-icon style="color: red; margin-left: 5px"
|
||||
><Warning
|
||||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="采购单价 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
key="price"
|
||||
prop="price"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-input
|
||||
v-model="scope.row.price"
|
||||
placeholder=""
|
||||
@blur="handleBlur(scope.row, scope.$index)"
|
||||
/>
|
||||
<el-tooltip content="该项目必填" placement="top">
|
||||
<el-icon style="color: red; margin-left: 5px"
|
||||
><Warning
|
||||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="售价 "
|
||||
align="center"
|
||||
key="sellPrice"
|
||||
prop="sellPrice"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.sellPrice" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零售价 "
|
||||
align="center"
|
||||
key="minSellPrice"
|
||||
prop="minSellPrice"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.minSellPrice" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -404,17 +465,6 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="有效期(月)"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发票号 "
|
||||
align="center"
|
||||
@@ -445,18 +495,18 @@
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
<el-input v-model="scope.row.zsbz" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
key="detailJson"
|
||||
prop="detailJson"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.busNo" placeholder="" />
|
||||
<el-input v-model="scope.row.detailJson" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -537,34 +587,32 @@
|
||||
</template>
|
||||
|
||||
<script setup name="InventoryReceiptDialog">
|
||||
// import {
|
||||
// getPurchaseinventoryList,
|
||||
// editPurchaseinventory,
|
||||
// addPurchaseinventory,
|
||||
// getPurchaseinventoryOne,
|
||||
// getInit,
|
||||
// deptTreeSelect,
|
||||
// locationTreeSelect,
|
||||
// delPurchaseinventory,
|
||||
// } from "./components/purchaseinventory";
|
||||
import {
|
||||
getPurchaseinventoryList,
|
||||
editPurchaseinventory,
|
||||
addPurchaseinventory,
|
||||
getPurchaseinventoryOne,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
delPurchaseinventory,
|
||||
} from "./purchaseinventory";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const {
|
||||
adm_location,
|
||||
warehous_type,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
financial_type_code,
|
||||
purchase_type,
|
||||
} = proxy.useDict(
|
||||
"adm_location",
|
||||
"warehous_type",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"med_chrgitm_type",
|
||||
"financial_type_code"
|
||||
"purchase_type"
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
@@ -583,18 +631,37 @@ const locationOptions = ref(undefined); // 地点树选项
|
||||
const dateRange = ref([]);
|
||||
const visible = ref(false);
|
||||
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const props = defineProps({
|
||||
practitionerListOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
itemTypeOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
supplierListOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
busNoAdd: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
receiptHeaderForm: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
statusEnum: undefined, // 状态
|
||||
supplierId: undefined, // 供应商ID
|
||||
applyTimeStart: undefined, // 申请时间开始
|
||||
practitionerId: undefined, // 经手人ID
|
||||
},
|
||||
rules: {
|
||||
offeredOrgId: [
|
||||
@@ -630,51 +697,93 @@ const data = reactive({
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const { queryParams, form, receiptHeaderForm, rules } = toRefs(data);
|
||||
const itemTypeOptions = ref(undefined); // 入库项目类型
|
||||
const practitionerListOptions = ref(undefined); // 查询经手人列表
|
||||
const supplierListOptions = ref(undefined); // 供应商列表
|
||||
const selectedRows = ref([]); // 用于存储选中的行
|
||||
|
||||
const addNewRow = () => {
|
||||
purchaseinventoryList.value.push({
|
||||
busNo: "",
|
||||
statusEnum_enumText: "",
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning("请先保存当前行后再新增!");
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
id: "",
|
||||
itemTable: "",
|
||||
itemQuantity: "",
|
||||
itemId: "",
|
||||
unitCode: "",
|
||||
detailJson: "",
|
||||
supplierId: "",
|
||||
purposeLocationId: "",
|
||||
approverId: "",
|
||||
applicantId: "",
|
||||
applyTime: null,
|
||||
approvalTime: null,
|
||||
// 其他字段...
|
||||
});
|
||||
purposeTypeEnum: "",
|
||||
purposeLocationId: null,
|
||||
purposeLocationStoreId: null,
|
||||
practitionerId: "",
|
||||
traceNo: "",
|
||||
invoiceNo: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
price: "",
|
||||
totalPrice: "",
|
||||
sellPrice: "",
|
||||
minSellPrice: "",
|
||||
isEditing: true, // 标记当前行是否正在编辑
|
||||
};
|
||||
purchaseinventoryList.value.push(newRow);
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
};
|
||||
|
||||
/** 挂号收费查询下拉树结构 */
|
||||
function getPurchaseinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log(response, "response");
|
||||
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
|
||||
appointmentRequiredFlagOptions.value =
|
||||
response.data.appointmentRequiredFlagOptions; // 预约必填标记
|
||||
});
|
||||
}
|
||||
const handleBlur = (row, index) => {
|
||||
console.log(row, "rowhandleBlurhandleBlurhandleBlurhandleBlurhandleBlur");
|
||||
if (
|
||||
row.itemTable &&
|
||||
row.unitCode &&
|
||||
row.purposeLocationStoreId &&
|
||||
row.approverId &&
|
||||
row.itemQuantity &&
|
||||
row.price
|
||||
) {
|
||||
saveRow(row, index); // 调用保存方法
|
||||
}
|
||||
};
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
const saveRow = (row, index) => {
|
||||
console.log(row, "saveRowsaveRowsaveRowsaveRowsaveRowsaveRow");
|
||||
// 保存当前行的逻辑...
|
||||
// 例如:调用 API 保存数据
|
||||
// 保存成功后,将标志位设置为 false
|
||||
// data.isAdding = false;
|
||||
if (receiptHeaderForm.value.medicationType === "1") {
|
||||
row.itemTable = "med_medication_definition";
|
||||
} else {
|
||||
row.itemTable = "adm_device_definition";
|
||||
}
|
||||
row.practitionerId = receiptHeaderForm.value.practitionerId;
|
||||
row.occurrenceTime = receiptHeaderForm.value.occurrenceTime;
|
||||
row.supplierId = receiptHeaderForm.value.supplierId;
|
||||
row.purposeTypeEnum = receiptHeaderForm.value.purposeTypeEnum;
|
||||
console.log(row, "rowabbbbbbbbbbbbbb");
|
||||
// try {
|
||||
// 调用 API 保存数据
|
||||
// await savePurchaseInventory(row);
|
||||
|
||||
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, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
// 保存成功后,更新本地数据
|
||||
purchaseinventoryList.value[index] = row;
|
||||
// 将表单数据发送给父组件
|
||||
emits("submit", row);
|
||||
// addPurchaseinventory(row).then((response) => {
|
||||
// reset();
|
||||
// data.isAdding = false; // 允许新增下一行
|
||||
// proxy.$message.success("保存成功!");
|
||||
// visible.value = false;
|
||||
// // getList();
|
||||
// });
|
||||
// } catch (error) {
|
||||
// proxy.$message.error("保存失败,请重试!");
|
||||
// }
|
||||
// proxy.$message.success("保存成功!");
|
||||
};
|
||||
|
||||
/** 查询挂号收费项目列表 */
|
||||
function getList() {
|
||||
@@ -690,21 +799,6 @@ function getList() {
|
||||
// });
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.applyTimeStart = dateRange.value[0];
|
||||
queryParams.value.applyTimeEnd = dateRange.value[1];
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
@@ -730,32 +824,51 @@ const deleteSelectedRows = () => {
|
||||
|
||||
/** 重置操作表单 */
|
||||
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,
|
||||
// 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");
|
||||
|
||||
receiptHeaderForm.value = {
|
||||
busNo: undefined,
|
||||
practitionerId: undefined,
|
||||
occurrenceTime: undefined,
|
||||
supplierId: undefined,
|
||||
medicationType: "1",
|
||||
purposeTypeEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("purchaseinventoryRef");
|
||||
proxy.resetForm("receiptHeaderRef");
|
||||
}
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
visible.value = true;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
itemTypeOptions.value = props.itemTypeOptions;
|
||||
practitionerListOptions.value = props.practitionerListOptions;
|
||||
receiptHeaderForm.value.busNo = props.busNoAdd;
|
||||
// console.log(purchase_type.value, "purchase_type.value")
|
||||
// // 设置默认值为字典中的第一个值
|
||||
// if (purchase_type.value.length > 0) {
|
||||
// form.value.medicationType = purchase_type.value[0].value;
|
||||
// }
|
||||
getList();
|
||||
}
|
||||
/** 取消按钮 */
|
||||
@@ -777,110 +890,7 @@ function handleUpdate(row) {
|
||||
open.value = true;
|
||||
title.value = "编辑";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (form.value.id != undefined) {
|
||||
// 移除规则
|
||||
rules.value.chargeName = [];
|
||||
rules.value.description = [];
|
||||
rules.value.cwTypeCode = [];
|
||||
rules.value.ybType = [];
|
||||
rules.value.price = [];
|
||||
} else {
|
||||
// 恢复规则
|
||||
rules.value.cwTypeCode = [
|
||||
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.ybType = [
|
||||
{ required: true, message: "医保类别不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.price = [
|
||||
{ required: true, message: "基础价格不能为空", trigger: "blur" },
|
||||
];
|
||||
|
||||
rules.value.chargeName = [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.description = [
|
||||
{ required: true, message: "描述不能为空", trigger: "blur" },
|
||||
];
|
||||
}
|
||||
|
||||
// const nameData = name || chargeName;
|
||||
// 服务名称
|
||||
form.value.name = getName();
|
||||
// 收费名称
|
||||
form.value.chargeName = getName();
|
||||
proxy.$refs["purchaseinventoryRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
// 调用转换函数
|
||||
const transformFormEditParam = transformFormEditData(form);
|
||||
console.log(transformFormEditData, "transformFormEditData");
|
||||
console.log(form.value, "editPurchaseinventory", form.value.statusEnum);
|
||||
editPurchaseinventory(transformFormEditParam).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
reset();
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
// 调用转换函数
|
||||
const transformedData = transformFormData(form);
|
||||
console.log(transformedData, "transformedData");
|
||||
addPurchaseinventory(transformedData).then((response) => {
|
||||
reset();
|
||||
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 handleView(row) {
|
||||
reset();
|
||||
@@ -906,99 +916,7 @@ 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,
|
||||
},
|
||||
};
|
||||
};
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询服务管理列表
|
||||
// 查询采购入库列表
|
||||
export function getPurchaseinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt-page',
|
||||
@@ -18,28 +18,20 @@ export function getPurchaseinventoryOne(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 新增服务管理
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改服务管理
|
||||
export function editPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询厂商类型
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/init',
|
||||
url: '/inventory-manage/purchase/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -9,18 +9,14 @@
|
||||
>
|
||||
<el-form-item label="单据号" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="审批状态:"
|
||||
prop="statusEnum"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
@@ -28,49 +24,40 @@
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in appointmentRequiredFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="回车查询"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门:" prop="categoryEnum">
|
||||
<el-select
|
||||
v-model="queryParams.categoryEnum"
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门经手人:" prop="applicantId" label-width="120px">
|
||||
<el-form-item label="经手人:" prop="practitionerId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
v-model="queryParams.practitionerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="practitioner in practitionerListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -113,7 +100,7 @@
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
@click="handleQuery"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>查询</el-button
|
||||
>
|
||||
@@ -136,7 +123,12 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="单据号" align="center" key="busNo" prop="busNo" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
@@ -146,48 +138,51 @@
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId"
|
||||
prop="supplierId"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门"
|
||||
label="经手人"
|
||||
align="center"
|
||||
key="purposeLocationId"
|
||||
prop="purposeLocationId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门经手人"
|
||||
align="center"
|
||||
key="approverId"
|
||||
prop="approverId"
|
||||
key="practitionerId_dictText"
|
||||
prop="practitionerId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId"
|
||||
prop="applicantId"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId"
|
||||
prop="approverId"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="applyTime"
|
||||
prop="applyTime"
|
||||
/>
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
/>
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@@ -223,10 +218,11 @@
|
||||
/>
|
||||
<inventory-receipt-dialog
|
||||
ref="inventoryReceiptRef"
|
||||
:item="currentData"
|
||||
:domainEnum="domainEnumOptions"
|
||||
:status="statusFlagOptions"
|
||||
@submit="submitForm"
|
||||
:practitionerListOptions="practitionerListOptions"
|
||||
:itemTypeOptions="itemTypeOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
@new-item-added="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -278,6 +274,11 @@ const appointmentRequiredFlagOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const dateRange = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const itemTypeOptions = ref(undefined); // 入库项目类型
|
||||
const practitionerListOptions = ref(undefined); // 查询经手人列表
|
||||
const supplierListOptions = ref(undefined); // 供应商列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
@@ -289,52 +290,24 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
offeredOrgId: [
|
||||
{ required: true, message: "提供部门不能为空", trigger: "blur" },
|
||||
],
|
||||
categoryCode: [
|
||||
{ required: true, message: "服务分类不能为空", trigger: "blur" },
|
||||
],
|
||||
fwTypeCode: [
|
||||
{ required: true, message: "服务类型不能为空", trigger: "blur" },
|
||||
],
|
||||
specialtyCode: [
|
||||
{ required: true, message: "服务专业不能为空", trigger: "blur" },
|
||||
],
|
||||
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "服务名称不能为空", trigger: "blur" }],
|
||||
contact: [
|
||||
{ required: true, message: "联系人电话不能为空", trigger: "blur" },
|
||||
],
|
||||
appointmentRequiredFlag: [
|
||||
{ required: true, message: "预约要求不能为空", trigger: "blur" },
|
||||
],
|
||||
activeFlag: [
|
||||
{ required: true, message: "活动标识不能为空", trigger: "blur" },
|
||||
],
|
||||
chargeName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
description: [{ required: true, message: "描述不能为空", trigger: "blur" }],
|
||||
cwTypeCode: [
|
||||
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||
],
|
||||
ybType: [{ required: true, message: "医保类别不能为空", trigger: "blur" }],
|
||||
price: [{ required: true, message: "基础价格不能为空", trigger: "blur" }],
|
||||
practitionerId: undefined,
|
||||
supplierId: undefined,
|
||||
statusEnum: undefined, // 审批状态
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 挂号收费查询下拉树结构 */
|
||||
/** 采购入库查询下拉树结构 */
|
||||
function getPurchaseinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log(response, "response");
|
||||
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
|
||||
appointmentRequiredFlagOptions.value =
|
||||
response.data.appointmentRequiredFlagOptions; // 预约必填标记
|
||||
console.log(response, "response采购入库查询下拉树结构");
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
itemTypeOptions.value = response.data.itemTypeOptions; // 活动标记
|
||||
practitionerListOptions.value = response.data.practitionerListOptions; // 预约必填标记
|
||||
supplierListOptions.value = response.data.supplierListOptions; // 供应商列表
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 供应状态
|
||||
});
|
||||
}
|
||||
|
||||
@@ -357,24 +330,25 @@ function getLocationTree() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询挂号收费项目列表 */
|
||||
/** 查询采购入库项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// // queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
// console.log(queryParams.value, "queryParams.value");
|
||||
// getPurchaseinventoryList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
// console.log(res, "res");
|
||||
// purchaseinventoryList.value = res.data.records;
|
||||
// total.value = res.data.total;
|
||||
// console.log(total.value, "total.value");
|
||||
// });
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
// proxy.addDateRange(queryParams.value, dateRange.value)
|
||||
getPurchaseinventoryList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res");
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, "total.value");
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.applyTimeStart = dateRange.value[0];
|
||||
queryParams.value.applyTimeEnd = dateRange.value[1];
|
||||
queryParams.value.S_TIME = dateRange.value[0] + " 00:00:00";
|
||||
queryParams.value.E_TIME = dateRange.value[1] + " 23:59:59";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
@@ -442,67 +416,17 @@ function handleUpdate(row) {
|
||||
open.value = true;
|
||||
title.value = "编辑";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (form.value.id != undefined) {
|
||||
// 移除规则
|
||||
rules.value.chargeName = [];
|
||||
rules.value.description = [];
|
||||
rules.value.cwTypeCode = [];
|
||||
rules.value.ybType = [];
|
||||
rules.value.price = [];
|
||||
} else {
|
||||
// 恢复规则
|
||||
rules.value.cwTypeCode = [
|
||||
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.ybType = [
|
||||
{ required: true, message: "医保类别不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.price = [
|
||||
{ required: true, message: "基础价格不能为空", trigger: "blur" },
|
||||
];
|
||||
|
||||
rules.value.chargeName = [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.description = [
|
||||
{ required: true, message: "描述不能为空", trigger: "blur" },
|
||||
];
|
||||
}
|
||||
|
||||
// const nameData = name || chargeName;
|
||||
// 服务名称
|
||||
form.value.name = getName();
|
||||
// 收费名称
|
||||
form.value.chargeName = getName();
|
||||
proxy.$refs["purchaseinventoryRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
// 调用转换函数
|
||||
const transformFormEditParam = transformFormEditData(form);
|
||||
console.log(transformFormEditData, "transformFormEditData");
|
||||
console.log(form.value, "editPurchaseinventory", form.value.statusEnum);
|
||||
editPurchaseinventory(transformFormEditParam).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
reset();
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
// 调用转换函数
|
||||
const transformedData = transformFormData(form);
|
||||
console.log(transformedData, "transformedData");
|
||||
addPurchaseinventory(transformedData).then((response) => {
|
||||
reset();
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// /** 提交按钮 */
|
||||
// function submitForm() {
|
||||
// // // 调用转换函数
|
||||
// // const transformedData = transformFormData(form);
|
||||
// // console.log(transformedData, "transformedData");
|
||||
// // addPurchaseinventory(transformedData).then((response) => {
|
||||
// // proxy.$modal.msgSuccess("新增成功");
|
||||
// // open.value = false;
|
||||
// getList();
|
||||
// // });
|
||||
// }
|
||||
|
||||
// 获取完整地址字符串
|
||||
function getName() {
|
||||
|
||||
Reference in New Issue
Block a user