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