From 89c969167c264cbd05c70e5c2b06234fc9ccecfd Mon Sep 17 00:00:00 2001 From: duhe Date: Thu, 13 Mar 2025 18:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E5=93=81=E7=9B=AE=E5=BD=95=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=AD=A3=20pagesize=E9=BB=98=E8=AE=A410=20up?= =?UTF-8?q?=20by=20dh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/basicmanage/supplier/index.vue | 13 +- .../basicservices/registrationfee/index.vue | 2 +- .../src/views/catalog/device/index.vue | 6 +- .../catalog/diagnosisTreatment/index.vue | 6 +- .../src/views/catalog/disease/index.vue | 2 +- .../catalog/medicine/components/medicine.js | 21 + .../medicine/components/medicineDialog.vue | 979 +++++++++++------- .../src/views/catalog/medicine/index.vue | 513 +++++---- .../components/patientInfoDialog.vue | 2 +- .../charge/outpatientregistration/index.vue | 2 +- 10 files changed, 967 insertions(+), 579 deletions(-) diff --git a/openhis-ui-vue3/src/views/basicmanage/supplier/index.vue b/openhis-ui-vue3/src/views/basicmanage/supplier/index.vue index 87c27cb3..b418cda9 100644 --- a/openhis-ui-vue3/src/views/basicmanage/supplier/index.vue +++ b/openhis-ui-vue3/src/views/basicmanage/supplier/index.vue @@ -221,7 +221,7 @@ - + @@ -318,7 +318,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 供应商名称 busNo: undefined, // 编码 statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) @@ -327,8 +327,8 @@ const data = reactive({ rules: { busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], name: [{ required: true, message: "名称不能为空", trigger: "blur" }], - pyStr: [{ required: true, message: "拼音不能为空", trigger: "blur" }], - wbStr: [{ required: true, message: "五笔拼音不能为空", trigger: "blur" }], + // pyStr: [{ required: true, message: "拼音不能为空", trigger: "blur" }], + // wbStr: [{ required: true, message: "五笔拼音不能为空", trigger: "blur" }], typeEnum: [{ required: true, message: "类型不能为空", trigger: "blur" }], address: [{ required: true, message: "地址不能为空", trigger: "blur" }], phone: [{ required: true, message: "联系人电话不能为空", trigger: "blur" }], @@ -356,8 +356,9 @@ function getList() { console.log(queryParams.value, "queryParams.value"); getSupplierList(queryParams.value).then((res) => { loading.value = false; - console.log(res, "res"); + console.log(res, "res",res.data.records); supplierList.value = res.data.records; + console.log(supplierList.value, "supplierList.value"); total.value = res.data.total; console.log(total.value, "total.value"); }); diff --git a/openhis-ui-vue3/src/views/basicservices/registrationfee/index.vue b/openhis-ui-vue3/src/views/basicservices/registrationfee/index.vue index bec462f5..0a9fc2a3 100644 --- a/openhis-ui-vue3/src/views/basicservices/registrationfee/index.vue +++ b/openhis-ui-vue3/src/views/basicservices/registrationfee/index.vue @@ -479,7 +479,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 供应商名称 busNo: undefined, // 编码 statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) diff --git a/openhis-ui-vue3/src/views/catalog/device/index.vue b/openhis-ui-vue3/src/views/catalog/device/index.vue index 9f3df927..7148b113 100644 --- a/openhis-ui-vue3/src/views/catalog/device/index.vue +++ b/openhis-ui-vue3/src/views/catalog/device/index.vue @@ -385,11 +385,11 @@ :item="currentData" @submit="getList()" /> - + /> --> @@ -433,7 +433,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 typeEnum: undefined, // 类型(包括 1:中药,2:成药) statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) diff --git a/openhis-ui-vue3/src/views/catalog/diagnosisTreatment/index.vue b/openhis-ui-vue3/src/views/catalog/diagnosisTreatment/index.vue index f677ae1f..d8c30f0d 100644 --- a/openhis-ui-vue3/src/views/catalog/diagnosisTreatment/index.vue +++ b/openhis-ui-vue3/src/views/catalog/diagnosisTreatment/index.vue @@ -317,11 +317,11 @@ :item="currentData" @submit="getList()" /> - + /> --> @@ -365,7 +365,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 typeCode: undefined, // 类型(包括 1:中药,2:成药) statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) diff --git a/openhis-ui-vue3/src/views/catalog/disease/index.vue b/openhis-ui-vue3/src/views/catalog/disease/index.vue index 620044af..56787dbe 100644 --- a/openhis-ui-vue3/src/views/catalog/disease/index.vue +++ b/openhis-ui-vue3/src/views/catalog/disease/index.vue @@ -329,7 +329,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 疾病名称 statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) sourceEnum: undefined, // 来源(包括 1:病种目录分类,2:自定义) diff --git a/openhis-ui-vue3/src/views/catalog/medicine/components/medicine.js b/openhis-ui-vue3/src/views/catalog/medicine/components/medicine.js index c4a3cb0f..577c107e 100644 --- a/openhis-ui-vue3/src/views/catalog/medicine/components/medicine.js +++ b/openhis-ui-vue3/src/views/catalog/medicine/components/medicine.js @@ -51,3 +51,24 @@ export function getMedicationCategory() { method: 'get' }) } + + +// 停用病种目录 +export function stopMedication(ids) { + console.log(ids) + return request({ + url: '/datadictionary/medication/information-stop', + method: 'put', + data: ids + }) +} + +// 启用病种目录 +export function startMedication(ids) { + console.log(ids) + return request({ + url: '/datadictionary/medication/information-start', + method: 'put', + data: ids + }) +} \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/catalog/medicine/components/medicineDialog.vue b/openhis-ui-vue3/src/views/catalog/medicine/components/medicineDialog.vue index c57eaf5a..a26dce4d 100644 --- a/openhis-ui-vue3/src/views/catalog/medicine/components/medicineDialog.vue +++ b/openhis-ui-vue3/src/views/catalog/medicine/components/medicineDialog.vue @@ -1,7 +1,7 @@ @@ -486,6 +596,8 @@ import { addMedication, getMedicationCategory, getMedicationOne, + startMedication, + stopMedication, } from "./components/medicine"; import medicineDialog from "./components/medicineDialog"; import medicineViewDialog from "./components/medicineViewDialog"; @@ -502,25 +614,27 @@ const medicationList = ref([]); const open = ref(false); const loading = ref(true); const showSearch = ref(true); -const selectedData = ref([]); // 存储选择的行数据 +const ids = ref([]); // 存储选择的行数据 const single = ref(true); const multiple = ref(true); const total = ref(0); const title = ref(""); const medicationOptions = ref(undefined); +const statusFlagOptions = ref(undefined); +const domainEnumOptions = ref(undefined); // 使用 ref 定义当前药品数据 const currentData = ref({}); // 使用 ref 定义当前查看药品数据 const viewData = ref({}); -// const initPassword = ref(undefined); -// const postOptions = ref([]); -// const roleOptions = ref([]); + +// 使用 ref 定义当前查看药品数据 +const viewFlg = ref(false); const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否) @@ -549,7 +663,8 @@ const filterNode = (value, data) => { function getMedicationCategoryList() { getMedicationCategory().then((response) => { console.log(response, "response药品目录分类查询下拉树结构"); - medicationOptions.value = response.data; + medicationOptions.value = response.data.medicationOptions; + statusFlagOptions.value = response.data.statusFlagOptions; }); } /** 查询病种目录列表 */ @@ -575,16 +690,11 @@ function handleQuery() { /** 启用按钮操作 */ function handleStart() { - selectedData.value.forEach((item) => { - item.statusEnum = "2"; - }); - const data = selectedData.value; - // selectedData - console.log(data, "data"); + const startIds = ids.value; proxy.$modal .confirm("是否确定启用数据!") .then(function () { - return editMedication(data); + return startMedication(startIds); }) .then(() => { getList(); @@ -594,15 +704,12 @@ function handleStart() { } /** 停用按钮操作 */ function handleClose() { - selectedData.value.forEach((item) => { - item.statusEnum = "3"; - }); - const data = selectedData.value; + const stopIds = ids.value; console.log(data, "data"); proxy.$modal .confirm("是否确认停用数据!") .then(function () { - return editMedication(data); + return stopMedication(stopIds); }) .then(() => { getList(); @@ -623,8 +730,7 @@ function handleExport() { /** 选择条数 */ function handleSelectionChange(selection) { - console.log(selection, "selection"); - selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据 + ids.value = selection.map((item) => item.id); single.value = selection.length != 1; multiple.value = !selection.length; } @@ -660,6 +766,24 @@ function openAddMedicine() { /** 打开编辑弹窗 */ function openEditMedicine(row) { currentData.value = JSON.parse(JSON.stringify(row)); + currentData.value.activeFlag == 1 + ? (currentData.value.activeFlag = true) + : (currentData.value.activeFlag = false); //是否为活性 + currentData.value.ybMatchFlag == 1 + ? (currentData.value.ybMatchFlag = true) + : (currentData.value.ybMatchFlag = false); //医保是否对码 + currentData.value.skinTestFlag == 1 + ? (currentData.value.skinTestFlag = true) + : (currentData.value.skinTestFlag = false); //是否皮试 + currentData.value.injectFlag == 1 + ? (currentData.value.injectFlag = true) + : (currentData.value.injectFlag = false); //是否为注射药物 + currentData.value.restrictedFlag == 1 + ? (currentData.value.restrictedFlag = true) + : (currentData.value.restrictedFlag = false); //是否限制使用 + currentData.value.childrenFlag == 1 + ? (currentData.value.childrenFlag = true) + : (currentData.value.childrenFlag = false); //儿童用药标志 console.log(currentData.value, "currentData"); // 确保子组件已经接收到最新的 props nextTick(() => { @@ -679,22 +803,29 @@ function openViewMedicine(row) { getList(); }); } -/** 新增按钮操作 */ -function handleAdd() { - reset(); - open.value = true; - title.value = "新增"; -} -/** 修改按钮操作 */ -function handleUpdate(row) { - reset(); - console.log(row, "row"); - form.value = JSON.parse(JSON.stringify(row)); - open.value = true; - title.value = "病种编辑"; -} + /** 提交按钮 */ function submitForm(formData) { + formData.activeFlag == true + ? (formData.activeFlag = 1) + : (formData.activeFlag = 0); //是否为活性 + formData.ybMatchFlag == true + ? (formData.ybMatchFlag = 1) + : (formData.ybMatchFlag = 0); //医保是否对码 + formData.skinTestFlag == true + ? (formData.skinTestFlag = 1) + : (formData.skinTestFlag = 0); //是否皮试 + formData.injectFlag == true + ? (formData.injectFlag = 1) + : (formData.injectFlag = 0); //是否为注射药物 + formData.restrictedFlag == true + ? (formData.restrictedFlag = 1) + : (formData.restrictedFlag = 0); //是否限制使用 + formData.childrenFlag == true + ? (formData.childrenFlag = 1) + : (formData.childrenFlag = 0); //儿童用药标志 + formData.status == true ? (formData.status = 1) : (formData.status = 0); //启用状态 + if (formData.id != undefined) { // form.value.status // ? (form.value.statusEnum = "3") diff --git a/openhis-ui-vue3/src/views/charge/outpatientregistration/components/patientInfoDialog.vue b/openhis-ui-vue3/src/views/charge/outpatientregistration/components/patientInfoDialog.vue index 55827c8b..50afc903 100644 --- a/openhis-ui-vue3/src/views/charge/outpatientregistration/components/patientInfoDialog.vue +++ b/openhis-ui-vue3/src/views/charge/outpatientregistration/components/patientInfoDialog.vue @@ -90,7 +90,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 }, rules: {}, diff --git a/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue b/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue index 962940d9..921ce142 100644 --- a/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue +++ b/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue @@ -671,7 +671,7 @@ const data = reactive({ form: {}, queryParams: { pageNo: 1, - pageSize: 50, + pageSize: 10, // searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 // statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) // ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)